From d613ade4e740f9196fba4dcee4b5da2c50923681 Mon Sep 17 00:00:00 2001 From: Hakeem Kazeem Date: Fri, 18 Aug 2023 09:31:37 +0100 Subject: [PATCH 001/179] Concat for tensors with tests, Added i8 test helper, Added 3x3x3 Matrix to test helper , All conflicts resolved --- .vscode/extensions.json | 5 + docs/CHANGELOG.md | 13 + docs/SUMMARY.md | 1 + docs/framework/compatibility.md | 89 +-- docs/framework/operators/tensor/README.md | 1 + .../operators/tensor/tensor.concat.md | 54 ++ src/operators/tensor/core.cairo | 59 +- .../implementations/impl_tensor_fp.cairo | 7 + .../implementations/impl_tensor_i32.cairo | 8 +- .../implementations/impl_tensor_i8.cairo | 8 +- .../implementations/impl_tensor_u32.cairo | 7 +- src/operators/tensor/math.cairo | 1 + src/operators/tensor/math/concat.cairo | 6 + .../tensor/math/concat/concat_fp.cairo | 3 + .../tensor/math/concat/concat_fp/core.cairo | 40 + .../math/concat/concat_fp/fp16x16.cairo | 16 + .../tensor/math/concat/concat_fp/fp8x23.cairo | 17 + .../tensor/math/concat/concat_i32.cairo | 14 + .../tensor/math/concat/concat_i8.cairo | 15 + .../tensor/math/concat/concat_u32.cairo | 13 + .../tensor/math/concat/helpers.cairo | 139 ++++ src/tests/helpers/tensor.cairo | 1 + .../helpers/tensor/fixed_point/fp16x16.cairo | 84 ++ .../helpers/tensor/fixed_point/fp8x23.cairo | 85 +++ src/tests/helpers/tensor/i32.cairo | 84 ++ src/tests/helpers/tensor/i8.cairo | 415 ++++++++++ src/tests/helpers/tensor/u32.cairo | 42 + src/tests/operators/tensor/math.cairo | 32 + src/tests/tensor_core/concat.cairo | 4 + .../tensor_core/concat/concat_fp_test.cairo | 2 + .../concat_fp_test/concat_fp16x16_test.cairo | 717 ++++++++++++++++++ .../concat_fp_test/concat_fp8x23_test.cairo | 669 ++++++++++++++++ .../tensor_core/concat/concat_i32_test.cairo | 622 +++++++++++++++ .../tensor_core/concat/concat_i8_test.cairo | 622 +++++++++++++++ .../tensor_core/concat/concat_u32_test.cairo | 622 +++++++++++++++ 35 files changed, 4469 insertions(+), 48 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 docs/framework/operators/tensor/tensor.concat.md create mode 100644 src/operators/tensor/math/concat.cairo create mode 100644 src/operators/tensor/math/concat/concat_fp.cairo create mode 100644 src/operators/tensor/math/concat/concat_fp/core.cairo create mode 100644 src/operators/tensor/math/concat/concat_fp/fp16x16.cairo create mode 100644 src/operators/tensor/math/concat/concat_fp/fp8x23.cairo create mode 100644 src/operators/tensor/math/concat/concat_i32.cairo create mode 100644 src/operators/tensor/math/concat/concat_i8.cairo create mode 100644 src/operators/tensor/math/concat/concat_u32.cairo create mode 100644 src/operators/tensor/math/concat/helpers.cairo create mode 100644 src/tests/helpers/tensor/i8.cairo create mode 100644 src/tests/operators/tensor/math.cairo create mode 100644 src/tests/tensor_core/concat.cairo create mode 100644 src/tests/tensor_core/concat/concat_fp_test.cairo create mode 100644 src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo create mode 100644 src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo create mode 100644 src/tests/tensor_core/concat/concat_i32_test.cairo create mode 100644 src/tests/tensor_core/concat/concat_i8_test.cairo create mode 100644 src/tests/tensor_core/concat/concat_u32_test.cairo diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..3999f337f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "starkware.cairo1" + ] +} \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d88abd201..43d6f5e41 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,6 +11,19 @@ Use only LUTs for trigonometric functions. ## [Unreleased] - 2023-08-15 +### Added + +- Concat for tensors with tests +- Added i8 tensor helper for tests. + +## [Unreleased] - 2023-08-09 + +### Added + +- Onehot encoding for tensors with tests + +## [Unreleased] - 2023-08-15 + ### Added Add FixedType implementation of NNTrait. diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 61f4576a3..f95d5eb7f 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -75,6 +75,7 @@ * [tensor.or](framework/operators/tensor/tensor.or.md) * [tensor.xor](framework/operators/tensor/tensor.xor.md) * [tensor.onehot](framework/operators/tensor/tensor.onehot.md) + * [tensor.concat](framework/operators/tensor/tensor.concat.md) * [Neural Network](framework/operators/neural-network/README.md) * [nn.relu](framework/operators/neural-network/nn.relu.md) * [nn.leaky\_relu](framework/operators/neural-network/nn.leaky\_relu.md) diff --git a/docs/framework/compatibility.md b/docs/framework/compatibility.md index a5b693849..35d3b3acc 100644 --- a/docs/framework/compatibility.md +++ b/docs/framework/compatibility.md @@ -4,50 +4,51 @@ To see the full list of available ONNX Operators refer to [this table](https://g You can see below the list of current supported ONNX Operators: -| Operator | Implemented | -| :-------------------------------------------------------------: | :------------------: | -| [MatMul](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | -| [MatMulInteger](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | -| [Add](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Sub](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Mul](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Div](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Equal](operators/tensor/tensor.equal.md) | :white\_check\_mark: | -| [Greater](operators/tensor/tensor.greater.md) | :white\_check\_mark: | -| [GreaterOrEqual](operators/tensor/tensor.greater\_equal.md) | :white\_check\_mark: | -| [Less](operators/tensor/tensor.less.md) | :white\_check\_mark: | -| [LessOrEqual](operators/tensor/tensor.less\_equal.md) | :white\_check\_mark: | -| [Abs](operators/tensor/tensor.abs.md) | :white\_check\_mark: | -| [Ceil](operators/tensor/tensor.ceil.md) | :white\_check\_mark: | -| [Exp](operators/tensor/tensor.exp.md) | :white\_check\_mark: | -| [Ln](operators/tensor/tensor.log.md) | :white\_check\_mark: | -| [Reshape](operators/tensor/tensor.reshape.md) | :white\_check\_mark: | -| [Transpose](operators/tensor/tensor.transpose.md) | :white\_check\_mark: | -| [ArgMax](operators/tensor/tensor.argmax.md) | :white\_check\_mark: | -| [ArgMin](operators/tensor/tensor.argmin.md) | :white\_check\_mark: | -| [ReduceSum](operators/tensor/tensor.reduce\_sum.md) | :white\_check\_mark: | -| [CumSum](operators/tensor/tensor.cumsum.md) | :white\_check\_mark: | -| [Cos](operators/tensor/tensor.cos.md) | :white\_check\_mark: | -| [Sin](operators/tensor/tensor.sin.md) | :white\_check\_mark: | -| [Asin](operators/tensor/tensor.asin.md) | :white\_check\_mark: | -| [Flatten](operators/tensor/tensor.flatten.md) | :white\_check\_mark: | -| [Relu](operators/neural-network/nn.relu.md) | :white\_check\_mark: | -| [LeakyRelu](operators/neural-network/nn.leaky\_relu.md) | :white\_check\_mark: | -| [Sigmoid](operators/neural-network/nn.sigmoid.md) | :white\_check\_mark: | -| [Softmax](operators/neural-network/nn.softmax.md) | :white\_check\_mark: | -| [LogSoftmax](operators/neural-network/nn.logsoftmax.md) | :white\_check\_mark: | -| [Softsign](operators/neural-network/nn.softsign.md) | :white\_check\_mark: | -| [Softplus](operators/neural-network/nn.softplus.md) | :white\_check\_mark: | -| [Linear](operators/neural-network/nn.linear.md) | :white\_check\_mark: | -| [Sinh](operators/tensor/tensor.sinh.md) | :white\_check\_mark: | -| [Asinh](operators/tensor/tensor.asinh.md) | :white\_check\_mark: | -| [Cosh](operators/tensor/tensor.cosh.md) | :white\_check\_mark: | -| [ACosh](operators/tensor/tensor.acosh.md) | :white\_check\_mark: | -| [Tanh](operators/tensor/tensor.tanh.md) | :white\_check\_mark: | -| [Acos](operators/tensor/tensor.acos.md) | :white\_check\_mark: | +| Operator | Implemented | +| :-----------------------------------------------------------: | :------------------: | +| [MatMul](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | +| [MatMulInteger](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | +| [Add](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Sub](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Mul](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Div](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Equal](operators/tensor/tensor.eq.md) | :white\_check\_mark: | +| [Greater](operators/tensor/tensor.greater.md) | :white\_check\_mark: | +| [GreaterOrEqual](operators/tensor/tensor.greater\_equal.md) | :white\_check\_mark: | +| [Less](operators/tensor/tensor.less.md) | :white\_check\_mark: | +| [LessOrEqual](operators/tensor/tensor.less\_equal.md) | :white\_check\_mark: | +| [Abs](operators/tensor/tensor.abs.md) | :white\_check\_mark: | +| [Ceil](operators/tensor/tensor.ceil.md) | :white\_check\_mark: | +| [Exp](operators/tensor/tensor.exp.md) | :white\_check\_mark: | +| [Ln](operators/tensor/tensor.ln.md) | :white\_check\_mark: | +| [Reshape](operators/tensor/tensor.reshape.md) | :white\_check\_mark: | +| [Transpose](operators/tensor/tensor.transpose.md) | :white\_check\_mark: | +| [ArgMax](operators/tensor/tensor.argmax.md) | :white\_check\_mark: | +| [ArgMin](operators/tensor/tensor.argmin.md) | :white\_check\_mark: | +| [ReduceSum](operators/tensor/tensor.reduce\_sum.md) | :white\_check\_mark: | +| [CumSum](operators/tensor/tensor.cumsum.md) | :white\_check\_mark: | +| [Cos](operators/tensor/tensor.cos.md) | :white\_check\_mark: | +| [Sin](operators/tensor/tensor.sin.md) | :white\_check\_mark: | +| [Asin](operators/tensor/tensor.asin.md) | :white\_check\_mark: | +| [Flatten](operators/tensor/tensor.flatten.md) | :white\_check\_mark: | +| [Relu](operators/neural-network/nn.relu.md) | :white\_check\_mark: | +| [LeakyRelu](operators/neural-network/nn.leaky\_relu.md) | :white\_check\_mark: | +| [Sigmoid](operators/neural-network/nn.sigmoid.md) | :white\_check\_mark: | +| [Softmax](operators/neural-network/nn.softmax.md) | :white\_check\_mark: | +| [LogSoftmax](operators/neural-network/nn.logsoftmax.md) | :white\_check\_mark: | +| [Softsign](operators/neural-network/nn.softsign.md) | :white\_check\_mark: | +| [Softplus](operators/neural-network/nn.softplus.md) | :white\_check\_mark: | +| [Linear](operators/neural-network/nn.linear.md) | :white\_check\_mark: | +| [Sinh](operators/tensor/tensor.sinh.md) | :white\_check\_mark: | +| [Asinh](operators/tensor/tensor.asinh.md) | :white\_check\_mark: | +| [Cosh](operators/tensor/tensor.cosh.md) | :white\_check\_mark: | +| [ACosh](operators/tensor/tensor.acosh.md) | :white\_check\_mark: | +| [Tanh](operators/tensor/tensor.tanh.md) | :white\_check\_mark: | +| [Acos](operators/tensor/tensor.acos.md) | :white\_check\_mark: | | [Sqrt](operators/tensor/tensor.sqrt.md) | :white\_check\_mark: | -| [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | -| [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | +| [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | +| [Concat](operators/tensor/tensor.concat.md) | :white\_check\_mark: | +| [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | | [DequantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | @@ -57,4 +58,4 @@ Performance optimizations: | :----------------: | :------------------: | | 8-bit quantization | :white\_check\_mark: | -Current Operators support: **42/156 (27%)** \ No newline at end of file +Current Operators support: **43/156 (27%)** \ No newline at end of file diff --git a/docs/framework/operators/tensor/README.md b/docs/framework/operators/tensor/README.md index b8ac7064e..4dda82a6a 100644 --- a/docs/framework/operators/tensor/README.md +++ b/docs/framework/operators/tensor/README.md @@ -76,6 +76,7 @@ use orion::operators::tensor::core::TensorTrait; | [`tensor.log`](tensor.log.md) | Computes the natural log of all elements of the input tensor. | | [`tensor.abs`](tensor.abs.md) | Computes the absolute value of all elements in the input tensor. | | [`tensor.ceil`](tensor.ceil.md) | Rounds up the value of each element in the input tensor. | +| [`tensor.concat`](tensor.concat.md) | Concatenate a list of tensors into a single tensor. | | [`tensor.sqrt`](tensor.sqrt.md) | Computes the square root of all elements of the input tensor. | | [`tensor.sin`](tensor.sin.md) | Computes the sine of all elements of the input tensor. | | [`tensor.cos`](tensor.cos.md) | Computes the cosine of all elements of the input tensor. | diff --git a/docs/framework/operators/tensor/tensor.concat.md b/docs/framework/operators/tensor/tensor.concat.md new file mode 100644 index 000000000..b39900fb3 --- /dev/null +++ b/docs/framework/operators/tensor/tensor.concat.md @@ -0,0 +1,54 @@ +# tensor.concat + +```rust + fn concat(tensors: Span>, axis: usize, ) -> Tensor; +``` + +Concatenate a list of tensors into a single tensor.. + +## Args + +* `tensors`(` Span>,`) - Array of the input tensors. +* `axis`(`usize`) - Axis to concat on. + +## Panics + +* Panics if lenght of tensors is not equal greater than 1. +* Panics if dimension is not greater than axis + +## Returns + +A new `Tensor` concatenated tensor of the input tensors. + +## Example + +```rust +fn concat_example() -> Tensor { + let tensor1 = u32_tensor_2x2_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + axis = 0 + let result = TensorTrait::concat(tensors: data.span(), axis: axis); + return result; +} +>>> [[0. 1.] + [2. 3.], + [0. 1.] + [2. 3.]] + + result.shape +>>> (4, 2) + + axis = 1 + let result = TensorTrait::concat(tensors: data.span(), axis: axis); + return result; +} +>>> [[0. 1., 0., 1.] + [2. 3., 2., 3.]] + + result.shape +>>> (2, 4 ) +``` diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 9b6cb760a..9748bbe6b 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -75,6 +75,7 @@ impl TensorSerde, impl TDrop: Drop> of Serde { /// # tensor.new @@ -2385,7 +2386,63 @@ trait TensorTrait { /// // [0,1,1.4142...] /// ``` /// - fn sqrt(self: @Tensor) -> Tensor; + fn sqrt(self: @Tensor) -> Tensor; + /// # tensor.concat + /// + /// ```rust + /// fn concat(tensors: Span>, axis: usize, ) -> Tensor; + /// ``` + /// + /// Concatenate a list of tensors into a single tensor.. + /// + /// ## Args + /// + /// * `tensors`(` Span>,`) - Array of the input tensors. + /// * `axis`(`usize`) - Axis to concat on. + /// + /// ## Panics + /// + /// * Panics if lenght of tensors is not equal greater than 1. + /// * Panics if dimension is not greater than axis + /// + /// ## Returns + /// + /// A new `Tensor` concatenated tensor of the input tensors. + /// + /// ## Example + /// + /// ```rust + /// fn concat_example() -> Tensor { + /// let tensor1 = u32_tensor_2x2_helper(); + /// let tensor2 = u32_tensor_2x2_helper(); + /// + /// let mut data = ArrayTrait::new(); + /// data.append(tensor1); + /// data.append(tensor2); + /// axis = 0 + /// let result = TensorTrait::concat(tensors: data.span(), axis: axis); + /// return result; + /// } + /// >>> [[0. 1.] + /// [2. 3.], + /// [0. 1.] + /// [2. 3.]] + /// + /// result.shape + /// >>> (4, 2) + /// + /// axis = 1 + /// let result = TensorTrait::concat(tensors: data.span(), axis: axis); + /// return result; + /// } + /// >>> [[0. 1., 0., 1.] + /// [2. 3., 2., 3.]] + /// + /// result.shape + /// >>> (2, 4 ) + /// ``` + /// + fn concat(tensors: Span>, axis: usize, ) -> Tensor; } diff --git a/src/operators/tensor/implementations/impl_tensor_fp.cairo b/src/operators/tensor/implementations/impl_tensor_fp.cairo index 1e9b70f06..09d4aeb96 100644 --- a/src/operators/tensor/implementations/impl_tensor_fp.cairo +++ b/src/operators/tensor/implementations/impl_tensor_fp.cairo @@ -43,6 +43,8 @@ use orion::operators::tensor::math::or::or_fp::core::or; use orion::operators::tensor::math::acos::acos_fp::core::acos; use orion::operators::tensor::math::onehot::onehot_fp::core::onehot; use orion::operators::tensor::math::sqrt::sqrt_fp::core::sqrt; +use orion::operators::tensor::math::concat::concat_fp::core::concat; + impl Tensor_fp of TensorTrait { fn new( @@ -211,7 +213,12 @@ impl Tensor_fp of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt(self).unwrap() + } + + fn concat( tensors: Span>, axis: usize, ) -> Tensor { + concat(tensors, axis).unwrap() } + } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_i32.cairo b/src/operators/tensor/implementations/impl_tensor_i32.cairo index 19bc70c89..004701904 100644 --- a/src/operators/tensor/implementations/impl_tensor_i32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i32.cairo @@ -41,6 +41,8 @@ use orion::operators::tensor::math::xor::xor_i32::xor; use orion::operators::tensor::math::or::or_i32::or; use orion::operators::tensor::math::onehot::onehot_i32::onehot; use orion::operators::tensor::math::sqrt::sqrt_i32::core::sqrt_i32; +use orion::operators::tensor::math::concat::concat_i32::concat_i32; + impl Tensor_i32 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -202,7 +204,11 @@ impl Tensor_i32 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_i32(self).unwrap() - } + } + + fn concat( tensors: Span>, axis: usize, ) -> Tensor { + concat_i32(tensors, axis) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_i8.cairo b/src/operators/tensor/implementations/impl_tensor_i8.cairo index b1af718c5..ee7b8a573 100644 --- a/src/operators/tensor/implementations/impl_tensor_i8.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i8.cairo @@ -44,6 +44,8 @@ use orion::operators::tensor::math::xor::xor_i8::xor; use orion::operators::tensor::math::or::or_i8::or; use orion::operators::tensor::math::onehot::onehot_i8::onehot; use orion::operators::tensor::math::sqrt::sqrt_i8::core::sqrt_i8; +use orion::operators::tensor::math::concat::concat_i8::concat_i8; + impl Tensor_i8 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -203,7 +205,11 @@ impl Tensor_i8 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_i8(self).unwrap() - } + } + + fn concat( tensors: Span>, axis: usize, ) -> Tensor { + concat_i8(tensors, axis) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_u32.cairo b/src/operators/tensor/implementations/impl_tensor_u32.cairo index a9b02a544..5dcbe14c0 100644 --- a/src/operators/tensor/implementations/impl_tensor_u32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_u32.cairo @@ -40,6 +40,7 @@ use orion::operators::tensor::math::xor::xor_u32::xor; use orion::operators::tensor::math::or::or_u32::or; use orion::operators::tensor::math::onehot::onehot_u32::onehot; use orion::operators::tensor::math::sqrt::sqrt_u32::core::sqrt_u32; +use orion::operators::tensor::math::concat::concat_u32::concat_u32; impl Tensor_u32 of TensorTrait { @@ -202,7 +203,11 @@ impl Tensor_u32 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_u32(self).unwrap() - } + } + + fn concat( tensors: Span>, axis: usize, ) -> Tensor { + concat_u32(tensors, axis) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 4d3e4ccda..428c00880 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -29,3 +29,4 @@ mod or; mod acos; mod onehot; mod sqrt; +mod concat; diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo new file mode 100644 index 000000000..cd8b81c5c --- /dev/null +++ b/src/operators/tensor/math/concat.cairo @@ -0,0 +1,6 @@ +mod concat_i8; +mod concat_i32; +mod concat_u32; +mod concat_fp; +mod helpers; + diff --git a/src/operators/tensor/math/concat/concat_fp.cairo b/src/operators/tensor/math/concat/concat_fp.cairo new file mode 100644 index 000000000..50d44d68c --- /dev/null +++ b/src/operators/tensor/math/concat/concat_fp.cairo @@ -0,0 +1,3 @@ +mod core; +mod fp8x23; +mod fp16x16; diff --git a/src/operators/tensor/math/concat/concat_fp/core.cairo b/src/operators/tensor/math/concat/concat_fp/core.cairo new file mode 100644 index 000000000..48648af2c --- /dev/null +++ b/src/operators/tensor/math/concat/concat_fp/core.cairo @@ -0,0 +1,40 @@ +use core::option::OptionTrait; +use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; +use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::math::concat::concat_fp::fp8x23; +use orion::operators::tensor::math::concat::concat_fp::fp16x16; +use core::traits::Into; +use debug::PrintTrait; +use core::traits::TryInto; +use core::serde::Serde; +use core::traits::Destruct; +use core::clone::Clone; +use array::{ArrayTrait, SpanTrait}; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; +use orion::operators::tensor::helpers::replace_index; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +/// Cf: TensorTrait::concat docstring +fn concat( + mut tensors: Span>, axis: usize, +) -> Option> { + assert(tensors.len() >= 2, 'Wrong values dimensions'); + + let mut first = *tensors.at(0); + + match first.extra { + Option::Some(extra_params) => match extra_params.fixed_point { + Option::Some(fixed_point) => match fixed_point { + FixedImpl::FP8x23(()) => Option::Some( + fp8x23::concat(tensors, axis) + ), + FixedImpl::FP16x16(()) => Option::Some( + fp16x16::concat(tensors, axis) + ), + }, + Option::None(_) => Option::Some(fp16x16::concat(tensors, axis)), + }, + Option::None(_) => Option::Some(fp16x16::concat(tensors, axis)), + } +} diff --git a/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo b/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo new file mode 100644 index 000000000..fe56460e0 --- /dev/null +++ b/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo @@ -0,0 +1,16 @@ +use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::implementations::impl_16x16::{ + FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq +}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::math::concat::helpers::{concat_helper}; + + +/// Cf: TensorTrait::cumsum docstring +fn concat( + tensors: Span>, axis: usize, +) -> Tensor { + + concat_helper(tensors, axis) +} diff --git a/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo b/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo new file mode 100644 index 000000000..c817ca016 --- /dev/null +++ b/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo @@ -0,0 +1,17 @@ +use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::implementations::impl_8x23::{ + FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23AddEq +}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::math::concat::helpers::{ concat_helper}; + + +/// Cf: TensorTrait::cumsum docstring +/// Cf: TensorTrait::cumsum docstring +fn concat( + tensors: Span>, axis: usize, +) -> Tensor { + + concat_helper(tensors, axis) +} diff --git a/src/operators/tensor/math/concat/concat_i32.cairo b/src/operators/tensor/math/concat/concat_i32.cairo new file mode 100644 index 000000000..abf1c8583 --- /dev/null +++ b/src/operators/tensor/math/concat/concat_i32.cairo @@ -0,0 +1,14 @@ +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::math::concat::helpers::{ concat_helper}; + + +/// Cf: TensorTrait::cumsum docstring +/// Cf: TensorTrait::cumsum docstring +fn concat_i32( + tensors: Span>, axis: usize, +) -> Tensor { + + concat_helper(tensors, axis) +} diff --git a/src/operators/tensor/math/concat/concat_i8.cairo b/src/operators/tensor/math/concat/concat_i8.cairo new file mode 100644 index 000000000..bf2e20330 --- /dev/null +++ b/src/operators/tensor/math/concat/concat_i8.cairo @@ -0,0 +1,15 @@ +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::core::Tensor; + +use orion::operators::tensor::math::concat::helpers::{ concat_helper}; + + +/// Cf: TensorTrait::cumsum docstring +/// Cf: TensorTrait::cumsum docstring +fn concat_i8( + tensors: Span>, axis: usize, +) -> Tensor { + + concat_helper(tensors, axis) +} \ No newline at end of file diff --git a/src/operators/tensor/math/concat/concat_u32.cairo b/src/operators/tensor/math/concat/concat_u32.cairo new file mode 100644 index 000000000..ea955d41c --- /dev/null +++ b/src/operators/tensor/math/concat/concat_u32.cairo @@ -0,0 +1,13 @@ +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; +use orion::operators::tensor::math::concat::helpers::{concat_helper}; + + +/// Cf: TensorTrait::cumsum docstring +fn concat_u32( + tensors: Span>, axis: usize, +) -> Tensor { + + concat_helper(tensors, axis) +} \ No newline at end of file diff --git a/src/operators/tensor/math/concat/helpers.cairo b/src/operators/tensor/math/concat/helpers.cairo new file mode 100644 index 000000000..1ecc9483c --- /dev/null +++ b/src/operators/tensor/math/concat/helpers.cairo @@ -0,0 +1,139 @@ +use core::clone::Clone; +use array::{ArrayTrait, SpanTrait}; +use option::OptionTrait; +use debug::PrintTrait; +use core::traits::Into; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; +use orion::operators::tensor::helpers::replace_index; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + +/// Cf: TensorTrait::concat_helper docstring +fn concat_helper< + T, + impl TTensorTrait: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop, + +>( + mut tensors: Span>, axis: usize, +) -> Tensor { + assert(tensors.len() >= 2, 'Input tensors must be > 1'); + let base_tensor = *tensors.at(0); + + let base_shape = base_tensor.shape; + let dimension = base_shape.len(); + assert(dimension > axis, 'Out of bounds for dimension'); + + let tensor_len = tensors.len(); + let mut output_data = ArrayTrait::::new(); + let mut output_size = ArrayTrait::::new(); + let extra = Option::::None(()); + + let mut axis_index_shape: usize = 0; + + let mut shape_index: usize = 0; + loop { + if (shape_index == tensor_len){ + break(); + }; + let current_shape_ind = 0; + let index_shape = *tensors.at(shape_index).shape; + assert(dimension == index_shape.len(), 'Dimension not the same'); + + let mut base_index: usize = 0; + let mut max_break: usize = 1; + + loop { + if (base_index == dimension){ + break(); + }; + if (base_index == axis){ + assert(max_break == 1, 'More than 1 axis not same'); + axis_index_shape += *index_shape.at(base_index); + max_break -=1; + } else { + assert(base_shape.at(base_index) == index_shape.at(base_index), 'Shape is not the same') + } + base_index +=1; + }; + + shape_index += 1; + }; + + // output size of data + let mut index = 0; + loop { + if (index == dimension){ + break(); + }; + let val = *base_shape.at(index); + if (index == axis){ + output_size.append(axis_index_shape) + } + else { + output_size.append(val) + } + index +=1; + }; + + // Concatenation loop + let mut total_loop = 1; + if (axis == 0_u32){ + total_loop == 1; + } + else { + let mut total_loop_index: usize = 0; + loop { + if (total_loop_index == axis){ + break(); + }; + total_loop *= *base_shape.at(total_loop_index); + + total_loop_index += 1; + }; + + } + + // Loop through dimension + let mut outer_loop_index: usize = 0; + loop { + if (outer_loop_index == total_loop.into()) { + break(); + }; + + // Loop through each tensor + let mut tensor_index: usize = 0; + loop { + if (tensor_index == tensor_len){ + break(); + } + + let active_tensor = *tensors.at(tensor_index); + let total_active_tensor = active_tensor.data.len(); + + let mut inner_index: usize = 0; + let count = total_active_tensor / total_loop; + loop { + if (inner_index == count){ + break(); + } + + output_data.append(*active_tensor.data.at(count*outer_loop_index + inner_index)); + + inner_index += 1; + }; + + tensor_index += 1; + }; + + outer_loop_index += 1; + }; + + let mut output_tensor = TensorTrait::::new(output_size.span(), output_data.span(), extra); + + output_tensor +} + + diff --git a/src/tests/helpers/tensor.cairo b/src/tests/helpers/tensor.cairo index c1cfb1deb..a87d2ad1b 100644 --- a/src/tests/helpers/tensor.cairo +++ b/src/tests/helpers/tensor.cairo @@ -1,3 +1,4 @@ mod fixed_point; mod i32; +mod i8; mod u32; diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index 9b52b162f..b6cd6a1d6 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -333,3 +333,87 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { return tensor; } + +fn fp_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + data.append(FixedTrait::new_unscaled(6, false)); + data.append(FixedTrait::new_unscaled(7, false)); + data.append(FixedTrait::new_unscaled(8, false)); + data.append(FixedTrait::new_unscaled(9, false)); + data.append(FixedTrait::new_unscaled(10, false)); + data.append(FixedTrait::new_unscaled(11, false)); + data.append(FixedTrait::new_unscaled(12, false)); + data.append(FixedTrait::new_unscaled(13, false)); + data.append(FixedTrait::new_unscaled(14, false)); + data.append(FixedTrait::new_unscaled(15, false)); + data.append(FixedTrait::new_unscaled(16, false)); + data.append(FixedTrait::new_unscaled(17, false)); + data.append(FixedTrait::new_unscaled(18, false)); + data.append(FixedTrait::new_unscaled(19, false)); + data.append(FixedTrait::new_unscaled(20, false)); + data.append(FixedTrait::new_unscaled(21, false)); + data.append(FixedTrait::new_unscaled(22, false)); + data.append(FixedTrait::new_unscaled(23, false)); + data.append(FixedTrait::new_unscaled(24, false)); + data.append(FixedTrait::new_unscaled(25, false)); + data.append(FixedTrait::new_unscaled(26, false)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + + fn fp_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, true)); + data.append(FixedTrait::new_unscaled(2, true)); + data.append(FixedTrait::new_unscaled(3, true)); + data.append(FixedTrait::new_unscaled(4, true)); + data.append(FixedTrait::new_unscaled(5, true)); + data.append(FixedTrait::new_unscaled(6, true)); + data.append(FixedTrait::new_unscaled(7, true)); + data.append(FixedTrait::new_unscaled(8, true)); + data.append(FixedTrait::new_unscaled(9, true)); + data.append(FixedTrait::new_unscaled(10, true)); + data.append(FixedTrait::new_unscaled(11, true)); + data.append(FixedTrait::new_unscaled(12, true)); + data.append(FixedTrait::new_unscaled(13, true)); + data.append(FixedTrait::new_unscaled(14, true)); + data.append(FixedTrait::new_unscaled(15, true)); + data.append(FixedTrait::new_unscaled(16, true)); + data.append(FixedTrait::new_unscaled(17, true)); + data.append(FixedTrait::new_unscaled(18, true)); + data.append(FixedTrait::new_unscaled(19, true)); + data.append(FixedTrait::new_unscaled(20, true)); + data.append(FixedTrait::new_unscaled(21, true)); + data.append(FixedTrait::new_unscaled(22, true)); + data.append(FixedTrait::new_unscaled(23, true)); + data.append(FixedTrait::new_unscaled(24, true)); + data.append(FixedTrait::new_unscaled(25, true)); + data.append(FixedTrait::new_unscaled(26, true)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } \ No newline at end of file diff --git a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo index db4440f6b..5f5c3fddd 100644 --- a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo @@ -334,3 +334,88 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { return tensor; } + +fn fp_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + data.append(FixedTrait::new_unscaled(6, false)); + data.append(FixedTrait::new_unscaled(7, false)); + data.append(FixedTrait::new_unscaled(8, false)); + data.append(FixedTrait::new_unscaled(9, false)); + data.append(FixedTrait::new_unscaled(10, false)); + data.append(FixedTrait::new_unscaled(11, false)); + data.append(FixedTrait::new_unscaled(12, false)); + data.append(FixedTrait::new_unscaled(13, false)); + data.append(FixedTrait::new_unscaled(14, false)); + data.append(FixedTrait::new_unscaled(15, false)); + data.append(FixedTrait::new_unscaled(16, false)); + data.append(FixedTrait::new_unscaled(17, false)); + data.append(FixedTrait::new_unscaled(18, false)); + data.append(FixedTrait::new_unscaled(19, false)); + data.append(FixedTrait::new_unscaled(20, false)); + data.append(FixedTrait::new_unscaled(21, false)); + data.append(FixedTrait::new_unscaled(22, false)); + data.append(FixedTrait::new_unscaled(23, false)); + data.append(FixedTrait::new_unscaled(24, false)); + data.append(FixedTrait::new_unscaled(25, false)); + data.append(FixedTrait::new_unscaled(26, false)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + + fn fp_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, true)); + data.append(FixedTrait::new_unscaled(2, true)); + data.append(FixedTrait::new_unscaled(3, true)); + data.append(FixedTrait::new_unscaled(4, true)); + data.append(FixedTrait::new_unscaled(5, true)); + data.append(FixedTrait::new_unscaled(6, true)); + data.append(FixedTrait::new_unscaled(7, true)); + data.append(FixedTrait::new_unscaled(8, true)); + data.append(FixedTrait::new_unscaled(9, true)); + data.append(FixedTrait::new_unscaled(10, true)); + data.append(FixedTrait::new_unscaled(11, true)); + data.append(FixedTrait::new_unscaled(12, true)); + data.append(FixedTrait::new_unscaled(13, true)); + data.append(FixedTrait::new_unscaled(14, true)); + data.append(FixedTrait::new_unscaled(15, true)); + data.append(FixedTrait::new_unscaled(16, true)); + data.append(FixedTrait::new_unscaled(17, true)); + data.append(FixedTrait::new_unscaled(18, true)); + data.append(FixedTrait::new_unscaled(19, true)); + data.append(FixedTrait::new_unscaled(20, true)); + data.append(FixedTrait::new_unscaled(21, true)); + data.append(FixedTrait::new_unscaled(22, true)); + data.append(FixedTrait::new_unscaled(23, true)); + data.append(FixedTrait::new_unscaled(24, true)); + data.append(FixedTrait::new_unscaled(25, true)); + data.append(FixedTrait::new_unscaled(26, true)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + diff --git a/src/tests/helpers/tensor/i32.cairo b/src/tests/helpers/tensor/i32.cairo index 4f29cbf4f..e08141319 100644 --- a/src/tests/helpers/tensor/i32.cairo +++ b/src/tests/helpers/tensor/i32.cairo @@ -334,3 +334,87 @@ fn i32_tensor_3x2x2_neg_helper() -> Tensor { return tensor; } + +fn i32_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 {mag: 0, sign:false}); + data.append(i32 {mag: 1, sign:false}); + data.append(i32 {mag: 2, sign:false}); + data.append(i32 {mag: 3, sign:false}); + data.append(i32 {mag: 4, sign:false}); + data.append(i32 {mag: 5, sign:false}); + data.append(i32 {mag: 6, sign:false}); + data.append(i32 {mag: 7, sign:false}); + data.append(i32 {mag: 8, sign:false}); + data.append(i32 {mag: 9, sign:false}); + data.append(i32 {mag: 10, sign: false}); + data.append(i32 {mag: 11, sign: false}); + data.append(i32 {mag: 12, sign: false}); + data.append(i32 {mag: 13, sign: false}); + data.append(i32 {mag: 14, sign: false}); + data.append(i32 {mag: 15, sign: false}); + data.append(i32 {mag: 16, sign: false}); + data.append(i32 {mag: 17, sign: false}); + data.append(i32 {mag: 18, sign: false}); + data.append(i32 {mag: 19, sign: false}); + data.append(i32 {mag: 20, sign: false}); + data.append(i32 {mag: 21, sign: false}); + data.append(i32 {mag: 22, sign: false}); + data.append(i32 {mag: 23, sign: false}); + data.append(i32 {mag: 24, sign: false}); + data.append(i32 {mag: 25, sign: false}); + data.append(i32 {mag: 26, sign: false}); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + + fn i32_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 {mag: 0, sign: false}); + data.append(i32 {mag: 1, sign: true}); + data.append(i32 {mag: 2, sign: true}); + data.append(i32 {mag: 3, sign: true}); + data.append(i32 {mag: 4, sign: true}); + data.append(i32 {mag: 5, sign: true}); + data.append(i32 {mag: 6, sign: true}); + data.append(i32 {mag: 7, sign: true}); + data.append(i32 {mag: 8, sign: true}); + data.append(i32 {mag: 9, sign: true}); + data.append(i32 {mag: 10, sign: true}); + data.append(i32 {mag: 11, sign: true}); + data.append(i32 {mag: 12, sign: true}); + data.append(i32 {mag: 13, sign: true}); + data.append(i32 {mag: 14, sign: true}); + data.append(i32 {mag: 15, sign: true}); + data.append(i32 {mag: 16, sign: true}); + data.append(i32 {mag: 17, sign: true}); + data.append(i32 {mag: 18, sign: true}); + data.append(i32 {mag: 19, sign: true}); + data.append(i32 {mag: 20, sign: true}); + data.append(i32 {mag: 21, sign: true}); + data.append(i32 {mag: 22, sign: true}); + data.append(i32 {mag: 23, sign: true}); + data.append(i32 {mag: 24, sign: true}); + data.append(i32 {mag: 25, sign: true}); + data.append(i32 {mag: 26, sign: true}); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } diff --git a/src/tests/helpers/tensor/i8.cairo b/src/tests/helpers/tensor/i8.cairo new file mode 100644 index 000000000..f62419523 --- /dev/null +++ b/src/tests/helpers/tensor/i8.cairo @@ -0,0 +1,415 @@ +use array::ArrayTrait; +use array::SpanTrait; + + +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + + +// 1D +fn i8_tensor_1x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + let extra = Option::::None(()); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + return tensor; +} + +fn i8_tensor_1x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + let extra = Option::::None(()); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + return tensor; +} + +// 2D + +fn i8_tensor_2x2_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_2x2_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 8, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 8, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x2_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x2_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x1_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_2x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_2x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +// 3D + +fn i8_tensor_2x2x2_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 7, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_2x2x2_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(2); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 7, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x2x2_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 11, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x2x2_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 11, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + +fn i8_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 {mag: 0, sign:false}); + data.append(i8 {mag: 1, sign:false}); + data.append(i8 {mag: 2, sign:false}); + data.append(i8 {mag: 3, sign:false}); + data.append(i8 {mag: 4, sign:false}); + data.append(i8 {mag: 5, sign:false}); + data.append(i8 {mag: 6, sign:false}); + data.append(i8 {mag: 7, sign:false}); + data.append(i8 {mag: 8, sign:false}); + data.append(i8 {mag: 9, sign:false}); + data.append(i8 {mag: 10, sign: false}); + data.append(i8 {mag: 11, sign: false}); + data.append(i8 {mag: 12, sign: false}); + data.append(i8 {mag: 13, sign: false}); + data.append(i8 {mag: 14, sign: false}); + data.append(i8 {mag: 15, sign: false}); + data.append(i8 {mag: 16, sign: false}); + data.append(i8 {mag: 17, sign: false}); + data.append(i8 {mag: 18, sign: false}); + data.append(i8 {mag: 19, sign: false}); + data.append(i8 {mag: 20, sign: false}); + data.append(i8 {mag: 21, sign: false}); + data.append(i8 {mag: 22, sign: false}); + data.append(i8 {mag: 23, sign: false}); + data.append(i8 {mag: 24, sign: false}); + data.append(i8 {mag: 25, sign: false}); + data.append(i8 {mag: 26, sign: false}); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + + fn i8_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 {mag: 0, sign: false}); + data.append(i8 {mag: 1, sign: true}); + data.append(i8 {mag: 2, sign: true}); + data.append(i8 {mag: 3, sign: true}); + data.append(i8 {mag: 4, sign: true}); + data.append(i8 {mag: 5, sign: true}); + data.append(i8 {mag: 6, sign: true}); + data.append(i8 {mag: 7, sign: true}); + data.append(i8 {mag: 8, sign: true}); + data.append(i8 {mag: 9, sign: true}); + data.append(i8 {mag: 10, sign: true}); + data.append(i8 {mag: 11, sign: true}); + data.append(i8 {mag: 12, sign: true}); + data.append(i8 {mag: 13, sign: true}); + data.append(i8 {mag: 14, sign: true}); + data.append(i8 {mag: 15, sign: true}); + data.append(i8 {mag: 16, sign: true}); + data.append(i8 {mag: 17, sign: true}); + data.append(i8 {mag: 18, sign: true}); + data.append(i8 {mag: 19, sign: true}); + data.append(i8 {mag: 20, sign: true}); + data.append(i8 {mag: 21, sign: true}); + data.append(i8 {mag: 22, sign: true}); + data.append(i8 {mag: 23, sign: true}); + data.append(i8 {mag: 24, sign: true}); + data.append(i8 {mag: 25, sign: true}); + data.append(i8 {mag: 26, sign: true}); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } \ No newline at end of file diff --git a/src/tests/helpers/tensor/u32.cairo b/src/tests/helpers/tensor/u32.cairo index dcde6470e..207980a0a 100644 --- a/src/tests/helpers/tensor/u32.cairo +++ b/src/tests/helpers/tensor/u32.cairo @@ -170,3 +170,45 @@ fn u32_tensor_3x2x2_helper() -> Tensor { return tensor; } +fn u32_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + diff --git a/src/tests/operators/tensor/math.cairo b/src/tests/operators/tensor/math.cairo new file mode 100644 index 000000000..be37360c1 --- /dev/null +++ b/src/tests/operators/tensor/math.cairo @@ -0,0 +1,32 @@ +mod argmax; +mod argmin; +mod max; +mod min; +mod reduce_sum; +mod exp; +mod equal; +mod greater; +mod greater_equal; +mod less; +mod less_equal; +mod abs; +mod ceil; +mod ln; +mod arithmetic; +mod sin; +mod cos; +mod asin; +mod cumsum; +mod flatten; +mod sinh; +mod tanh; +mod cosh; +mod acosh; +mod asinh; +mod atan; +mod xor; +mod or; +mod acos; +mod onehot; +mod sqrt; +mod concat; \ No newline at end of file diff --git a/src/tests/tensor_core/concat.cairo b/src/tests/tensor_core/concat.cairo new file mode 100644 index 000000000..b9054a183 --- /dev/null +++ b/src/tests/tensor_core/concat.cairo @@ -0,0 +1,4 @@ +mod concat_u32_test; +mod concat_i32_test; +mod concat_i8_test; +mod concat_fp_test; \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test.cairo b/src/tests/tensor_core/concat/concat_fp_test.cairo new file mode 100644 index 000000000..2216b1777 --- /dev/null +++ b/src/tests/tensor_core/concat/concat_fp_test.cairo @@ -0,0 +1,2 @@ +mod concat_fp8x23_test; +mod concat_fp16x16_test; \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo b/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo new file mode 100644 index 000000000..86efcf579 --- /dev/null +++ b/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo @@ -0,0 +1,717 @@ +// ===== 1D ===== // + +#[cfg(test)] +mod tensor_1D { + use array::{ArrayTrait, SpanTrait}; + use core::traits::Into; + use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::implementations::impl_16x16::{ + FP16x16Impl, FP16x16Into, FP16x16PartialEq + }; + use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::tests::helpers::tensor::fixed_point::fp16x16::{fp_tensor_1x3_helper,fp_tensor_1x3_neg_helper, fp_tensor_2x3_helper, + fp_tensor_3x3_helper, fp_tensor_2x2_helper, fp_tensor_2x2_neg_helper, + fp_tensor_3x2_helper, fp_tensor_3x2x2_helper, fp_tensor_3x2x2_neg_helper, + fp_tensor_2x2x2_helper, fp_tensor_2x2x2_neg_helper, fp_tensor_3x3x3_helper, fp_tensor_3x3x3_neg_helper}; + + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + use debug::PrintTrait; + + fn fp_tensor_3x2x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(1); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; + } + + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_1x3() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_1x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + } + +// ===== 2D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_0() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + + assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); + assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_1() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); + assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 2'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 2'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -3'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -4'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_1() { + let tensor1 = fp_tensor_2x3_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); + assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[5] = 4'); + assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_0() { + let tensor1 = fp_tensor_2x3_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_0() { + let tensor1 = fp_tensor_3x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis:0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[5] = 0'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_1() { + let tensor1 = fp_tensor_3x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + +// ===== 3D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_0() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(1, true), 'result[9] = 9'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, true), 'result[10] = 10'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, true), 'result[11] = 11'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = 0'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -1'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -2'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -3'); + assert((*result.data[16]) == FixedTrait::new_unscaled(0, false), 'result[16] = -4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(1, false), 'result[17] = -5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(2, false), 'result[18] = -6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(3, false), 'result[19] = -7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_1() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 0'); + assert((*result.data[9]) == FixedTrait::new_unscaled(1, false), 'result[9] = 1'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = 6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = 7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); + assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_2() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = 2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = 3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[8] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[9] = -3'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(4, true), 'result[14] = -4'); + assert((*result.data[15]) == FixedTrait::new_unscaled(5, true), 'result[15] = -5'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = 4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(6, true), 'result[20] = -6'); + assert((*result.data[21]) == FixedTrait::new_unscaled(7, true), 'result[21] = -7'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_0() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(9, false), 'result[9] = 9'); + assert((*result.data[10]) == FixedTrait::new_unscaled(10, false), 'result[10] = 10'); + assert((*result.data[11]) == FixedTrait::new_unscaled(11, false), 'result[11] = 11'); + assert((*result.data[12]) == FixedTrait::new_unscaled(0, false), 'result[12] = 0'); + assert((*result.data[13]) == FixedTrait::new_unscaled(1, true), 'result[13] = -1'); + assert((*result.data[14]) == FixedTrait::new_unscaled(2, true), 'result[14] = -2'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = -3'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_1() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); + assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); + assert((*result.data[10]) == FixedTrait::new_unscaled(6, false), 'result[10] = 6'); + assert((*result.data[11]) == FixedTrait::new_unscaled(7, false), 'result[11] = 7'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); + assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); + assert((*result.data[18]) == FixedTrait::new_unscaled(10, false), 'result[18] = 10'); + assert((*result.data[19]) == FixedTrait::new_unscaled(11, false), 'result[19] = 11'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_2() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); + assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); + assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = 6'); + assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = 7'); + assert((*result.data[12]) == FixedTrait::new_unscaled(6, false), 'result[12] = -4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(7, false), 'result[13] = -5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); + assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); + assert((*result.data[18]) == FixedTrait::new_unscaled(8, false), 'result[18] = 10'); + assert((*result.data[19]) == FixedTrait::new_unscaled(9, false), 'result[19] = 11'); + assert((*result.data[20]) == FixedTrait::new_unscaled(10, false), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(11, false), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, false), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, false), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 4, 'shape[1] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(2, false), 'result[3] = -1'); + assert((*result.data[4]) == FixedTrait::new_unscaled(3, false), 'result[4] = 2'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 3'); + assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 4'); + assert((*result.data[9]) == FixedTrait::new_unscaled(6, false), 'result[9] = 5'); + assert((*result.data[10]) == FixedTrait::new_unscaled(7, false), 'result[10] = -4'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = -5'); + assert((*result.data[12]) == FixedTrait::new_unscaled(8, false), 'result[12] = 6'); + assert((*result.data[13]) == FixedTrait::new_unscaled(9, false), 'result[13] = 7'); + assert((*result.data[14]) == FixedTrait::new_unscaled(4, false), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(10, false), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(11, false), 'result[16] = 8'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 9'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); + + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn dimension_not_the_same() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_2x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn out_of_bound() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_1_fail() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_2_fail() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_1() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x3x3_neg_helper(); + let tensor3 = fp_tensor_3x3x3_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); + assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); + assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); + assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); + assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); + assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); + assert((*result.data[15]) == FixedTrait::new_unscaled(6, true), 'result[15] = -6'); + assert((*result.data[16]) == FixedTrait::new_unscaled(7, true), 'result[16] = -7'); + assert((*result.data[17]) == FixedTrait::new_unscaled(8, true), 'result[17] = -8'); + assert((*result.data[18]) == FixedTrait::new_unscaled(0, false), 'result[18] = 1'); + assert((*result.data[19]) == FixedTrait::new_unscaled(1, false), 'result[19] = 2'); + assert((*result.data[20]) == FixedTrait::new_unscaled(2, false), 'result[20] = 3'); + assert((*result.data[21]) == FixedTrait::new_unscaled(3, false), 'result[21] = 4'); + assert((*result.data[22]) == FixedTrait::new_unscaled(4, false), 'result[22] = 5'); + assert((*result.data[23]) == FixedTrait::new_unscaled(5, false), 'result[23] = 6'); + assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); + assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); + assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 9, 'shape[1] = 9'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 3'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x3x3_neg_helper(); + let tensor3 = fp_tensor_3x3x3_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, false), 'result[9] = 0'); + assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = -1'); + assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = -2'); + assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); + assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); + assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, false), 'result[15] = -6'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = -7'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = -8'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 1'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 2'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, false), 'result[20] = 3'); + assert((*result.data[21]) == FixedTrait::new_unscaled(6, true), 'result[21] = 4'); + assert((*result.data[22]) == FixedTrait::new_unscaled(7, true), 'result[22] = 5'); + assert((*result.data[23]) == FixedTrait::new_unscaled(8, true), 'result[23] = 6'); + assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); + assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); + assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2_2() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x3x3_neg_helper(); + let tensor3 = fp_tensor_3x3x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + data.append(tensor2); + + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 0'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 1'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); + assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); + assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); + assert((*result.data[12]) == FixedTrait::new_unscaled(3, false), 'result[12] = 3'); + assert((*result.data[13]) == FixedTrait::new_unscaled(4, false), 'result[13] = 4'); + assert((*result.data[14]) == FixedTrait::new_unscaled(5, false), 'result[14] = 5'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = 3'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = 4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = 5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(3, false), 'result[18] = -3'); + assert((*result.data[19]) == FixedTrait::new_unscaled(4, false), 'result[19] = -4'); + assert((*result.data[20]) == FixedTrait::new_unscaled(5, false), 'result[20] = -5'); + assert((*result.data[21]) == FixedTrait::new_unscaled(3, true), 'result[21] = 3'); + assert((*result.data[22]) == FixedTrait::new_unscaled(4, true), 'result[22] = 4'); + assert((*result.data[23]) == FixedTrait::new_unscaled(5, true), 'result[23] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 12, 'shape[1] = 12'); + } + + +} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo b/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo new file mode 100644 index 000000000..5fceb521e --- /dev/null +++ b/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo @@ -0,0 +1,669 @@ +// ===== 1D ===== // + +#[cfg(test)] +mod tensor_1D { + use array::{ArrayTrait, SpanTrait}; + use core::traits::Into; + use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::implementations::impl_8x23::{ + FP8x23Impl, FP8x23Into, FP8x23PartialEq + }; + use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::tests::helpers::tensor::fixed_point::fp8x23::{fp_tensor_1x3_helper,fp_tensor_1x3_neg_helper, fp_tensor_2x3_helper, + fp_tensor_3x3_helper, fp_tensor_2x2_helper, fp_tensor_2x2_neg_helper, + fp_tensor_3x2_helper, fp_tensor_3x2x2_helper, fp_tensor_3x2x2_neg_helper, + fp_tensor_2x2x2_helper, fp_tensor_2x2x2_neg_helper, fp_tensor_3x3x3_helper, fp_tensor_3x3x3_neg_helper}; + + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + use debug::PrintTrait; + + fn fp_tensor_3x2x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(1); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_1x3() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_1x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + } + +// ===== 2D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_0() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + + assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); + assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_1() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); + assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 2'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -3'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -4'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_1() { + let tensor1 = fp_tensor_2x3_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); + assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[5] = 4'); + assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_0() { + let tensor1 = fp_tensor_2x3_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_0() { + let tensor1 = fp_tensor_3x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis:0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[5] = 0'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); + + assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_1() { + let tensor1 = fp_tensor_3x2_helper(); + let tensor2 = fp_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + +// ===== 3D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_0() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(1, true), 'result[9] = -1'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, true), 'result[10] = -2'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, true), 'result[11] = -3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(0, false), 'result[16] = 0'); + assert((*result.data[17]) == FixedTrait::new_unscaled(1, false), 'result[17] = 1'); + assert((*result.data[18]) == FixedTrait::new_unscaled(2, false), 'result[18] = 2'); + assert((*result.data[19]) == FixedTrait::new_unscaled(3, false), 'result[19] = 3'); + assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); + assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_1() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 0'); + assert((*result.data[9]) == FixedTrait::new_unscaled(1, false), 'result[9] = 1'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = 6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = 7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); + assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_2() { + let tensor1 = fp_tensor_2x2x2_helper(); + let tensor2 = fp_tensor_2x2x2_neg_helper(); + let tensor3 = fp_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = 2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = 3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[8] = -2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[9] = -3'); + assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(4, true), 'result[14] = -4'); + assert((*result.data[15]) == FixedTrait::new_unscaled(5, true), 'result[15] = -5'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = 4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(6, true), 'result[20] = -6'); + assert((*result.data[21]) == FixedTrait::new_unscaled(7, true), 'result[21] = -7'); + assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); + assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_0() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); + assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); + assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(9, false), 'result[9] = 9'); + assert((*result.data[10]) == FixedTrait::new_unscaled(10, false), 'result[10] = 10'); + assert((*result.data[11]) == FixedTrait::new_unscaled(11, false), 'result[11] = 11'); + assert((*result.data[12]) == FixedTrait::new_unscaled(0, false), 'result[12] = 0'); + assert((*result.data[13]) == FixedTrait::new_unscaled(1, true), 'result[13] = -1'); + assert((*result.data[14]) == FixedTrait::new_unscaled(2, true), 'result[14] = -2'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = -3'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_1() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); + assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); + assert((*result.data[10]) == FixedTrait::new_unscaled(6, false), 'result[10] = 6'); + assert((*result.data[11]) == FixedTrait::new_unscaled(7, false), 'result[11] = 7'); + assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); + assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); + assert((*result.data[18]) == FixedTrait::new_unscaled(10, false), 'result[18] = 10'); + assert((*result.data[19]) == FixedTrait::new_unscaled(11, false), 'result[19] = 11'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_2() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(1, false), 'result[3] = 3'); + assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 0'); + assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = -1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = -2'); + assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = -3'); + assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); + assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); + assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = 6'); + assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = 7'); + assert((*result.data[12]) == FixedTrait::new_unscaled(6, false), 'result[12] = -4'); + assert((*result.data[13]) == FixedTrait::new_unscaled(7, false), 'result[13] = -5'); + assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = -6'); + assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = -7'); + assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); + assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); + assert((*result.data[18]) == FixedTrait::new_unscaled(8, false), 'result[18] = 10'); + assert((*result.data[19]) == FixedTrait::new_unscaled(9, false), 'result[19] = 11'); + assert((*result.data[20]) == FixedTrait::new_unscaled(10, false), 'result[20] = -8'); + assert((*result.data[21]) == FixedTrait::new_unscaled(11, false), 'result[21] = -9'); + assert((*result.data[22]) == FixedTrait::new_unscaled(10, false), 'result[22] = -10'); + assert((*result.data[23]) == FixedTrait::new_unscaled(11, false), 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 4, 'shape[1] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); + assert((*result.data[3]) == FixedTrait::new_unscaled(2, false), 'result[3] = 2'); + assert((*result.data[4]) == FixedTrait::new_unscaled(3, false), 'result[4] = 3'); + assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); + assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[6] = 4'); + assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[7] = 5'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(6, false), 'result[9] = 6'); + assert((*result.data[10]) == FixedTrait::new_unscaled(7, false), 'result[10] = 7'); + assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); + assert((*result.data[12]) == FixedTrait::new_unscaled(8, false), 'result[12] = 8'); + assert((*result.data[13]) == FixedTrait::new_unscaled(9, false), 'result[13] = 9'); + assert((*result.data[14]) == FixedTrait::new_unscaled(4, false), 'result[14] = 4'); + assert((*result.data[15]) == FixedTrait::new_unscaled(10, false), 'result[15] = 10'); + assert((*result.data[16]) == FixedTrait::new_unscaled(11, false), 'result[16] = 11'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); + + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { + let tensor1 = fp_tensor_3x2x2_helper(); + let tensor2 = fp_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn dimension_not_the_same() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_2x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn out_of_bound() { + let tensor1 = fp_tensor_1x3_helper(); + let tensor2 = fp_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_1_fail() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_2_fail() { + let tensor1 = fp_tensor_2x2_helper(); + let tensor2 = fp_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x3x3_neg_helper(); + let tensor3 = fp_tensor_3x3x3_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 6'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 7'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 8'); + assert((*result.data[9]) == FixedTrait::new_unscaled(3, false), 'result[9] = 0'); + assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = -1'); + assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = -2'); + assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); + assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); + assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, false), 'result[15] = -6'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = -7'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = -8'); + assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 1'); + assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 2'); + assert((*result.data[20]) == FixedTrait::new_unscaled(8, false), 'result[20] = 3'); + assert((*result.data[21]) == FixedTrait::new_unscaled(6, true), 'result[21] = 4'); + assert((*result.data[22]) == FixedTrait::new_unscaled(7, true), 'result[22] = 5'); + assert((*result.data[23]) == FixedTrait::new_unscaled(8, true), 'result[23] = 6'); + assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); + assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); + assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2_2() { + let tensor1 = fp_tensor_3x3x3_helper(); + let tensor2 = fp_tensor_3x3x3_neg_helper(); + let tensor3 = fp_tensor_3x3x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + data.append(tensor2); + + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); + assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); + assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); + assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); + assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); + assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); + assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 0'); + assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 1'); + assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); + assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); + assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); + assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); + assert((*result.data[12]) == FixedTrait::new_unscaled(3, false), 'result[12] = 3'); + assert((*result.data[13]) == FixedTrait::new_unscaled(4, false), 'result[13] = 4'); + assert((*result.data[14]) == FixedTrait::new_unscaled(5, false), 'result[14] = 5'); + assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = 3'); + assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = 4'); + assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = 5'); + assert((*result.data[18]) == FixedTrait::new_unscaled(3, false), 'result[18] = -3'); + assert((*result.data[19]) == FixedTrait::new_unscaled(4, false), 'result[19] = -4'); + assert((*result.data[20]) == FixedTrait::new_unscaled(5, false), 'result[20] = -5'); + assert((*result.data[21]) == FixedTrait::new_unscaled(3, true), 'result[21] = 3'); + assert((*result.data[22]) == FixedTrait::new_unscaled(4, true), 'result[22] = 4'); + assert((*result.data[23]) == FixedTrait::new_unscaled(5, true), 'result[23] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); + } + + +} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_i32_test.cairo b/src/tests/tensor_core/concat/concat_i32_test.cairo new file mode 100644 index 000000000..41195a655 --- /dev/null +++ b/src/tests/tensor_core/concat/concat_i32_test.cairo @@ -0,0 +1,622 @@ +// ===== 1D ===== // + +#[cfg(test)] +mod tensor_1D { + use array::{ArrayTrait, SpanTrait}; + use core::traits::Into; + + use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + use orion::tests::helpers::tensor::i32::{i32_tensor_1x3_helper,i32_tensor_1x3_neg_helper, i32_tensor_2x3_helper, + i32_tensor_3x3_helper, i32_tensor_2x2_helper, i32_tensor_2x2_neg_helper, + i32_tensor_3x2_helper, i32_tensor_3x2x2_helper, i32_tensor_3x2x2_neg_helper, + i32_tensor_2x2x2_helper, i32_tensor_2x2x2_neg_helper, i32_tensor_3x3x3_helper, i32_tensor_3x3x3_neg_helper}; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + use debug::PrintTrait; + + fn i32_tensor_3x2x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(1); + + let mut data = ArrayTrait::new(); + + data.append(i32 {mag: 0, sign: false}); + data.append(i32 {mag: 1, sign: false}); + data.append(i32 {mag: 2, sign: false}); + data.append(i32 {mag: 3, sign: false}); + data.append(i32 {mag: 4, sign: false}); + data.append(i32 {mag: 5, sign: false}); + + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_1x3() { + let tensor1 = i32_tensor_1x3_helper(); + let tensor2 = i32_tensor_1x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + } + +// ===== 2D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_0() { + let tensor1 = i32_tensor_2x2_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1, 'result[5] = -1'); + assert((*result.data[6]).into() == -2, 'result[5] = -2'); + assert((*result.data[7]).into() == -3, 'result[5] = -3'); + + + assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); + assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_1() { + let tensor1 = i32_tensor_2x2_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == -1,'result[3] = -1'); + assert((*result.data[4]).into() == 2, 'result[4] = 2'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == -2,'result[6] = -2'); + assert((*result.data[7]).into() == -3,'result[7] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_1() { + let tensor1 = i32_tensor_2x3_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == 4, 'result[5] = 4'); + assert((*result.data[7]).into() == 5, 'result[5] = 5'); + assert((*result.data[8]).into() == -2, 'result[5] = -2'); + assert((*result.data[9]).into() == -3, 'result[5] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_0() { + let tensor1 = i32_tensor_2x3_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_0() { + let tensor1 = i32_tensor_3x2_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis:0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 0, 'result[5] = 0'); + assert((*result.data[7]).into() == -1,'result[5] = -1'); + assert((*result.data[8]).into() == -2,'result[5] = -2'); + assert((*result.data[9]).into() == -3,'result[5] = -3'); + + assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_1() { + let tensor1 = i32_tensor_3x2_helper(); + let tensor2 = i32_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + +// ===== 3D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_0() { + let tensor1 = i32_tensor_2x2x2_helper(); + let tensor2 = i32_tensor_2x2x2_neg_helper(); + let tensor3 = i32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 0, 'result[8] = 8'); + assert((*result.data[9]).into() == -1,'result[9] = -1'); + assert((*result.data[10]).into() == -2, 'result[10] = -2'); + assert((*result.data[11]).into() == -3, 'result[11] = -3'); + assert((*result.data[12]).into() == -4, 'result[12] = -4'); + assert((*result.data[13]).into() == -5, 'result[13] = -5'); + assert((*result.data[14]).into() == -6, 'result[14] = -6'); + assert((*result.data[15]).into() == -7, 'result[15] = -7'); + assert((*result.data[16]).into() == 0, 'result[16] = 0'); + assert((*result.data[17]).into() == 1, 'result[17] = 1'); + assert((*result.data[18]).into() == 2, 'result[18] = 2'); + assert((*result.data[19]).into() == 3, 'result[19] = 3'); + assert((*result.data[20]).into() == 4, 'result[20] = 4'); + assert((*result.data[21]).into() == 5, 'result[21] = 5'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_1() { + let tensor1 = i32_tensor_2x2x2_helper(); + let tensor2 = i32_tensor_2x2x2_neg_helper(); + let tensor3 = i32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1,'result[5] = -1'); + assert((*result.data[6]).into() == -2,'result[6] = -2'); + assert((*result.data[7]).into() == -3,'result[7] = -3'); + assert((*result.data[8]).into() == 0, 'result[8] = 0'); + assert((*result.data[9]).into() == 1, 'result[9] = 1'); + assert((*result.data[10]).into() == 2,'result[10] = 2'); + assert((*result.data[11]).into() == 3,'result[11] = 3'); + assert((*result.data[12]).into() == 4,'result[12] = 4'); + assert((*result.data[13]).into() == 5,'result[13] = 5'); + assert((*result.data[14]).into() == 6,'result[14] = 6'); + assert((*result.data[15]).into() == 7,'result[15] = 7'); + assert((*result.data[16]).into() == -4,'result[16] = -4'); + assert((*result.data[17]).into() == -5,'result[17] = -5'); + assert((*result.data[18]).into() == -6,'result[18] = -6'); + assert((*result.data[19]).into() == -7,'result[19] = -7'); + assert((*result.data[20]).into() == 4,'result[20] = 4'); + assert((*result.data[21]).into() == 5,'result[21] = 5'); + assert((*result.data[22]).into() == 6,'result[22] = 6'); + assert((*result.data[23]).into() == 7,'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_2() { + let tensor1 = i32_tensor_2x2x2_helper(); + let tensor2 = i32_tensor_2x2x2_neg_helper(); + let tensor3 = i32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == -1, 'result[3] = -1'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 2, 'result[6] = 2'); + assert((*result.data[7]).into() == 3, 'result[7] = 3'); + assert((*result.data[8]).into() == -2, 'result[8] = -2'); + assert((*result.data[9]).into() == -3, 'result[9] = -3'); + assert((*result.data[10]).into() == 2, 'result[10] = 2'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 4, 'result[12] = 4'); + assert((*result.data[13]).into() == 5, 'result[13] = 5'); + assert((*result.data[14]).into() == -4, 'result[14] = -4'); + assert((*result.data[15]).into() == -5, 'result[15] = -5'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == -6, 'result[20] = -6'); + assert((*result.data[21]).into() == -7, 'result[21] = -7'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_0() { + let tensor1 = i32_tensor_3x2x2_helper(); + let tensor2 = i32_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 8, 'result[8] = 8'); + assert((*result.data[9]).into() == 9, 'result[9] = 9'); + assert((*result.data[10]).into() == 10, 'result[10] = 10'); + assert((*result.data[11]).into() == 11, 'result[11] = 11'); + assert((*result.data[12]).into() == 0, 'result[12] = 0'); + assert((*result.data[13]).into() == -1, 'result[13] = -1'); + assert((*result.data[14]).into() == -2, 'result[14] = -2'); + assert((*result.data[15]).into() == -3, 'result[15] = -3'); + assert((*result.data[16]).into() == -4, 'result[16] = -4'); + assert((*result.data[17]).into() == -5, 'result[17] = -5'); + assert((*result.data[18]).into() == -6, 'result[18] = -6'); + assert((*result.data[19]).into() == -7, 'result[19] = -7'); + assert((*result.data[20]).into() == -8, 'result[20] = -8'); + assert((*result.data[21]).into() == -9, 'result[21] = -9'); + assert((*result.data[22]).into() == -10, 'result[22] = -10'); + assert((*result.data[23]).into() == -11, 'result[23] = -11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_1() { + let tensor1 = i32_tensor_3x2x2_helper(); + let tensor2 = i32_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1, 'result[5] = -1'); + assert((*result.data[6]).into() == -2, 'result[6] = -2'); + assert((*result.data[7]).into() == -3, 'result[7] = -3'); + assert((*result.data[8]).into() == 4, 'result[8] = 4'); + assert((*result.data[9]).into() == 5, 'result[9] = 5'); + assert((*result.data[10]).into() == 6, 'result[10] = 6'); + assert((*result.data[11]).into() == 7, 'result[11] = 7'); + assert((*result.data[12]).into() == -4, 'result[12] = -4'); + assert((*result.data[13]).into() == -5, 'result[13] = -5'); + assert((*result.data[14]).into() == -6, 'result[14] = -6'); + assert((*result.data[15]).into() == -7, 'result[15] = -7'); + assert((*result.data[16]).into() == 8, 'result[16] = 8'); + assert((*result.data[17]).into() == 9, 'result[17] = 9'); + assert((*result.data[18]).into() == 10, 'result[18] = 10'); + assert((*result.data[19]).into() == 11, 'result[19] = 11'); + assert((*result.data[20]).into() == -8, 'result[20] = -8'); + assert((*result.data[21]).into() == -9, 'result[21] = -9'); + assert((*result.data[22]).into() == -10, 'result[22] = -10'); + assert((*result.data[23]).into() == -11, 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { + let tensor1 = i32_tensor_3x2x2_helper(); + let tensor2 = i32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == 2, 'result[3] = 2'); + assert((*result.data[4]).into() == 3, 'result[4] = 3'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 4, 'result[6] = 4'); + assert((*result.data[7]).into() == 5, 'result[7] = 5'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 6, 'result[9] = 6'); + assert((*result.data[10]).into() == 7, 'result[10] = 7'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 8, 'result[12] = 8'); + assert((*result.data[13]).into() == 9, 'result[13] = 9'); + assert((*result.data[14]).into() == 4, 'result[14] = 4'); + assert((*result.data[15]).into() == 10, 'result[15] = 10'); + assert((*result.data[16]).into() == 11, 'result[16] = 11'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); + + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { + let tensor1 = i32_tensor_3x2x2_helper(); + let tensor2 = i32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { + let tensor1 = i32_tensor_3x2x2_helper(); + let tensor2 = i32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn dimension_not_the_same() { + let tensor1 = i32_tensor_1x3_helper(); + let tensor2 = i32_tensor_2x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn out_of_bound() { + let tensor1 = i32_tensor_1x3_helper(); + let tensor2 = i32_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_1_fail() { + let tensor1 = i32_tensor_2x2_helper(); + let tensor2 = i32_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_2_fail() { + let tensor1 = i32_tensor_2x2_helper(); + let tensor2 = i32_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2() { + let tensor1 = i32_tensor_3x3x3_helper(); + let tensor2 = i32_tensor_3x3x3_neg_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 3, 'result[9] = 3'); + assert((*result.data[10]).into() == 4, 'result[10] = 4'); + assert((*result.data[11]).into() == 5, 'result[11] = 5'); + assert((*result.data[12]).into() == -3, 'result[12] = -3'); + assert((*result.data[13]).into() == -4, 'result[13] = -4'); + assert((*result.data[14]).into() == -5, 'result[14] = -5'); + assert((*result.data[15]).into() == 3, 'result[15] = 3'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == 8, 'result[20] = 8'); + assert((*result.data[21]).into() == -6, 'result[21] = -6'); + assert((*result.data[22]).into() == -7, 'result[22] = -7'); + assert((*result.data[23]).into() == -8, 'result[23] = -8'); + assert((*result.data[24]).into() == 6, 'result[23] = 6'); + assert((*result.data[25]).into() == 7, 'result[23] = 7'); + assert((*result.data[26]).into() == 8, 'result[23] = 8'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2_2() { + let tensor1 = i32_tensor_3x3x3_helper(); + let tensor2 = i32_tensor_3x3x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + data.append(tensor2); + + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 0, 'result[9] = 0'); + assert((*result.data[10]).into() == -1, 'result[10] = -1'); + assert((*result.data[11]).into() == -2, 'result[11] = -2'); + assert((*result.data[12]).into() == 3, 'result[12] = 3'); + assert((*result.data[13]).into() == 4, 'result[13] = 4'); + assert((*result.data[14]).into() == 5, 'result[14] = 5'); + assert((*result.data[15]).into() == -3, 'result[15] = 3'); + assert((*result.data[16]).into() == -4, 'result[16] = 4'); + assert((*result.data[17]).into() == -5, 'result[17] = 5'); + assert((*result.data[18]).into() == 3, 'result[18] = -3'); + assert((*result.data[19]).into() == 4, 'result[19] = -4'); + assert((*result.data[20]).into() == 5, 'result[20] = -5'); + assert((*result.data[21]).into() == -3, 'result[21] = 3'); + assert((*result.data[22]).into() == -4, 'result[22] = 4'); + assert((*result.data[23]).into() == -5, 'result[23] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); + } + +} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_i8_test.cairo b/src/tests/tensor_core/concat/concat_i8_test.cairo new file mode 100644 index 000000000..543afb70d --- /dev/null +++ b/src/tests/tensor_core/concat/concat_i8_test.cairo @@ -0,0 +1,622 @@ +// ===== 1D ===== // + +#[cfg(test)] +mod tensor_1D { + use array::{ArrayTrait, SpanTrait}; + use core::traits::Into; + + use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; + use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + use orion::tests::helpers::tensor::i8::{i8_tensor_1x3_helper,i8_tensor_1x3_neg_helper, i8_tensor_2x3_helper, + i8_tensor_3x3_helper, i8_tensor_2x2_helper, i8_tensor_2x2_neg_helper, + i8_tensor_3x2_helper, i8_tensor_3x2x2_helper, i8_tensor_3x2x2_neg_helper, + i8_tensor_2x2x2_helper, i8_tensor_2x2x2_neg_helper, i8_tensor_3x3x3_helper, i8_tensor_3x3x3_neg_helper}; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + use debug::PrintTrait; + + fn i8_tensor_3x2x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(1); + + let mut data = ArrayTrait::new(); + + data.append(i8 {mag: 0, sign: false}); + data.append(i8 {mag: 1, sign: false}); + data.append(i8 {mag: 2, sign: false}); + data.append(i8 {mag: 3, sign: false}); + data.append(i8 {mag: 4, sign: false}); + data.append(i8 {mag: 5, sign: false}); + + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_1x3() { + let tensor1 = i8_tensor_1x3_helper(); + let tensor2 = i8_tensor_1x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + } + +// ===== 2D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_0() { + let tensor1 = i8_tensor_2x2_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1, 'result[5] = -1'); + assert((*result.data[6]).into() == -2, 'result[5] = -2'); + assert((*result.data[7]).into() == -3, 'result[5] = -3'); + + + assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); + assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_1() { + let tensor1 = i8_tensor_2x2_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == -1,'result[3] = -1'); + assert((*result.data[4]).into() == 2, 'result[4] = 2'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == -2,'result[6] = -2'); + assert((*result.data[7]).into() == -3,'result[7] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_1() { + let tensor1 = i8_tensor_2x3_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == 4, 'result[5] = 4'); + assert((*result.data[7]).into() == 5, 'result[5] = 5'); + assert((*result.data[8]).into() == -2, 'result[5] = -2'); + assert((*result.data[9]).into() == -3, 'result[5] = -3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_0() { + let tensor1 = i8_tensor_2x3_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_0() { + let tensor1 = i8_tensor_3x2_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis:0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 0, 'result[5] = 0'); + assert((*result.data[7]).into() == -1,'result[5] = -1'); + assert((*result.data[8]).into() == -2,'result[5] = -2'); + assert((*result.data[9]).into() == -3,'result[5] = -3'); + + assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_1() { + let tensor1 = i8_tensor_3x2_helper(); + let tensor2 = i8_tensor_2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + +// ===== 3D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_0() { + let tensor1 = i8_tensor_2x2x2_helper(); + let tensor2 = i8_tensor_2x2x2_neg_helper(); + let tensor3 = i8_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 0, 'result[8] = 8'); + assert((*result.data[9]).into() == -1,'result[9] = -1'); + assert((*result.data[10]).into() == -2, 'result[10] = -2'); + assert((*result.data[11]).into() == -3, 'result[11] = -3'); + assert((*result.data[12]).into() == -4, 'result[12] = -4'); + assert((*result.data[13]).into() == -5, 'result[13] = -5'); + assert((*result.data[14]).into() == -6, 'result[14] = -6'); + assert((*result.data[15]).into() == -7, 'result[15] = -7'); + assert((*result.data[16]).into() == 0, 'result[16] = 0'); + assert((*result.data[17]).into() == 1, 'result[17] = 1'); + assert((*result.data[18]).into() == 2, 'result[18] = 2'); + assert((*result.data[19]).into() == 3, 'result[19] = 3'); + assert((*result.data[20]).into() == 4, 'result[20] = 4'); + assert((*result.data[21]).into() == 5, 'result[21] = 5'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_1() { + let tensor1 = i8_tensor_2x2x2_helper(); + let tensor2 = i8_tensor_2x2x2_neg_helper(); + let tensor3 = i8_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1,'result[5] = -1'); + assert((*result.data[6]).into() == -2,'result[6] = -2'); + assert((*result.data[7]).into() == -3,'result[7] = -3'); + assert((*result.data[8]).into() == 0, 'result[8] = 0'); + assert((*result.data[9]).into() == 1, 'result[9] = 1'); + assert((*result.data[10]).into() == 2,'result[10] = 2'); + assert((*result.data[11]).into() == 3,'result[11] = 3'); + assert((*result.data[12]).into() == 4,'result[12] = 4'); + assert((*result.data[13]).into() == 5,'result[13] = 5'); + assert((*result.data[14]).into() == 6,'result[14] = 6'); + assert((*result.data[15]).into() == 7,'result[15] = 7'); + assert((*result.data[16]).into() == -4,'result[16] = -4'); + assert((*result.data[17]).into() == -5,'result[17] = -5'); + assert((*result.data[18]).into() == -6,'result[18] = -6'); + assert((*result.data[19]).into() == -7,'result[19] = -7'); + assert((*result.data[20]).into() == 4,'result[20] = 4'); + assert((*result.data[21]).into() == 5,'result[21] = 5'); + assert((*result.data[22]).into() == 6,'result[22] = 6'); + assert((*result.data[23]).into() == 7,'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_2() { + let tensor1 = i8_tensor_2x2x2_helper(); + let tensor2 = i8_tensor_2x2x2_neg_helper(); + let tensor3 = i8_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == -1, 'result[3] = -1'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 2, 'result[6] = 2'); + assert((*result.data[7]).into() == 3, 'result[7] = 3'); + assert((*result.data[8]).into() == -2, 'result[8] = -2'); + assert((*result.data[9]).into() == -3, 'result[9] = -3'); + assert((*result.data[10]).into() == 2, 'result[10] = 2'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 4, 'result[12] = 4'); + assert((*result.data[13]).into() == 5, 'result[13] = 5'); + assert((*result.data[14]).into() == -4, 'result[14] = -4'); + assert((*result.data[15]).into() == -5, 'result[15] = -5'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == -6, 'result[20] = -6'); + assert((*result.data[21]).into() == -7, 'result[21] = -7'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_0() { + let tensor1 = i8_tensor_3x2x2_helper(); + let tensor2 = i8_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 8, 'result[8] = 8'); + assert((*result.data[9]).into() == 9, 'result[9] = 9'); + assert((*result.data[10]).into() == 10, 'result[10] = 10'); + assert((*result.data[11]).into() == 11, 'result[11] = 11'); + assert((*result.data[12]).into() == 0, 'result[12] = 0'); + assert((*result.data[13]).into() == -1, 'result[13] = -1'); + assert((*result.data[14]).into() == -2, 'result[14] = -2'); + assert((*result.data[15]).into() == -3, 'result[15] = -3'); + assert((*result.data[16]).into() == -4, 'result[16] = -4'); + assert((*result.data[17]).into() == -5, 'result[17] = -5'); + assert((*result.data[18]).into() == -6, 'result[18] = -6'); + assert((*result.data[19]).into() == -7, 'result[19] = -7'); + assert((*result.data[20]).into() == -8, 'result[20] = -8'); + assert((*result.data[21]).into() == -9, 'result[21] = -9'); + assert((*result.data[22]).into() == -10, 'result[22] = -10'); + assert((*result.data[23]).into() == -11, 'result[23] = -11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_1() { + let tensor1 = i8_tensor_3x2x2_helper(); + let tensor2 = i8_tensor_3x2x2_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == -1, 'result[5] = -1'); + assert((*result.data[6]).into() == -2, 'result[6] = -2'); + assert((*result.data[7]).into() == -3, 'result[7] = -3'); + assert((*result.data[8]).into() == 4, 'result[8] = 4'); + assert((*result.data[9]).into() == 5, 'result[9] = 5'); + assert((*result.data[10]).into() == 6, 'result[10] = 6'); + assert((*result.data[11]).into() == 7, 'result[11] = 7'); + assert((*result.data[12]).into() == -4, 'result[12] = -4'); + assert((*result.data[13]).into() == -5, 'result[13] = -5'); + assert((*result.data[14]).into() == -6, 'result[14] = -6'); + assert((*result.data[15]).into() == -7, 'result[15] = -7'); + assert((*result.data[16]).into() == 8, 'result[16] = 8'); + assert((*result.data[17]).into() == 9, 'result[17] = 9'); + assert((*result.data[18]).into() == 10, 'result[18] = 10'); + assert((*result.data[19]).into() == 11, 'result[19] = 11'); + assert((*result.data[20]).into() == -8, 'result[20] = -8'); + assert((*result.data[21]).into() == -9, 'result[21] = -9'); + assert((*result.data[22]).into() == -10, 'result[22] = -10'); + assert((*result.data[23]).into() == -11, 'result[23] = -11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { + let tensor1 = i8_tensor_3x2x2_helper(); + let tensor2 = i8_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == 2, 'result[3] = 2'); + assert((*result.data[4]).into() == 3, 'result[4] = 3'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 4, 'result[6] = 4'); + assert((*result.data[7]).into() == 5, 'result[7] = 5'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 6, 'result[9] = 6'); + assert((*result.data[10]).into() == 7, 'result[10] = 7'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 8, 'result[12] = 8'); + assert((*result.data[13]).into() == 9, 'result[13] = 9'); + assert((*result.data[14]).into() == 4, 'result[14] = 4'); + assert((*result.data[15]).into() == 10, 'result[15] = 10'); + assert((*result.data[16]).into() == 11, 'result[16] = 11'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); + + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { + let tensor1 = i8_tensor_3x2x2_helper(); + let tensor2 = i8_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { + let tensor1 = i8_tensor_3x2x2_helper(); + let tensor2 = i8_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn dimension_not_the_same() { + let tensor1 = i8_tensor_1x3_helper(); + let tensor2 = i8_tensor_2x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn out_of_bound() { + let tensor1 = i8_tensor_1x3_helper(); + let tensor2 = i8_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_1_fail() { + let tensor1 = i8_tensor_2x2_helper(); + let tensor2 = i8_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_2_fail() { + let tensor1 = i8_tensor_2x2_helper(); + let tensor2 = i8_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2() { + let tensor1 = i8_tensor_3x3x3_helper(); + let tensor2 = i8_tensor_3x3x3_neg_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 3, 'result[9] = 3'); + assert((*result.data[10]).into() == 4, 'result[10] = 4'); + assert((*result.data[11]).into() == 5, 'result[11] = 5'); + assert((*result.data[12]).into() == -3, 'result[12] = -3'); + assert((*result.data[13]).into() == -4, 'result[13] = -4'); + assert((*result.data[14]).into() == -5, 'result[14] = -5'); + assert((*result.data[15]).into() == 3, 'result[15] = 3'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == 8, 'result[20] = 8'); + assert((*result.data[21]).into() == -6, 'result[21] = -6'); + assert((*result.data[22]).into() == -7, 'result[22] = -7'); + assert((*result.data[23]).into() == -8, 'result[23] = -8'); + assert((*result.data[24]).into() == 6, 'result[23] = 6'); + assert((*result.data[25]).into() == 7, 'result[23] = 7'); + assert((*result.data[26]).into() == 8, 'result[23] = 8'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2_2() { + let tensor1 = i8_tensor_3x3x3_helper(); + let tensor2 = i8_tensor_3x3x3_neg_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + data.append(tensor2); + + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == -1, 'result[4] = -1'); + assert((*result.data[5]).into() == -2, 'result[5] = -2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 0, 'result[9] = 0'); + assert((*result.data[10]).into() == -1, 'result[10] = -1'); + assert((*result.data[11]).into() == -2, 'result[11] = -2'); + assert((*result.data[12]).into() == 3, 'result[12] = 3'); + assert((*result.data[13]).into() == 4, 'result[13] = 4'); + assert((*result.data[14]).into() == 5, 'result[14] = 5'); + assert((*result.data[15]).into() == -3, 'result[15] = 3'); + assert((*result.data[16]).into() == -4, 'result[16] = 4'); + assert((*result.data[17]).into() == -5, 'result[17] = 5'); + assert((*result.data[18]).into() == 3, 'result[18] = -3'); + assert((*result.data[19]).into() == 4, 'result[19] = -4'); + assert((*result.data[20]).into() == 5, 'result[20] = -5'); + assert((*result.data[21]).into() == -3, 'result[21] = 3'); + assert((*result.data[22]).into() == -4, 'result[22] = 4'); + assert((*result.data[23]).into() == -5, 'result[23] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); + } + +} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_u32_test.cairo b/src/tests/tensor_core/concat/concat_u32_test.cairo new file mode 100644 index 000000000..2fee11e48 --- /dev/null +++ b/src/tests/tensor_core/concat/concat_u32_test.cairo @@ -0,0 +1,622 @@ +// ===== 1D ===== // + +#[cfg(test)] +mod tensor_1D { + use array::{ArrayTrait, SpanTrait}; + use core::traits::Into; + + + use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + + use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x3_helper, + u32_tensor_3x3_helper, u32_tensor_2x2_helper, + u32_tensor_3x2_helper, u32_tensor_3x2x2_helper, + u32_tensor_2x2x2_helper, u32_tensor_3x3x3_helper}; + use debug::PrintTrait; + + fn u32_tensor_3x2x1_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(2); + sizes.append(1); + + let mut data = ArrayTrait::new(); + + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + return tensor; +} + + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_1x3() { + let tensor1 = u32_tensor_1x3_helper(); + let tensor2 = u32_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == 1, 'result[4] = 1'); + assert((*result.data[5]).into() == 2, 'result[5] = 2'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + } + +// ===== 2D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_0() { + let tensor1 = u32_tensor_2x2_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 2, 'result[5] = 2'); + assert((*result.data[7]).into() == 3, 'result[5] = 3'); + + + assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); + assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2_axis_1() { + let tensor1 = u32_tensor_2x2_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == 1,'result[3] = 1'); + assert((*result.data[4]).into() == 2, 'result[4] = 2'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == 2,'result[6] = 2'); + assert((*result.data[7]).into() == 3,'result[7] = 3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_1() { + let tensor1 = u32_tensor_2x3_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == 1, 'result[4] = 1'); + assert((*result.data[5]).into() == 3, 'result[5] = 3'); + assert((*result.data[6]).into() == 4, 'result[5] = 4'); + assert((*result.data[7]).into() == 5, 'result[5] = 5'); + assert((*result.data[8]).into() == 2, 'result[5] = 2'); + assert((*result.data[9]).into() == 3, 'result[5] = 3'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x3_2x2__axis_0() { + let tensor1 = u32_tensor_2x3_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_0() { + let tensor1 = u32_tensor_3x2_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis:0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 0, 'result[5] = 0'); + assert((*result.data[7]).into() == 1,'result[5] = 1'); + assert((*result.data[8]).into() == 2,'result[5] = 2'); + assert((*result.data[9]).into() == 3,'result[5] = 3'); + + assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2_2x2__axis_1() { + let tensor1 = u32_tensor_3x2_helper(); + let tensor2 = u32_tensor_2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + +// ===== 3D ===== // + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_0() { + let tensor1 = u32_tensor_2x2x2_helper(); + let tensor2 = u32_tensor_2x2x2_helper(); + let tensor3 = u32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 0, 'result[8] = 0'); + assert((*result.data[9]).into() == 1,'result[9] = 1'); + assert((*result.data[10]).into() == 2, 'result[10] = 2'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 4, 'result[12] = 4'); + assert((*result.data[13]).into() == 5, 'result[13] = 5'); + assert((*result.data[14]).into() == 6, 'result[14] = 6'); + assert((*result.data[15]).into() == 7, 'result[15] = 7'); + assert((*result.data[16]).into() == 0, 'result[16] = 0'); + assert((*result.data[17]).into() == 1, 'result[17] = 1'); + assert((*result.data[18]).into() == 2, 'result[18] = 2'); + assert((*result.data[19]).into() == 3, 'result[19] = 3'); + assert((*result.data[20]).into() == 4, 'result[20] = 4'); + assert((*result.data[21]).into() == 5, 'result[21] = 5'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_1() { + let tensor1 = u32_tensor_2x2x2_helper(); + let tensor2 = u32_tensor_2x2x2_helper(); + let tensor3 = u32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1,'result[5] = 1'); + assert((*result.data[6]).into() == 2,'result[6] = 2'); + assert((*result.data[7]).into() == 3,'result[7] = 3'); + assert((*result.data[8]).into() == 0, 'result[8] = 0'); + assert((*result.data[9]).into() == 1, 'result[9] = 1'); + assert((*result.data[10]).into() == 2,'result[10] = 2'); + assert((*result.data[11]).into() == 3,'result[11] = 3'); + assert((*result.data[12]).into() == 4,'result[12] = 4'); + assert((*result.data[13]).into() == 5,'result[13] = 5'); + assert((*result.data[14]).into() == 6,'result[14] = 6'); + assert((*result.data[15]).into() == 7,'result[15] = 7'); + assert((*result.data[16]).into() == 4,'result[16] = 4'); + assert((*result.data[17]).into() == 5,'result[17] = 5'); + assert((*result.data[18]).into() == 6,'result[18] = 6'); + assert((*result.data[19]).into() == 7,'result[19] = 7'); + assert((*result.data[20]).into() == 4,'result[20] = 4'); + assert((*result.data[21]).into() == 5,'result[21] = 5'); + assert((*result.data[22]).into() == 6,'result[22] = 6'); + assert((*result.data[23]).into() == 7,'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_2x2x2__axis_2() { + let tensor1 = u32_tensor_2x2x2_helper(); + let tensor2 = u32_tensor_2x2x2_helper(); + let tensor3 = u32_tensor_2x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor3); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == 1, 'result[3] = 1'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 2, 'result[6] = 2'); + assert((*result.data[7]).into() == 3, 'result[7] = 3'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 3, 'result[9] = 3'); + assert((*result.data[10]).into() == 2, 'result[10] = 2'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 4, 'result[12] = 4'); + assert((*result.data[13]).into() == 5, 'result[13] = 5'); + assert((*result.data[14]).into() == 4, 'result[14] = 4'); + assert((*result.data[15]).into() == 5, 'result[15] = 5'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == 6, 'result[20] = 6'); + assert((*result.data[21]).into() == 7, 'result[21] = 7'); + assert((*result.data[22]).into() == 6, 'result[22] = 6'); + assert((*result.data[23]).into() == 7, 'result[23] = 7'); + + assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_0() { + let tensor1 = u32_tensor_3x2x2_helper(); + let tensor2 = u32_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 4, 'result[4] = 4'); + assert((*result.data[5]).into() == 5, 'result[5] = 5'); + assert((*result.data[6]).into() == 6, 'result[6] = 6'); + assert((*result.data[7]).into() == 7, 'result[7] = 7'); + assert((*result.data[8]).into() == 8, 'result[8] = 8'); + assert((*result.data[9]).into() == 9, 'result[9] = 9'); + assert((*result.data[10]).into() == 10, 'result[10] = 10'); + assert((*result.data[11]).into() == 11, 'result[11] = 11'); + assert((*result.data[12]).into() == 0, 'result[12] = 0'); + assert((*result.data[13]).into() == 1, 'result[13] = 1'); + assert((*result.data[14]).into() == 2, 'result[14] = 2'); + assert((*result.data[15]).into() == 3, 'result[15] = 3'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == 8, 'result[20] = 8'); + assert((*result.data[21]).into() == 9, 'result[21] = 9'); + assert((*result.data[22]).into() == 10, 'result[22] = 10'); + assert((*result.data[23]).into() == 11, 'result[23] = 11'); + + assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2__axis_1() { + let tensor1 = u32_tensor_3x2x2_helper(); + let tensor2 = u32_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 3, 'result[3] = 3'); + assert((*result.data[4]).into() == 0, 'result[4] = 0'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 2, 'result[6] = 2'); + assert((*result.data[7]).into() == 3, 'result[7] = 3'); + assert((*result.data[8]).into() == 4, 'result[8] = 4'); + assert((*result.data[9]).into() == 5, 'result[9] = 5'); + assert((*result.data[10]).into() == 6, 'result[10] = 6'); + assert((*result.data[11]).into() == 7, 'result[11] = 7'); + assert((*result.data[12]).into() == 4, 'result[12] = 4'); + assert((*result.data[13]).into() == 5, 'result[13] = 5'); + assert((*result.data[14]).into() == 6, 'result[14] = 6'); + assert((*result.data[15]).into() == 7, 'result[15] = 7'); + assert((*result.data[16]).into() == 8, 'result[16] = 8'); + assert((*result.data[17]).into() == 9, 'result[17] = 9'); + assert((*result.data[18]).into() == 10, 'result[18] = 10'); + assert((*result.data[19]).into() == 11, 'result[19] = 11'); + assert((*result.data[20]).into() == 8, 'result[20] = 8'); + assert((*result.data[21]).into() == 9, 'result[21] = 9'); + assert((*result.data[22]).into() == 10, 'result[22] = 10'); + assert((*result.data[23]).into() == 11, 'result[23] = 11'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); + assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); + + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { + let tensor1 = u32_tensor_3x2x2_helper(); + let tensor2 = u32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 0, 'result[2] = 0'); + assert((*result.data[3]).into() == 2, 'result[3] = 2'); + assert((*result.data[4]).into() == 3, 'result[4] = 3'); + assert((*result.data[5]).into() == 1, 'result[5] = 1'); + assert((*result.data[6]).into() == 4, 'result[6] = 4'); + assert((*result.data[7]).into() == 5, 'result[7] = 5'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 6, 'result[9] = 6'); + assert((*result.data[10]).into() == 7, 'result[10] = 7'); + assert((*result.data[11]).into() == 3, 'result[11] = 3'); + assert((*result.data[12]).into() == 8, 'result[12] = 8'); + assert((*result.data[13]).into() == 9, 'result[13] = 9'); + assert((*result.data[14]).into() == 4, 'result[14] = 4'); + assert((*result.data[15]).into() == 10, 'result[15] = 10'); + assert((*result.data[16]).into() == 11, 'result[16] = 11'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); + assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); + + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { + let tensor1 = u32_tensor_3x2x2_helper(); + let tensor2 = u32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 0); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { + let tensor1 = u32_tensor_3x2x2_helper(); + let tensor2 = u32_tensor_3x2x1_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn dimension_not_the_same() { + let tensor1 = u32_tensor_1x3_helper(); + let tensor2 = u32_tensor_2x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn out_of_bound() { + let tensor1 = u32_tensor_1x3_helper(); + let tensor2 = u32_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_1_fail() { + let tensor1 = u32_tensor_2x2_helper(); + let tensor2 = u32_tensor_1x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[should_panic] + #[available_gas(20000000)] + fn tensor_not_same_dimension_2_fail() { + let tensor1 = u32_tensor_2x2_helper(); + let tensor2 = u32_tensor_3x2x2_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + + let result = TensorTrait::concat(tensors: data.span(), axis: 1); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2() { + let tensor1 = u32_tensor_3x3x3_helper(); + let tensor2 = u32_tensor_3x3x3_helper(); + + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == 1, 'result[4] = 1'); + assert((*result.data[5]).into() == 2, 'result[5] = 2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 3, 'result[9] = 3'); + assert((*result.data[10]).into() == 4, 'result[10] = 4'); + assert((*result.data[11]).into() == 5, 'result[11] = 5'); + assert((*result.data[12]).into() == 3, 'result[12] = 3'); + assert((*result.data[13]).into() == 4, 'result[13] = 4'); + assert((*result.data[14]).into() == 5, 'result[14] = 5'); + assert((*result.data[15]).into() == 3, 'result[15] = 3'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 6, 'result[18] = 6'); + assert((*result.data[19]).into() == 7, 'result[19] = 7'); + assert((*result.data[20]).into() == 8, 'result[20] = 8'); + assert((*result.data[21]).into() == 6, 'result[21] = 6'); + assert((*result.data[22]).into() == 7, 'result[22] = 7'); + assert((*result.data[23]).into() == 8, 'result[23] = 8'); + assert((*result.data[24]).into() == 6, 'result[23] = 6'); + assert((*result.data[25]).into() == 7, 'result[23] = 7'); + assert((*result.data[26]).into() == 8, 'result[23] = 8'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); + } + + #[test] + #[available_gas(20000000)] + fn tensor_onehot_tensor_3x3x3__axis_2_2() { + let tensor1 = u32_tensor_3x3x3_helper(); + let tensor2 = u32_tensor_3x3x3_helper(); + + let mut data = ArrayTrait::new(); + data.append(tensor1); + data.append(tensor2); + data.append(tensor1); + data.append(tensor2); + + + let result = TensorTrait::concat(tensors: data.span(), axis: 2); + assert((*result.data[0]).into() == 0, 'result[0] = 0'); + assert((*result.data[1]).into() == 1, 'result[1] = 1'); + assert((*result.data[2]).into() == 2, 'result[2] = 2'); + assert((*result.data[3]).into() == 0, 'result[3] = 0'); + assert((*result.data[4]).into() == 1, 'result[4] = 1'); + assert((*result.data[5]).into() == 2, 'result[5] = 2'); + assert((*result.data[6]).into() == 0, 'result[6] = 0'); + assert((*result.data[7]).into() == 1, 'result[7] = 1'); + assert((*result.data[8]).into() == 2, 'result[8] = 2'); + assert((*result.data[9]).into() == 0, 'result[9] = 0'); + assert((*result.data[10]).into() == 1, 'result[10] = 1'); + assert((*result.data[11]).into() == 2, 'result[11] = 2'); + assert((*result.data[12]).into() == 3, 'result[12] = 3'); + assert((*result.data[13]).into() == 4, 'result[13] = 4'); + assert((*result.data[14]).into() == 5, 'result[14] = 5'); + assert((*result.data[15]).into() == 3, 'result[15] = 3'); + assert((*result.data[16]).into() == 4, 'result[16] = 4'); + assert((*result.data[17]).into() == 5, 'result[17] = 5'); + assert((*result.data[18]).into() == 3, 'result[18] = 3'); + assert((*result.data[19]).into() == 4, 'result[19] = 4'); + assert((*result.data[20]).into() == 5, 'result[20] = 5'); + assert((*result.data[21]).into() == 3, 'result[21] = 3'); + assert((*result.data[22]).into() == 4, 'result[22] = 4'); + assert((*result.data[23]).into() == 5, 'result[23] = 5'); + + assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); + assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); + assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); + } + +} \ No newline at end of file From 552691f44a73c8362c263899a2450e6e668cce66 Mon Sep 17 00:00:00 2001 From: Hakeem Kazeem Date: Sat, 19 Aug 2023 08:40:07 +0100 Subject: [PATCH 002/179] Concat Test generated with nodegen --- .gitignore | 1 + nodegen/node/concat.py | 686 ++++++++++++++++++ .../math/concat/concat_fp/fp16x16.cairo | 2 +- .../tensor/math/concat/concat_fp/fp8x23.cairo | 4 +- src/tests/nodes.cairo | 35 + src/tests/nodes/concat_fp16x16_1d.cairo | 22 + .../nodes/concat_fp16x16_1d/input_0.cairo | 17 + .../nodes/concat_fp16x16_1d/input_1.cairo | 17 + .../nodes/concat_fp16x16_1d/output_0.cairo | 20 + src/tests/nodes/concat_fp16x16_2d.cairo | 22 + .../nodes/concat_fp16x16_2d/input_0.cairo | 19 + .../nodes/concat_fp16x16_2d/input_1.cairo | 19 + .../nodes/concat_fp16x16_2d/output_0.cairo | 23 + .../nodes/concat_fp16x16_3d_axis_1.cairo | 22 + .../concat_fp16x16_3d_axis_1/input_0.cairo | 43 ++ .../concat_fp16x16_3d_axis_1/input_1.cairo | 43 ++ .../concat_fp16x16_3d_axis_1/output_0.cairo | 70 ++ .../nodes/concat_fp16x16_3d_axis_2.cairo | 22 + .../concat_fp16x16_3d_axis_2/input_0.cairo | 43 ++ .../concat_fp16x16_3d_axis_2/input_1.cairo | 43 ++ .../concat_fp16x16_3d_axis_2/output_0.cairo | 70 ++ .../nodes/concat_fp16x16_3d_default.cairo | 22 + .../concat_fp16x16_3d_default/input_0.cairo | 43 ++ .../concat_fp16x16_3d_default/input_1.cairo | 43 ++ .../concat_fp16x16_3d_default/output_0.cairo | 70 ++ ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ src/tests/nodes/concat_fp8x23_1d.cairo | 22 + .../nodes/concat_fp8x23_1d/input_0.cairo | 17 + .../nodes/concat_fp8x23_1d/input_1.cairo | 17 + .../nodes/concat_fp8x23_1d/output_0.cairo | 20 + src/tests/nodes/concat_fp8x23_2d.cairo | 22 + .../nodes/concat_fp8x23_2d/input_0.cairo | 19 + .../nodes/concat_fp8x23_2d/input_1.cairo | 19 + .../nodes/concat_fp8x23_2d/output_0.cairo | 23 + src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 22 + .../concat_fp8x23_3d_axis_1/input_0.cairo | 43 ++ .../concat_fp8x23_3d_axis_1/input_1.cairo | 43 ++ .../concat_fp8x23_3d_axis_1/output_0.cairo | 70 ++ src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 22 + .../concat_fp8x23_3d_axis_2/input_0.cairo | 43 ++ .../concat_fp8x23_3d_axis_2/input_1.cairo | 43 ++ .../concat_fp8x23_3d_axis_2/output_0.cairo | 70 ++ .../nodes/concat_fp8x23_3d_default.cairo | 22 + .../concat_fp8x23_3d_default/input_0.cairo | 43 ++ .../concat_fp8x23_3d_default/input_1.cairo | 43 ++ .../concat_fp8x23_3d_default/output_0.cairo | 70 ++ ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ src/tests/nodes/concat_i32_1d.cairo | 22 + src/tests/nodes/concat_i32_1d/input_0.cairo | 18 + src/tests/nodes/concat_i32_1d/input_1.cairo | 18 + src/tests/nodes/concat_i32_1d/output_0.cairo | 21 + src/tests/nodes/concat_i32_2d.cairo | 22 + src/tests/nodes/concat_i32_2d/input_0.cairo | 20 + src/tests/nodes/concat_i32_2d/input_1.cairo | 20 + src/tests/nodes/concat_i32_2d/output_0.cairo | 24 + src/tests/nodes/concat_i32_3d_axis_1.cairo | 22 + .../nodes/concat_i32_3d_axis_1/input_0.cairo | 44 ++ .../nodes/concat_i32_3d_axis_1/input_1.cairo | 44 ++ .../nodes/concat_i32_3d_axis_1/output_0.cairo | 71 ++ src/tests/nodes/concat_i32_3d_axis_2.cairo | 22 + .../nodes/concat_i32_3d_axis_2/input_0.cairo | 44 ++ .../nodes/concat_i32_3d_axis_2/input_1.cairo | 44 ++ .../nodes/concat_i32_3d_axis_2/output_0.cairo | 71 ++ src/tests/nodes/concat_i32_3d_default.cairo | 22 + .../nodes/concat_i32_3d_default/input_0.cairo | 44 ++ .../nodes/concat_i32_3d_default/input_1.cairo | 44 ++ .../concat_i32_3d_default/output_0.cairo | 71 ++ .../concat_i32_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 44 ++ .../input_1.cairo | 44 ++ .../input_2.cairo | 44 ++ .../output_0.cairo | 98 +++ .../concat_i32_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 44 ++ .../input_1.cairo | 44 ++ .../input_2.cairo | 44 ++ .../output_0.cairo | 98 +++ src/tests/nodes/concat_i8_1d.cairo | 22 + src/tests/nodes/concat_i8_1d/input_0.cairo | 17 + src/tests/nodes/concat_i8_1d/input_1.cairo | 17 + src/tests/nodes/concat_i8_1d/output_0.cairo | 20 + src/tests/nodes/concat_i8_2d.cairo | 22 + src/tests/nodes/concat_i8_2d/input_0.cairo | 19 + src/tests/nodes/concat_i8_2d/input_1.cairo | 19 + src/tests/nodes/concat_i8_2d/output_0.cairo | 23 + src/tests/nodes/concat_i8_3d_axis_1.cairo | 22 + .../nodes/concat_i8_3d_axis_1/input_0.cairo | 43 ++ .../nodes/concat_i8_3d_axis_1/input_1.cairo | 43 ++ .../nodes/concat_i8_3d_axis_1/output_0.cairo | 70 ++ src/tests/nodes/concat_i8_3d_axis_2.cairo | 22 + .../nodes/concat_i8_3d_axis_2/input_0.cairo | 43 ++ .../nodes/concat_i8_3d_axis_2/input_1.cairo | 43 ++ .../nodes/concat_i8_3d_axis_2/output_0.cairo | 70 ++ src/tests/nodes/concat_i8_3d_default.cairo | 22 + .../nodes/concat_i8_3d_default/input_0.cairo | 43 ++ .../nodes/concat_i8_3d_default/input_1.cairo | 43 ++ .../nodes/concat_i8_3d_default/output_0.cairo | 70 ++ .../concat_i8_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ .../concat_i8_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ src/tests/nodes/concat_u32_1d.cairo | 22 + src/tests/nodes/concat_u32_1d/input_0.cairo | 17 + src/tests/nodes/concat_u32_1d/input_1.cairo | 17 + src/tests/nodes/concat_u32_1d/output_0.cairo | 20 + src/tests/nodes/concat_u32_2d.cairo | 22 + src/tests/nodes/concat_u32_2d/input_0.cairo | 19 + src/tests/nodes/concat_u32_2d/input_1.cairo | 19 + src/tests/nodes/concat_u32_2d/output_0.cairo | 23 + src/tests/nodes/concat_u32_3d_axis_1.cairo | 22 + .../nodes/concat_u32_3d_axis_1/input_0.cairo | 43 ++ .../nodes/concat_u32_3d_axis_1/input_1.cairo | 43 ++ .../nodes/concat_u32_3d_axis_1/output_0.cairo | 70 ++ src/tests/nodes/concat_u32_3d_axis_2.cairo | 22 + .../nodes/concat_u32_3d_axis_2/input_0.cairo | 43 ++ .../nodes/concat_u32_3d_axis_2/input_1.cairo | 43 ++ .../nodes/concat_u32_3d_axis_2/output_0.cairo | 70 ++ src/tests/nodes/concat_u32_3d_default.cairo | 22 + .../nodes/concat_u32_3d_default/input_0.cairo | 43 ++ .../nodes/concat_u32_3d_default/input_1.cairo | 43 ++ .../concat_u32_3d_default/output_0.cairo | 70 ++ .../concat_u32_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ .../concat_u32_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 43 ++ .../input_1.cairo | 43 ++ .../input_2.cairo | 43 ++ .../output_0.cairo | 97 +++ 155 files changed, 6713 insertions(+), 3 deletions(-) create mode 100644 nodegen/node/concat.py create mode 100644 src/tests/nodes/concat_fp16x16_1d.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_1d.cairo create mode 100644 src/tests/nodes/concat_i32_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_2d.cairo create mode 100644 src/tests/nodes/concat_i32_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_1d.cairo create mode 100644 src/tests/nodes/concat_u32_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_2d.cairo create mode 100644 src/tests/nodes/concat_u32_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo diff --git a/.gitignore b/.gitignore index b69dbeef7..da2ca529d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ target __pycache__ neural_network/.venv +orion_test \ No newline at end of file diff --git a/nodegen/node/concat.py b/nodegen/node/concat.py new file mode 100644 index 000000000..3df9decce --- /dev/null +++ b/nodegen/node/concat.py @@ -0,0 +1,686 @@ +import numpy as np +from nodegen.node import RunAll +from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl, Trait +# 687 +class Concat(RunAll): + @staticmethod + def concat_u32(): + + def concat_1D(): + x1 = np.arange(0,3).astype(np.uint32) + x2 = np.arange(3,6).astype(np.uint32) + y = np.concatenate((x1, x2)) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_1d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + + def concat_2D(): + x1 = np.arange(0,4).astype(np.uint32).reshape(2,2) + x2 = np.arange(4,8).astype(np.uint32).reshape(2,2) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_2d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def concat_3D(): + def default(): + x1 = np.arange(0,27).astype(np.uint32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.uint32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_3d_default" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_1(): + x1 = np.arange(0,27).astype(np.uint32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.uint32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=1) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_3d_axis_1" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_2(): + x1 = np.arange(0,27).astype(np.uint32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.uint32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=2) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_3d_axis_2" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_1(): + x1 = np.arange(0,27).astype(np.uint32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.uint32).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.uint32).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=1) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.U32, x3.shape, x3.flatten()) + + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_3d_three_tensors_axis_1" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_2(): + x1 = np.arange(0,27).astype(np.uint32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.uint32).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.uint32).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=2) + + x1 = Tensor(Dtype.U32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.U32, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.U32, x3.shape, x3.flatten()) + + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "concat_u32_3d_three_tensors_axis_2" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + default() + axis_1() + axis_2() + three_tensors_axis_1() + three_tensors_axis_2() + + concat_1D() + concat_2D() + concat_3D() + + @staticmethod + def concat_i32(): + def concat_1D(): + x1 = np.arange(0,3).astype(np.int32) + x2 = np.arange(3,6).astype(np.int32) + y = np.concatenate((x1, x2)) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_1d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR.TENSOR) + + + def concat_2D(): + x1 = np.arange(0,4).astype(np.int32).reshape(2,2) + x2 = np.arange(4,8).astype(np.int32).reshape(2,2) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_2d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def concat_3D(): + def default(): + x1 = np.arange(0,27).astype(np.int32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_3d_default" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_1(): + x1 = np.arange(0,27).astype(np.int32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=1) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_3d_axis_1" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_2(): + x1 = np.arange(0,27).astype(np.int32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int32).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=2) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_3d_axis_2" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_1(): + x1 = np.arange(0,27).astype(np.int32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int32).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int32).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=1) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.I32, x3.shape, x3.flatten()) + + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_3d_three_tensors_axis_1" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_2(): + x1 = np.arange(0,27).astype(np.int32).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int32).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int32).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=2) + + x1 = Tensor(Dtype.I32, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.I32, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.I32, x3.shape, x3.flatten()) + + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "concat_i32_3d_three_tensors_axis_2" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + default() + axis_1() + axis_2() + three_tensors_axis_1() + three_tensors_axis_2() + + concat_1D() + concat_2D() + concat_3D() + + @staticmethod + def concat_i8(): + def concat_1D(): + x1 = np.arange(0,3).astype(np.int8) + x2 = np.arange(3,6).astype(np.int8) + y = np.concatenate((x1, x2)) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_1d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR.TENSOR) + + + def concat_2D(): + x1 = np.arange(0,4).astype(np.int8).reshape(2,2) + x2 = np.arange(4,8).astype(np.int8).reshape(2,2) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_2d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def concat_3D(): + def default(): + x1 = np.arange(0,27).astype(np.int8).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int8).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_3d_default" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_1(): + x1 = np.arange(0,27).astype(np.int8).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int8).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=1) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_3d_axis_1" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_2(): + x1 = np.arange(0,27).astype(np.int8).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int8).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=2) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_3d_axis_2" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_1(): + x1 = np.arange(0,27).astype(np.int8).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int8).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int8).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=1) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.FP8x23, x3.shape, x3.flatten()) + + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_3d_three_tensors_axis_1" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_2(): + x1 = np.arange(0,27).astype(np.int8).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int8).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int8).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=2) + + x1 = Tensor(Dtype.FP8x23, x1.shape, x1.flatten()) + x2 = Tensor(Dtype.FP8x23, x2.shape, x2.flatten()) + x3 = Tensor(Dtype.FP8x23, x3.shape, x3.flatten()) + + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) + + name = "concat_i8_3d_three_tensors_axis_2" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + default() + axis_1() + axis_2() + three_tensors_axis_1() + three_tensors_axis_2() + + concat_1D() + concat_2D() + concat_3D() + + @staticmethod + def concat_fp8x23(): + def concat_1D(): + x1 = np.arange(0,3).astype(np.int64) + x2 = np.arange(3,6).astype(np.int64) + y = np.concatenate((x1, x2)) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_1d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR.TENSOR) + + + def concat_2D(): + x1 = np.arange(0,4).astype(np.int64).reshape(2,2) + x2 = np.arange(4,8).astype(np.int64).reshape(2,2) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_2d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def concat_3D(): + def default(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape,to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_3d_default" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_1(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=1) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_3d_axis_1" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_2(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=2) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_3d_axis_2" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_1(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int64).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=1) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3 = Tensor(Dtype.FP8x23, x3.shape,to_fp( + x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_3d_three_tensors_axis_1" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_2(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int64).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=2) + + x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3 = Tensor(Dtype.FP8x23, x3.shape, to_fp( + x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + + name = "concat_fp8x23_3d_three_tensors_axis_2" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + default() + axis_1() + axis_2() + three_tensors_axis_1() + three_tensors_axis_2() + + concat_1D() + concat_2D() + concat_3D() + + staticmethod + def concat_fp16x16(): + def concat_1D(): + x1 = np.arange(0,3).astype(np.int64) + x2 = np.arange(3,6).astype(np.int64) + y = np.concatenate((x1, x2)) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_1d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR.TENSOR) + + + def concat_2D(): + x1 = np.arange(0,4).astype(np.int64).reshape(2,2) + x2 = np.arange(4,8).astype(np.int64).reshape(2,2) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_2d" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def concat_3D(): + def default(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=0) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_3d_default" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_1(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=1) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y = Tensor(Dtype.FP16x16, y.shape,to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_3d_axis_1" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def axis_2(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + y = np.concatenate((x1, x2), axis=2) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_3d_axis_2" + make_node([x1, x2], [y], name) + make_test( + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_1(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int64).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=1) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( + x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_3d_three_tensors_axis_1" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 1)", + file_name= name, trait_type= Trait.TENSOR) + + def three_tensors_axis_2(): + x1 = np.arange(0,27).astype(np.int64).reshape(3,3,3) + x2 = np.arange(27,54).astype(np.int64).reshape(3,3,3) + x3 = np.arange(54,81).astype(np.int64).reshape(3,3,3) + + y = np.concatenate((x1, x2, x3), axis=2) + + x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( + x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( + x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( + x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + y = Tensor(Dtype.FP16x16, y.shape,to_fp( + y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + + name = "concat_fp16x16_3d_three_tensors_axis_2" + make_node([x1, x2, x3], [y], name) + make_test( + inputs = [x1, x2, x3], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1, input_2].span(), 2)", + file_name= name, trait_type= Trait.TENSOR) + + default() + axis_1() + axis_2() + three_tensors_axis_1() + three_tensors_axis_2() + + concat_1D() + concat_2D() + concat_3D() diff --git a/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo b/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo index fe56460e0..ef12ab1a9 100644 --- a/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo +++ b/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo @@ -1,5 +1,5 @@ use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::impl_16x16::{ +use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq }; use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; diff --git a/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo b/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo index c817ca016..961c5aa28 100644 --- a/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo +++ b/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo @@ -1,6 +1,6 @@ use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::impl_8x23::{ - FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23AddEq +use orion::numbers::fixed_point::implementations::fp16x16::core::{ + FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq }; use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; use orion::operators::tensor::core::Tensor; diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index e819cfd40..bf615b910 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -419,3 +419,38 @@ mod sin_i8_fp8x23; mod sin_i8_fp16x16; mod sin_u32_fp8x23; mod sin_u32_fp16x16; +mod concat_fp16x16_1d; +mod concat_fp16x16_2d; +mod concat_fp16x16_3d_default; +mod concat_fp16x16_3d_axis_1; +mod concat_fp16x16_3d_axis_2; +mod concat_fp16x16_3d_three_tensors_axis_1; +mod concat_fp16x16_3d_three_tensors_axis_2; +mod concat_fp8x23_1d; +mod concat_fp8x23_2d; +mod concat_fp8x23_3d_default; +mod concat_fp8x23_3d_axis_1; +mod concat_fp8x23_3d_axis_2; +mod concat_fp8x23_3d_three_tensors_axis_1; +mod concat_fp8x23_3d_three_tensors_axis_2; +mod concat_i32_1d; +mod concat_i32_2d; +mod concat_i32_3d_default; +mod concat_i32_3d_axis_1; +mod concat_i32_3d_axis_2; +mod concat_i32_3d_three_tensors_axis_1; +mod concat_i32_3d_three_tensors_axis_2; +mod concat_i8_1d; +mod concat_i8_2d; +mod concat_i8_3d_default; +mod concat_i8_3d_axis_1; +mod concat_i8_3d_axis_2; +mod concat_i8_3d_three_tensors_axis_1; +mod concat_i8_3d_three_tensors_axis_2; +mod concat_u32_1d; +mod concat_u32_2d; +mod concat_u32_3d_default; +mod concat_u32_3d_axis_1; +mod concat_u32_3d_axis_2; +mod concat_u32_3d_three_tensors_axis_1; +mod concat_u32_3d_three_tensors_axis_2; diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo new file mode 100644 index 000000000..575b46550 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo new file mode 100644 index 000000000..67db06586 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo new file mode 100644 index 000000000..48ee95945 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo new file mode 100644 index 000000000..3d34eed40 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo new file mode 100644 index 000000000..4f2b70d77 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo new file mode 100644 index 000000000..2989d0b7b --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo new file mode 100644 index 000000000..4367f2454 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo new file mode 100644 index 000000000..625da6457 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo new file mode 100644 index 000000000..05bf4ac42 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..235303716 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..8d98e3f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..dd92e5813 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo new file mode 100644 index 000000000..57d4d1ffd --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..235303716 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..8d98e3f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..21dd7fbf0 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo new file mode 100644 index 000000000..73e355b45 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo new file mode 100644 index 000000000..235303716 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo new file mode 100644 index 000000000..8d98e3f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo new file mode 100644 index 000000000..73c645a79 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..17593a141 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..235303716 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..8d98e3f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..7e45c5af2 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 4259840, sign: false }); + data.append(FixedType { mag: 4325376, sign: false }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 5242880, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..34a40dd63 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 4259840, sign: false }); + data.append(FixedType { mag: 4325376, sign: false }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 5242880, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..d33b8a7ef --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..235303716 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..8d98e3f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..7e45c5af2 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 4259840, sign: false }); + data.append(FixedType { mag: 4325376, sign: false }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 5242880, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..fa4fab744 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 4259840, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 4325376, sign: false }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 5242880, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo new file mode 100644 index 000000000..78c3fda52 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo new file mode 100644 index 000000000..f26a2c183 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo new file mode 100644 index 000000000..c1860b5d6 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo new file mode 100644 index 000000000..4743e3017 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo new file mode 100644 index 000000000..334201ce1 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo new file mode 100644 index 000000000..d018bc3e0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo new file mode 100644 index 000000000..ef68044bf --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo new file mode 100644 index 000000000..d95e728b0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo new file mode 100644 index 000000000..94b5bb16f --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..8866e7df2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..793142075 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..d0f255f3f --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo new file mode 100644 index 000000000..4750da5dd --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..8866e7df2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..793142075 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..9fc075c3d --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo new file mode 100644 index 000000000..15628bbb4 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo new file mode 100644 index 000000000..8866e7df2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo new file mode 100644 index 000000000..793142075 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo new file mode 100644 index 000000000..3cebbae28 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..9d4f0b25c --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..8866e7df2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..793142075 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..5a422933d --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 478150656, sign: false }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 545259520, sign: false }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 578813952, sign: false }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 612368384, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 645922816, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 671088640, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..0fe80fd7e --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 478150656, sign: false }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 545259520, sign: false }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 578813952, sign: false }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 612368384, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 645922816, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 671088640, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..956e9a404 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..8866e7df2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..793142075 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..5a422933d --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 478150656, sign: false }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 545259520, sign: false }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 578813952, sign: false }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 612368384, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 645922816, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 671088640, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..5c89fdbf2 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 478150656, sign: false }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 545259520, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 578813952, sign: false }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 612368384, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 645922816, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 671088640, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d.cairo b/src/tests/nodes/concat_i32_1d.cairo new file mode 100644 index 000000000..aa07ffa53 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo new file mode 100644 index 000000000..839d248fb --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -0,0 +1,18 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo new file mode 100644 index 000000000..4c5f2f235 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -0,0 +1,18 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo new file mode 100644 index 000000000..dd049749a --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -0,0 +1,21 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d.cairo b/src/tests/nodes/concat_i32_2d.cairo new file mode 100644 index 000000000..2dd7a154a --- /dev/null +++ b/src/tests/nodes/concat_i32_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo new file mode 100644 index 000000000..a58073bdf --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo new file mode 100644 index 000000000..64f7e66f8 --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo new file mode 100644 index 000000000..0ad7bfd63 --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -0,0 +1,24 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1.cairo new file mode 100644 index 000000000..f84261a18 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..10311fced --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..ba8cae9d6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..cefc31de6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -0,0 +1,71 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2.cairo b/src/tests/nodes/concat_i32_3d_axis_2.cairo new file mode 100644 index 000000000..ea4484d65 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..10311fced --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..ba8cae9d6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..0bd230421 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -0,0 +1,71 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default.cairo b/src/tests/nodes/concat_i32_3d_default.cairo new file mode 100644 index 000000000..3e9b832cb --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo new file mode 100644 index 000000000..10311fced --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo new file mode 100644 index 000000000..ba8cae9d6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo new file mode 100644 index 000000000..1c11ae1dd --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -0,0 +1,71 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..7a676e6ea --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..10311fced --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..ba8cae9d6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..074b739fa --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..d001780b5 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,98 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..01019a670 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..10311fced --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..ba8cae9d6 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..074b739fa --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,44 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..8b472aebe --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,98 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d.cairo b/src/tests/nodes/concat_i8_1d.cairo new file mode 100644 index 000000000..6198e6c0e --- /dev/null +++ b/src/tests/nodes/concat_i8_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_0.cairo b/src/tests/nodes/concat_i8_1d/input_0.cairo new file mode 100644 index 000000000..61b138e63 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_0.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_1.cairo b/src/tests/nodes/concat_i8_1d/input_1.cairo new file mode 100644 index 000000000..9bf2bbadb --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_1.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/output_0.cairo b/src/tests/nodes/concat_i8_1d/output_0.cairo new file mode 100644 index 000000000..f4cc71a42 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d.cairo b/src/tests/nodes/concat_i8_2d.cairo new file mode 100644 index 000000000..a9ce4a45c --- /dev/null +++ b/src/tests/nodes/concat_i8_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_0.cairo b/src/tests/nodes/concat_i8_2d/input_0.cairo new file mode 100644 index 000000000..095672ea7 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_1.cairo b/src/tests/nodes/concat_i8_2d/input_1.cairo new file mode 100644 index 000000000..d9190c875 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_1.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/output_0.cairo b/src/tests/nodes/concat_i8_2d/output_0.cairo new file mode 100644 index 000000000..5e23d5b58 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/output_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1.cairo new file mode 100644 index 000000000..10cfac679 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..0b5b08268 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..918442621 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..da8e0726e --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2.cairo b/src/tests/nodes/concat_i8_3d_axis_2.cairo new file mode 100644 index 000000000..46d11f03a --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..0b5b08268 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..918442621 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..0aee11e9f --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default.cairo b/src/tests/nodes/concat_i8_3d_default.cairo new file mode 100644 index 000000000..eb55088e7 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_0.cairo b/src/tests/nodes/concat_i8_3d_default/input_0.cairo new file mode 100644 index 000000000..0b5b08268 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_1.cairo b/src/tests/nodes/concat_i8_3d_default/input_1.cairo new file mode 100644 index 000000000..918442621 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/output_0.cairo b/src/tests/nodes/concat_i8_3d_default/output_0.cairo new file mode 100644 index 000000000..ec0392c75 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..7967620c6 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..0b5b08268 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..918442621 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..080506104 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 54, sign: false }); + data.append(FixedType { mag: 55, sign: false }); + data.append(FixedType { mag: 56, sign: false }); + data.append(FixedType { mag: 57, sign: false }); + data.append(FixedType { mag: 58, sign: false }); + data.append(FixedType { mag: 59, sign: false }); + data.append(FixedType { mag: 60, sign: false }); + data.append(FixedType { mag: 61, sign: false }); + data.append(FixedType { mag: 62, sign: false }); + data.append(FixedType { mag: 63, sign: false }); + data.append(FixedType { mag: 64, sign: false }); + data.append(FixedType { mag: 65, sign: false }); + data.append(FixedType { mag: 66, sign: false }); + data.append(FixedType { mag: 67, sign: false }); + data.append(FixedType { mag: 68, sign: false }); + data.append(FixedType { mag: 69, sign: false }); + data.append(FixedType { mag: 70, sign: false }); + data.append(FixedType { mag: 71, sign: false }); + data.append(FixedType { mag: 72, sign: false }); + data.append(FixedType { mag: 73, sign: false }); + data.append(FixedType { mag: 74, sign: false }); + data.append(FixedType { mag: 75, sign: false }); + data.append(FixedType { mag: 76, sign: false }); + data.append(FixedType { mag: 77, sign: false }); + data.append(FixedType { mag: 78, sign: false }); + data.append(FixedType { mag: 79, sign: false }); + data.append(FixedType { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..0cf4cc833 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 54, sign: false }); + data.append(FixedType { mag: 55, sign: false }); + data.append(FixedType { mag: 56, sign: false }); + data.append(FixedType { mag: 57, sign: false }); + data.append(FixedType { mag: 58, sign: false }); + data.append(FixedType { mag: 59, sign: false }); + data.append(FixedType { mag: 60, sign: false }); + data.append(FixedType { mag: 61, sign: false }); + data.append(FixedType { mag: 62, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 63, sign: false }); + data.append(FixedType { mag: 64, sign: false }); + data.append(FixedType { mag: 65, sign: false }); + data.append(FixedType { mag: 66, sign: false }); + data.append(FixedType { mag: 67, sign: false }); + data.append(FixedType { mag: 68, sign: false }); + data.append(FixedType { mag: 69, sign: false }); + data.append(FixedType { mag: 70, sign: false }); + data.append(FixedType { mag: 71, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + data.append(FixedType { mag: 72, sign: false }); + data.append(FixedType { mag: 73, sign: false }); + data.append(FixedType { mag: 74, sign: false }); + data.append(FixedType { mag: 75, sign: false }); + data.append(FixedType { mag: 76, sign: false }); + data.append(FixedType { mag: 77, sign: false }); + data.append(FixedType { mag: 78, sign: false }); + data.append(FixedType { mag: 79, sign: false }); + data.append(FixedType { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..92d862a5b --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..0b5b08268 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..918442621 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..080506104 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 54, sign: false }); + data.append(FixedType { mag: 55, sign: false }); + data.append(FixedType { mag: 56, sign: false }); + data.append(FixedType { mag: 57, sign: false }); + data.append(FixedType { mag: 58, sign: false }); + data.append(FixedType { mag: 59, sign: false }); + data.append(FixedType { mag: 60, sign: false }); + data.append(FixedType { mag: 61, sign: false }); + data.append(FixedType { mag: 62, sign: false }); + data.append(FixedType { mag: 63, sign: false }); + data.append(FixedType { mag: 64, sign: false }); + data.append(FixedType { mag: 65, sign: false }); + data.append(FixedType { mag: 66, sign: false }); + data.append(FixedType { mag: 67, sign: false }); + data.append(FixedType { mag: 68, sign: false }); + data.append(FixedType { mag: 69, sign: false }); + data.append(FixedType { mag: 70, sign: false }); + data.append(FixedType { mag: 71, sign: false }); + data.append(FixedType { mag: 72, sign: false }); + data.append(FixedType { mag: 73, sign: false }); + data.append(FixedType { mag: 74, sign: false }); + data.append(FixedType { mag: 75, sign: false }); + data.append(FixedType { mag: 76, sign: false }); + data.append(FixedType { mag: 77, sign: false }); + data.append(FixedType { mag: 78, sign: false }); + data.append(FixedType { mag: 79, sign: false }); + data.append(FixedType { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..5ee78ec1d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1, sign: false }); + data.append(FixedType { mag: 2, sign: false }); + data.append(FixedType { mag: 27, sign: false }); + data.append(FixedType { mag: 28, sign: false }); + data.append(FixedType { mag: 29, sign: false }); + data.append(FixedType { mag: 54, sign: false }); + data.append(FixedType { mag: 55, sign: false }); + data.append(FixedType { mag: 56, sign: false }); + data.append(FixedType { mag: 3, sign: false }); + data.append(FixedType { mag: 4, sign: false }); + data.append(FixedType { mag: 5, sign: false }); + data.append(FixedType { mag: 30, sign: false }); + data.append(FixedType { mag: 31, sign: false }); + data.append(FixedType { mag: 32, sign: false }); + data.append(FixedType { mag: 57, sign: false }); + data.append(FixedType { mag: 58, sign: false }); + data.append(FixedType { mag: 59, sign: false }); + data.append(FixedType { mag: 6, sign: false }); + data.append(FixedType { mag: 7, sign: false }); + data.append(FixedType { mag: 8, sign: false }); + data.append(FixedType { mag: 33, sign: false }); + data.append(FixedType { mag: 34, sign: false }); + data.append(FixedType { mag: 35, sign: false }); + data.append(FixedType { mag: 60, sign: false }); + data.append(FixedType { mag: 61, sign: false }); + data.append(FixedType { mag: 62, sign: false }); + data.append(FixedType { mag: 9, sign: false }); + data.append(FixedType { mag: 10, sign: false }); + data.append(FixedType { mag: 11, sign: false }); + data.append(FixedType { mag: 36, sign: false }); + data.append(FixedType { mag: 37, sign: false }); + data.append(FixedType { mag: 38, sign: false }); + data.append(FixedType { mag: 63, sign: false }); + data.append(FixedType { mag: 64, sign: false }); + data.append(FixedType { mag: 65, sign: false }); + data.append(FixedType { mag: 12, sign: false }); + data.append(FixedType { mag: 13, sign: false }); + data.append(FixedType { mag: 14, sign: false }); + data.append(FixedType { mag: 39, sign: false }); + data.append(FixedType { mag: 40, sign: false }); + data.append(FixedType { mag: 41, sign: false }); + data.append(FixedType { mag: 66, sign: false }); + data.append(FixedType { mag: 67, sign: false }); + data.append(FixedType { mag: 68, sign: false }); + data.append(FixedType { mag: 15, sign: false }); + data.append(FixedType { mag: 16, sign: false }); + data.append(FixedType { mag: 17, sign: false }); + data.append(FixedType { mag: 42, sign: false }); + data.append(FixedType { mag: 43, sign: false }); + data.append(FixedType { mag: 44, sign: false }); + data.append(FixedType { mag: 69, sign: false }); + data.append(FixedType { mag: 70, sign: false }); + data.append(FixedType { mag: 71, sign: false }); + data.append(FixedType { mag: 18, sign: false }); + data.append(FixedType { mag: 19, sign: false }); + data.append(FixedType { mag: 20, sign: false }); + data.append(FixedType { mag: 45, sign: false }); + data.append(FixedType { mag: 46, sign: false }); + data.append(FixedType { mag: 47, sign: false }); + data.append(FixedType { mag: 72, sign: false }); + data.append(FixedType { mag: 73, sign: false }); + data.append(FixedType { mag: 74, sign: false }); + data.append(FixedType { mag: 21, sign: false }); + data.append(FixedType { mag: 22, sign: false }); + data.append(FixedType { mag: 23, sign: false }); + data.append(FixedType { mag: 48, sign: false }); + data.append(FixedType { mag: 49, sign: false }); + data.append(FixedType { mag: 50, sign: false }); + data.append(FixedType { mag: 75, sign: false }); + data.append(FixedType { mag: 76, sign: false }); + data.append(FixedType { mag: 77, sign: false }); + data.append(FixedType { mag: 24, sign: false }); + data.append(FixedType { mag: 25, sign: false }); + data.append(FixedType { mag: 26, sign: false }); + data.append(FixedType { mag: 51, sign: false }); + data.append(FixedType { mag: 52, sign: false }); + data.append(FixedType { mag: 53, sign: false }); + data.append(FixedType { mag: 78, sign: false }); + data.append(FixedType { mag: 79, sign: false }); + data.append(FixedType { mag: 80, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo new file mode 100644 index 000000000..2c623a058 --- /dev/null +++ b/src/tests/nodes/concat_u32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo new file mode 100644 index 000000000..4681c7596 --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo new file mode 100644 index 000000000..632eef334 --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -0,0 +1,17 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(4); + data.append(5); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo new file mode 100644 index 000000000..f01348cb6 --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo new file mode 100644 index 000000000..8c490e0fb --- /dev/null +++ b/src/tests/nodes/concat_u32_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo new file mode 100644 index 000000000..0c5fdf6d1 --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo new file mode 100644 index 000000000..df9839699 --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo new file mode 100644 index 000000000..03828e525 --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo new file mode 100644 index 000000000..3397447a8 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..4cf4844bc --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..9d4ab9a02 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..5bcc8645b --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo new file mode 100644 index 000000000..5f6245bb7 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..4cf4844bc --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..9d4ab9a02 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..be05b541d --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(27); + data.append(28); + data.append(29); + data.append(3); + data.append(4); + data.append(5); + data.append(30); + data.append(31); + data.append(32); + data.append(6); + data.append(7); + data.append(8); + data.append(33); + data.append(34); + data.append(35); + data.append(9); + data.append(10); + data.append(11); + data.append(36); + data.append(37); + data.append(38); + data.append(12); + data.append(13); + data.append(14); + data.append(39); + data.append(40); + data.append(41); + data.append(15); + data.append(16); + data.append(17); + data.append(42); + data.append(43); + data.append(44); + data.append(18); + data.append(19); + data.append(20); + data.append(45); + data.append(46); + data.append(47); + data.append(21); + data.append(22); + data.append(23); + data.append(48); + data.append(49); + data.append(50); + data.append(24); + data.append(25); + data.append(26); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo new file mode 100644 index 000000000..7a9d069bd --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo new file mode 100644 index 000000000..4cf4844bc --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo new file mode 100644 index 000000000..9d4ab9a02 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo new file mode 100644 index 000000000..7f80c8e67 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -0,0 +1,70 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..82cf6c24b --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..4cf4844bc --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..9d4ab9a02 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..f6d3b55e9 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..8fb1044c7 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..3bc4279a4 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..4cf4844bc --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..9d4ab9a02 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..f6d3b55e9 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,43 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..c77d23ad1 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,97 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(27); + data.append(28); + data.append(29); + data.append(54); + data.append(55); + data.append(56); + data.append(3); + data.append(4); + data.append(5); + data.append(30); + data.append(31); + data.append(32); + data.append(57); + data.append(58); + data.append(59); + data.append(6); + data.append(7); + data.append(8); + data.append(33); + data.append(34); + data.append(35); + data.append(60); + data.append(61); + data.append(62); + data.append(9); + data.append(10); + data.append(11); + data.append(36); + data.append(37); + data.append(38); + data.append(63); + data.append(64); + data.append(65); + data.append(12); + data.append(13); + data.append(14); + data.append(39); + data.append(40); + data.append(41); + data.append(66); + data.append(67); + data.append(68); + data.append(15); + data.append(16); + data.append(17); + data.append(42); + data.append(43); + data.append(44); + data.append(69); + data.append(70); + data.append(71); + data.append(18); + data.append(19); + data.append(20); + data.append(45); + data.append(46); + data.append(47); + data.append(72); + data.append(73); + data.append(74); + data.append(21); + data.append(22); + data.append(23); + data.append(48); + data.append(49); + data.append(50); + data.append(75); + data.append(76); + data.append(77); + data.append(24); + data.append(25); + data.append(26); + data.append(51); + data.append(52); + data.append(53); + data.append(78); + data.append(79); + data.append(80); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file From 9545dddff99004755ac2c42d8e60d66d13602e0a Mon Sep 17 00:00:00 2001 From: Dincer Guner Date: Thu, 24 Aug 2023 21:35:10 +0300 Subject: [PATCH 003/179] implement slice --- docs/SUMMARY.md | 1 + docs/framework/compatibility.md | 4 +- docs/framework/operators/tensor/README.md | 1 + .../operators/tensor/tensor.slice.md | 52 + nodegen/node/slice.py | 155 +++ src/operators/tensor/core.cairo | 212 ++++ .../implementations/impl_tensor_fp.cairo | 12 +- .../implementations/impl_tensor_i32.cairo | 12 +- .../implementations/impl_tensor_i8.cairo | 12 +- .../implementations/impl_tensor_u32.cairo | 12 +- src/tests/nodes.cairo | 10 + src/tests/nodes/slice_fp16x16_2d.cairo | 20 + .../nodes/slice_fp16x16_2d/input_0.cairo | 23 + .../nodes/slice_fp16x16_2d/output_0.cairo | 19 + src/tests/nodes/slice_fp16x16_3d.cairo | 20 + .../nodes/slice_fp16x16_3d/input_0.cairo | 1016 ++++++++++++++++ .../nodes/slice_fp16x16_3d/output_0.cairo | 76 ++ src/tests/nodes/slice_fp8x23_2d.cairo | 20 + src/tests/nodes/slice_fp8x23_2d/input_0.cairo | 23 + .../nodes/slice_fp8x23_2d/output_0.cairo | 19 + src/tests/nodes/slice_fp8x23_3d.cairo | 20 + src/tests/nodes/slice_fp8x23_3d/input_0.cairo | 1016 ++++++++++++++++ .../nodes/slice_fp8x23_3d/output_0.cairo | 76 ++ src/tests/nodes/slice_i32_2d.cairo | 20 + src/tests/nodes/slice_i32_2d/input_0.cairo | 24 + src/tests/nodes/slice_i32_2d/output_0.cairo | 20 + src/tests/nodes/slice_i32_3d.cairo | 20 + src/tests/nodes/slice_i32_3d/input_0.cairo | 1017 +++++++++++++++++ src/tests/nodes/slice_i32_3d/output_0.cairo | 77 ++ src/tests/nodes/slice_i8_2d.cairo | 20 + src/tests/nodes/slice_i8_2d/input_0.cairo | 24 + src/tests/nodes/slice_i8_2d/output_0.cairo | 20 + src/tests/nodes/slice_i8_3d.cairo | 20 + src/tests/nodes/slice_i8_3d/input_0.cairo | 1017 +++++++++++++++++ src/tests/nodes/slice_i8_3d/output_0.cairo | 77 ++ src/tests/nodes/slice_u32_2d.cairo | 20 + src/tests/nodes/slice_u32_2d/input_0.cairo | 23 + src/tests/nodes/slice_u32_2d/output_0.cairo | 19 + src/tests/nodes/slice_u32_3d.cairo | 20 + src/tests/nodes/slice_u32_3d/input_0.cairo | 1016 ++++++++++++++++ src/tests/nodes/slice_u32_3d/output_0.cairo | 76 ++ 41 files changed, 6355 insertions(+), 6 deletions(-) create mode 100644 docs/framework/operators/tensor/tensor.slice.md create mode 100644 nodegen/node/slice.py create mode 100644 src/tests/nodes/slice_fp16x16_2d.cairo create mode 100644 src/tests/nodes/slice_fp16x16_2d/input_0.cairo create mode 100644 src/tests/nodes/slice_fp16x16_2d/output_0.cairo create mode 100644 src/tests/nodes/slice_fp16x16_3d.cairo create mode 100644 src/tests/nodes/slice_fp16x16_3d/input_0.cairo create mode 100644 src/tests/nodes/slice_fp16x16_3d/output_0.cairo create mode 100644 src/tests/nodes/slice_fp8x23_2d.cairo create mode 100644 src/tests/nodes/slice_fp8x23_2d/input_0.cairo create mode 100644 src/tests/nodes/slice_fp8x23_2d/output_0.cairo create mode 100644 src/tests/nodes/slice_fp8x23_3d.cairo create mode 100644 src/tests/nodes/slice_fp8x23_3d/input_0.cairo create mode 100644 src/tests/nodes/slice_fp8x23_3d/output_0.cairo create mode 100644 src/tests/nodes/slice_i32_2d.cairo create mode 100644 src/tests/nodes/slice_i32_2d/input_0.cairo create mode 100644 src/tests/nodes/slice_i32_2d/output_0.cairo create mode 100644 src/tests/nodes/slice_i32_3d.cairo create mode 100644 src/tests/nodes/slice_i32_3d/input_0.cairo create mode 100644 src/tests/nodes/slice_i32_3d/output_0.cairo create mode 100644 src/tests/nodes/slice_i8_2d.cairo create mode 100644 src/tests/nodes/slice_i8_2d/input_0.cairo create mode 100644 src/tests/nodes/slice_i8_2d/output_0.cairo create mode 100644 src/tests/nodes/slice_i8_3d.cairo create mode 100644 src/tests/nodes/slice_i8_3d/input_0.cairo create mode 100644 src/tests/nodes/slice_i8_3d/output_0.cairo create mode 100644 src/tests/nodes/slice_u32_2d.cairo create mode 100644 src/tests/nodes/slice_u32_2d/input_0.cairo create mode 100644 src/tests/nodes/slice_u32_2d/output_0.cairo create mode 100644 src/tests/nodes/slice_u32_3d.cairo create mode 100644 src/tests/nodes/slice_u32_3d/input_0.cairo create mode 100644 src/tests/nodes/slice_u32_3d/output_0.cairo diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 61f4576a3..679fcae87 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -75,6 +75,7 @@ * [tensor.or](framework/operators/tensor/tensor.or.md) * [tensor.xor](framework/operators/tensor/tensor.xor.md) * [tensor.onehot](framework/operators/tensor/tensor.onehot.md) + * [tensor.slice](framework/operators/tensor/tensor.slice.md) * [Neural Network](framework/operators/neural-network/README.md) * [nn.relu](framework/operators/neural-network/nn.relu.md) * [nn.leaky\_relu](framework/operators/neural-network/nn.leaky\_relu.md) diff --git a/docs/framework/compatibility.md b/docs/framework/compatibility.md index a5b693849..090990116 100644 --- a/docs/framework/compatibility.md +++ b/docs/framework/compatibility.md @@ -49,7 +49,7 @@ You can see below the list of current supported ONNX Operators: | [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | | [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | | [DequantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | - +| [Slice](operators/tensor/tensor.slice.md) | :white\_check\_mark: | Performance optimizations: @@ -57,4 +57,4 @@ Performance optimizations: | :----------------: | :------------------: | | 8-bit quantization | :white\_check\_mark: | -Current Operators support: **42/156 (27%)** \ No newline at end of file +Current Operators support: **43/156 (28%)** \ No newline at end of file diff --git a/docs/framework/operators/tensor/README.md b/docs/framework/operators/tensor/README.md index b8ac7064e..8184bce7f 100644 --- a/docs/framework/operators/tensor/README.md +++ b/docs/framework/operators/tensor/README.md @@ -87,6 +87,7 @@ use orion::operators::tensor::core::TensorTrait; | [`tensor.cosh`](tensor.cosh.md) | Computes the hyperbolic cosine of all elements of the input tensor. | | [`tensor.asinh`](tensor.asinh.md) | Computes the inverse hyperbolic sine of all elements of the input tensor. | | [`tensor.acosh`](tensor.acosh.md) | Computes the inverse hyperbolic cosine of all elements of the input tensor. | +| [`tensor.slice`](tensor.slice.md) | Produces a slice of the input tensor along multiple axes. | ### Arithmetic Operations diff --git a/docs/framework/operators/tensor/tensor.slice.md b/docs/framework/operators/tensor/tensor.slice.md new file mode 100644 index 000000000..f2843b53d --- /dev/null +++ b/docs/framework/operators/tensor/tensor.slice.md @@ -0,0 +1,52 @@ +# tensor.slice + +```rust + fn slice(self: @Tensor, starts: Span, ends: Span, axes: Option>, steps: Option>) -> Tensor; +``` + +Produces a slice of the input tensor along multiple axes. + +## Args + +* `self`(`@Tensor`) - Tensor of data to extract slices from. +* `starts`(Span) - 1-D tensor of starting indices of corresponding axis in `axes` +* `ends`(Span) - 1-D tensor of ending indices (exclusive) of corresponding axis in `axes` +* `axes`(Option>) - 1-D tensor of axes that `starts` and `ends` apply to. +* `steps`(Option>) - 1-D tensor of slice step of corresponding axis in `axes`. + +## Panics + +* Panics if the length of starts is not equal to the length of ends. +* Panics if the length of starts is not equal to the length of axes. +* Panics if the length of starts is not equal to the length of steps. + +## Returns + +A new `Tensor` slice of the input tensor. + +## Example + +```rust +use array::{ArrayTrait, SpanTrait}; + +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + +fn slice_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 4].span(), + data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), + extra: Option::None(()) + ); + + return tensor.slice( + starts: array![0, 2].span(), + ends: array![2, 4].span(), + axis: Option::None(()), + steps: Option::Some(array![1, 1].span()) + ); +} +>>> [[2 3] + [6 7]] +``` diff --git a/nodegen/node/slice.py b/nodegen/node/slice.py new file mode 100644 index 000000000..1867de266 --- /dev/null +++ b/nodegen/node/slice.py @@ -0,0 +1,155 @@ +import numpy as np +from nodegen.node import RunAll +from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl + + +class Slice(RunAll): + @staticmethod + def slice_u32(): + def slice_2D(): + x = np.random.randint(0, 255, (2, 4)).astype(np.uint32) + y = x[0:2, 2:4] + + x = Tensor(Dtype.U32, x.shape, x.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "slice_u32_2d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span()))", name) + + def slice_3D(): + x = np.random.randint(0, 255, (20, 10, 5)).astype(np.uint32) + y = x[0:3, 0:10:3] + + x = Tensor(Dtype.U32, x.shape, x.flatten()) + y = Tensor(Dtype.U32, y.shape, y.flatten()) + + name = "slice_u32_3d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span()))", name) + + slice_2D() + slice_3D() + + @staticmethod + def slice_i32(): + def slice_2D(): + x = np.random.randint(-127, 127, (2, 4)).astype(np.int32) + y = x[0:2, 2:4] + + x = Tensor(Dtype.I32, x.shape, x.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "slice_i32_2d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span()))", name) + + def slice_3D(): + x = np.random.randint(-127, 127, (20, 10, 5)).astype(np.int32) + y = x[0:3, 0:10:3] + + x = Tensor(Dtype.I32, x.shape, x.flatten()) + y = Tensor(Dtype.I32, y.shape, y.flatten()) + + name = "slice_i32_3d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span()))", name) + + + slice_2D() + slice_3D() + + @staticmethod + def slice_i8(): + def slice_2D(): + x = np.random.randint(-127, 127, (2, 4)).astype(np.int8) + y = x[0:2, 2:4] + + x = Tensor(Dtype.I8, x.shape, x.flatten()) + y = Tensor(Dtype.I8, y.shape, y.flatten()) + + name = "slice_i8_2d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span()))", name) + + def slice_3D(): + x = np.random.randint(-127, 127, (20, 10, 5)).astype(np.int8) + y = x[0:3, 0:10:3] + + x = Tensor(Dtype.I8, x.shape, x.flatten()) + y = Tensor(Dtype.I8, y.shape, y.flatten()) + + name = "slice_i8_3d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span()))", name) + + slice_2D() + slice_3D() + + @staticmethod + def slice_fp8x23(): + def slice_2D(): + x = to_fp(np.random.randint(-127, 127, (2, 4) + ).astype(np.int64), FixedImpl.FP8x23) + y = x[0:2, 2:4] + + x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + + name = "slice_fp8x23_2d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span()))", name) + + def slice_3D(): + x = to_fp(np.random.randint(-127, 127, (20, 10, 5) + ).astype(np.int64), FixedImpl.FP8x23) + y = x[0:3, 0:10:3] + + x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + + name = "slice_fp8x23_3d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span()))", name) + + slice_2D() + slice_3D() + + @staticmethod + def slice_fp16x16(): + def slice_2D(): + x = to_fp(np.random.randint(-127, 127, (2, 4) + ).astype(np.int64), FixedImpl.FP16x16) + y = x[0:2, 2:4] + + x = Tensor(Dtype.FP16x16, x.shape, x.flatten()) + y = Tensor(Dtype.FP16x16, y.shape, y.flatten()) + + name = "slice_fp16x16_2d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span()))", name) + + def slice_3D(): + x = to_fp(np.random.randint(-127, 127, (20, 10, 5) + ).astype(np.int64), FixedImpl.FP16x16) + y = x[0:3, 0:10:3] + + x = Tensor(Dtype.FP16x16, x.shape, x.flatten()) + y = Tensor(Dtype.FP16x16, y.shape, y.flatten()) + + name = "slice_fp16x16_3d" + make_node([x], [y], name) + make_test( + [x], y, "input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span()))", name) + + slice_2D() + slice_3D() diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 9b6cb760a..2013f5222 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -2,6 +2,7 @@ use array::{ArrayTrait, SpanTrait}; use serde::Serde; use option::OptionTrait; +use alexandria_data_structures::array_ext::{SpanTraitExt}; use orion::operators::tensor::helpers::{len_from_shape, check_shape}; use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; @@ -75,6 +76,7 @@ impl TensorSerde, impl TDrop: Drop> of Serde { /// # tensor.new @@ -2386,6 +2388,66 @@ trait TensorTrait { /// ``` /// fn sqrt(self: @Tensor) -> Tensor; + /// # tensor.slice + /// + /// ```rust + /// fn slice(self: @Tensor, starts: Span, ends: Span, axes: Option>, steps: Option>) -> Tensor; + /// ``` + /// + /// Produces a slice of the input tensor along multiple axes. + /// + /// ## Args + /// + /// * `self`(`@Tensor`) - Tensor of data to extract slices from. + /// * `starts`(Span) - 1-D tensor of starting indices of corresponding axis in `axes` + /// * `ends`(Span) - 1-D tensor of ending indices (exclusive) of corresponding axis in `axes` + /// * `axes`(Option>) - 1-D tensor of axes that `starts` and `ends` apply to. + /// * `steps`(Option>) - 1-D tensor of slice step of corresponding axis in `axes`. + /// + /// ## Panics + /// + /// * Panics if the length of starts is not equal to the length of ends. + /// * Panics if the length of starts is not equal to the length of axes. + /// * Panics if the length of starts is not equal to the length of steps. + /// + /// ## Returns + /// + /// A new `Tensor` slice of the input tensor. + /// + /// ## Example + /// + /// ```rust + /// use array::{ArrayTrait, SpanTrait}; + /// + /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// + /// fn slice_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 4].span(), + /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), + /// extra: Option::None(()) + /// ); + /// + /// return tensor.slice( + /// starts: array![0, 2].span(), + /// ends: array![2, 4].span(), + /// axis: Option::None(()), + /// steps: Option::Some(array![1, 1].span()) + /// ); + /// } + /// >>> [[2 3] + /// [6 7]] + /// ``` + /// + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor; } @@ -2510,3 +2572,153 @@ fn tensor_eq>(mut lhs: Tensor, mut rhs: Tens return is_eq; } +/// Cf: TensorTrait::slice docstring +fn slice, impl TDrop: Drop>( + self: @Tensor, starts: Span, ends: Span, axes: Option>, steps: Option> +) -> Tensor { + let axes = match axes { + Option::Some(axes) => axes, + Option::None(_) => { + let mut ret: Array = ArrayTrait::new(); + let mut i: usize = 0; + let stop_i = starts.len() - 1; + loop { + ret.append(i); + if i == stop_i { + break (); + } + i += 1; + }; + ret.span() + }, + }; + let steps = match steps { + Option::Some(steps) => steps, + Option::None(_) => { + let mut ret: Array = ArrayTrait::new(); + let mut i: usize = 0; + let stop_i = starts.len() - 1; + loop { + ret.append(1); + if i == stop_i { + break (); + } + i += 1; + }; + ret.span() + }, + }; + assert(starts.len() == ends.len(), 'Ends and starts len unequal'); + assert(starts.len() == axes.len(), 'Axes and starts len unequal'); + assert(starts.len() == steps.len(), 'Steps and starts len unequal'); + + let mut is_empty: bool = false; + let mut output_shape: Array = ArrayTrait::new(); + let mut processed_starts: Array = ArrayTrait::new(); + let mut processed_ends: Array = ArrayTrait::new(); + let mut processed_steps: Array = ArrayTrait::new(); + + let mut i: usize = 0; + let stop_i = (*self.shape).len() - 1; + loop { + let (axis_index, is_found) = match axes.index_of(i) { + Option::Some(axis_index) => (axis_index, true), + Option::None(_) => (0, false), + }; + + let mut processed_params = (0, 0, 0, 0); + if is_found { + let mut start: usize = *(*self.shape).at(i); + let mut end: usize = 0; + if *starts.at(axis_index) < *(*self.shape).at(i) { + start = *starts.at(axis_index); + } + + if *(*self.shape).at(i) > *ends.at(axis_index) { + end = *ends.at(axis_index); + } + else { + end = *(*self.shape).at(i); + } + + if start >= end { + is_empty = true; + } else { + let dim = (end - start + (*steps.at(axis_index) - 1)) / *steps.at(axis_index); + + if dim == 0 { + is_empty = true; + } else { + processed_params = (start, end, *steps.at(axis_index), dim); + } + } + + } else { + processed_params = (0, *(*self.shape).at(i), 1, *(*self.shape).at(i)); + } + let (start, end, step, shape) = processed_params; + processed_starts.append(start); + processed_ends.append(end); + processed_steps.append(step); + output_shape.append(shape); + + if i == stop_i { + break (); + } + i += 1; + }; + + let mut output_data: Array = ArrayTrait::new(); + + if is_empty { + return Tensor:: {shape: output_shape.span(), data: output_data.span(), extra: *self.extra}; + } + + let stop_j = (*self.data).len() - 1; + let stop_k = (*self.shape).len() - 1; + let mut j: usize = 0; + + let starts = processed_starts.span(); + let ends = processed_ends.span(); + let steps = processed_steps.span(); + loop { + let mut indices = unravel_index(j, *self.shape); + let mut is_included = false; + + let mut k: usize = 0; + loop { + let start = *(starts).at(k); + let end = *(ends).at(k); + let step = *(steps).at(k); + let index = *(indices).at(k); + + if index < start || index >= end { + is_included = false; + break (); + } + if (index - start) % step == 0 { + is_included = true; + } + else { + is_included = false; + break (); + } + + if k == stop_k { + break (); + } + k += 1; + }; + + if is_included { + output_data.append(*(*self.data).at(j)); + } + + if j == stop_j { + break (); + } + j += 1; + }; + + return Tensor:: {shape: output_shape.span(), data: output_data.span(), extra: *self.extra}; +} diff --git a/src/operators/tensor/implementations/impl_tensor_fp.cairo b/src/operators/tensor/implementations/impl_tensor_fp.cairo index bf8399ef6..6956cdb29 100644 --- a/src/operators/tensor/implementations/impl_tensor_fp.cairo +++ b/src/operators/tensor/implementations/impl_tensor_fp.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedType; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor, tensor_eq, slice }; use orion::operators::tensor::math::min::min_fp::core::min_in_tensor; use orion::operators::tensor::math::max::max_fp::core::max_in_tensor; @@ -212,6 +212,16 @@ impl Tensor_fp of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt(self).unwrap() } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_i32.cairo b/src/operators/tensor/implementations/impl_tensor_i32.cairo index 8a2f2a545..25a12d86c 100644 --- a/src/operators/tensor/implementations/impl_tensor_i32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i32.cairo @@ -9,7 +9,7 @@ use orion::numbers::fixed_point::core::FixedType; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor, tensor_eq, slice }; use orion::operators::tensor::math::min::min_i32::min_in_tensor; use orion::operators::tensor::math::max::max_i32::max_in_tensor; @@ -203,6 +203,16 @@ impl Tensor_i32 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_i32(self).unwrap() } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + slice(self,starts,ends,axes,steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_i8.cairo b/src/operators/tensor/implementations/impl_tensor_i8.cairo index fceb99b33..ca85ad46a 100644 --- a/src/operators/tensor/implementations/impl_tensor_i8.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i8.cairo @@ -12,7 +12,7 @@ use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor, tensor_eq, slice }; use orion::operators::tensor::math::min::min_i8::min_in_tensor; use orion::operators::tensor::math::max::max_i8::max_in_tensor; @@ -204,6 +204,16 @@ impl Tensor_i8 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_i8(self).unwrap() } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + slice(self,starts,ends,axes,steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/impl_tensor_u32.cairo b/src/operators/tensor/implementations/impl_tensor_u32.cairo index a9b02a544..835d97542 100644 --- a/src/operators/tensor/implementations/impl_tensor_u32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_u32.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedType; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ExtraParams, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor, tensor_eq, slice }; use orion::operators::tensor::math::min::min_u32::min_in_tensor; use orion::operators::tensor::math::max::max_u32::max_in_tensor; @@ -203,6 +203,16 @@ impl Tensor_u32 of TensorTrait { fn sqrt(self: @Tensor) -> Tensor { sqrt_u32(self).unwrap() } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + slice(self,starts,ends,axes,steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index e819cfd40..de6070119 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -419,3 +419,13 @@ mod sin_i8_fp8x23; mod sin_i8_fp16x16; mod sin_u32_fp8x23; mod sin_u32_fp16x16; +mod slice_fp16x16_2d; +mod slice_fp16x16_3d; +mod slice_fp8x23_2d; +mod slice_fp8x23_3d; +mod slice_i32_2d; +mod slice_i32_3d; +mod slice_i8_2d; +mod slice_i8_3d; +mod slice_u32_2d; +mod slice_u32_3d; diff --git a/src/tests/nodes/slice_fp16x16_2d.cairo b/src/tests/nodes/slice_fp16x16_2d.cairo new file mode 100644 index 000000000..1d86693c8 --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_fp16x16_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_2d/input_0.cairo b/src/tests/nodes/slice_fp16x16_2d/input_0.cairo new file mode 100644 index 000000000..40cd181e9 --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_2d/input_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(4); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 131072, sign: true }); + data.append(FixedType { mag: 6488064, sign: true }); + data.append(FixedType { mag: 6750208, sign: false }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 5439488, sign: true }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_2d/output_0.cairo b/src/tests/nodes/slice_fp16x16_2d/output_0.cairo new file mode 100644 index 000000000..e36306278 --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_2d/output_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 6750208, sign: false }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_3d.cairo b/src/tests/nodes/slice_fp16x16_3d.cairo new file mode 100644 index 000000000..3cb17c621 --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_fp16x16_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_3d/input_0.cairo b/src/tests/nodes/slice_fp16x16_3d/input_0.cairo new file mode 100644 index 000000000..de3ed45eb --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_3d/input_0.cairo @@ -0,0 +1,1016 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(20); + shape.append(10); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 6291456, sign: true }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 6619136, sign: true }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 5373952, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 1441792, sign: true }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 1835008, sign: true }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 5308416, sign: false }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 1835008, sign: true }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 5373952, sign: true }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 5701632, sign: false }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 5832704, sign: false }); + data.append(FixedType { mag: 5439488, sign: true }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 5308416, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 6553600, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 3211264, sign: true }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 4259840, sign: true }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 983040, sign: true }); + data.append(FixedType { mag: 6750208, sign: true }); + data.append(FixedType { mag: 6488064, sign: false }); + data.append(FixedType { mag: 7536640, sign: true }); + data.append(FixedType { mag: 5439488, sign: false }); + data.append(FixedType { mag: 7405568, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 7143424, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 7536640, sign: true }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 2031616, sign: true }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 7536640, sign: false }); + data.append(FixedType { mag: 5963776, sign: false }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 1900544, sign: true }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 131072, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: true }); + data.append(FixedType { mag: 7798784, sign: true }); + data.append(FixedType { mag: 5505024, sign: false }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 2228224, sign: true }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 5308416, sign: false }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 6094848, sign: true }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 6815744, sign: true }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 3473408, sign: true }); + data.append(FixedType { mag: 720896, sign: true }); + data.append(FixedType { mag: 1441792, sign: true }); + data.append(FixedType { mag: 2490368, sign: true }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 7340032, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 4849664, sign: true }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 2621440, sign: true }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 6488064, sign: true }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 6225920, sign: false }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 5439488, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 1769472, sign: true }); + data.append(FixedType { mag: 8192000, sign: false }); + data.append(FixedType { mag: 4259840, sign: true }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 4849664, sign: true }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 5636096, sign: true }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 3932160, sign: true }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 6619136, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 6029312, sign: true }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 262144, sign: true }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 3735552, sign: true }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 1572864, sign: true }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 5177344, sign: true }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 7733248, sign: true }); + data.append(FixedType { mag: 2424832, sign: true }); + data.append(FixedType { mag: 6029312, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 2949120, sign: true }); + data.append(FixedType { mag: 7208960, sign: true }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 7536640, sign: true }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 5570560, sign: false }); + data.append(FixedType { mag: 6619136, sign: true }); + data.append(FixedType { mag: 1835008, sign: true }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 3473408, sign: true }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 6946816, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 2359296, sign: true }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 6356992, sign: false }); + data.append(FixedType { mag: 1966080, sign: true }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 4390912, sign: true }); + data.append(FixedType { mag: 5177344, sign: true }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 851968, sign: true }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 4653056, sign: true }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 917504, sign: true }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 1835008, sign: true }); + data.append(FixedType { mag: 6488064, sign: true }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 2621440, sign: true }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 5177344, sign: true }); + data.append(FixedType { mag: 7798784, sign: false }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 8126464, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 8192000, sign: true }); + data.append(FixedType { mag: 4194304, sign: true }); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 4587520, sign: true }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 6094848, sign: false }); + data.append(FixedType { mag: 3670016, sign: true }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 6619136, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 1966080, sign: true }); + data.append(FixedType { mag: 7798784, sign: true }); + data.append(FixedType { mag: 458752, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 2621440, sign: true }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 2490368, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 1114112, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 3735552, sign: true }); + data.append(FixedType { mag: 4718592, sign: true }); + data.append(FixedType { mag: 7667712, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 4718592, sign: true }); + data.append(FixedType { mag: 4063232, sign: true }); + data.append(FixedType { mag: 5701632, sign: true }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 8257536, sign: true }); + data.append(FixedType { mag: 7208960, sign: true }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 5570560, sign: true }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 65536, sign: true }); + data.append(FixedType { mag: 6488064, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 3735552, sign: true }); + data.append(FixedType { mag: 3801088, sign: true }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 2359296, sign: true }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 6094848, sign: true }); + data.append(FixedType { mag: 7143424, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 6029312, sign: false }); + data.append(FixedType { mag: 3014656, sign: true }); + data.append(FixedType { mag: 7995392, sign: true }); + data.append(FixedType { mag: 6815744, sign: false }); + data.append(FixedType { mag: 7929856, sign: true }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 7340032, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 655360, sign: true }); + data.append(FixedType { mag: 7340032, sign: false }); + data.append(FixedType { mag: 8192000, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 5767168, sign: false }); + data.append(FixedType { mag: 5439488, sign: true }); + data.append(FixedType { mag: 7012352, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 7667712, sign: false }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 1441792, sign: true }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 7077888, sign: true }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 2752512, sign: true }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 7536640, sign: false }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 6160384, sign: true }); + data.append(FixedType { mag: 7995392, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2686976, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 4653056, sign: true }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 7798784, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 2621440, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 5242880, sign: false }); + data.append(FixedType { mag: 2686976, sign: true }); + data.append(FixedType { mag: 4128768, sign: true }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 6225920, sign: true }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 1572864, sign: true }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 4325376, sign: true }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 131072, sign: true }); + data.append(FixedType { mag: 1572864, sign: true }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 6946816, sign: true }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 589824, sign: false }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 6946816, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 2359296, sign: true }); + data.append(FixedType { mag: 4063232, sign: true }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 8257536, sign: false }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 7995392, sign: false }); + data.append(FixedType { mag: 6488064, sign: true }); + data.append(FixedType { mag: 2031616, sign: true }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 6225920, sign: false }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 6684672, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 4063232, sign: true }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 1900544, sign: true }); + data.append(FixedType { mag: 5701632, sign: true }); + data.append(FixedType { mag: 4915200, sign: true }); + data.append(FixedType { mag: 8192000, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 4653056, sign: false }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 6356992, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 4128768, sign: true }); + data.append(FixedType { mag: 6225920, sign: false }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 655360, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 2949120, sign: true }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 655360, sign: true }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 2424832, sign: true }); + data.append(FixedType { mag: 1507328, sign: true }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 786432, sign: true }); + data.append(FixedType { mag: 5177344, sign: false }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 6553600, sign: false }); + data.append(FixedType { mag: 1900544, sign: true }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 1572864, sign: true }); + data.append(FixedType { mag: 6881280, sign: true }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 3801088, sign: true }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 7602176, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 3145728, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 6684672, sign: false }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 4915200, sign: true }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 7405568, sign: false }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 6160384, sign: true }); + data.append(FixedType { mag: 3473408, sign: true }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 6750208, sign: true }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 6225920, sign: false }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 5767168, sign: true }); + data.append(FixedType { mag: 3670016, sign: true }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 2752512, sign: true }); + data.append(FixedType { mag: 5570560, sign: false }); + data.append(FixedType { mag: 6881280, sign: true }); + data.append(FixedType { mag: 3735552, sign: true }); + data.append(FixedType { mag: 7995392, sign: false }); + data.append(FixedType { mag: 6225920, sign: true }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 2424832, sign: true }); + data.append(FixedType { mag: 6029312, sign: false }); + data.append(FixedType { mag: 4521984, sign: true }); + data.append(FixedType { mag: 2752512, sign: true }); + data.append(FixedType { mag: 4587520, sign: true }); + data.append(FixedType { mag: 6225920, sign: false }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 1507328, sign: true }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 3342336, sign: true }); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 8126464, sign: false }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 7012352, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 2686976, sign: true }); + data.append(FixedType { mag: 7929856, sign: true }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 4259840, sign: false }); + data.append(FixedType { mag: 65536, sign: true }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 1703936, sign: true }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 6356992, sign: false }); + data.append(FixedType { mag: 720896, sign: true }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 4325376, sign: false }); + data.append(FixedType { mag: 1703936, sign: true }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 2686976, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 6619136, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 6946816, sign: false }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 7995392, sign: true }); + data.append(FixedType { mag: 6488064, sign: false }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 655360, sign: true }); + data.append(FixedType { mag: 7864320, sign: false }); + data.append(FixedType { mag: 3276800, sign: false }); + data.append(FixedType { mag: 4194304, sign: true }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 6619136, sign: false }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 3604480, sign: true }); + data.append(FixedType { mag: 3932160, sign: true }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 4325376, sign: true }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 6684672, sign: false }); + data.append(FixedType { mag: 6291456, sign: false }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 851968, sign: true }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 7864320, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 3538944, sign: false }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 2949120, sign: true }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 2555904, sign: true }); + data.append(FixedType { mag: 3014656, sign: true }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 4063232, sign: true }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 6029312, sign: true }); + data.append(FixedType { mag: 7929856, sign: true }); + data.append(FixedType { mag: 917504, sign: true }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 5636096, sign: true }); + data.append(FixedType { mag: 262144, sign: true }); + data.append(FixedType { mag: 7798784, sign: true }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 8192000, sign: false }); + data.append(FixedType { mag: 3866624, sign: true }); + data.append(FixedType { mag: 7143424, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 2621440, sign: true }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 983040, sign: true }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 3473408, sign: true }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 5832704, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 7864320, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 5570560, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 5373952, sign: true }); + data.append(FixedType { mag: 6946816, sign: false }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 1507328, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 458752, sign: true }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 4521984, sign: true }); + data.append(FixedType { mag: 65536, sign: true }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 3342336, sign: false }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 7667712, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 1572864, sign: true }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 3407872, sign: true }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 393216, sign: false }); + data.append(FixedType { mag: 6160384, sign: true }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 5701632, sign: false }); + data.append(FixedType { mag: 1179648, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 5767168, sign: true }); + data.append(FixedType { mag: 3801088, sign: true }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 8257536, sign: false }); + data.append(FixedType { mag: 1179648, sign: true }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 6291456, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 3866624, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 1769472, sign: true }); + data.append(FixedType { mag: 5767168, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 6422528, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 3014656, sign: true }); + data.append(FixedType { mag: 6291456, sign: false }); + data.append(FixedType { mag: 6815744, sign: true }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 1048576, sign: true }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 8192000, sign: true }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 1900544, sign: false }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 6094848, sign: false }); + data.append(FixedType { mag: 3014656, sign: true }); + data.append(FixedType { mag: 5963776, sign: false }); + data.append(FixedType { mag: 3211264, sign: true }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 720896, sign: false }); + data.append(FixedType { mag: 131072, sign: false }); + data.append(FixedType { mag: 3407872, sign: true }); + data.append(FixedType { mag: 6881280, sign: true }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 7208960, sign: false }); + data.append(FixedType { mag: 851968, sign: false }); + data.append(FixedType { mag: 7667712, sign: false }); + data.append(FixedType { mag: 6422528, sign: false }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 4128768, sign: true }); + data.append(FixedType { mag: 262144, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 1376256, sign: true }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 3735552, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 7208960, sign: true }); + data.append(FixedType { mag: 7864320, sign: false }); + data.append(FixedType { mag: 7471104, sign: false }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 2949120, sign: true }); + data.append(FixedType { mag: 7798784, sign: false }); + data.append(FixedType { mag: 3080192, sign: true }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 5111808, sign: false }); + data.append(FixedType { mag: 6291456, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 8192000, sign: true }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 2686976, sign: true }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 2818048, sign: false }); + data.append(FixedType { mag: 2424832, sign: false }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 1114112, sign: false }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 7274496, sign: true }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 5439488, sign: false }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 1245184, sign: false }); + data.append(FixedType { mag: 5701632, sign: false }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 4653056, sign: true }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 6946816, sign: false }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 8257536, sign: true }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 524288, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 7798784, sign: false }); + data.append(FixedType { mag: 196608, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 2359296, sign: true }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 6815744, sign: true }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 2555904, sign: false }); + data.append(FixedType { mag: 6029312, sign: false }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 1703936, sign: true }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 7405568, sign: false }); + data.append(FixedType { mag: 2031616, sign: true }); + data.append(FixedType { mag: 3735552, sign: true }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 1900544, sign: true }); + data.append(FixedType { mag: 3670016, sign: false }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 6553600, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 5308416, sign: true }); + data.append(FixedType { mag: 6356992, sign: true }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 3014656, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 7405568, sign: false }); + data.append(FixedType { mag: 6946816, sign: false }); + data.append(FixedType { mag: 2424832, sign: true }); + data.append(FixedType { mag: 5701632, sign: false }); + data.append(FixedType { mag: 1769472, sign: false }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 4653056, sign: true }); + data.append(FixedType { mag: 786432, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 3801088, sign: true }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 1769472, sign: true }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 4915200, sign: false }); + data.append(FixedType { mag: 983040, sign: true }); + data.append(FixedType { mag: 1114112, sign: true }); + data.append(FixedType { mag: 7012352, sign: false }); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 7012352, sign: true }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 524288, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 7667712, sign: false }); + data.append(FixedType { mag: 4784128, sign: false }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 7208960, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 3145728, sign: true }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 6619136, sign: false }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 7929856, sign: true }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 3604480, sign: true }); + data.append(FixedType { mag: 3473408, sign: false }); + data.append(FixedType { mag: 5570560, sign: false }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 655360, sign: false }); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 6422528, sign: true }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 2555904, sign: true }); + data.append(FixedType { mag: 5439488, sign: true }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 6553600, sign: false }); + data.append(FixedType { mag: 2883584, sign: false }); + data.append(FixedType { mag: 1638400, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 2228224, sign: true }); + data.append(FixedType { mag: 7995392, sign: false }); + data.append(FixedType { mag: 1114112, sign: true }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 2555904, sign: true }); + data.append(FixedType { mag: 2359296, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 3801088, sign: true }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 6225920, sign: true }); + data.append(FixedType { mag: 4128768, sign: true }); + data.append(FixedType { mag: 7012352, sign: false }); + data.append(FixedType { mag: 3407872, sign: true }); + data.append(FixedType { mag: 7733248, sign: false }); + data.append(FixedType { mag: 6684672, sign: true }); + data.append(FixedType { mag: 5898240, sign: true }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 5373952, sign: true }); + data.append(FixedType { mag: 5767168, sign: false }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 4653056, sign: true }); + data.append(FixedType { mag: 1835008, sign: false }); + data.append(FixedType { mag: 3932160, sign: true }); + data.append(FixedType { mag: 4063232, sign: false }); + data.append(FixedType { mag: 5701632, sign: true }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 1048576, sign: false }); + data.append(FixedType { mag: 3080192, sign: false }); + data.append(FixedType { mag: 2752512, sign: true }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 5111808, sign: true }); + data.append(FixedType { mag: 7012352, sign: false }); + data.append(FixedType { mag: 4194304, sign: false }); + data.append(FixedType { mag: 3407872, sign: true }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 7012352, sign: true }); + data.append(FixedType { mag: 1966080, sign: false }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2228224, sign: true }); + data.append(FixedType { mag: 1835008, sign: true }); + data.append(FixedType { mag: 3407872, sign: false }); + data.append(FixedType { mag: 65536, sign: false }); + data.append(FixedType { mag: 6553600, sign: true }); + data.append(FixedType { mag: 4915200, sign: true }); + data.append(FixedType { mag: 6881280, sign: true }); + data.append(FixedType { mag: 6029312, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 4063232, sign: true }); + data.append(FixedType { mag: 2555904, sign: true }); + data.append(FixedType { mag: 4390912, sign: false }); + data.append(FixedType { mag: 5373952, sign: false }); + data.append(FixedType { mag: 6553600, sign: false }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 8060928, sign: true }); + data.append(FixedType { mag: 7667712, sign: true }); + data.append(FixedType { mag: 2818048, sign: true }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 2228224, sign: true }); + data.append(FixedType { mag: 5439488, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 6881280, sign: false }); + data.append(FixedType { mag: 8192000, sign: true }); + data.append(FixedType { mag: 327680, sign: true }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 2883584, sign: true }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 3276800, sign: true }); + data.append(FixedType { mag: 6684672, sign: false }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 3080192, sign: true }); + data.append(FixedType { mag: 1048576, sign: true }); + data.append(FixedType { mag: 6291456, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 2621440, sign: false }); + data.append(FixedType { mag: 458752, sign: false }); + data.append(FixedType { mag: 2424832, sign: true }); + data.append(FixedType { mag: 393216, sign: true }); + data.append(FixedType { mag: 5570560, sign: false }); + data.append(FixedType { mag: 3538944, sign: true }); + data.append(FixedType { mag: 917504, sign: false }); + data.append(FixedType { mag: 2752512, sign: false }); + data.append(FixedType { mag: 2490368, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 8257536, sign: false }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 262144, sign: true }); + data.append(FixedType { mag: 7602176, sign: false }); + data.append(FixedType { mag: 5046272, sign: false }); + data.append(FixedType { mag: 4849664, sign: false }); + data.append(FixedType { mag: 6750208, sign: true }); + data.append(FixedType { mag: 196608, sign: true }); + data.append(FixedType { mag: 4980736, sign: false }); + data.append(FixedType { mag: 720896, sign: true }); + data.append(FixedType { mag: 6422528, sign: true }); + data.append(FixedType { mag: 5636096, sign: false }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 3604480, sign: true }); + data.append(FixedType { mag: 5832704, sign: true }); + data.append(FixedType { mag: 5242880, sign: true }); + data.append(FixedType { mag: 983040, sign: false }); + data.append(FixedType { mag: 3801088, sign: false }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 8126464, sign: false }); + data.append(FixedType { mag: 8323072, sign: true }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 3997696, sign: false }); + data.append(FixedType { mag: 8192000, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 327680, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 7798784, sign: false }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 2031616, sign: false }); + data.append(FixedType { mag: 2097152, sign: true }); + data.append(FixedType { mag: 7929856, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 1310720, sign: true }); + data.append(FixedType { mag: 2555904, sign: true }); + data.append(FixedType { mag: 6291456, sign: true }); + data.append(FixedType { mag: 4718592, sign: true }); + data.append(FixedType { mag: 5767168, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_3d/output_0.cairo b/src/tests/nodes/slice_fp16x16_3d/output_0.cairo new file mode 100644 index 000000000..46beb81c7 --- /dev/null +++ b/src/tests/nodes/slice_fp16x16_3d/output_0.cairo @@ -0,0 +1,76 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(4); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 4980736, sign: true }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 6291456, sign: true }); + data.append(FixedType { mag: 4587520, sign: false }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 6160384, sign: false }); + data.append(FixedType { mag: 2293760, sign: true }); + data.append(FixedType { mag: 5308416, sign: false }); + data.append(FixedType { mag: 5963776, sign: true }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 3932160, sign: false }); + data.append(FixedType { mag: 1703936, sign: false }); + data.append(FixedType { mag: 5832704, sign: false }); + data.append(FixedType { mag: 5439488, sign: true }); + data.append(FixedType { mag: 7471104, sign: true }); + data.append(FixedType { mag: 5505024, sign: true }); + data.append(FixedType { mag: 8060928, sign: false }); + data.append(FixedType { mag: 4259840, sign: true }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 4718592, sign: false }); + data.append(FixedType { mag: 3604480, sign: false }); + data.append(FixedType { mag: 1572864, sign: false }); + data.append(FixedType { mag: 3014656, sign: false }); + data.append(FixedType { mag: 983040, sign: true }); + data.append(FixedType { mag: 6750208, sign: true }); + data.append(FixedType { mag: 7143424, sign: true }); + data.append(FixedType { mag: 7340032, sign: true }); + data.append(FixedType { mag: 2097152, sign: false }); + data.append(FixedType { mag: 7405568, sign: true }); + data.append(FixedType { mag: 7536640, sign: true }); + data.append(FixedType { mag: 2293760, sign: false }); + data.append(FixedType { mag: 1310720, sign: false }); + data.append(FixedType { mag: 131072, sign: true }); + data.append(FixedType { mag: 1441792, sign: false }); + data.append(FixedType { mag: 1507328, sign: true }); + data.append(FixedType { mag: 7274496, sign: false }); + data.append(FixedType { mag: 7077888, sign: false }); + data.append(FixedType { mag: 4521984, sign: false }); + data.append(FixedType { mag: 6094848, sign: true }); + data.append(FixedType { mag: 2162688, sign: true }); + data.append(FixedType { mag: 2228224, sign: false }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 5898240, sign: false }); + data.append(FixedType { mag: 8126464, sign: true }); + data.append(FixedType { mag: 3211264, sign: false }); + data.append(FixedType { mag: 1376256, sign: false }); + data.append(FixedType { mag: 4128768, sign: false }); + data.append(FixedType { mag: 2686976, sign: false }); + data.append(FixedType { mag: 7340032, sign: false }); + data.append(FixedType { mag: 5046272, sign: true }); + data.append(FixedType { mag: 589824, sign: true }); + data.append(FixedType { mag: 5439488, sign: false }); + data.append(FixedType { mag: 2949120, sign: false }); + data.append(FixedType { mag: 1245184, sign: true }); + data.append(FixedType { mag: 2162688, sign: false }); + data.append(FixedType { mag: 4456448, sign: false }); + data.append(FixedType { mag: 4456448, sign: true }); + data.append(FixedType { mag: 262144, sign: false }); + data.append(FixedType { mag: 3932160, sign: true }); + data.append(FixedType { mag: 3538944, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_2d.cairo b/src/tests/nodes/slice_fp8x23_2d.cairo new file mode 100644 index 000000000..6ba207994 --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_fp8x23_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_2d/input_0.cairo b/src/tests/nodes/slice_fp8x23_2d/input_0.cairo new file mode 100644 index 000000000..2cbd34e3d --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_2d/input_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(4); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 897581056, sign: true }); + data.append(FixedType { mag: 914358272, sign: true }); + data.append(FixedType { mag: 394264576, sign: true }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 746586112, sign: false }); + data.append(FixedType { mag: 855638016, sign: true }); + data.append(FixedType { mag: 226492416, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_2d/output_0.cairo b/src/tests/nodes/slice_fp8x23_2d/output_0.cairo new file mode 100644 index 000000000..1c0ec2e49 --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_2d/output_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 394264576, sign: true }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 855638016, sign: true }); + data.append(FixedType { mag: 226492416, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_3d.cairo b/src/tests/nodes/slice_fp8x23_3d.cairo new file mode 100644 index 000000000..111b6c9c8 --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_fp8x23_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_3d/input_0.cairo b/src/tests/nodes/slice_fp8x23_3d/input_0.cairo new file mode 100644 index 000000000..8164ffbae --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_3d/input_0.cairo @@ -0,0 +1,1016 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(20); + shape.append(10); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 830472192, sign: true }); + data.append(FixedType { mag: 444596224, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 864026624, sign: true }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 905969664, sign: false }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 880803840, sign: false }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 830472192, sign: true }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 805306368, sign: true }); + data.append(FixedType { mag: 822083584, sign: false }); + data.append(FixedType { mag: 1006632960, sign: false }); + data.append(FixedType { mag: 687865856, sign: false }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 721420288, sign: true }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 713031680, sign: true }); + data.append(FixedType { mag: 796917760, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 796917760, sign: true }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 796917760, sign: true }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 847249408, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 293601280, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 209715200, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 486539264, sign: true }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 830472192, sign: false }); + data.append(FixedType { mag: 847249408, sign: true }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 33554432, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 587202560, sign: true }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 134217728, sign: true }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 159383552, sign: true }); + data.append(FixedType { mag: 922746880, sign: true }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 377487360, sign: true }); + data.append(FixedType { mag: 973078528, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 209715200, sign: true }); + data.append(FixedType { mag: 452984832, sign: true }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 704643072, sign: false }); + data.append(FixedType { mag: 805306368, sign: true }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 788529152, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 956301312, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 922746880, sign: true }); + data.append(FixedType { mag: 578813952, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 58720256, sign: true }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 41943040, sign: true }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 452984832, sign: true }); + data.append(FixedType { mag: 771751936, sign: false }); + data.append(FixedType { mag: 746586112, sign: true }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 494927872, sign: true }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 8388608, sign: true }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 989855744, sign: true }); + data.append(FixedType { mag: 184549376, sign: true }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 117440512, sign: true }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 251658240, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 343932928, sign: true }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 562036736, sign: true }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 738197504, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 729808896, sign: true }); + data.append(FixedType { mag: 570425344, sign: true }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 637534208, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 738197504, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 369098752, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 16777216, sign: true }); + data.append(FixedType { mag: 620756992, sign: true }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 729808896, sign: false }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 570425344, sign: true }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 67108864, sign: true }); + data.append(FixedType { mag: 964689920, sign: true }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 897581056, sign: false }); + data.append(FixedType { mag: 427819008, sign: true }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 746586112, sign: false }); + data.append(FixedType { mag: 989855744, sign: false }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 964689920, sign: true }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 989855744, sign: true }); + data.append(FixedType { mag: 243269632, sign: true }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 671088640, sign: true }); + data.append(FixedType { mag: 830472192, sign: true }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 1006632960, sign: false }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 411041792, sign: true }); + data.append(FixedType { mag: 1006632960, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 855638016, sign: false }); + data.append(FixedType { mag: 973078528, sign: false }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 276824064, sign: true }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 562036736, sign: true }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 746586112, sign: true }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 838860800, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 520093696, sign: true }); + data.append(FixedType { mag: 33554432, sign: true }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 343932928, sign: true }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 905969664, sign: false }); + data.append(FixedType { mag: 293601280, sign: true }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 830472192, sign: true }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 1023410176, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 243269632, sign: true }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 117440512, sign: true }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 796917760, sign: true }); + data.append(FixedType { mag: 830472192, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 939524096, sign: true }); + data.append(FixedType { mag: 796917760, sign: false }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 578813952, sign: true }); + data.append(FixedType { mag: 864026624, sign: false }); + data.append(FixedType { mag: 50331648, sign: false }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 285212672, sign: true }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 553648128, sign: true }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 796917760, sign: true }); + data.append(FixedType { mag: 83886080, sign: true }); + data.append(FixedType { mag: 75497472, sign: true }); + data.append(FixedType { mag: 251658240, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 914358272, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 897581056, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 729808896, sign: false }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 452984832, sign: true }); + data.append(FixedType { mag: 654311424, sign: true }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 796917760, sign: false }); + data.append(FixedType { mag: 260046848, sign: true }); + data.append(FixedType { mag: 1015021568, sign: false }); + data.append(FixedType { mag: 41943040, sign: false }); + data.append(FixedType { mag: 687865856, sign: false }); + data.append(FixedType { mag: 788529152, sign: false }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 973078528, sign: true }); + data.append(FixedType { mag: 444596224, sign: true }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 847249408, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 1048576000, sign: true }); + data.append(FixedType { mag: 402653184, sign: true }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 713031680, sign: true }); + data.append(FixedType { mag: 1031798784, sign: false }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 293601280, sign: true }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 729808896, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 327155712, sign: true }); + data.append(FixedType { mag: 872415232, sign: false }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 704643072, sign: false }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 838860800, sign: false }); + data.append(FixedType { mag: 436207616, sign: true }); + data.append(FixedType { mag: 1023410176, sign: true }); + data.append(FixedType { mag: 436207616, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 478150656, sign: true }); + data.append(FixedType { mag: 411041792, sign: true }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 419430400, sign: true }); + data.append(FixedType { mag: 578813952, sign: true }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 998244352, sign: false }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 167772160, sign: true }); + data.append(FixedType { mag: 553648128, sign: false }); + data.append(FixedType { mag: 226492416, sign: true }); + data.append(FixedType { mag: 763363328, sign: true }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 738197504, sign: true }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 1048576000, sign: false }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 721420288, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 545259520, sign: true }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 184549376, sign: true }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 1056964608, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 562036736, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 167772160, sign: true }); + data.append(FixedType { mag: 411041792, sign: true }); + data.append(FixedType { mag: 989855744, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 1040187392, sign: true }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 620756992, sign: false }); + data.append(FixedType { mag: 167772160, sign: true }); + data.append(FixedType { mag: 981467136, sign: true }); + data.append(FixedType { mag: 545259520, sign: true }); + data.append(FixedType { mag: 570425344, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 545259520, sign: true }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 75497472, sign: true }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 973078528, sign: true }); + data.append(FixedType { mag: 595591168, sign: true }); + data.append(FixedType { mag: 939524096, sign: false }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 58720256, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 285212672, sign: true }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 587202560, sign: false }); + data.append(FixedType { mag: 184549376, sign: true }); + data.append(FixedType { mag: 553648128, sign: true }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 855638016, sign: false }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 796917760, sign: false }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 671088640, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 226492416, sign: true }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 838860800, sign: true }); + data.append(FixedType { mag: 8388608, sign: true }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 1040187392, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 998244352, sign: false }); + data.append(FixedType { mag: 1056964608, sign: false }); + data.append(FixedType { mag: 478150656, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 243269632, sign: true }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 335544320, sign: false }); + data.append(FixedType { mag: 260046848, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 1040187392, sign: false }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 16777216, sign: true }); + data.append(FixedType { mag: 109051904, sign: true }); + data.append(FixedType { mag: 864026624, sign: true }); + data.append(FixedType { mag: 704643072, sign: false }); + data.append(FixedType { mag: 805306368, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 830472192, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 864026624, sign: true }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 67108864, sign: true }); + data.append(FixedType { mag: 864026624, sign: true }); + data.append(FixedType { mag: 729808896, sign: false }); + data.append(FixedType { mag: 662700032, sign: true }); + data.append(FixedType { mag: 813694976, sign: true }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 377487360, sign: true }); + data.append(FixedType { mag: 520093696, sign: true }); + data.append(FixedType { mag: 1015021568, sign: true }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 159383552, sign: false }); + data.append(FixedType { mag: 562036736, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 402653184, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 1006632960, sign: false }); + data.append(FixedType { mag: 360710144, sign: false }); + data.append(FixedType { mag: 914358272, sign: true }); + data.append(FixedType { mag: 83886080, sign: true }); + data.append(FixedType { mag: 369098752, sign: true }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 603979776, sign: true }); + data.append(FixedType { mag: 360710144, sign: true }); + data.append(FixedType { mag: 452984832, sign: true }); + data.append(FixedType { mag: 260046848, sign: true }); + data.append(FixedType { mag: 511705088, sign: false }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 486539264, sign: true }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 973078528, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 369098752, sign: true }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 956301312, sign: true }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 578813952, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 973078528, sign: false }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 41943040, sign: true }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 209715200, sign: true }); + data.append(FixedType { mag: 763363328, sign: true }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 637534208, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 838860800, sign: true }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 444596224, sign: true }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 578813952, sign: true }); + data.append(FixedType { mag: 847249408, sign: false }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 880803840, sign: false }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 520093696, sign: true }); + data.append(FixedType { mag: 167772160, sign: false }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 729808896, sign: true }); + data.append(FixedType { mag: 889192448, sign: true }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 562036736, sign: true }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 125829120, sign: true }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 125829120, sign: true }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 662700032, sign: true }); + data.append(FixedType { mag: 251658240, sign: true }); + data.append(FixedType { mag: 897581056, sign: true }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 545259520, sign: true }); + data.append(FixedType { mag: 830472192, sign: true }); + data.append(FixedType { mag: 478150656, sign: true }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 243269632, sign: true }); + data.append(FixedType { mag: 973078528, sign: true }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 0, sign: false }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 385875968, sign: false }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 813694976, sign: false }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 754974720, sign: false }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 838860800, sign: false }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 914358272, sign: true }); + data.append(FixedType { mag: 268435456, sign: true }); + data.append(FixedType { mag: 75497472, sign: true }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 713031680, sign: true }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 25165824, sign: false }); + data.append(FixedType { mag: 327155712, sign: false }); + data.append(FixedType { mag: 788529152, sign: true }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 855638016, sign: true }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 905969664, sign: true }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 889192448, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 67108864, sign: true }); + data.append(FixedType { mag: 385875968, sign: true }); + data.append(FixedType { mag: 989855744, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 1040187392, sign: true }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 58720256, sign: true }); + data.append(FixedType { mag: 184549376, sign: true }); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 612368384, sign: true }); + data.append(FixedType { mag: 889192448, sign: true }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 41943040, sign: true }); + data.append(FixedType { mag: 444596224, sign: true }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 763363328, sign: true }); + data.append(FixedType { mag: 654311424, sign: true }); + data.append(FixedType { mag: 520093696, sign: true }); + data.append(FixedType { mag: 125829120, sign: true }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 746586112, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 872415232, sign: false }); + data.append(FixedType { mag: 83886080, sign: true }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 754974720, sign: true }); + data.append(FixedType { mag: 981467136, sign: true }); + data.append(FixedType { mag: 83886080, sign: true }); + data.append(FixedType { mag: 16777216, sign: true }); + data.append(FixedType { mag: 989855744, sign: true }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 855638016, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 813694976, sign: true }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 973078528, sign: true }); + data.append(FixedType { mag: 444596224, sign: false }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 16777216, sign: true }); + data.append(FixedType { mag: 662700032, sign: true }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 260046848, sign: true }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 1040187392, sign: false }); + data.append(FixedType { mag: 75497472, sign: false }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 704643072, sign: false }); + data.append(FixedType { mag: 536870912, sign: false }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 92274688, sign: true }); + data.append(FixedType { mag: 637534208, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 411041792, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 788529152, sign: true }); + data.append(FixedType { mag: 486539264, sign: true }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 813694976, sign: false }); + data.append(FixedType { mag: 343932928, sign: true }); + data.append(FixedType { mag: 335544320, sign: true }); + data.append(FixedType { mag: 1023410176, sign: true }); + data.append(FixedType { mag: 310378496, sign: true }); + data.append(FixedType { mag: 402653184, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 1040187392, sign: true }); + data.append(FixedType { mag: 125829120, sign: true }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 285212672, sign: false }); + data.append(FixedType { mag: 436207616, sign: true }); + data.append(FixedType { mag: 192937984, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 150994944, sign: false }); + data.append(FixedType { mag: 452984832, sign: false }); + data.append(FixedType { mag: 520093696, sign: false }); + data.append(FixedType { mag: 343932928, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 327155712, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 385875968, sign: true }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 419430400, sign: true }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 494927872, sign: true }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 1056964608, sign: false }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 570425344, sign: true }); + data.append(FixedType { mag: 16777216, sign: true }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 687865856, sign: false }); + data.append(FixedType { mag: 805306368, sign: true }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 914358272, sign: true }); + data.append(FixedType { mag: 746586112, sign: true }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 234881024, sign: true }); + data.append(FixedType { mag: 1040187392, sign: true }); + data.append(FixedType { mag: 1048576000, sign: false }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 620756992, sign: true }); + data.append(FixedType { mag: 327155712, sign: true }); + data.append(FixedType { mag: 822083584, sign: false }); + data.append(FixedType { mag: 343932928, sign: true }); + data.append(FixedType { mag: 545259520, sign: true }); + data.append(FixedType { mag: 494927872, sign: false }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 729808896, sign: false }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 654311424, sign: true }); + data.append(FixedType { mag: 159383552, sign: true }); + data.append(FixedType { mag: 738197504, sign: true }); + data.append(FixedType { mag: 973078528, sign: false }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 746586112, sign: true }); + data.append(FixedType { mag: 763363328, sign: true }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 788529152, sign: true }); + data.append(FixedType { mag: 251658240, sign: true }); + data.append(FixedType { mag: 83886080, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 956301312, sign: true }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 1015021568, sign: false }); + data.append(FixedType { mag: 629145600, sign: true }); + data.append(FixedType { mag: 931135488, sign: false }); + data.append(FixedType { mag: 713031680, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 880803840, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 301989888, sign: false }); + data.append(FixedType { mag: 226492416, sign: true }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 486539264, sign: false }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 41943040, sign: true }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 905969664, sign: true }); + data.append(FixedType { mag: 260046848, sign: false }); + data.append(FixedType { mag: 511705088, sign: true }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 796917760, sign: false }); + data.append(FixedType { mag: 385875968, sign: true }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 343932928, sign: true }); + data.append(FixedType { mag: 394264576, sign: true }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 1040187392, sign: false }); + data.append(FixedType { mag: 637534208, sign: true }); + data.append(FixedType { mag: 662700032, sign: false }); + data.append(FixedType { mag: 402653184, sign: true }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 838860800, sign: true }); + data.append(FixedType { mag: 50331648, sign: true }); + data.append(FixedType { mag: 620756992, sign: true }); + data.append(FixedType { mag: 939524096, sign: true }); + data.append(FixedType { mag: 763363328, sign: true }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 117440512, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 310378496, sign: false }); + data.append(FixedType { mag: 989855744, sign: false }); + data.append(FixedType { mag: 645922816, sign: false }); + data.append(FixedType { mag: 1006632960, sign: false }); + data.append(FixedType { mag: 721420288, sign: false }); + data.append(FixedType { mag: 947912704, sign: false }); + data.append(FixedType { mag: 964689920, sign: false }); + data.append(FixedType { mag: 394264576, sign: false }); + data.append(FixedType { mag: 201326592, sign: false }); + data.append(FixedType { mag: 603979776, sign: false }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 444596224, sign: true }); + data.append(FixedType { mag: 721420288, sign: true }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 662700032, sign: true }); + data.append(FixedType { mag: 92274688, sign: false }); + data.append(FixedType { mag: 41943040, sign: true }); + data.append(FixedType { mag: 159383552, sign: true }); + data.append(FixedType { mag: 33554432, sign: true }); + data.append(FixedType { mag: 117440512, sign: true }); + data.append(FixedType { mag: 595591168, sign: true }); + data.append(FixedType { mag: 327155712, sign: true }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 973078528, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 494927872, sign: true }); + data.append(FixedType { mag: 83886080, sign: false }); + data.append(FixedType { mag: 964689920, sign: true }); + data.append(FixedType { mag: 503316480, sign: false }); + data.append(FixedType { mag: 100663296, sign: false }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 947912704, sign: true }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 889192448, sign: false }); + data.append(FixedType { mag: 587202560, sign: true }); + data.append(FixedType { mag: 1023410176, sign: false }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 478150656, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 729808896, sign: false }); + data.append(FixedType { mag: 654311424, sign: false }); + data.append(FixedType { mag: 25165824, sign: true }); + data.append(FixedType { mag: 813694976, sign: false }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 226492416, sign: false }); + data.append(FixedType { mag: 385875968, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 754974720, sign: false }); + data.append(FixedType { mag: 880803840, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 1023410176, sign: true }); + data.append(FixedType { mag: 1031798784, sign: false }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 603979776, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 134217728, sign: false }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 1040187392, sign: true }); + data.append(FixedType { mag: 486539264, sign: true }); + data.append(FixedType { mag: 662700032, sign: true }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 880803840, sign: true }); + data.append(FixedType { mag: 134217728, sign: true }); + data.append(FixedType { mag: 142606336, sign: false }); + data.append(FixedType { mag: 1015021568, sign: false }); + data.append(FixedType { mag: 939524096, sign: false }); + data.append(FixedType { mag: 805306368, sign: true }); + data.append(FixedType { mag: 687865856, sign: true }); + data.append(FixedType { mag: 570425344, sign: true }); + data.append(FixedType { mag: 276824064, sign: false }); + data.append(FixedType { mag: 981467136, sign: true }); + data.append(FixedType { mag: 243269632, sign: false }); + data.append(FixedType { mag: 276824064, sign: true }); + data.append(FixedType { mag: 167772160, sign: true }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 469762048, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 159383552, sign: true }); + data.append(FixedType { mag: 293601280, sign: true }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 872415232, sign: false }); + data.append(FixedType { mag: 562036736, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 880803840, sign: true }); + data.append(FixedType { mag: 234881024, sign: true }); + data.append(FixedType { mag: 771751936, sign: false }); + data.append(FixedType { mag: 444596224, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 58720256, sign: true }); + data.append(FixedType { mag: 461373440, sign: true }); + data.append(FixedType { mag: 209715200, sign: false }); + data.append(FixedType { mag: 469762048, sign: true }); + data.append(FixedType { mag: 612368384, sign: false }); + data.append(FixedType { mag: 780140544, sign: false }); + data.append(FixedType { mag: 721420288, sign: false }); + data.append(FixedType { mag: 335544320, sign: true }); + data.append(FixedType { mag: 989855744, sign: false }); + data.append(FixedType { mag: 788529152, sign: false }); + data.append(FixedType { mag: 671088640, sign: true }); + data.append(FixedType { mag: 260046848, sign: true }); + data.append(FixedType { mag: 704643072, sign: true }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 1056964608, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 780140544, sign: true }); + data.append(FixedType { mag: 75497472, sign: true }); + data.append(FixedType { mag: 763363328, sign: false }); + data.append(FixedType { mag: 201326592, sign: true }); + data.append(FixedType { mag: 293601280, sign: false }); + data.append(FixedType { mag: 637534208, sign: true }); + data.append(FixedType { mag: 58720256, sign: false }); + data.append(FixedType { mag: 570425344, sign: true }); + data.append(FixedType { mag: 805306368, sign: true }); + data.append(FixedType { mag: 478150656, sign: true }); + data.append(FixedType { mag: 696254464, sign: false }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 679477248, sign: false }); + data.append(FixedType { mag: 33554432, sign: true }); + data.append(FixedType { mag: 528482304, sign: false }); + data.append(FixedType { mag: 713031680, sign: false }); + data.append(FixedType { mag: 419430400, sign: false }); + data.append(FixedType { mag: 377487360, sign: false }); + data.append(FixedType { mag: 981467136, sign: true }); + data.append(FixedType { mag: 713031680, sign: true }); + data.append(FixedType { mag: 905969664, sign: false }); + data.append(FixedType { mag: 159383552, sign: true }); + data.append(FixedType { mag: 226492416, sign: true }); + data.append(FixedType { mag: 738197504, sign: false }); + data.append(FixedType { mag: 771751936, sign: true }); + data.append(FixedType { mag: 25165824, sign: true }); + data.append(FixedType { mag: 318767104, sign: true }); + data.append(FixedType { mag: 369098752, sign: false }); + data.append(FixedType { mag: 167772160, sign: true }); + data.append(FixedType { mag: 536870912, sign: true }); + data.append(FixedType { mag: 721420288, sign: true }); + data.append(FixedType { mag: 922746880, sign: false }); + data.append(FixedType { mag: 1031798784, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_3d/output_0.cairo b/src/tests/nodes/slice_fp8x23_3d/output_0.cairo new file mode 100644 index 000000000..171aaedcc --- /dev/null +++ b/src/tests/nodes/slice_fp8x23_3d/output_0.cairo @@ -0,0 +1,76 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; +use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(4); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FixedType { mag: 461373440, sign: false }); + data.append(FixedType { mag: 352321536, sign: false }); + data.append(FixedType { mag: 679477248, sign: true }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 905969664, sign: false }); + data.append(FixedType { mag: 931135488, sign: true }); + data.append(FixedType { mag: 67108864, sign: false }); + data.append(FixedType { mag: 880803840, sign: false }); + data.append(FixedType { mag: 192937984, sign: false }); + data.append(FixedType { mag: 125829120, sign: false }); + data.append(FixedType { mag: 822083584, sign: true }); + data.append(FixedType { mag: 142606336, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 1031798784, sign: true }); + data.append(FixedType { mag: 847249408, sign: true }); + data.append(FixedType { mag: 998244352, sign: true }); + data.append(FixedType { mag: 293601280, sign: true }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 209715200, sign: true }); + data.append(FixedType { mag: 645922816, sign: true }); + data.append(FixedType { mag: 318767104, sign: false }); + data.append(FixedType { mag: 486539264, sign: true }); + data.append(FixedType { mag: 184549376, sign: false }); + data.append(FixedType { mag: 587202560, sign: true }); + data.append(FixedType { mag: 595591168, sign: false }); + data.append(FixedType { mag: 981467136, sign: false }); + data.append(FixedType { mag: 134217728, sign: true }); + data.append(FixedType { mag: 176160768, sign: false }); + data.append(FixedType { mag: 452984832, sign: true }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 33554432, sign: false }); + data.append(FixedType { mag: 8388608, sign: false }); + data.append(FixedType { mag: 704643072, sign: false }); + data.append(FixedType { mag: 956301312, sign: false }); + data.append(FixedType { mag: 109051904, sign: false }); + data.append(FixedType { mag: 629145600, sign: false }); + data.append(FixedType { mag: 503316480, sign: true }); + data.append(FixedType { mag: 922746880, sign: true }); + data.append(FixedType { mag: 578813952, sign: true }); + data.append(FixedType { mag: 218103808, sign: true }); + data.append(FixedType { mag: 251658240, sign: false }); + data.append(FixedType { mag: 268435456, sign: false }); + data.append(FixedType { mag: 58720256, sign: true }); + data.append(FixedType { mag: 234881024, sign: false }); + data.append(FixedType { mag: 494927872, sign: true }); + data.append(FixedType { mag: 301989888, sign: true }); + data.append(FixedType { mag: 528482304, sign: true }); + data.append(FixedType { mag: 218103808, sign: false }); + data.append(FixedType { mag: 16777216, sign: false }); + data.append(FixedType { mag: 100663296, sign: true }); + data.append(FixedType { mag: 696254464, sign: true }); + data.append(FixedType { mag: 117440512, sign: true }); + data.append(FixedType { mag: 176160768, sign: true }); + data.append(FixedType { mag: 352321536, sign: true }); + data.append(FixedType { mag: 872415232, sign: true }); + data.append(FixedType { mag: 1006632960, sign: true }); + data.append(FixedType { mag: 427819008, sign: false }); + data.append(FixedType { mag: 50331648, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_2d.cairo b/src/tests/nodes/slice_i32_2d.cairo new file mode 100644 index 000000000..7a6dde9f3 --- /dev/null +++ b/src/tests/nodes/slice_i32_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_i32_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_2d/input_0.cairo b/src/tests/nodes/slice_i32_2d/input_0.cairo new file mode 100644 index 000000000..c488dde57 --- /dev/null +++ b/src/tests/nodes/slice_i32_2d/input_0.cairo @@ -0,0 +1,24 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(4); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 18, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_2d/output_0.cairo b/src/tests/nodes/slice_i32_2d/output_0.cairo new file mode 100644 index 000000000..a7c503129 --- /dev/null +++ b/src/tests/nodes/slice_i32_2d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 18, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_3d.cairo b/src/tests/nodes/slice_i32_3d.cairo new file mode 100644 index 000000000..3c39a525f --- /dev/null +++ b/src/tests/nodes/slice_i32_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_i32_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_3d/input_0.cairo b/src/tests/nodes/slice_i32_3d/input_0.cairo new file mode 100644 index 000000000..efd5f502c --- /dev/null +++ b/src/tests/nodes/slice_i32_3d/input_0.cairo @@ -0,0 +1,1017 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(20); + shape.append(10); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 94, sign: false }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 118, sign: true }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 8, sign: true }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 124, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 8, sign: true }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 111, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 93, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 111, sign: false }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 30, sign: true }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 46, sign: true }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 46, sign: true }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 46, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 120, sign: false }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 94, sign: false }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 76, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 98, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 121, sign: false }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 124, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 110, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 87, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 119, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 120, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 120, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 124, sign: true }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 87, sign: true }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 93, sign: false }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 121, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 93, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 98, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 76, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 105, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 87, sign: true }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 101, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 76, sign: true }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 100, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 100, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 111, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 89, sign: false }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 87, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 76, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 104, sign: false }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 100, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 104, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 8, sign: true }); + data.append(i32 { mag: 89, sign: false }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 68, sign: false }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_3d/output_0.cairo b/src/tests/nodes/slice_i32_3d/output_0.cairo new file mode 100644 index 000000000..fcd8f726a --- /dev/null +++ b/src/tests/nodes/slice_i32_3d/output_0.cairo @@ -0,0 +1,77 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(4); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 105, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_2d.cairo b/src/tests/nodes/slice_i8_2d.cairo new file mode 100644 index 000000000..fe08baa62 --- /dev/null +++ b/src/tests/nodes/slice_i8_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_i8_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_2d/input_0.cairo b/src/tests/nodes/slice_i8_2d/input_0.cairo new file mode 100644 index 000000000..c6d2d0b72 --- /dev/null +++ b/src/tests/nodes/slice_i8_2d/input_0.cairo @@ -0,0 +1,24 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(4); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 115, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 113, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_2d/output_0.cairo b/src/tests/nodes/slice_i8_2d/output_0.cairo new file mode 100644 index 000000000..6fbe34011 --- /dev/null +++ b/src/tests/nodes/slice_i8_2d/output_0.cairo @@ -0,0 +1,20 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 113, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_3d.cairo b/src/tests/nodes/slice_i8_3d.cairo new file mode 100644 index 000000000..8873a9c61 --- /dev/null +++ b/src/tests/nodes/slice_i8_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_i8_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_3d/input_0.cairo b/src/tests/nodes/slice_i8_3d/input_0.cairo new file mode 100644 index 000000000..472358144 --- /dev/null +++ b/src/tests/nodes/slice_i8_3d/input_0.cairo @@ -0,0 +1,1017 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(20); + shape.append(10); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 29, sign: true }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 31, sign: false }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 73, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 92, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 109, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 83, sign: true }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 27, sign: true }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 102, sign: false }); + data.append(i8 { mag: 83, sign: true }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 62, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 27, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 101, sign: false }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 31, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 123, sign: true }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 109, sign: true }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 74, sign: false }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 82, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 123, sign: true }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 52, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 101, sign: false }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 13, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 92, sign: false }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 52, sign: false }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 91, sign: true }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 62, sign: true }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 102, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 82, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 96, sign: false }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 96, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 121, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 92, sign: false }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 47, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 74, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 62, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 37, sign: true }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 123, sign: true }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 29, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 13, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 102, sign: false }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 95, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 27, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 85, sign: false }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 95, sign: true }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 96, sign: false }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 95, sign: true }); + data.append(i8 { mag: 31, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 83, sign: true }); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 31, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 55, sign: false }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 82, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 29, sign: true }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 52, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 73, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 27, sign: true }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 41, sign: true }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 55, sign: false }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 5, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_3d/output_0.cairo b/src/tests/nodes/slice_i8_3d/output_0.cairo new file mode 100644 index 000000000..65e8ab3e6 --- /dev/null +++ b/src/tests/nodes/slice_i8_3d/output_0.cairo @@ -0,0 +1,77 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(4); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 29, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 36, sign: true }); + data.append(i8 { mag: 27, sign: true }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 32, sign: true }); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_2d.cairo b/src/tests/nodes/slice_u32_2d.cairo new file mode 100644 index 000000000..51a20483f --- /dev/null +++ b/src/tests/nodes/slice_u32_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_u32_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 2].span(), array![2, 4].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 1].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_2d/input_0.cairo b/src/tests/nodes/slice_u32_2d/input_0.cairo new file mode 100644 index 000000000..dbc5b7d40 --- /dev/null +++ b/src/tests/nodes/slice_u32_2d/input_0.cairo @@ -0,0 +1,23 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(4); + + let mut data = ArrayTrait::new(); + data.append(219); + data.append(77); + data.append(17); + data.append(252); + data.append(224); + data.append(113); + data.append(238); + data.append(108); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_2d/output_0.cairo b/src/tests/nodes/slice_u32_2d/output_0.cairo new file mode 100644 index 000000000..b1c9497d7 --- /dev/null +++ b/src/tests/nodes/slice_u32_2d/output_0.cairo @@ -0,0 +1,19 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(17); + data.append(252); + data.append(238); + data.append(108); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_3d.cairo b/src/tests/nodes/slice_u32_3d.cairo new file mode 100644 index 000000000..5c41d43ee --- /dev/null +++ b/src/tests/nodes/slice_u32_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::ArrayTrait; +use orion::operators::tensor::core::TensorTrait; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_slice_u32_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.slice(array![0, 0].span(), array![3, 10].span(), Option::Some(array![0, 1].span()), Option::Some(array![1, 3].span())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_3d/input_0.cairo b/src/tests/nodes/slice_u32_3d/input_0.cairo new file mode 100644 index 000000000..406e4bd15 --- /dev/null +++ b/src/tests/nodes/slice_u32_3d/input_0.cairo @@ -0,0 +1,1016 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(20); + shape.append(10); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(247); + data.append(185); + data.append(145); + data.append(11); + data.append(240); + data.append(25); + data.append(157); + data.append(15); + data.append(129); + data.append(226); + data.append(8); + data.append(9); + data.append(110); + data.append(142); + data.append(240); + data.append(16); + data.append(187); + data.append(18); + data.append(218); + data.append(210); + data.append(142); + data.append(123); + data.append(229); + data.append(0); + data.append(38); + data.append(62); + data.append(210); + data.append(39); + data.append(33); + data.append(101); + data.append(62); + data.append(139); + data.append(31); + data.append(92); + data.append(89); + data.append(15); + data.append(9); + data.append(237); + data.append(177); + data.append(188); + data.append(180); + data.append(180); + data.append(93); + data.append(191); + data.append(92); + data.append(132); + data.append(141); + data.append(59); + data.append(97); + data.append(91); + data.append(18); + data.append(176); + data.append(237); + data.append(50); + data.append(217); + data.append(224); + data.append(169); + data.append(49); + data.append(33); + data.append(39); + data.append(125); + data.append(203); + data.append(76); + data.append(39); + data.append(219); + data.append(221); + data.append(111); + data.append(82); + data.append(177); + data.append(219); + data.append(87); + data.append(38); + data.append(128); + data.append(66); + data.append(62); + data.append(243); + data.append(64); + data.append(100); + data.append(252); + data.append(52); + data.append(7); + data.append(17); + data.append(193); + data.append(197); + data.append(241); + data.append(55); + data.append(157); + data.append(3); + data.append(159); + data.append(144); + data.append(60); + data.append(103); + data.append(132); + data.append(28); + data.append(20); + data.append(11); + data.append(83); + data.append(71); + data.append(78); + data.append(247); + data.append(18); + data.append(138); + data.append(92); + data.append(240); + data.append(137); + data.append(239); + data.append(200); + data.append(38); + data.append(66); + data.append(59); + data.append(16); + data.append(210); + data.append(156); + data.append(65); + data.append(67); + data.append(7); + data.append(41); + data.append(32); + data.append(70); + data.append(113); + data.append(66); + data.append(196); + data.append(90); + data.append(189); + data.append(85); + data.append(145); + data.append(184); + data.append(70); + data.append(87); + data.append(236); + data.append(189); + data.append(91); + data.append(188); + data.append(153); + data.append(67); + data.append(236); + data.append(157); + data.append(168); + data.append(182); + data.append(16); + data.append(103); + data.append(21); + data.append(207); + data.append(38); + data.append(254); + data.append(110); + data.append(17); + data.append(44); + data.append(180); + data.append(1); + data.append(40); + data.append(223); + data.append(95); + data.append(181); + data.append(99); + data.append(251); + data.append(71); + data.append(79); + data.append(195); + data.append(85); + data.append(174); + data.append(72); + data.append(68); + data.append(62); + data.append(104); + data.append(102); + data.append(28); + data.append(71); + data.append(120); + data.append(181); + data.append(162); + data.append(95); + data.append(48); + data.append(9); + data.append(98); + data.append(239); + data.append(30); + data.append(15); + data.append(54); + data.append(133); + data.append(172); + data.append(228); + data.append(91); + data.append(39); + data.append(212); + data.append(131); + data.append(175); + data.append(7); + data.append(33); + data.append(247); + data.append(130); + data.append(2); + data.append(83); + data.append(245); + data.append(185); + data.append(234); + data.append(8); + data.append(246); + data.append(62); + data.append(242); + data.append(73); + data.append(165); + data.append(145); + data.append(226); + data.append(10); + data.append(128); + data.append(249); + data.append(84); + data.append(59); + data.append(40); + data.append(145); + data.append(224); + data.append(188); + data.append(31); + data.append(83); + data.append(121); + data.append(151); + data.append(61); + data.append(150); + data.append(81); + data.append(19); + data.append(139); + data.append(118); + data.append(228); + data.append(53); + data.append(171); + data.append(130); + data.append(125); + data.append(172); + data.append(69); + data.append(168); + data.append(178); + data.append(198); + data.append(244); + data.append(254); + data.append(195); + data.append(246); + data.append(233); + data.append(57); + data.append(12); + data.append(223); + data.append(244); + data.append(136); + data.append(45); + data.append(126); + data.append(94); + data.append(217); + data.append(76); + data.append(221); + data.append(7); + data.append(20); + data.append(142); + data.append(14); + data.append(217); + data.append(98); + data.append(113); + data.append(30); + data.append(163); + data.append(171); + data.append(148); + data.append(109); + data.append(195); + data.append(52); + data.append(6); + data.append(189); + data.append(61); + data.append(187); + data.append(155); + data.append(235); + data.append(99); + data.append(23); + data.append(206); + data.append(2); + data.append(166); + data.append(67); + data.append(235); + data.append(23); + data.append(107); + data.append(91); + data.append(68); + data.append(164); + data.append(188); + data.append(96); + data.append(223); + data.append(11); + data.append(202); + data.append(122); + data.append(90); + data.append(178); + data.append(40); + data.append(166); + data.append(84); + data.append(107); + data.append(71); + data.append(158); + data.append(54); + data.append(135); + data.append(248); + data.append(201); + data.append(155); + data.append(228); + data.append(13); + data.append(33); + data.append(90); + data.append(164); + data.append(181); + data.append(117); + data.append(210); + data.append(89); + data.append(137); + data.append(65); + data.append(118); + data.append(151); + data.append(148); + data.append(51); + data.append(21); + data.append(195); + data.append(185); + data.append(239); + data.append(154); + data.append(38); + data.append(140); + data.append(225); + data.append(238); + data.append(178); + data.append(42); + data.append(178); + data.append(123); + data.append(56); + data.append(53); + data.append(19); + data.append(94); + data.append(149); + data.append(163); + data.append(181); + data.append(130); + data.append(177); + data.append(186); + data.append(0); + data.append(7); + data.append(187); + data.append(40); + data.append(101); + data.append(13); + data.append(83); + data.append(210); + data.append(54); + data.append(3); + data.append(205); + data.append(125); + data.append(30); + data.append(68); + data.append(251); + data.append(17); + data.append(14); + data.append(23); + data.append(131); + data.append(143); + data.append(149); + data.append(252); + data.append(48); + data.append(12); + data.append(101); + data.append(29); + data.append(179); + data.append(28); + data.append(28); + data.append(16); + data.append(23); + data.append(175); + data.append(107); + data.append(102); + data.append(224); + data.append(69); + data.append(149); + data.append(189); + data.append(226); + data.append(77); + data.append(112); + data.append(117); + data.append(130); + data.append(157); + data.append(239); + data.append(99); + data.append(100); + data.append(25); + data.append(89); + data.append(215); + data.append(186); + data.append(205); + data.append(91); + data.append(143); + data.append(6); + data.append(109); + data.append(117); + data.append(179); + data.append(100); + data.append(48); + data.append(29); + data.append(237); + data.append(158); + data.append(244); + data.append(244); + data.append(109); + data.append(59); + data.append(101); + data.append(50); + data.append(46); + data.append(163); + data.append(168); + data.append(130); + data.append(55); + data.append(140); + data.append(204); + data.append(199); + data.append(252); + data.append(131); + data.append(123); + data.append(215); + data.append(191); + data.append(134); + data.append(159); + data.append(120); + data.append(65); + data.append(254); + data.append(214); + data.append(205); + data.append(0); + data.append(70); + data.append(8); + data.append(52); + data.append(178); + data.append(191); + data.append(175); + data.append(27); + data.append(166); + data.append(223); + data.append(137); + data.append(92); + data.append(201); + data.append(139); + data.append(117); + data.append(225); + data.append(89); + data.append(253); + data.append(6); + data.append(229); + data.append(163); + data.append(38); + data.append(249); + data.append(34); + data.append(70); + data.append(114); + data.append(4); + data.append(93); + data.append(206); + data.append(115); + data.append(6); + data.append(84); + data.append(236); + data.append(73); + data.append(160); + data.append(74); + data.append(91); + data.append(39); + data.append(27); + data.append(203); + data.append(39); + data.append(209); + data.append(97); + data.append(60); + data.append(108); + data.append(87); + data.append(75); + data.append(46); + data.append(51); + data.append(78); + data.append(39); + data.append(132); + data.append(87); + data.append(174); + data.append(117); + data.append(67); + data.append(38); + data.append(92); + data.append(235); + data.append(191); + data.append(157); + data.append(214); + data.append(134); + data.append(54); + data.append(182); + data.append(84); + data.append(34); + data.append(237); + data.append(145); + data.append(125); + data.append(131); + data.append(251); + data.append(120); + data.append(14); + data.append(143); + data.append(69); + data.append(1); + data.append(189); + data.append(115); + data.append(47); + data.append(208); + data.append(67); + data.append(28); + data.append(8); + data.append(81); + data.append(212); + data.append(13); + data.append(32); + data.append(112); + data.append(70); + data.append(243); + data.append(24); + data.append(214); + data.append(143); + data.append(175); + data.append(17); + data.append(229); + data.append(118); + data.append(174); + data.append(132); + data.append(232); + data.append(187); + data.append(35); + data.append(212); + data.append(247); + data.append(147); + data.append(238); + data.append(130); + data.append(189); + data.append(49); + data.append(78); + data.append(20); + data.append(101); + data.append(151); + data.append(11); + data.append(134); + data.append(130); + data.append(194); + data.append(224); + data.append(183); + data.append(47); + data.append(249); + data.append(135); + data.append(39); + data.append(153); + data.append(226); + data.append(130); + data.append(80); + data.append(185); + data.append(42); + data.append(119); + data.append(194); + data.append(13); + data.append(84); + data.append(38); + data.append(140); + data.append(165); + data.append(2); + data.append(37); + data.append(197); + data.append(81); + data.append(64); + data.append(56); + data.append(112); + data.append(89); + data.append(14); + data.append(181); + data.append(203); + data.append(168); + data.append(214); + data.append(86); + data.append(5); + data.append(213); + data.append(149); + data.append(175); + data.append(40); + data.append(230); + data.append(233); + data.append(16); + data.append(192); + data.append(209); + data.append(96); + data.append(134); + data.append(142); + data.append(117); + data.append(66); + data.append(236); + data.append(234); + data.append(113); + data.append(191); + data.append(33); + data.append(209); + data.append(5); + data.append(97); + data.append(254); + data.append(151); + data.append(246); + data.append(173); + data.append(26); + data.append(190); + data.append(45); + data.append(24); + data.append(230); + data.append(20); + data.append(11); + data.append(192); + data.append(75); + data.append(203); + data.append(208); + data.append(236); + data.append(161); + data.append(125); + data.append(175); + data.append(140); + data.append(190); + data.append(153); + data.append(155); + data.append(70); + data.append(35); + data.append(190); + data.append(232); + data.append(139); + data.append(220); + data.append(132); + data.append(72); + data.append(71); + data.append(22); + data.append(7); + data.append(150); + data.append(208); + data.append(139); + data.append(24); + data.append(32); + data.append(10); + data.append(125); + data.append(196); + data.append(51); + data.append(174); + data.append(94); + data.append(219); + data.append(14); + data.append(41); + data.append(182); + data.append(235); + data.append(249); + data.append(77); + data.append(113); + data.append(130); + data.append(136); + data.append(184); + data.append(136); + data.append(27); + data.append(79); + data.append(4); + data.append(85); + data.append(106); + data.append(47); + data.append(107); + data.append(224); + data.append(161); + data.append(143); + data.append(93); + data.append(172); + data.append(150); + data.append(164); + data.append(56); + data.append(102); + data.append(99); + data.append(219); + data.append(210); + data.append(162); + data.append(203); + data.append(205); + data.append(78); + data.append(236); + data.append(247); + data.append(36); + data.append(159); + data.append(238); + data.append(196); + data.append(68); + data.append(172); + data.append(212); + data.append(150); + data.append(116); + data.append(207); + data.append(45); + data.append(54); + data.append(151); + data.append(130); + data.append(186); + data.append(61); + data.append(61); + data.append(78); + data.append(21); + data.append(87); + data.append(129); + data.append(87); + data.append(53); + data.append(50); + data.append(127); + data.append(63); + data.append(131); + data.append(35); + data.append(225); + data.append(76); + data.append(239); + data.append(60); + data.append(195); + data.append(100); + data.append(99); + data.append(196); + data.append(138); + data.append(208); + data.append(57); + data.append(240); + data.append(33); + data.append(156); + data.append(202); + data.append(90); + data.append(12); + data.append(230); + data.append(222); + data.append(63); + data.append(250); + data.append(140); + data.append(138); + data.append(141); + data.append(5); + data.append(132); + data.append(35); + data.append(72); + data.append(183); + data.append(250); + data.append(27); + data.append(150); + data.append(131); + data.append(146); + data.append(209); + data.append(238); + data.append(86); + data.append(213); + data.append(246); + data.append(20); + data.append(81); + data.append(75); + data.append(101); + data.append(63); + data.append(176); + data.append(5); + data.append(32); + data.append(189); + data.append(191); + data.append(71); + data.append(240); + data.append(121); + data.append(53); + data.append(42); + data.append(205); + data.append(49); + data.append(29); + data.append(252); + data.append(110); + data.append(91); + data.append(92); + data.append(242); + data.append(150); + data.append(2); + data.append(97); + data.append(139); + data.append(14); + data.append(228); + data.append(52); + data.append(0); + data.append(197); + data.append(109); + data.append(10); + data.append(26); + data.append(68); + data.append(242); + data.append(123); + data.append(103); + data.append(33); + data.append(51); + data.append(190); + data.append(183); + data.append(151); + data.append(34); + data.append(100); + data.append(122); + data.append(204); + data.append(149); + data.append(196); + data.append(52); + data.append(173); + data.append(189); + data.append(246); + data.append(167); + data.append(147); + data.append(106); + data.append(72); + data.append(30); + data.append(58); + data.append(204); + data.append(58); + data.append(83); + data.append(192); + data.append(251); + data.append(13); + data.append(125); + data.append(189); + data.append(62); + data.append(209); + data.append(72); + data.append(30); + data.append(251); + data.append(73); + data.append(153); + data.append(128); + data.append(143); + data.append(209); + data.append(233); + data.append(80); + data.append(99); + data.append(236); + data.append(10); + data.append(88); + data.append(134); + data.append(102); + data.append(225); + data.append(215); + data.append(243); + data.append(162); + data.append(18); + data.append(42); + data.append(81); + data.append(116); + data.append(182); + data.append(185); + data.append(195); + data.append(122); + data.append(135); + data.append(206); + data.append(106); + data.append(187); + data.append(229); + data.append(190); + data.append(144); + data.append(115); + data.append(45); + data.append(232); + data.append(254); + data.append(176); + data.append(21); + data.append(89); + data.append(192); + data.append(161); + data.append(156); + data.append(59); + data.append(226); + data.append(82); + data.append(204); + data.append(249); + data.append(43); + data.append(127); + data.append(173); + data.append(152); + data.append(200); + data.append(2); + data.append(167); + data.append(194); + data.append(248); + data.append(112); + data.append(129); + data.append(201); + data.append(197); + data.append(32); + data.append(50); + data.append(162); + data.append(161); + data.append(95); + data.append(149); + data.append(254); + data.append(26); + data.append(131); + data.append(210); + data.append(32); + data.append(208); + data.append(144); + data.append(25); + data.append(193); + data.append(78); + data.append(251); + data.append(71); + data.append(90); + data.append(47); + data.append(67); + data.append(154); + data.append(239); + data.append(11); + data.append(123); + data.append(11); + data.append(66); + data.append(232); + data.append(243); + data.append(155); + data.append(114); + data.append(143); + data.append(183); + data.append(68); + data.append(75); + data.append(127); + data.append(165); + data.append(5); + data.append(86); + data.append(14); + data.append(102); + data.append(86); + data.append(26); + data.append(157); + data.append(127); + data.append(137); + data.append(134); + data.append(36); + data.append(93); + data.append(231); + data.append(148); + data.append(206); + data.append(144); + data.append(44); + data.append(63); + data.append(236); + data.append(236); + data.append(71); + data.append(24); + data.append(37); + data.append(153); + data.append(25); + data.append(143); + data.append(212); + data.append(231); + data.append(27); + data.append(90); + data.append(97); + data.append(52); + data.append(166); + data.append(98); + data.append(231); + data.append(106); + data.append(50); + data.append(198); + data.append(11); + data.append(219); + data.append(170); + data.append(254); + data.append(118); + data.append(220); + data.append(2); + data.append(55); + data.append(148); + data.append(190); + data.append(131); + data.append(41); + data.append(61); + data.append(197); + data.append(174); + data.append(119); + data.append(89); + data.append(209); + data.append(249); + data.append(198); + data.append(83); + data.append(246); + data.append(113); + data.append(151); + data.append(174); + data.append(155); + data.append(102); + data.append(242); + data.append(102); + data.append(219); + data.append(166); + data.append(212); + data.append(220); + data.append(208); + data.append(218); + data.append(63); + data.append(139); + data.append(22); + data.append(188); + data.append(154); + data.append(64); + data.append(48); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_3d/output_0.cairo b/src/tests/nodes/slice_u32_3d/output_0.cairo new file mode 100644 index 000000000..d8c9ffb47 --- /dev/null +++ b/src/tests/nodes/slice_u32_3d/output_0.cairo @@ -0,0 +1,76 @@ +use array::ArrayTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(4); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(247); + data.append(185); + data.append(145); + data.append(11); + data.append(240); + data.append(16); + data.append(187); + data.append(18); + data.append(218); + data.append(210); + data.append(62); + data.append(139); + data.append(31); + data.append(92); + data.append(89); + data.append(132); + data.append(141); + data.append(59); + data.append(97); + data.append(91); + data.append(18); + data.append(176); + data.append(237); + data.append(50); + data.append(217); + data.append(221); + data.append(111); + data.append(82); + data.append(177); + data.append(219); + data.append(7); + data.append(17); + data.append(193); + data.append(197); + data.append(241); + data.append(11); + data.append(83); + data.append(71); + data.append(78); + data.append(247); + data.append(18); + data.append(138); + data.append(92); + data.append(240); + data.append(137); + data.append(7); + data.append(41); + data.append(32); + data.append(70); + data.append(113); + data.append(189); + data.append(91); + data.append(188); + data.append(153); + data.append(67); + data.append(110); + data.append(17); + data.append(44); + data.append(180); + data.append(1); + + let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; + TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) +} \ No newline at end of file From d7e7598c309a1d21f62cc015a13b16382134242f Mon Sep 17 00:00:00 2001 From: raphaelDkhn <113879115+raphaelDkhn@users.noreply.github.com> Date: Sun, 27 Aug 2023 10:25:59 +0300 Subject: [PATCH 004/179] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index da2ca529d..b69dbeef7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,3 @@ target __pycache__ neural_network/.venv -orion_test \ No newline at end of file From 9fd3284103100d9c24fc61910ae60daacd25eea0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn <113879115+raphaelDkhn@users.noreply.github.com> Date: Sun, 27 Aug 2023 10:29:52 +0300 Subject: [PATCH 005/179] Update compatibility.md --- docs/framework/compatibility.md | 90 ++++++++++++++++----------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/framework/compatibility.md b/docs/framework/compatibility.md index 35d3b3acc..31bacf7f9 100644 --- a/docs/framework/compatibility.md +++ b/docs/framework/compatibility.md @@ -4,51 +4,51 @@ To see the full list of available ONNX Operators refer to [this table](https://g You can see below the list of current supported ONNX Operators: -| Operator | Implemented | -| :-----------------------------------------------------------: | :------------------: | -| [MatMul](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | -| [MatMulInteger](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | -| [Add](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Sub](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Mul](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Div](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | -| [Equal](operators/tensor/tensor.eq.md) | :white\_check\_mark: | -| [Greater](operators/tensor/tensor.greater.md) | :white\_check\_mark: | -| [GreaterOrEqual](operators/tensor/tensor.greater\_equal.md) | :white\_check\_mark: | -| [Less](operators/tensor/tensor.less.md) | :white\_check\_mark: | -| [LessOrEqual](operators/tensor/tensor.less\_equal.md) | :white\_check\_mark: | -| [Abs](operators/tensor/tensor.abs.md) | :white\_check\_mark: | -| [Ceil](operators/tensor/tensor.ceil.md) | :white\_check\_mark: | -| [Exp](operators/tensor/tensor.exp.md) | :white\_check\_mark: | -| [Ln](operators/tensor/tensor.ln.md) | :white\_check\_mark: | -| [Reshape](operators/tensor/tensor.reshape.md) | :white\_check\_mark: | -| [Transpose](operators/tensor/tensor.transpose.md) | :white\_check\_mark: | -| [ArgMax](operators/tensor/tensor.argmax.md) | :white\_check\_mark: | -| [ArgMin](operators/tensor/tensor.argmin.md) | :white\_check\_mark: | -| [ReduceSum](operators/tensor/tensor.reduce\_sum.md) | :white\_check\_mark: | -| [CumSum](operators/tensor/tensor.cumsum.md) | :white\_check\_mark: | -| [Cos](operators/tensor/tensor.cos.md) | :white\_check\_mark: | -| [Sin](operators/tensor/tensor.sin.md) | :white\_check\_mark: | -| [Asin](operators/tensor/tensor.asin.md) | :white\_check\_mark: | -| [Flatten](operators/tensor/tensor.flatten.md) | :white\_check\_mark: | -| [Relu](operators/neural-network/nn.relu.md) | :white\_check\_mark: | -| [LeakyRelu](operators/neural-network/nn.leaky\_relu.md) | :white\_check\_mark: | -| [Sigmoid](operators/neural-network/nn.sigmoid.md) | :white\_check\_mark: | -| [Softmax](operators/neural-network/nn.softmax.md) | :white\_check\_mark: | -| [LogSoftmax](operators/neural-network/nn.logsoftmax.md) | :white\_check\_mark: | -| [Softsign](operators/neural-network/nn.softsign.md) | :white\_check\_mark: | -| [Softplus](operators/neural-network/nn.softplus.md) | :white\_check\_mark: | -| [Linear](operators/neural-network/nn.linear.md) | :white\_check\_mark: | -| [Sinh](operators/tensor/tensor.sinh.md) | :white\_check\_mark: | -| [Asinh](operators/tensor/tensor.asinh.md) | :white\_check\_mark: | -| [Cosh](operators/tensor/tensor.cosh.md) | :white\_check\_mark: | -| [ACosh](operators/tensor/tensor.acosh.md) | :white\_check\_mark: | -| [Tanh](operators/tensor/tensor.tanh.md) | :white\_check\_mark: | -| [Acos](operators/tensor/tensor.acos.md) | :white\_check\_mark: | +| Operator | Implemented | +| :-------------------------------------------------------------: | :------------------: | +| [MatMul](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | +| [MatMulInteger](operators/tensor/tensor.matmul.md) | :white\_check\_mark: | +| [Add](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Sub](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Mul](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Div](operators/tensor/#arithmetic-operations) | :white\_check\_mark: | +| [Equal](operators/tensor/tensor.equal.md) | :white\_check\_mark: | +| [Greater](operators/tensor/tensor.greater.md) | :white\_check\_mark: | +| [GreaterOrEqual](operators/tensor/tensor.greater\_equal.md) | :white\_check\_mark: | +| [Less](operators/tensor/tensor.less.md) | :white\_check\_mark: | +| [LessOrEqual](operators/tensor/tensor.less\_equal.md) | :white\_check\_mark: | +| [Abs](operators/tensor/tensor.abs.md) | :white\_check\_mark: | +| [Ceil](operators/tensor/tensor.ceil.md) | :white\_check\_mark: | +| [Exp](operators/tensor/tensor.exp.md) | :white\_check\_mark: | +| [Ln](operators/tensor/tensor.log.md) | :white\_check\_mark: | +| [Reshape](operators/tensor/tensor.reshape.md) | :white\_check\_mark: | +| [Transpose](operators/tensor/tensor.transpose.md) | :white\_check\_mark: | +| [ArgMax](operators/tensor/tensor.argmax.md) | :white\_check\_mark: | +| [ArgMin](operators/tensor/tensor.argmin.md) | :white\_check\_mark: | +| [ReduceSum](operators/tensor/tensor.reduce\_sum.md) | :white\_check\_mark: | +| [CumSum](operators/tensor/tensor.cumsum.md) | :white\_check\_mark: | +| [Cos](operators/tensor/tensor.cos.md) | :white\_check\_mark: | +| [Sin](operators/tensor/tensor.sin.md) | :white\_check\_mark: | +| [Asin](operators/tensor/tensor.asin.md) | :white\_check\_mark: | +| [Flatten](operators/tensor/tensor.flatten.md) | :white\_check\_mark: | +| [Relu](operators/neural-network/nn.relu.md) | :white\_check\_mark: | +| [LeakyRelu](operators/neural-network/nn.leaky\_relu.md) | :white\_check\_mark: | +| [Sigmoid](operators/neural-network/nn.sigmoid.md) | :white\_check\_mark: | +| [Softmax](operators/neural-network/nn.softmax.md) | :white\_check\_mark: | +| [LogSoftmax](operators/neural-network/nn.logsoftmax.md) | :white\_check\_mark: | +| [Softsign](operators/neural-network/nn.softsign.md) | :white\_check\_mark: | +| [Softplus](operators/neural-network/nn.softplus.md) | :white\_check\_mark: | +| [Linear](operators/neural-network/nn.linear.md) | :white\_check\_mark: | +| [Sinh](operators/tensor/tensor.sinh.md) | :white\_check\_mark: | +| [Asinh](operators/tensor/tensor.asinh.md) | :white\_check\_mark: | +| [Cosh](operators/tensor/tensor.cosh.md) | :white\_check\_mark: | +| [ACosh](operators/tensor/tensor.acosh.md) | :white\_check\_mark: | +| [Tanh](operators/tensor/tensor.tanh.md) | :white\_check\_mark: | +| [Acos](operators/tensor/tensor.acos.md) | :white\_check\_mark: | | [Sqrt](operators/tensor/tensor.sqrt.md) | :white\_check\_mark: | -| [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | -| [Concat](operators/tensor/tensor.concat.md) | :white\_check\_mark: | -| [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | +| [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | +| [Concat](operators/tensor/tensor.concat.md) | :white\_check\_mark: | +| [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | | [DequantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | @@ -58,4 +58,4 @@ Performance optimizations: | :----------------: | :------------------: | | 8-bit quantization | :white\_check\_mark: | -Current Operators support: **43/156 (27%)** \ No newline at end of file +Current Operators support: **42/156 (27%)** From 359304754b2d7af9d27f46357c697eb339a20311 Mon Sep 17 00:00:00 2001 From: raphaelDkhn <113879115+raphaelDkhn@users.noreply.github.com> Date: Sun, 27 Aug 2023 10:30:58 +0300 Subject: [PATCH 006/179] Update compatibility.md --- docs/framework/compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/compatibility.md b/docs/framework/compatibility.md index 31bacf7f9..98d210c7f 100644 --- a/docs/framework/compatibility.md +++ b/docs/framework/compatibility.md @@ -58,4 +58,4 @@ Performance optimizations: | :----------------: | :------------------: | | 8-bit quantization | :white\_check\_mark: | -Current Operators support: **42/156 (27%)** +Current Operators support: **43/156 (27%)** From d0588fb6014d62d8d561ffc625f14d5f54a19f05 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 27 Aug 2023 10:49:18 +0300 Subject: [PATCH 007/179] remove concat test from tensore_core --- docs/framework/operators/tensor/README.md | 2 +- .../operators/tensor/tensor.concat.md | 34 +- .../operators/tensor/tensor.onehot.md | 1 - src/operators/tensor/core.cairo | 35 +- src/tests/tensor_core/concat.cairo | 4 - .../tensor_core/concat/concat_fp_test.cairo | 2 - .../concat_fp_test/concat_fp16x16_test.cairo | 717 ------------------ .../concat_fp_test/concat_fp8x23_test.cairo | 669 ---------------- .../tensor_core/concat/concat_i32_test.cairo | 622 --------------- .../tensor_core/concat/concat_i8_test.cairo | 622 --------------- .../tensor_core/concat/concat_u32_test.cairo | 622 --------------- 11 files changed, 43 insertions(+), 3287 deletions(-) delete mode 100644 src/tests/tensor_core/concat.cairo delete mode 100644 src/tests/tensor_core/concat/concat_fp_test.cairo delete mode 100644 src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo delete mode 100644 src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo delete mode 100644 src/tests/tensor_core/concat/concat_i32_test.cairo delete mode 100644 src/tests/tensor_core/concat/concat_i8_test.cairo delete mode 100644 src/tests/tensor_core/concat/concat_u32_test.cairo diff --git a/docs/framework/operators/tensor/README.md b/docs/framework/operators/tensor/README.md index 4dda82a6a..2bfaa2d9e 100644 --- a/docs/framework/operators/tensor/README.md +++ b/docs/framework/operators/tensor/README.md @@ -76,7 +76,6 @@ use orion::operators::tensor::core::TensorTrait; | [`tensor.log`](tensor.log.md) | Computes the natural log of all elements of the input tensor. | | [`tensor.abs`](tensor.abs.md) | Computes the absolute value of all elements in the input tensor. | | [`tensor.ceil`](tensor.ceil.md) | Rounds up the value of each element in the input tensor. | -| [`tensor.concat`](tensor.concat.md) | Concatenate a list of tensors into a single tensor. | | [`tensor.sqrt`](tensor.sqrt.md) | Computes the square root of all elements of the input tensor. | | [`tensor.sin`](tensor.sin.md) | Computes the sine of all elements of the input tensor. | | [`tensor.cos`](tensor.cos.md) | Computes the cosine of all elements of the input tensor. | @@ -88,6 +87,7 @@ use orion::operators::tensor::core::TensorTrait; | [`tensor.cosh`](tensor.cosh.md) | Computes the hyperbolic cosine of all elements of the input tensor. | | [`tensor.asinh`](tensor.asinh.md) | Computes the inverse hyperbolic sine of all elements of the input tensor. | | [`tensor.acosh`](tensor.acosh.md) | Computes the inverse hyperbolic cosine of all elements of the input tensor. | +| [`tensor.concat`](tensor.concat.md) | Concatenate a list of tensors into a single tensor. | ### Arithmetic Operations diff --git a/docs/framework/operators/tensor/tensor.concat.md b/docs/framework/operators/tensor/tensor.concat.md index b39900fb3..7d50e0297 100644 --- a/docs/framework/operators/tensor/tensor.concat.md +++ b/docs/framework/operators/tensor/tensor.concat.md @@ -4,7 +4,7 @@ fn concat(tensors: Span>, axis: usize, ) -> Tensor; ``` -Concatenate a list of tensors into a single tensor.. +Concatenate a list of tensors into a single tensor. ## Args @@ -13,8 +13,8 @@ Concatenate a list of tensors into a single tensor.. ## Panics -* Panics if lenght of tensors is not equal greater than 1. -* Panics if dimension is not greater than axis +* Panic if tensor length is not greater than 1. +* Panics if dimension is not greater than axis. ## Returns @@ -23,15 +23,24 @@ A new `Tensor` concatenated tensor of the input tensors. ## Example ```rust +use array::{ArrayTrait, SpanTrait}; + +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + fn concat_example() -> Tensor { - let tensor1 = u32_tensor_2x2_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - axis = 0 - let result = TensorTrait::concat(tensors: data.span(), axis: axis); + let tensor1 = TensorTrait::::new( + shape: array![2, 2].span(), + data: array![0, 1, 2, 3].span(), + extra: Option::None(()) + ); + + let tensor2 = TensorTrait::::new( + shape: array![2, 2].span(), + data: array![0, 1, 2, 3].span(), + extra: Option::None(()) + ); + + let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); return result; } >>> [[0. 1.] @@ -42,8 +51,7 @@ fn concat_example() -> Tensor { result.shape >>> (4, 2) - axis = 1 - let result = TensorTrait::concat(tensors: data.span(), axis: axis); + let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 1); return result; } >>> [[0. 1., 0., 1.] diff --git a/docs/framework/operators/tensor/tensor.onehot.md b/docs/framework/operators/tensor/tensor.onehot.md index d5e73edca..199c58cbf 100644 --- a/docs/framework/operators/tensor/tensor.onehot.md +++ b/docs/framework/operators/tensor/tensor.onehot.md @@ -24,7 +24,6 @@ A new `Tensor` one-hot encode of the input tensor. ## Example ```rust -fn onehot_example() -> Tensor { use array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 9748bbe6b..a238591a6 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -2311,7 +2311,6 @@ trait TensorTrait { /// ## Example /// /// ```rust - /// fn onehot_example() -> Tensor { /// use array::{ArrayTrait, SpanTrait}; /// /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; @@ -2393,7 +2392,7 @@ trait TensorTrait { /// fn concat(tensors: Span>, axis: usize, ) -> Tensor; /// ``` /// - /// Concatenate a list of tensors into a single tensor.. + /// Concatenate a list of tensors into a single tensor. /// /// ## Args /// @@ -2402,8 +2401,8 @@ trait TensorTrait { /// /// ## Panics /// - /// * Panics if lenght of tensors is not equal greater than 1. - /// * Panics if dimension is not greater than axis + /// * Panic if tensor length is not greater than 1. + /// * Panics if dimension is not greater than axis. /// /// ## Returns /// @@ -2412,15 +2411,24 @@ trait TensorTrait { /// ## Example /// /// ```rust + /// use array::{ArrayTrait, SpanTrait}; + /// + /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// /// fn concat_example() -> Tensor { - /// let tensor1 = u32_tensor_2x2_helper(); - /// let tensor2 = u32_tensor_2x2_helper(); - /// - /// let mut data = ArrayTrait::new(); - /// data.append(tensor1); - /// data.append(tensor2); - /// axis = 0 - /// let result = TensorTrait::concat(tensors: data.span(), axis: axis); + /// let tensor1 = TensorTrait::::new( + /// shape: array![2, 2].span(), + /// data: array![0, 1, 2, 3].span(), + /// extra: Option::None(()) + /// ); + /// + /// let tensor2 = TensorTrait::::new( + /// shape: array![2, 2].span(), + /// data: array![0, 1, 2, 3].span(), + /// extra: Option::None(()) + /// ); + /// + /// let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); /// return result; /// } /// >>> [[0. 1.] @@ -2431,8 +2439,7 @@ trait TensorTrait { /// result.shape /// >>> (4, 2) /// - /// axis = 1 - /// let result = TensorTrait::concat(tensors: data.span(), axis: axis); + /// let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 1); /// return result; /// } /// >>> [[0. 1., 0., 1.] diff --git a/src/tests/tensor_core/concat.cairo b/src/tests/tensor_core/concat.cairo deleted file mode 100644 index b9054a183..000000000 --- a/src/tests/tensor_core/concat.cairo +++ /dev/null @@ -1,4 +0,0 @@ -mod concat_u32_test; -mod concat_i32_test; -mod concat_i8_test; -mod concat_fp_test; \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test.cairo b/src/tests/tensor_core/concat/concat_fp_test.cairo deleted file mode 100644 index 2216b1777..000000000 --- a/src/tests/tensor_core/concat/concat_fp_test.cairo +++ /dev/null @@ -1,2 +0,0 @@ -mod concat_fp8x23_test; -mod concat_fp16x16_test; \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo b/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo deleted file mode 100644 index 86efcf579..000000000 --- a/src/tests/tensor_core/concat/concat_fp_test/concat_fp16x16_test.cairo +++ /dev/null @@ -1,717 +0,0 @@ -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; - use orion::numbers::fixed_point::implementations::impl_16x16::{ - FP16x16Impl, FP16x16Into, FP16x16PartialEq - }; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::tests::helpers::tensor::fixed_point::fp16x16::{fp_tensor_1x3_helper,fp_tensor_1x3_neg_helper, fp_tensor_2x3_helper, - fp_tensor_3x3_helper, fp_tensor_2x2_helper, fp_tensor_2x2_neg_helper, - fp_tensor_3x2_helper, fp_tensor_3x2x2_helper, fp_tensor_3x2x2_neg_helper, - fp_tensor_2x2x2_helper, fp_tensor_2x2x2_neg_helper, fp_tensor_3x3x3_helper, fp_tensor_3x3x3_neg_helper}; - - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - use debug::PrintTrait; - - fn fp_tensor_3x2x1_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(1); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, false)); - data.append(FixedTrait::new_unscaled(2, false)); - data.append(FixedTrait::new_unscaled(3, false)); - data.append(FixedTrait::new_unscaled(4, false)); - data.append(FixedTrait::new_unscaled(5, false)); - - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); - - return tensor; - } - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_1x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - } - -// ===== 2D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_0() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_1() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); - assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 2'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 2'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -3'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -4'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_1() { - let tensor1 = fp_tensor_2x3_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); - assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[5] = 4'); - assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_0() { - let tensor1 = fp_tensor_2x3_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_0() { - let tensor1 = fp_tensor_3x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis:0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[5] = 0'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_1() { - let tensor1 = fp_tensor_3x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - -// ===== 3D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_0() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(1, true), 'result[9] = 9'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, true), 'result[10] = 10'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, true), 'result[11] = 11'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = 0'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -1'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -2'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -3'); - assert((*result.data[16]) == FixedTrait::new_unscaled(0, false), 'result[16] = -4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(1, false), 'result[17] = -5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(2, false), 'result[18] = -6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(3, false), 'result[19] = -7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_1() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 0'); - assert((*result.data[9]) == FixedTrait::new_unscaled(1, false), 'result[9] = 1'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = 6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = 7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); - assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_2() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = 2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = 3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[8] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[9] = -3'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(4, true), 'result[14] = -4'); - assert((*result.data[15]) == FixedTrait::new_unscaled(5, true), 'result[15] = -5'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = 4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(6, true), 'result[20] = -6'); - assert((*result.data[21]) == FixedTrait::new_unscaled(7, true), 'result[21] = -7'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_0() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(9, false), 'result[9] = 9'); - assert((*result.data[10]) == FixedTrait::new_unscaled(10, false), 'result[10] = 10'); - assert((*result.data[11]) == FixedTrait::new_unscaled(11, false), 'result[11] = 11'); - assert((*result.data[12]) == FixedTrait::new_unscaled(0, false), 'result[12] = 0'); - assert((*result.data[13]) == FixedTrait::new_unscaled(1, true), 'result[13] = -1'); - assert((*result.data[14]) == FixedTrait::new_unscaled(2, true), 'result[14] = -2'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = -3'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_1() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); - assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); - assert((*result.data[10]) == FixedTrait::new_unscaled(6, false), 'result[10] = 6'); - assert((*result.data[11]) == FixedTrait::new_unscaled(7, false), 'result[11] = 7'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); - assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); - assert((*result.data[18]) == FixedTrait::new_unscaled(10, false), 'result[18] = 10'); - assert((*result.data[19]) == FixedTrait::new_unscaled(11, false), 'result[19] = 11'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_2() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); - assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); - assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = 6'); - assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = 7'); - assert((*result.data[12]) == FixedTrait::new_unscaled(6, false), 'result[12] = -4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(7, false), 'result[13] = -5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); - assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); - assert((*result.data[18]) == FixedTrait::new_unscaled(8, false), 'result[18] = 10'); - assert((*result.data[19]) == FixedTrait::new_unscaled(9, false), 'result[19] = 11'); - assert((*result.data[20]) == FixedTrait::new_unscaled(10, false), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(11, false), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, false), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, false), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[1] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(2, false), 'result[3] = -1'); - assert((*result.data[4]) == FixedTrait::new_unscaled(3, false), 'result[4] = 2'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 3'); - assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 4'); - assert((*result.data[9]) == FixedTrait::new_unscaled(6, false), 'result[9] = 5'); - assert((*result.data[10]) == FixedTrait::new_unscaled(7, false), 'result[10] = -4'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = -5'); - assert((*result.data[12]) == FixedTrait::new_unscaled(8, false), 'result[12] = 6'); - assert((*result.data[13]) == FixedTrait::new_unscaled(9, false), 'result[13] = 7'); - assert((*result.data[14]) == FixedTrait::new_unscaled(4, false), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(10, false), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(11, false), 'result[16] = 8'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 9'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); - - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn dimension_not_the_same() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_2x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn out_of_bound() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_1_fail() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_2_fail() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_1() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x3x3_neg_helper(); - let tensor3 = fp_tensor_3x3x3_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); - assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); - assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); - assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); - assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); - assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); - assert((*result.data[15]) == FixedTrait::new_unscaled(6, true), 'result[15] = -6'); - assert((*result.data[16]) == FixedTrait::new_unscaled(7, true), 'result[16] = -7'); - assert((*result.data[17]) == FixedTrait::new_unscaled(8, true), 'result[17] = -8'); - assert((*result.data[18]) == FixedTrait::new_unscaled(0, false), 'result[18] = 1'); - assert((*result.data[19]) == FixedTrait::new_unscaled(1, false), 'result[19] = 2'); - assert((*result.data[20]) == FixedTrait::new_unscaled(2, false), 'result[20] = 3'); - assert((*result.data[21]) == FixedTrait::new_unscaled(3, false), 'result[21] = 4'); - assert((*result.data[22]) == FixedTrait::new_unscaled(4, false), 'result[22] = 5'); - assert((*result.data[23]) == FixedTrait::new_unscaled(5, false), 'result[23] = 6'); - assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); - assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); - assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 9, 'shape[1] = 9'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 3'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x3x3_neg_helper(); - let tensor3 = fp_tensor_3x3x3_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, false), 'result[9] = 0'); - assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = -1'); - assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = -2'); - assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); - assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); - assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, false), 'result[15] = -6'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = -7'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = -8'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 1'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 2'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, false), 'result[20] = 3'); - assert((*result.data[21]) == FixedTrait::new_unscaled(6, true), 'result[21] = 4'); - assert((*result.data[22]) == FixedTrait::new_unscaled(7, true), 'result[22] = 5'); - assert((*result.data[23]) == FixedTrait::new_unscaled(8, true), 'result[23] = 6'); - assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); - assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); - assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2_2() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x3x3_neg_helper(); - let tensor3 = fp_tensor_3x3x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - data.append(tensor2); - - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 0'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 1'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); - assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); - assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); - assert((*result.data[12]) == FixedTrait::new_unscaled(3, false), 'result[12] = 3'); - assert((*result.data[13]) == FixedTrait::new_unscaled(4, false), 'result[13] = 4'); - assert((*result.data[14]) == FixedTrait::new_unscaled(5, false), 'result[14] = 5'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = 3'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = 4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = 5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(3, false), 'result[18] = -3'); - assert((*result.data[19]) == FixedTrait::new_unscaled(4, false), 'result[19] = -4'); - assert((*result.data[20]) == FixedTrait::new_unscaled(5, false), 'result[20] = -5'); - assert((*result.data[21]) == FixedTrait::new_unscaled(3, true), 'result[21] = 3'); - assert((*result.data[22]) == FixedTrait::new_unscaled(4, true), 'result[22] = 4'); - assert((*result.data[23]) == FixedTrait::new_unscaled(5, true), 'result[23] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 12, 'shape[1] = 12'); - } - - -} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo b/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo deleted file mode 100644 index 5fceb521e..000000000 --- a/src/tests/tensor_core/concat/concat_fp_test/concat_fp8x23_test.cairo +++ /dev/null @@ -1,669 +0,0 @@ -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; - use orion::numbers::fixed_point::implementations::impl_8x23::{ - FP8x23Impl, FP8x23Into, FP8x23PartialEq - }; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::tests::helpers::tensor::fixed_point::fp8x23::{fp_tensor_1x3_helper,fp_tensor_1x3_neg_helper, fp_tensor_2x3_helper, - fp_tensor_3x3_helper, fp_tensor_2x2_helper, fp_tensor_2x2_neg_helper, - fp_tensor_3x2_helper, fp_tensor_3x2x2_helper, fp_tensor_3x2x2_neg_helper, - fp_tensor_2x2x2_helper, fp_tensor_2x2x2_neg_helper, fp_tensor_3x3x3_helper, fp_tensor_3x3x3_neg_helper}; - - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - use debug::PrintTrait; - - fn fp_tensor_3x2x1_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(1); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, false)); - data.append(FixedTrait::new_unscaled(2, false)); - data.append(FixedTrait::new_unscaled(3, false)); - data.append(FixedTrait::new_unscaled(4, false)); - data.append(FixedTrait::new_unscaled(5, false)); - - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); - - return tensor; -} - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_1x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - } - -// ===== 2D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_0() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_1() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); - assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 2'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[5] = -3'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[5] = -4'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_1() { - let tensor1 = fp_tensor_2x3_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = 3'); - assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[5] = 4'); - assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_0() { - let tensor1 = fp_tensor_2x3_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_0() { - let tensor1 = fp_tensor_3x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis:0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[5] = 0'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[5] = -3'); - - assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_1() { - let tensor1 = fp_tensor_3x2_helper(); - let tensor2 = fp_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - -// ===== 3D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_0() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(1, true), 'result[9] = -1'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, true), 'result[10] = -2'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, true), 'result[11] = -3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(0, false), 'result[16] = 0'); - assert((*result.data[17]) == FixedTrait::new_unscaled(1, false), 'result[17] = 1'); - assert((*result.data[18]) == FixedTrait::new_unscaled(2, false), 'result[18] = 2'); - assert((*result.data[19]) == FixedTrait::new_unscaled(3, false), 'result[19] = 3'); - assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); - assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_1() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(0, false), 'result[8] = 0'); - assert((*result.data[9]) == FixedTrait::new_unscaled(1, false), 'result[9] = 1'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = 6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = 7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(4, false), 'result[20] = 4'); - assert((*result.data[21]) == FixedTrait::new_unscaled(5, false), 'result[21] = 5'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_2() { - let tensor1 = fp_tensor_2x2x2_helper(); - let tensor2 = fp_tensor_2x2x2_neg_helper(); - let tensor3 = fp_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, true), 'result[3] = -1'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = 2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = 3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, true), 'result[8] = -2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, true), 'result[9] = -3'); - assert((*result.data[10]) == FixedTrait::new_unscaled(2, false), 'result[10] = 2'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, false), 'result[12] = 4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, false), 'result[13] = 5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(4, true), 'result[14] = -4'); - assert((*result.data[15]) == FixedTrait::new_unscaled(5, true), 'result[15] = -5'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = 4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(6, true), 'result[20] = -6'); - assert((*result.data[21]) == FixedTrait::new_unscaled(7, true), 'result[21] = -7'); - assert((*result.data[22]) == FixedTrait::new_unscaled(6, false), 'result[22] = 6'); - assert((*result.data[23]) == FixedTrait::new_unscaled(7, false), 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_0() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(4, false), 'result[4] = 4'); - assert((*result.data[5]) == FixedTrait::new_unscaled(5, false), 'result[5] = 5'); - assert((*result.data[6]) == FixedTrait::new_unscaled(6, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(7, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(8, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(9, false), 'result[9] = 9'); - assert((*result.data[10]) == FixedTrait::new_unscaled(10, false), 'result[10] = 10'); - assert((*result.data[11]) == FixedTrait::new_unscaled(11, false), 'result[11] = 11'); - assert((*result.data[12]) == FixedTrait::new_unscaled(0, false), 'result[12] = 0'); - assert((*result.data[13]) == FixedTrait::new_unscaled(1, true), 'result[13] = -1'); - assert((*result.data[14]) == FixedTrait::new_unscaled(2, true), 'result[14] = -2'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = -3'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = -4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = -5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, true), 'result[18] = -6'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, true), 'result[19] = -7'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_1() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(3, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(0, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, true), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, true), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, true), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); - assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); - assert((*result.data[10]) == FixedTrait::new_unscaled(6, false), 'result[10] = 6'); - assert((*result.data[11]) == FixedTrait::new_unscaled(7, false), 'result[11] = 7'); - assert((*result.data[12]) == FixedTrait::new_unscaled(4, true), 'result[12] = -4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(5, true), 'result[13] = -5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, true), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, true), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); - assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); - assert((*result.data[18]) == FixedTrait::new_unscaled(10, false), 'result[18] = 10'); - assert((*result.data[19]) == FixedTrait::new_unscaled(11, false), 'result[19] = 11'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, true), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(9, true), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, true), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, true), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_2() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(1, false), 'result[3] = 3'); - assert((*result.data[4]) == FixedTrait::new_unscaled(2, false), 'result[4] = 0'); - assert((*result.data[5]) == FixedTrait::new_unscaled(3, false), 'result[5] = -1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(2, false), 'result[6] = -2'); - assert((*result.data[7]) == FixedTrait::new_unscaled(3, false), 'result[7] = -3'); - assert((*result.data[8]) == FixedTrait::new_unscaled(4, false), 'result[8] = 4'); - assert((*result.data[9]) == FixedTrait::new_unscaled(5, false), 'result[9] = 5'); - assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = 6'); - assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = 7'); - assert((*result.data[12]) == FixedTrait::new_unscaled(6, false), 'result[12] = -4'); - assert((*result.data[13]) == FixedTrait::new_unscaled(7, false), 'result[13] = -5'); - assert((*result.data[14]) == FixedTrait::new_unscaled(6, false), 'result[14] = -6'); - assert((*result.data[15]) == FixedTrait::new_unscaled(7, false), 'result[15] = -7'); - assert((*result.data[16]) == FixedTrait::new_unscaled(8, false), 'result[16] = 8'); - assert((*result.data[17]) == FixedTrait::new_unscaled(9, false), 'result[17] = 9'); - assert((*result.data[18]) == FixedTrait::new_unscaled(8, false), 'result[18] = 10'); - assert((*result.data[19]) == FixedTrait::new_unscaled(9, false), 'result[19] = 11'); - assert((*result.data[20]) == FixedTrait::new_unscaled(10, false), 'result[20] = -8'); - assert((*result.data[21]) == FixedTrait::new_unscaled(11, false), 'result[21] = -9'); - assert((*result.data[22]) == FixedTrait::new_unscaled(10, false), 'result[22] = -10'); - assert((*result.data[23]) == FixedTrait::new_unscaled(11, false), 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[1] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(0, false), 'result[2] = 0'); - assert((*result.data[3]) == FixedTrait::new_unscaled(2, false), 'result[3] = 2'); - assert((*result.data[4]) == FixedTrait::new_unscaled(3, false), 'result[4] = 3'); - assert((*result.data[5]) == FixedTrait::new_unscaled(1, false), 'result[5] = 1'); - assert((*result.data[6]) == FixedTrait::new_unscaled(4, false), 'result[6] = 4'); - assert((*result.data[7]) == FixedTrait::new_unscaled(5, false), 'result[7] = 5'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(6, false), 'result[9] = 6'); - assert((*result.data[10]) == FixedTrait::new_unscaled(7, false), 'result[10] = 7'); - assert((*result.data[11]) == FixedTrait::new_unscaled(3, false), 'result[11] = 3'); - assert((*result.data[12]) == FixedTrait::new_unscaled(8, false), 'result[12] = 8'); - assert((*result.data[13]) == FixedTrait::new_unscaled(9, false), 'result[13] = 9'); - assert((*result.data[14]) == FixedTrait::new_unscaled(4, false), 'result[14] = 4'); - assert((*result.data[15]) == FixedTrait::new_unscaled(10, false), 'result[15] = 10'); - assert((*result.data[16]) == FixedTrait::new_unscaled(11, false), 'result[16] = 11'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); - - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { - let tensor1 = fp_tensor_3x2x2_helper(); - let tensor2 = fp_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn dimension_not_the_same() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_2x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn out_of_bound() { - let tensor1 = fp_tensor_1x3_helper(); - let tensor2 = fp_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_1_fail() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_2_fail() { - let tensor1 = fp_tensor_2x2_helper(); - let tensor2 = fp_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x3x3_neg_helper(); - let tensor3 = fp_tensor_3x3x3_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 6'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 7'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 8'); - assert((*result.data[9]) == FixedTrait::new_unscaled(3, false), 'result[9] = 0'); - assert((*result.data[10]) == FixedTrait::new_unscaled(4, false), 'result[10] = -1'); - assert((*result.data[11]) == FixedTrait::new_unscaled(5, false), 'result[11] = -2'); - assert((*result.data[12]) == FixedTrait::new_unscaled(3, true), 'result[12] = -3'); - assert((*result.data[13]) == FixedTrait::new_unscaled(4, true), 'result[13] = -4'); - assert((*result.data[14]) == FixedTrait::new_unscaled(5, true), 'result[14] = -5'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, false), 'result[15] = -6'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, false), 'result[16] = -7'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, false), 'result[17] = -8'); - assert((*result.data[18]) == FixedTrait::new_unscaled(6, false), 'result[18] = 1'); - assert((*result.data[19]) == FixedTrait::new_unscaled(7, false), 'result[19] = 2'); - assert((*result.data[20]) == FixedTrait::new_unscaled(8, false), 'result[20] = 3'); - assert((*result.data[21]) == FixedTrait::new_unscaled(6, true), 'result[21] = 4'); - assert((*result.data[22]) == FixedTrait::new_unscaled(7, true), 'result[22] = 5'); - assert((*result.data[23]) == FixedTrait::new_unscaled(8, true), 'result[23] = 6'); - assert((*result.data[24]) == FixedTrait::new_unscaled(6, false), 'result[23] = 7'); - assert((*result.data[25]) == FixedTrait::new_unscaled(7, false), 'result[23] = 8'); - assert((*result.data[26]) == FixedTrait::new_unscaled(8, false), 'result[23] = 9'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2_2() { - let tensor1 = fp_tensor_3x3x3_helper(); - let tensor2 = fp_tensor_3x3x3_neg_helper(); - let tensor3 = fp_tensor_3x3x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - data.append(tensor2); - - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]) == FixedTrait::new_unscaled(0, false), 'result[0] = 0'); - assert((*result.data[1]) == FixedTrait::new_unscaled(1, false), 'result[1] = 1'); - assert((*result.data[2]) == FixedTrait::new_unscaled(2, false), 'result[2] = 2'); - assert((*result.data[3]) == FixedTrait::new_unscaled(0, false), 'result[3] = 0'); - assert((*result.data[4]) == FixedTrait::new_unscaled(1, true), 'result[4] = -1'); - assert((*result.data[5]) == FixedTrait::new_unscaled(2, true), 'result[5] = -2'); - assert((*result.data[6]) == FixedTrait::new_unscaled(0, false), 'result[6] = 0'); - assert((*result.data[7]) == FixedTrait::new_unscaled(1, false), 'result[7] = 1'); - assert((*result.data[8]) == FixedTrait::new_unscaled(2, false), 'result[8] = 2'); - assert((*result.data[9]) == FixedTrait::new_unscaled(0, false), 'result[9] = 0'); - assert((*result.data[10]) == FixedTrait::new_unscaled(1, true), 'result[10] = -1'); - assert((*result.data[11]) == FixedTrait::new_unscaled(2, true), 'result[11] = -2'); - assert((*result.data[12]) == FixedTrait::new_unscaled(3, false), 'result[12] = 3'); - assert((*result.data[13]) == FixedTrait::new_unscaled(4, false), 'result[13] = 4'); - assert((*result.data[14]) == FixedTrait::new_unscaled(5, false), 'result[14] = 5'); - assert((*result.data[15]) == FixedTrait::new_unscaled(3, true), 'result[15] = 3'); - assert((*result.data[16]) == FixedTrait::new_unscaled(4, true), 'result[16] = 4'); - assert((*result.data[17]) == FixedTrait::new_unscaled(5, true), 'result[17] = 5'); - assert((*result.data[18]) == FixedTrait::new_unscaled(3, false), 'result[18] = -3'); - assert((*result.data[19]) == FixedTrait::new_unscaled(4, false), 'result[19] = -4'); - assert((*result.data[20]) == FixedTrait::new_unscaled(5, false), 'result[20] = -5'); - assert((*result.data[21]) == FixedTrait::new_unscaled(3, true), 'result[21] = 3'); - assert((*result.data[22]) == FixedTrait::new_unscaled(4, true), 'result[22] = 4'); - assert((*result.data[23]) == FixedTrait::new_unscaled(5, true), 'result[23] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); - } - - -} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_i32_test.cairo b/src/tests/tensor_core/concat/concat_i32_test.cairo deleted file mode 100644 index 41195a655..000000000 --- a/src/tests/tensor_core/concat/concat_i32_test.cairo +++ /dev/null @@ -1,622 +0,0 @@ -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - use orion::tests::helpers::tensor::i32::{i32_tensor_1x3_helper,i32_tensor_1x3_neg_helper, i32_tensor_2x3_helper, - i32_tensor_3x3_helper, i32_tensor_2x2_helper, i32_tensor_2x2_neg_helper, - i32_tensor_3x2_helper, i32_tensor_3x2x2_helper, i32_tensor_3x2x2_neg_helper, - i32_tensor_2x2x2_helper, i32_tensor_2x2x2_neg_helper, i32_tensor_3x3x3_helper, i32_tensor_3x3x3_neg_helper}; - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - use debug::PrintTrait; - - fn i32_tensor_3x2x1_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(1); - - let mut data = ArrayTrait::new(); - - data.append(i32 {mag: 0, sign: false}); - data.append(i32 {mag: 1, sign: false}); - data.append(i32 {mag: 2, sign: false}); - data.append(i32 {mag: 3, sign: false}); - data.append(i32 {mag: 4, sign: false}); - data.append(i32 {mag: 5, sign: false}); - - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); - - return tensor; -} - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3() { - let tensor1 = i32_tensor_1x3_helper(); - let tensor2 = i32_tensor_1x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - } - -// ===== 2D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_0() { - let tensor1 = i32_tensor_2x2_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1, 'result[5] = -1'); - assert((*result.data[6]).into() == -2, 'result[5] = -2'); - assert((*result.data[7]).into() == -3, 'result[5] = -3'); - - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_1() { - let tensor1 = i32_tensor_2x2_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == -1,'result[3] = -1'); - assert((*result.data[4]).into() == 2, 'result[4] = 2'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == -2,'result[6] = -2'); - assert((*result.data[7]).into() == -3,'result[7] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_1() { - let tensor1 = i32_tensor_2x3_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == 4, 'result[5] = 4'); - assert((*result.data[7]).into() == 5, 'result[5] = 5'); - assert((*result.data[8]).into() == -2, 'result[5] = -2'); - assert((*result.data[9]).into() == -3, 'result[5] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_0() { - let tensor1 = i32_tensor_2x3_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_0() { - let tensor1 = i32_tensor_3x2_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis:0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 0, 'result[5] = 0'); - assert((*result.data[7]).into() == -1,'result[5] = -1'); - assert((*result.data[8]).into() == -2,'result[5] = -2'); - assert((*result.data[9]).into() == -3,'result[5] = -3'); - - assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_1() { - let tensor1 = i32_tensor_3x2_helper(); - let tensor2 = i32_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - -// ===== 3D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_0() { - let tensor1 = i32_tensor_2x2x2_helper(); - let tensor2 = i32_tensor_2x2x2_neg_helper(); - let tensor3 = i32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 0, 'result[8] = 8'); - assert((*result.data[9]).into() == -1,'result[9] = -1'); - assert((*result.data[10]).into() == -2, 'result[10] = -2'); - assert((*result.data[11]).into() == -3, 'result[11] = -3'); - assert((*result.data[12]).into() == -4, 'result[12] = -4'); - assert((*result.data[13]).into() == -5, 'result[13] = -5'); - assert((*result.data[14]).into() == -6, 'result[14] = -6'); - assert((*result.data[15]).into() == -7, 'result[15] = -7'); - assert((*result.data[16]).into() == 0, 'result[16] = 0'); - assert((*result.data[17]).into() == 1, 'result[17] = 1'); - assert((*result.data[18]).into() == 2, 'result[18] = 2'); - assert((*result.data[19]).into() == 3, 'result[19] = 3'); - assert((*result.data[20]).into() == 4, 'result[20] = 4'); - assert((*result.data[21]).into() == 5, 'result[21] = 5'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_1() { - let tensor1 = i32_tensor_2x2x2_helper(); - let tensor2 = i32_tensor_2x2x2_neg_helper(); - let tensor3 = i32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1,'result[5] = -1'); - assert((*result.data[6]).into() == -2,'result[6] = -2'); - assert((*result.data[7]).into() == -3,'result[7] = -3'); - assert((*result.data[8]).into() == 0, 'result[8] = 0'); - assert((*result.data[9]).into() == 1, 'result[9] = 1'); - assert((*result.data[10]).into() == 2,'result[10] = 2'); - assert((*result.data[11]).into() == 3,'result[11] = 3'); - assert((*result.data[12]).into() == 4,'result[12] = 4'); - assert((*result.data[13]).into() == 5,'result[13] = 5'); - assert((*result.data[14]).into() == 6,'result[14] = 6'); - assert((*result.data[15]).into() == 7,'result[15] = 7'); - assert((*result.data[16]).into() == -4,'result[16] = -4'); - assert((*result.data[17]).into() == -5,'result[17] = -5'); - assert((*result.data[18]).into() == -6,'result[18] = -6'); - assert((*result.data[19]).into() == -7,'result[19] = -7'); - assert((*result.data[20]).into() == 4,'result[20] = 4'); - assert((*result.data[21]).into() == 5,'result[21] = 5'); - assert((*result.data[22]).into() == 6,'result[22] = 6'); - assert((*result.data[23]).into() == 7,'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_2() { - let tensor1 = i32_tensor_2x2x2_helper(); - let tensor2 = i32_tensor_2x2x2_neg_helper(); - let tensor3 = i32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == -1, 'result[3] = -1'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 2, 'result[6] = 2'); - assert((*result.data[7]).into() == 3, 'result[7] = 3'); - assert((*result.data[8]).into() == -2, 'result[8] = -2'); - assert((*result.data[9]).into() == -3, 'result[9] = -3'); - assert((*result.data[10]).into() == 2, 'result[10] = 2'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 4, 'result[12] = 4'); - assert((*result.data[13]).into() == 5, 'result[13] = 5'); - assert((*result.data[14]).into() == -4, 'result[14] = -4'); - assert((*result.data[15]).into() == -5, 'result[15] = -5'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == -6, 'result[20] = -6'); - assert((*result.data[21]).into() == -7, 'result[21] = -7'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_0() { - let tensor1 = i32_tensor_3x2x2_helper(); - let tensor2 = i32_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 8, 'result[8] = 8'); - assert((*result.data[9]).into() == 9, 'result[9] = 9'); - assert((*result.data[10]).into() == 10, 'result[10] = 10'); - assert((*result.data[11]).into() == 11, 'result[11] = 11'); - assert((*result.data[12]).into() == 0, 'result[12] = 0'); - assert((*result.data[13]).into() == -1, 'result[13] = -1'); - assert((*result.data[14]).into() == -2, 'result[14] = -2'); - assert((*result.data[15]).into() == -3, 'result[15] = -3'); - assert((*result.data[16]).into() == -4, 'result[16] = -4'); - assert((*result.data[17]).into() == -5, 'result[17] = -5'); - assert((*result.data[18]).into() == -6, 'result[18] = -6'); - assert((*result.data[19]).into() == -7, 'result[19] = -7'); - assert((*result.data[20]).into() == -8, 'result[20] = -8'); - assert((*result.data[21]).into() == -9, 'result[21] = -9'); - assert((*result.data[22]).into() == -10, 'result[22] = -10'); - assert((*result.data[23]).into() == -11, 'result[23] = -11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_1() { - let tensor1 = i32_tensor_3x2x2_helper(); - let tensor2 = i32_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1, 'result[5] = -1'); - assert((*result.data[6]).into() == -2, 'result[6] = -2'); - assert((*result.data[7]).into() == -3, 'result[7] = -3'); - assert((*result.data[8]).into() == 4, 'result[8] = 4'); - assert((*result.data[9]).into() == 5, 'result[9] = 5'); - assert((*result.data[10]).into() == 6, 'result[10] = 6'); - assert((*result.data[11]).into() == 7, 'result[11] = 7'); - assert((*result.data[12]).into() == -4, 'result[12] = -4'); - assert((*result.data[13]).into() == -5, 'result[13] = -5'); - assert((*result.data[14]).into() == -6, 'result[14] = -6'); - assert((*result.data[15]).into() == -7, 'result[15] = -7'); - assert((*result.data[16]).into() == 8, 'result[16] = 8'); - assert((*result.data[17]).into() == 9, 'result[17] = 9'); - assert((*result.data[18]).into() == 10, 'result[18] = 10'); - assert((*result.data[19]).into() == 11, 'result[19] = 11'); - assert((*result.data[20]).into() == -8, 'result[20] = -8'); - assert((*result.data[21]).into() == -9, 'result[21] = -9'); - assert((*result.data[22]).into() == -10, 'result[22] = -10'); - assert((*result.data[23]).into() == -11, 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { - let tensor1 = i32_tensor_3x2x2_helper(); - let tensor2 = i32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == 2, 'result[3] = 2'); - assert((*result.data[4]).into() == 3, 'result[4] = 3'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 4, 'result[6] = 4'); - assert((*result.data[7]).into() == 5, 'result[7] = 5'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 6, 'result[9] = 6'); - assert((*result.data[10]).into() == 7, 'result[10] = 7'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 8, 'result[12] = 8'); - assert((*result.data[13]).into() == 9, 'result[13] = 9'); - assert((*result.data[14]).into() == 4, 'result[14] = 4'); - assert((*result.data[15]).into() == 10, 'result[15] = 10'); - assert((*result.data[16]).into() == 11, 'result[16] = 11'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); - - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { - let tensor1 = i32_tensor_3x2x2_helper(); - let tensor2 = i32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { - let tensor1 = i32_tensor_3x2x2_helper(); - let tensor2 = i32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn dimension_not_the_same() { - let tensor1 = i32_tensor_1x3_helper(); - let tensor2 = i32_tensor_2x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn out_of_bound() { - let tensor1 = i32_tensor_1x3_helper(); - let tensor2 = i32_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_1_fail() { - let tensor1 = i32_tensor_2x2_helper(); - let tensor2 = i32_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_2_fail() { - let tensor1 = i32_tensor_2x2_helper(); - let tensor2 = i32_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2() { - let tensor1 = i32_tensor_3x3x3_helper(); - let tensor2 = i32_tensor_3x3x3_neg_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 3, 'result[9] = 3'); - assert((*result.data[10]).into() == 4, 'result[10] = 4'); - assert((*result.data[11]).into() == 5, 'result[11] = 5'); - assert((*result.data[12]).into() == -3, 'result[12] = -3'); - assert((*result.data[13]).into() == -4, 'result[13] = -4'); - assert((*result.data[14]).into() == -5, 'result[14] = -5'); - assert((*result.data[15]).into() == 3, 'result[15] = 3'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == 8, 'result[20] = 8'); - assert((*result.data[21]).into() == -6, 'result[21] = -6'); - assert((*result.data[22]).into() == -7, 'result[22] = -7'); - assert((*result.data[23]).into() == -8, 'result[23] = -8'); - assert((*result.data[24]).into() == 6, 'result[23] = 6'); - assert((*result.data[25]).into() == 7, 'result[23] = 7'); - assert((*result.data[26]).into() == 8, 'result[23] = 8'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2_2() { - let tensor1 = i32_tensor_3x3x3_helper(); - let tensor2 = i32_tensor_3x3x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - data.append(tensor2); - - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 0, 'result[9] = 0'); - assert((*result.data[10]).into() == -1, 'result[10] = -1'); - assert((*result.data[11]).into() == -2, 'result[11] = -2'); - assert((*result.data[12]).into() == 3, 'result[12] = 3'); - assert((*result.data[13]).into() == 4, 'result[13] = 4'); - assert((*result.data[14]).into() == 5, 'result[14] = 5'); - assert((*result.data[15]).into() == -3, 'result[15] = 3'); - assert((*result.data[16]).into() == -4, 'result[16] = 4'); - assert((*result.data[17]).into() == -5, 'result[17] = 5'); - assert((*result.data[18]).into() == 3, 'result[18] = -3'); - assert((*result.data[19]).into() == 4, 'result[19] = -4'); - assert((*result.data[20]).into() == 5, 'result[20] = -5'); - assert((*result.data[21]).into() == -3, 'result[21] = 3'); - assert((*result.data[22]).into() == -4, 'result[22] = 4'); - assert((*result.data[23]).into() == -5, 'result[23] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); - } - -} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_i8_test.cairo b/src/tests/tensor_core/concat/concat_i8_test.cairo deleted file mode 100644 index 543afb70d..000000000 --- a/src/tests/tensor_core/concat/concat_i8_test.cairo +++ /dev/null @@ -1,622 +0,0 @@ -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - - use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - use orion::tests::helpers::tensor::i8::{i8_tensor_1x3_helper,i8_tensor_1x3_neg_helper, i8_tensor_2x3_helper, - i8_tensor_3x3_helper, i8_tensor_2x2_helper, i8_tensor_2x2_neg_helper, - i8_tensor_3x2_helper, i8_tensor_3x2x2_helper, i8_tensor_3x2x2_neg_helper, - i8_tensor_2x2x2_helper, i8_tensor_2x2x2_neg_helper, i8_tensor_3x3x3_helper, i8_tensor_3x3x3_neg_helper}; - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - use debug::PrintTrait; - - fn i8_tensor_3x2x1_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(1); - - let mut data = ArrayTrait::new(); - - data.append(i8 {mag: 0, sign: false}); - data.append(i8 {mag: 1, sign: false}); - data.append(i8 {mag: 2, sign: false}); - data.append(i8 {mag: 3, sign: false}); - data.append(i8 {mag: 4, sign: false}); - data.append(i8 {mag: 5, sign: false}); - - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); - - return tensor; -} - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3() { - let tensor1 = i8_tensor_1x3_helper(); - let tensor2 = i8_tensor_1x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - } - -// ===== 2D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_0() { - let tensor1 = i8_tensor_2x2_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1, 'result[5] = -1'); - assert((*result.data[6]).into() == -2, 'result[5] = -2'); - assert((*result.data[7]).into() == -3, 'result[5] = -3'); - - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_1() { - let tensor1 = i8_tensor_2x2_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == -1,'result[3] = -1'); - assert((*result.data[4]).into() == 2, 'result[4] = 2'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == -2,'result[6] = -2'); - assert((*result.data[7]).into() == -3,'result[7] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_1() { - let tensor1 = i8_tensor_2x3_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == 4, 'result[5] = 4'); - assert((*result.data[7]).into() == 5, 'result[5] = 5'); - assert((*result.data[8]).into() == -2, 'result[5] = -2'); - assert((*result.data[9]).into() == -3, 'result[5] = -3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_0() { - let tensor1 = i8_tensor_2x3_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_0() { - let tensor1 = i8_tensor_3x2_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis:0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 0, 'result[5] = 0'); - assert((*result.data[7]).into() == -1,'result[5] = -1'); - assert((*result.data[8]).into() == -2,'result[5] = -2'); - assert((*result.data[9]).into() == -3,'result[5] = -3'); - - assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_1() { - let tensor1 = i8_tensor_3x2_helper(); - let tensor2 = i8_tensor_2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - -// ===== 3D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_0() { - let tensor1 = i8_tensor_2x2x2_helper(); - let tensor2 = i8_tensor_2x2x2_neg_helper(); - let tensor3 = i8_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 0, 'result[8] = 8'); - assert((*result.data[9]).into() == -1,'result[9] = -1'); - assert((*result.data[10]).into() == -2, 'result[10] = -2'); - assert((*result.data[11]).into() == -3, 'result[11] = -3'); - assert((*result.data[12]).into() == -4, 'result[12] = -4'); - assert((*result.data[13]).into() == -5, 'result[13] = -5'); - assert((*result.data[14]).into() == -6, 'result[14] = -6'); - assert((*result.data[15]).into() == -7, 'result[15] = -7'); - assert((*result.data[16]).into() == 0, 'result[16] = 0'); - assert((*result.data[17]).into() == 1, 'result[17] = 1'); - assert((*result.data[18]).into() == 2, 'result[18] = 2'); - assert((*result.data[19]).into() == 3, 'result[19] = 3'); - assert((*result.data[20]).into() == 4, 'result[20] = 4'); - assert((*result.data[21]).into() == 5, 'result[21] = 5'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_1() { - let tensor1 = i8_tensor_2x2x2_helper(); - let tensor2 = i8_tensor_2x2x2_neg_helper(); - let tensor3 = i8_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1,'result[5] = -1'); - assert((*result.data[6]).into() == -2,'result[6] = -2'); - assert((*result.data[7]).into() == -3,'result[7] = -3'); - assert((*result.data[8]).into() == 0, 'result[8] = 0'); - assert((*result.data[9]).into() == 1, 'result[9] = 1'); - assert((*result.data[10]).into() == 2,'result[10] = 2'); - assert((*result.data[11]).into() == 3,'result[11] = 3'); - assert((*result.data[12]).into() == 4,'result[12] = 4'); - assert((*result.data[13]).into() == 5,'result[13] = 5'); - assert((*result.data[14]).into() == 6,'result[14] = 6'); - assert((*result.data[15]).into() == 7,'result[15] = 7'); - assert((*result.data[16]).into() == -4,'result[16] = -4'); - assert((*result.data[17]).into() == -5,'result[17] = -5'); - assert((*result.data[18]).into() == -6,'result[18] = -6'); - assert((*result.data[19]).into() == -7,'result[19] = -7'); - assert((*result.data[20]).into() == 4,'result[20] = 4'); - assert((*result.data[21]).into() == 5,'result[21] = 5'); - assert((*result.data[22]).into() == 6,'result[22] = 6'); - assert((*result.data[23]).into() == 7,'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_2() { - let tensor1 = i8_tensor_2x2x2_helper(); - let tensor2 = i8_tensor_2x2x2_neg_helper(); - let tensor3 = i8_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == -1, 'result[3] = -1'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 2, 'result[6] = 2'); - assert((*result.data[7]).into() == 3, 'result[7] = 3'); - assert((*result.data[8]).into() == -2, 'result[8] = -2'); - assert((*result.data[9]).into() == -3, 'result[9] = -3'); - assert((*result.data[10]).into() == 2, 'result[10] = 2'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 4, 'result[12] = 4'); - assert((*result.data[13]).into() == 5, 'result[13] = 5'); - assert((*result.data[14]).into() == -4, 'result[14] = -4'); - assert((*result.data[15]).into() == -5, 'result[15] = -5'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == -6, 'result[20] = -6'); - assert((*result.data[21]).into() == -7, 'result[21] = -7'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_0() { - let tensor1 = i8_tensor_3x2x2_helper(); - let tensor2 = i8_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 8, 'result[8] = 8'); - assert((*result.data[9]).into() == 9, 'result[9] = 9'); - assert((*result.data[10]).into() == 10, 'result[10] = 10'); - assert((*result.data[11]).into() == 11, 'result[11] = 11'); - assert((*result.data[12]).into() == 0, 'result[12] = 0'); - assert((*result.data[13]).into() == -1, 'result[13] = -1'); - assert((*result.data[14]).into() == -2, 'result[14] = -2'); - assert((*result.data[15]).into() == -3, 'result[15] = -3'); - assert((*result.data[16]).into() == -4, 'result[16] = -4'); - assert((*result.data[17]).into() == -5, 'result[17] = -5'); - assert((*result.data[18]).into() == -6, 'result[18] = -6'); - assert((*result.data[19]).into() == -7, 'result[19] = -7'); - assert((*result.data[20]).into() == -8, 'result[20] = -8'); - assert((*result.data[21]).into() == -9, 'result[21] = -9'); - assert((*result.data[22]).into() == -10, 'result[22] = -10'); - assert((*result.data[23]).into() == -11, 'result[23] = -11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_1() { - let tensor1 = i8_tensor_3x2x2_helper(); - let tensor2 = i8_tensor_3x2x2_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == -1, 'result[5] = -1'); - assert((*result.data[6]).into() == -2, 'result[6] = -2'); - assert((*result.data[7]).into() == -3, 'result[7] = -3'); - assert((*result.data[8]).into() == 4, 'result[8] = 4'); - assert((*result.data[9]).into() == 5, 'result[9] = 5'); - assert((*result.data[10]).into() == 6, 'result[10] = 6'); - assert((*result.data[11]).into() == 7, 'result[11] = 7'); - assert((*result.data[12]).into() == -4, 'result[12] = -4'); - assert((*result.data[13]).into() == -5, 'result[13] = -5'); - assert((*result.data[14]).into() == -6, 'result[14] = -6'); - assert((*result.data[15]).into() == -7, 'result[15] = -7'); - assert((*result.data[16]).into() == 8, 'result[16] = 8'); - assert((*result.data[17]).into() == 9, 'result[17] = 9'); - assert((*result.data[18]).into() == 10, 'result[18] = 10'); - assert((*result.data[19]).into() == 11, 'result[19] = 11'); - assert((*result.data[20]).into() == -8, 'result[20] = -8'); - assert((*result.data[21]).into() == -9, 'result[21] = -9'); - assert((*result.data[22]).into() == -10, 'result[22] = -10'); - assert((*result.data[23]).into() == -11, 'result[23] = -11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { - let tensor1 = i8_tensor_3x2x2_helper(); - let tensor2 = i8_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == 2, 'result[3] = 2'); - assert((*result.data[4]).into() == 3, 'result[4] = 3'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 4, 'result[6] = 4'); - assert((*result.data[7]).into() == 5, 'result[7] = 5'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 6, 'result[9] = 6'); - assert((*result.data[10]).into() == 7, 'result[10] = 7'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 8, 'result[12] = 8'); - assert((*result.data[13]).into() == 9, 'result[13] = 9'); - assert((*result.data[14]).into() == 4, 'result[14] = 4'); - assert((*result.data[15]).into() == 10, 'result[15] = 10'); - assert((*result.data[16]).into() == 11, 'result[16] = 11'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); - - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { - let tensor1 = i8_tensor_3x2x2_helper(); - let tensor2 = i8_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { - let tensor1 = i8_tensor_3x2x2_helper(); - let tensor2 = i8_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn dimension_not_the_same() { - let tensor1 = i8_tensor_1x3_helper(); - let tensor2 = i8_tensor_2x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn out_of_bound() { - let tensor1 = i8_tensor_1x3_helper(); - let tensor2 = i8_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_1_fail() { - let tensor1 = i8_tensor_2x2_helper(); - let tensor2 = i8_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_2_fail() { - let tensor1 = i8_tensor_2x2_helper(); - let tensor2 = i8_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2() { - let tensor1 = i8_tensor_3x3x3_helper(); - let tensor2 = i8_tensor_3x3x3_neg_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 3, 'result[9] = 3'); - assert((*result.data[10]).into() == 4, 'result[10] = 4'); - assert((*result.data[11]).into() == 5, 'result[11] = 5'); - assert((*result.data[12]).into() == -3, 'result[12] = -3'); - assert((*result.data[13]).into() == -4, 'result[13] = -4'); - assert((*result.data[14]).into() == -5, 'result[14] = -5'); - assert((*result.data[15]).into() == 3, 'result[15] = 3'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == 8, 'result[20] = 8'); - assert((*result.data[21]).into() == -6, 'result[21] = -6'); - assert((*result.data[22]).into() == -7, 'result[22] = -7'); - assert((*result.data[23]).into() == -8, 'result[23] = -8'); - assert((*result.data[24]).into() == 6, 'result[23] = 6'); - assert((*result.data[25]).into() == 7, 'result[23] = 7'); - assert((*result.data[26]).into() == 8, 'result[23] = 8'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2_2() { - let tensor1 = i8_tensor_3x3x3_helper(); - let tensor2 = i8_tensor_3x3x3_neg_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - data.append(tensor2); - - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == -1, 'result[4] = -1'); - assert((*result.data[5]).into() == -2, 'result[5] = -2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 0, 'result[9] = 0'); - assert((*result.data[10]).into() == -1, 'result[10] = -1'); - assert((*result.data[11]).into() == -2, 'result[11] = -2'); - assert((*result.data[12]).into() == 3, 'result[12] = 3'); - assert((*result.data[13]).into() == 4, 'result[13] = 4'); - assert((*result.data[14]).into() == 5, 'result[14] = 5'); - assert((*result.data[15]).into() == -3, 'result[15] = 3'); - assert((*result.data[16]).into() == -4, 'result[16] = 4'); - assert((*result.data[17]).into() == -5, 'result[17] = 5'); - assert((*result.data[18]).into() == 3, 'result[18] = -3'); - assert((*result.data[19]).into() == 4, 'result[19] = -4'); - assert((*result.data[20]).into() == 5, 'result[20] = -5'); - assert((*result.data[21]).into() == -3, 'result[21] = 3'); - assert((*result.data[22]).into() == -4, 'result[22] = 4'); - assert((*result.data[23]).into() == -5, 'result[23] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); - } - -} \ No newline at end of file diff --git a/src/tests/tensor_core/concat/concat_u32_test.cairo b/src/tests/tensor_core/concat/concat_u32_test.cairo deleted file mode 100644 index 2fee11e48..000000000 --- a/src/tests/tensor_core/concat/concat_u32_test.cairo +++ /dev/null @@ -1,622 +0,0 @@ -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - - - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - - use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x3_helper, - u32_tensor_3x3_helper, u32_tensor_2x2_helper, - u32_tensor_3x2_helper, u32_tensor_3x2x2_helper, - u32_tensor_2x2x2_helper, u32_tensor_3x3x3_helper}; - use debug::PrintTrait; - - fn u32_tensor_3x2x1_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(1); - - let mut data = ArrayTrait::new(); - - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); - - return tensor; -} - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3() { - let tensor1 = u32_tensor_1x3_helper(); - let tensor2 = u32_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == 1, 'result[4] = 1'); - assert((*result.data[5]).into() == 2, 'result[5] = 2'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - } - -// ===== 2D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_0() { - let tensor1 = u32_tensor_2x2_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 2, 'result[5] = 2'); - assert((*result.data[7]).into() == 3, 'result[5] = 3'); - - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_axis_1() { - let tensor1 = u32_tensor_2x2_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == 1,'result[3] = 1'); - assert((*result.data[4]).into() == 2, 'result[4] = 2'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == 2,'result[6] = 2'); - assert((*result.data[7]).into() == 3,'result[7] = 3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_1() { - let tensor1 = u32_tensor_2x3_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == 1, 'result[4] = 1'); - assert((*result.data[5]).into() == 3, 'result[5] = 3'); - assert((*result.data[6]).into() == 4, 'result[5] = 4'); - assert((*result.data[7]).into() == 5, 'result[5] = 5'); - assert((*result.data[8]).into() == 2, 'result[5] = 2'); - assert((*result.data[9]).into() == 3, 'result[5] = 3'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 5, 'shape[1] = 5'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x3_2x2__axis_0() { - let tensor1 = u32_tensor_2x3_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_0() { - let tensor1 = u32_tensor_3x2_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis:0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 0, 'result[5] = 0'); - assert((*result.data[7]).into() == 1,'result[5] = 1'); - assert((*result.data[8]).into() == 2,'result[5] = 2'); - assert((*result.data[9]).into() == 3,'result[5] = 3'); - - assert((*result.shape.at(0)) == 5, 'shape[0] = 5'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2_2x2__axis_1() { - let tensor1 = u32_tensor_3x2_helper(); - let tensor2 = u32_tensor_2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - -// ===== 3D ===== // - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_0() { - let tensor1 = u32_tensor_2x2x2_helper(); - let tensor2 = u32_tensor_2x2x2_helper(); - let tensor3 = u32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 0, 'result[8] = 0'); - assert((*result.data[9]).into() == 1,'result[9] = 1'); - assert((*result.data[10]).into() == 2, 'result[10] = 2'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 4, 'result[12] = 4'); - assert((*result.data[13]).into() == 5, 'result[13] = 5'); - assert((*result.data[14]).into() == 6, 'result[14] = 6'); - assert((*result.data[15]).into() == 7, 'result[15] = 7'); - assert((*result.data[16]).into() == 0, 'result[16] = 0'); - assert((*result.data[17]).into() == 1, 'result[17] = 1'); - assert((*result.data[18]).into() == 2, 'result[18] = 2'); - assert((*result.data[19]).into() == 3, 'result[19] = 3'); - assert((*result.data[20]).into() == 4, 'result[20] = 4'); - assert((*result.data[21]).into() == 5, 'result[21] = 5'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_1() { - let tensor1 = u32_tensor_2x2x2_helper(); - let tensor2 = u32_tensor_2x2x2_helper(); - let tensor3 = u32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1,'result[5] = 1'); - assert((*result.data[6]).into() == 2,'result[6] = 2'); - assert((*result.data[7]).into() == 3,'result[7] = 3'); - assert((*result.data[8]).into() == 0, 'result[8] = 0'); - assert((*result.data[9]).into() == 1, 'result[9] = 1'); - assert((*result.data[10]).into() == 2,'result[10] = 2'); - assert((*result.data[11]).into() == 3,'result[11] = 3'); - assert((*result.data[12]).into() == 4,'result[12] = 4'); - assert((*result.data[13]).into() == 5,'result[13] = 5'); - assert((*result.data[14]).into() == 6,'result[14] = 6'); - assert((*result.data[15]).into() == 7,'result[15] = 7'); - assert((*result.data[16]).into() == 4,'result[16] = 4'); - assert((*result.data[17]).into() == 5,'result[17] = 5'); - assert((*result.data[18]).into() == 6,'result[18] = 6'); - assert((*result.data[19]).into() == 7,'result[19] = 7'); - assert((*result.data[20]).into() == 4,'result[20] = 4'); - assert((*result.data[21]).into() == 5,'result[21] = 5'); - assert((*result.data[22]).into() == 6,'result[22] = 6'); - assert((*result.data[23]).into() == 7,'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 6, 'shape[1] = 6'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2x2__axis_2() { - let tensor1 = u32_tensor_2x2x2_helper(); - let tensor2 = u32_tensor_2x2x2_helper(); - let tensor3 = u32_tensor_2x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor3); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == 1, 'result[3] = 1'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 2, 'result[6] = 2'); - assert((*result.data[7]).into() == 3, 'result[7] = 3'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 3, 'result[9] = 3'); - assert((*result.data[10]).into() == 2, 'result[10] = 2'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 4, 'result[12] = 4'); - assert((*result.data[13]).into() == 5, 'result[13] = 5'); - assert((*result.data[14]).into() == 4, 'result[14] = 4'); - assert((*result.data[15]).into() == 5, 'result[15] = 5'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == 6, 'result[20] = 6'); - assert((*result.data[21]).into() == 7, 'result[21] = 7'); - assert((*result.data[22]).into() == 6, 'result[22] = 6'); - assert((*result.data[23]).into() == 7, 'result[23] = 7'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 6, 'shape[1] = 6'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_0() { - let tensor1 = u32_tensor_3x2x2_helper(); - let tensor2 = u32_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 4, 'result[4] = 4'); - assert((*result.data[5]).into() == 5, 'result[5] = 5'); - assert((*result.data[6]).into() == 6, 'result[6] = 6'); - assert((*result.data[7]).into() == 7, 'result[7] = 7'); - assert((*result.data[8]).into() == 8, 'result[8] = 8'); - assert((*result.data[9]).into() == 9, 'result[9] = 9'); - assert((*result.data[10]).into() == 10, 'result[10] = 10'); - assert((*result.data[11]).into() == 11, 'result[11] = 11'); - assert((*result.data[12]).into() == 0, 'result[12] = 0'); - assert((*result.data[13]).into() == 1, 'result[13] = 1'); - assert((*result.data[14]).into() == 2, 'result[14] = 2'); - assert((*result.data[15]).into() == 3, 'result[15] = 3'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == 8, 'result[20] = 8'); - assert((*result.data[21]).into() == 9, 'result[21] = 9'); - assert((*result.data[22]).into() == 10, 'result[22] = 10'); - assert((*result.data[23]).into() == 11, 'result[23] = 11'); - - assert((*result.shape.at(0)) == 6, 'shape[0] = 6'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2__axis_1() { - let tensor1 = u32_tensor_3x2x2_helper(); - let tensor2 = u32_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 3, 'result[3] = 3'); - assert((*result.data[4]).into() == 0, 'result[4] = 0'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 2, 'result[6] = 2'); - assert((*result.data[7]).into() == 3, 'result[7] = 3'); - assert((*result.data[8]).into() == 4, 'result[8] = 4'); - assert((*result.data[9]).into() == 5, 'result[9] = 5'); - assert((*result.data[10]).into() == 6, 'result[10] = 6'); - assert((*result.data[11]).into() == 7, 'result[11] = 7'); - assert((*result.data[12]).into() == 4, 'result[12] = 4'); - assert((*result.data[13]).into() == 5, 'result[13] = 5'); - assert((*result.data[14]).into() == 6, 'result[14] = 6'); - assert((*result.data[15]).into() == 7, 'result[15] = 7'); - assert((*result.data[16]).into() == 8, 'result[16] = 8'); - assert((*result.data[17]).into() == 9, 'result[17] = 9'); - assert((*result.data[18]).into() == 10, 'result[18] = 10'); - assert((*result.data[19]).into() == 11, 'result[19] = 11'); - assert((*result.data[20]).into() == 8, 'result[20] = 8'); - assert((*result.data[21]).into() == 9, 'result[21] = 9'); - assert((*result.data[22]).into() == 10, 'result[22] = 10'); - assert((*result.data[23]).into() == 11, 'result[23] = 11'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[1] = 2'); - - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_2() { - let tensor1 = u32_tensor_3x2x2_helper(); - let tensor2 = u32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 0, 'result[2] = 0'); - assert((*result.data[3]).into() == 2, 'result[3] = 2'); - assert((*result.data[4]).into() == 3, 'result[4] = 3'); - assert((*result.data[5]).into() == 1, 'result[5] = 1'); - assert((*result.data[6]).into() == 4, 'result[6] = 4'); - assert((*result.data[7]).into() == 5, 'result[7] = 5'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 6, 'result[9] = 6'); - assert((*result.data[10]).into() == 7, 'result[10] = 7'); - assert((*result.data[11]).into() == 3, 'result[11] = 3'); - assert((*result.data[12]).into() == 8, 'result[12] = 8'); - assert((*result.data[13]).into() == 9, 'result[13] = 9'); - assert((*result.data[14]).into() == 4, 'result[14] = 4'); - assert((*result.data[15]).into() == 10, 'result[15] = 10'); - assert((*result.data[16]).into() == 11, 'result[16] = 11'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 3, 'shape[1] = 4'); - - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_0() { - let tensor1 = u32_tensor_3x2x2_helper(); - let tensor2 = u32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 0); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_3x2x1__axis_1() { - let tensor1 = u32_tensor_3x2x2_helper(); - let tensor2 = u32_tensor_3x2x1_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn dimension_not_the_same() { - let tensor1 = u32_tensor_1x3_helper(); - let tensor2 = u32_tensor_2x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn out_of_bound() { - let tensor1 = u32_tensor_1x3_helper(); - let tensor2 = u32_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_1_fail() { - let tensor1 = u32_tensor_2x2_helper(); - let tensor2 = u32_tensor_1x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_not_same_dimension_2_fail() { - let tensor1 = u32_tensor_2x2_helper(); - let tensor2 = u32_tensor_3x2x2_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - - let result = TensorTrait::concat(tensors: data.span(), axis: 1); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2() { - let tensor1 = u32_tensor_3x3x3_helper(); - let tensor2 = u32_tensor_3x3x3_helper(); - - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == 1, 'result[4] = 1'); - assert((*result.data[5]).into() == 2, 'result[5] = 2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 3, 'result[9] = 3'); - assert((*result.data[10]).into() == 4, 'result[10] = 4'); - assert((*result.data[11]).into() == 5, 'result[11] = 5'); - assert((*result.data[12]).into() == 3, 'result[12] = 3'); - assert((*result.data[13]).into() == 4, 'result[13] = 4'); - assert((*result.data[14]).into() == 5, 'result[14] = 5'); - assert((*result.data[15]).into() == 3, 'result[15] = 3'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 6, 'result[18] = 6'); - assert((*result.data[19]).into() == 7, 'result[19] = 7'); - assert((*result.data[20]).into() == 8, 'result[20] = 8'); - assert((*result.data[21]).into() == 6, 'result[21] = 6'); - assert((*result.data[22]).into() == 7, 'result[22] = 7'); - assert((*result.data[23]).into() == 8, 'result[23] = 8'); - assert((*result.data[24]).into() == 6, 'result[23] = 6'); - assert((*result.data[25]).into() == 7, 'result[23] = 7'); - assert((*result.data[26]).into() == 8, 'result[23] = 8'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 9, 'shape[1] = 9'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x3x3__axis_2_2() { - let tensor1 = u32_tensor_3x3x3_helper(); - let tensor2 = u32_tensor_3x3x3_helper(); - - let mut data = ArrayTrait::new(); - data.append(tensor1); - data.append(tensor2); - data.append(tensor1); - data.append(tensor2); - - - let result = TensorTrait::concat(tensors: data.span(), axis: 2); - assert((*result.data[0]).into() == 0, 'result[0] = 0'); - assert((*result.data[1]).into() == 1, 'result[1] = 1'); - assert((*result.data[2]).into() == 2, 'result[2] = 2'); - assert((*result.data[3]).into() == 0, 'result[3] = 0'); - assert((*result.data[4]).into() == 1, 'result[4] = 1'); - assert((*result.data[5]).into() == 2, 'result[5] = 2'); - assert((*result.data[6]).into() == 0, 'result[6] = 0'); - assert((*result.data[7]).into() == 1, 'result[7] = 1'); - assert((*result.data[8]).into() == 2, 'result[8] = 2'); - assert((*result.data[9]).into() == 0, 'result[9] = 0'); - assert((*result.data[10]).into() == 1, 'result[10] = 1'); - assert((*result.data[11]).into() == 2, 'result[11] = 2'); - assert((*result.data[12]).into() == 3, 'result[12] = 3'); - assert((*result.data[13]).into() == 4, 'result[13] = 4'); - assert((*result.data[14]).into() == 5, 'result[14] = 5'); - assert((*result.data[15]).into() == 3, 'result[15] = 3'); - assert((*result.data[16]).into() == 4, 'result[16] = 4'); - assert((*result.data[17]).into() == 5, 'result[17] = 5'); - assert((*result.data[18]).into() == 3, 'result[18] = 3'); - assert((*result.data[19]).into() == 4, 'result[19] = 4'); - assert((*result.data[20]).into() == 5, 'result[20] = 5'); - assert((*result.data[21]).into() == 3, 'result[21] = 3'); - assert((*result.data[22]).into() == 4, 'result[22] = 4'); - assert((*result.data[23]).into() == 5, 'result[23] = 5'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 12, 'shape[1] = 3'); - } - -} \ No newline at end of file From 640e0d38a4053a4be16df4b42e12b389aeef58b3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 28 Aug 2023 15:34:49 +0300 Subject: [PATCH 008/179] refactor concat_helper --- .../tensor/math/concat/helpers.cairo | 188 +++++++++--------- 1 file changed, 98 insertions(+), 90 deletions(-) diff --git a/src/operators/tensor/math/concat/helpers.cairo b/src/operators/tensor/math/concat/helpers.cairo index 1ecc9483c..a31972185 100644 --- a/src/operators/tensor/math/concat/helpers.cairo +++ b/src/operators/tensor/math/concat/helpers.cairo @@ -8,132 +8,140 @@ use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32 use orion::operators::tensor::helpers::replace_index; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -/// Cf: TensorTrait::concat_helper docstring -fn concat_helper< - T, - impl TTensorTrait: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, - ->( - mut tensors: Span>, axis: usize, -) -> Tensor { + +fn concat_helper, impl TCopy: Copy, impl TDrop: Drop, >( + mut tensors: Span>, axis: usize +) -> Tensor { assert(tensors.len() >= 2, 'Input tensors must be > 1'); let base_tensor = *tensors.at(0); - let base_shape = base_tensor.shape; - let dimension = base_shape.len(); + let dimension = base_shape.len(); assert(dimension > axis, 'Out of bounds for dimension'); - let tensor_len = tensors.len(); - let mut output_data = ArrayTrait::::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); + // Validate shapes of tensors + validate_shapes(tensors, base_shape, axis); + + // Calculate output size + let output_size = compute_output_size(base_shape, tensors, axis); - let mut axis_index_shape: usize = 0; - - let mut shape_index: usize = 0; + // Concatenate tensor data + let output_data: Array = concatenate_data(tensors, axis, base_shape); + + TensorTrait::::new(output_size.span(), output_data.span(), base_tensor.extra) +} + +fn validate_shapes(mut tensors: Span>, mut base_shape: Span, axis: usize) { loop { - if (shape_index == tensor_len){ - break(); + match tensors.pop_front() { + Option::Some(tensor) => { + assert(base_shape.len() == (*tensor.shape).len(), 'Dimension not the same'); + + let mut axis_index = 0; + loop { + if axis_index == base_shape.len() { + break; + } + if axis_index != axis { + assert( + base_shape.at(axis_index) == (*tensor.shape).at(axis_index), + 'Shape is not the same' + ); + } + axis_index += 1; + }; + }, + Option::None(_) => { + break; + } }; - let current_shape_ind = 0; - let index_shape = *tensors.at(shape_index).shape; - assert(dimension == index_shape.len(), 'Dimension not the same'); + }; +} - let mut base_index: usize = 0; - let mut max_break: usize = 1; +fn compute_output_size( + mut base_shape: Span, mut tensors: Span>, axis: usize +) -> Array { + let mut output_size = ArrayTrait::::new(); - loop { - if (base_index == dimension){ - break(); - }; - if (base_index == axis){ - assert(max_break == 1, 'More than 1 axis not same'); - axis_index_shape += *index_shape.at(base_index); - max_break -=1; - } else { - assert(base_shape.at(base_index) == index_shape.at(base_index), 'Shape is not the same') + let mut axis_size = 0; + loop { + match tensors.pop_front() { + Option::Some(tensor) => { + axis_size += *(*tensor.shape).at(axis); + }, + Option::None(_) => { + break; } - base_index +=1; }; - - shape_index += 1; }; - // output size of data - let mut index = 0; + let mut shape_index = 0; loop { - if (index == dimension){ - break(); + match base_shape.pop_front() { + Option::Some(item) => { + if shape_index == axis { + output_size.append(axis_size); + } else { + output_size.append(*item); + } + shape_index += 1; + }, + Option::None(_) => { + break; + } }; - let val = *base_shape.at(index); - if (index == axis){ - output_size.append(axis_index_shape) - } - else { - output_size.append(val) - } - index +=1; }; - // Concatenation loop - let mut total_loop = 1; - if (axis == 0_u32){ - total_loop == 1; - } - else { - let mut total_loop_index: usize = 0; - loop { - if (total_loop_index == axis){ - break(); - }; - total_loop *= *base_shape.at(total_loop_index); + output_size +} - total_loop_index += 1; - }; +fn concatenate_data, impl TDrop: Drop, >( + mut tensors: Span>, axis: usize, base_shape: Span +) -> Array { + let mut output_data = ArrayTrait::::new(); - } + let total_loops = product_upto(base_shape, axis); - // Loop through dimension - let mut outer_loop_index: usize = 0; + let mut outer_loop_index = 0; loop { - if (outer_loop_index == total_loop.into()) { - break(); - }; + if outer_loop_index == total_loops { + break; + } - // Loop through each tensor - let mut tensor_index: usize = 0; + let mut tensor_index = 0; loop { - if (tensor_index == tensor_len){ - break(); + if tensor_index == tensors.len() { + break; } + let tensor = tensors.at(tensor_index); + let slice_len = (*tensor.data).len() / total_loops; - let active_tensor = *tensors.at(tensor_index); - let total_active_tensor = active_tensor.data.len(); - - let mut inner_index: usize = 0; - let count = total_active_tensor / total_loop; + let mut inner_index = 0; loop { - if (inner_index == count){ - break(); + if inner_index == slice_len { + break; } - output_data.append(*active_tensor.data.at(count*outer_loop_index + inner_index)); - + output_data.append(*(*tensor.data).at(slice_len * outer_loop_index + inner_index)); inner_index += 1; }; - tensor_index += 1; }; - outer_loop_index += 1; }; - let mut output_tensor = TensorTrait::::new(output_size.span(), output_data.span(), extra); - - output_tensor + output_data } +fn product_upto(mut shape: Span, upto: usize) -> usize { + let mut total = 1; + let mut index = 0; + loop { + if index == upto { + break; + } + total *= *shape.at(index); + index += 1; + }; + total +} From 400d38abede3f7e3ce639492a7aee901196db4e2 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 12:11:56 +0300 Subject: [PATCH 009/179] add zero and one trait --- src/numbers.cairo | 3 +- .../implementations/fp16x16/core.cairo | 26 ++++++++++++++++ .../implementations/fp8x23/core.cairo | 26 ++++++++++++++++ src/numbers/one.cairo | 4 +++ src/numbers/signed_integer/i128.cairo | 26 ++++++++++++++++ src/numbers/signed_integer/i16.cairo | 25 ++++++++++++++++ src/numbers/signed_integer/i32.cairo | 28 ++++++++++++++++- src/numbers/signed_integer/i64.cairo | 26 ++++++++++++++++ src/numbers/signed_integer/i8.cairo | 30 +++++++++++++++++-- src/numbers/zero.cairo | 4 +++ 10 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 src/numbers/one.cairo create mode 100644 src/numbers/zero.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 33d5f87bc..a069d8ee1 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -1,3 +1,4 @@ mod fixed_point; mod signed_integer; - +mod zero; +mod one; \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp16x16/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/core.cairo index 62ab1d1ed..d71bcdd2c 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/core.cairo @@ -8,6 +8,8 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; use orion::numbers::fixed_point::implementations::fp16x16::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // CONSTANTS @@ -358,6 +360,30 @@ impl FP16x16Rem of Rem { } } +impl FP16x16Zero of Zero { + #[inline(always)] + fn zero() -> FixedType { + return FixedTrait::ZERO(); + } + + #[inline(always)] + fn is_zero(self: FixedType) -> bool { + return self == FixedTrait::ZERO(); + } +} + +impl FP16x16One of One { + #[inline(always)] + fn one() -> FixedType { + return FixedTrait::ONE(); + } + + #[inline(always)] + fn is_one(self: FixedType) -> bool { + return self == FixedTrait::ONE(); + } +} + /// INTERNAL fn _i32_into_fp(x: FixedType) -> i32 { diff --git a/src/numbers/fixed_point/implementations/fp8x23/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/core.cairo index 88d64beb2..4c5d47796 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/core.cairo @@ -8,6 +8,8 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; use orion::numbers::fixed_point::implementations::fp8x23::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // CONSTANTS @@ -357,6 +359,30 @@ impl FP8x23Rem of Rem { } } +impl FP8x23Zero of Zero { + #[inline(always)] + fn zero() -> FixedType { + return FixedTrait::ZERO(); + } + + #[inline(always)] + fn is_zero(self: FixedType) -> bool { + return self == FixedTrait::ZERO(); + } +} + +impl FP8x23One of One { + #[inline(always)] + fn one() -> FixedType { + return FixedTrait::ONE(); + } + + #[inline(always)] + fn is_one(self: FixedType) -> bool { + return self == FixedTrait::ONE(); + } +} + /// INTERNAL fn _i32_into_fp(x: FixedType) -> i32 { diff --git a/src/numbers/one.cairo b/src/numbers/one.cairo new file mode 100644 index 000000000..1614766c1 --- /dev/null +++ b/src/numbers/one.cairo @@ -0,0 +1,4 @@ +trait One { + fn one() -> T; + fn is_one(self: T) -> bool; +} \ No newline at end of file diff --git a/src/numbers/signed_integer/i128.cairo b/src/numbers/signed_integer/i128.cairo index 6889e3550..093a8cafa 100644 --- a/src/numbers/signed_integer/i128.cairo +++ b/src/numbers/signed_integer/i128.cairo @@ -1,6 +1,8 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // ====================== INT 128 ====================== @@ -159,6 +161,30 @@ impl i128Neg of Neg { } } +impl I128Zero of Zero { + #[inline(always)] + fn zero() -> i128 { + return i128 { mag: 0, sign: false }; + } + + #[inline(always)] + fn is_zero(self: i128) -> bool { + return self == i128 { mag: 0, sign: false }; + } +} + +impl I128One of One { + #[inline(always)] + fn one() -> i128 { + return i128 { mag: 1, sign: false }; + } + + #[inline(always)] + fn is_one(self: i128) -> bool { + return self == i128 { mag: 1, sign: false }; + } +} + // Checks if the given i128 integer is zero and has the correct sign. // # Arguments diff --git a/src/numbers/signed_integer/i16.cairo b/src/numbers/signed_integer/i16.cairo index 3689f150a..34232b467 100644 --- a/src/numbers/signed_integer/i16.cairo +++ b/src/numbers/signed_integer/i16.cairo @@ -1,6 +1,8 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // ====================== INT 16 ====================== @@ -159,6 +161,29 @@ impl i16Neg of Neg { } } +impl I16Zero of Zero { + #[inline(always)] + fn zero() -> i16 { + return i16 { mag: 0, sign: false }; + } + + #[inline(always)] + fn is_zero(self: i16) -> bool { + return self == i16 { mag: 0, sign: false }; + } +} + +impl I16One of One { + #[inline(always)] + fn one() -> i16 { + return i16 { mag: 1, sign: false }; + } + + #[inline(always)] + fn is_one(self: i16) -> bool { + return self == i16 { mag: 1, sign: false }; + } +} // Checks if the given i16 integer is zero and has the correct sign. // # Arguments diff --git a/src/numbers/signed_integer/i32.cairo b/src/numbers/signed_integer/i32.cairo index 04a2ca148..61d56aba3 100644 --- a/src/numbers/signed_integer/i32.cairo +++ b/src/numbers/signed_integer/i32.cairo @@ -4,6 +4,8 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; use orion::numbers::signed_integer::i8::i8; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // ====================== INT 32 ====================== @@ -168,6 +170,30 @@ impl I32TryIntoI8 of TryInto { } } +impl I32Zero of Zero { + #[inline(always)] + fn zero() -> i32 { + return i32 { mag: 0, sign: false }; + } + + #[inline(always)] + fn is_zero(self: i32) -> bool { + return self == i32 { mag: 0, sign: false }; + } +} + +impl I32One of One { + #[inline(always)] + fn one() -> i32 { + return i32 { mag: 1, sign: false }; + } + + #[inline(always)] + fn is_one(self: i32) -> bool { + return self == i32 { mag: 1, sign: false }; + } +} + // Checks if the given i32 integer is zero and has the correct sign. // # Arguments // * `x` - The i32 integer to check. @@ -489,4 +515,4 @@ fn ensure_non_negative_zero(mag: u32, sign: bool) -> i32 { } else { IntegerTrait::::new(mag, sign) } -} \ No newline at end of file +} diff --git a/src/numbers/signed_integer/i64.cairo b/src/numbers/signed_integer/i64.cairo index 070bc3133..25cb8748a 100644 --- a/src/numbers/signed_integer/i64.cairo +++ b/src/numbers/signed_integer/i64.cairo @@ -1,6 +1,8 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // ====================== INT 64 ====================== @@ -159,6 +161,30 @@ impl i64Neg of Neg { } } +impl I64Zero of Zero { + #[inline(always)] + fn zero() -> i64 { + return i64 { mag: 0, sign: false }; + } + + #[inline(always)] + fn is_zero(self: i64) -> bool { + return self == i64 { mag: 0, sign: false }; + } +} + +impl I64One of One { + #[inline(always)] + fn one() -> i64 { + return i64 { mag: 1, sign: false }; + } + + #[inline(always)] + fn is_one(self: i64) -> bool { + return self == i64 { mag: 1, sign: false }; + } +} + // Checks if the given i64 integer is zero and has the correct sign. // # Arguments diff --git a/src/numbers/signed_integer/i8.cairo b/src/numbers/signed_integer/i8.cairo index aed7c3338..cfc77ef12 100644 --- a/src/numbers/signed_integer/i8.cairo +++ b/src/numbers/signed_integer/i8.cairo @@ -5,6 +5,8 @@ use orion::numbers::signed_integer::i32::i32; use orion::numbers::fixed_point::implementations::fp8x23::core::ONE as ONE_fp8x23; use orion::numbers::fixed_point::implementations::fp16x16::core::ONE as ONE_fp16x16; use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; +use orion::numbers::zero::Zero; +use orion::numbers::one::One; // ====================== INT 8 ====================== @@ -184,6 +186,30 @@ impl I8IntoFP16x16 of Into { } } +impl I8Zero of Zero { + #[inline(always)] + fn zero() -> i8 { + return i8 { mag: 0, sign: false }; + } + + #[inline(always)] + fn is_zero(self: i8) -> bool { + return self == i8 { mag: 0, sign: false }; + } +} + +impl I8One of One { + #[inline(always)] + fn one() -> i8 { + return i8 { mag: 1, sign: false }; + } + + #[inline(always)] + fn is_one(self: i8) -> bool { + return self == i8 { mag: 1, sign: false }; + } +} + // Checks if the given i8 integer is zero and has the correct sign. // # Arguments // * `x` - The i8 integer to check. @@ -496,8 +522,6 @@ fn i8_to_i32(x: i8) -> i32 { i32 { mag: x.mag.into(), sign: x.sign } } -use debug::PrintTrait; - fn i8_to_fp8x23(x: i8) -> FixedType { FixedType { mag: x.mag.into() * ONE_fp8x23, sign: x.sign } } @@ -512,4 +536,4 @@ fn ensure_non_negative_zero(mag: u8, sign: bool) -> i8 { } else { IntegerTrait::::new(mag, sign) } -} \ No newline at end of file +} diff --git a/src/numbers/zero.cairo b/src/numbers/zero.cairo new file mode 100644 index 000000000..6bccc5d47 --- /dev/null +++ b/src/numbers/zero.cairo @@ -0,0 +1,4 @@ +trait Zero { + fn zero() -> T; + fn is_zero(self: T) -> bool; +} \ No newline at end of file From bf121953dd671a523a4d61ccd0144d12fa8c05f6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 13:48:23 +0300 Subject: [PATCH 010/179] add NumberTrait --- src/numbers.cairo | 175 +++++++++++++++++- .../implementations/fp16x16/core.cairo | 26 +-- .../implementations/fp8x23/core.cairo | 27 +-- src/numbers/one.cairo | 4 - src/numbers/signed_integer/i128.cairo | 28 --- src/numbers/signed_integer/i16.cairo | 27 --- src/numbers/signed_integer/i32.cairo | 27 --- src/numbers/signed_integer/i64.cairo | 28 --- src/numbers/signed_integer/i8.cairo | 27 --- src/numbers/zero.cairo | 4 - 10 files changed, 175 insertions(+), 198 deletions(-) delete mode 100644 src/numbers/one.cairo delete mode 100644 src/numbers/zero.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index a069d8ee1..175b1ccb9 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -1,4 +1,175 @@ mod fixed_point; mod signed_integer; -mod zero; -mod one; \ No newline at end of file + +// Common methods from Fixed Point and Signed Integers. +trait NumberTrait { + fn zero() -> T; + fn is_zero(self: T) -> bool; + + fn one() -> T; + fn is_one(self: T) -> bool; + + fn abs(self: T) -> T; +} + +use orion::numbers::fixed_point::core::FixedType; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::numbers::fixed_point::implementations::fp8x23::math::core as core_fp8x23; + +impl FP8x23Number of NumberTrait { + fn zero() -> FixedType { + FP8x23Impl::ZERO() + } + fn is_zero(self: FixedType) -> bool { + core_fp8x23::eq(@self, @FP8x23Impl::ZERO()) + } + + fn one() -> FixedType { + FP8x23Impl::ONE() + } + fn is_one(self: FixedType) -> bool { + core_fp8x23::eq(@self, @FP8x23Impl::ONE()) + } + + fn abs(self: FixedType) -> FixedType { + core_fp8x23::abs(self) + } +} + +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::fixed_point::implementations::fp16x16::math::core as core_fp16x16; + +impl FP16x16Number of NumberTrait { + fn zero() -> FixedType { + FP16x16Impl::ZERO() + } + fn is_zero(self: FixedType) -> bool { + core_fp16x16::eq(@self, @FP16x16Impl::ZERO()) + } + + fn one() -> FixedType { + FP16x16Impl::ONE() + } + fn is_one(self: FixedType) -> bool { + core_fp16x16::eq(@self, @FP16x16Impl::ONE()) + } + + fn abs(self: FixedType) -> FixedType { + core_fp16x16::abs(self) + } +} + +use orion::numbers::signed_integer::i8 as i8_core; +use orion::numbers::signed_integer::i8::i8; + +impl I8Number of NumberTrait { + fn zero() -> i8 { + i8 {mag: 0, sign: false} + } + fn is_zero(self: i8) -> bool { + i8_core::i8_eq(self, i8 {mag: 0, sign: false}) + } + + fn one() -> i8 { + i8 {mag: 1, sign: false} + } + fn is_one(self: i8) -> bool { + i8_core::i8_eq(self, i8 {mag: 1, sign: false}) + } + + fn abs(self: i8) -> i8 { + i8_core::i8_abs(self) + } +} + +use orion::numbers::signed_integer::i16 as i16_core; +use orion::numbers::signed_integer::i16::i16; + +impl i16Number of NumberTrait { + fn zero() -> i16 { + i16 {mag: 0, sign: false} + } + fn is_zero(self: i16) -> bool { + i16_core::i16_eq(self, i16 {mag: 0, sign: false}) + } + + fn one() -> i16 { + i16 {mag: 1, sign: false} + } + fn is_one(self: i16) -> bool { + i16_core::i16_eq(self, i16 {mag: 1, sign: false}) + } + + fn abs(self: i16) -> i16 { + i16_core::i16_abs(self) + } +} + +use orion::numbers::signed_integer::i32 as i32_core; +use orion::numbers::signed_integer::i32::i32; + +impl i32Number of NumberTrait { + fn zero() -> i32 { + i32 {mag: 0, sign: false} + } + fn is_zero(self: i32) -> bool { + i32_core::i32_eq(self, i32 {mag: 0, sign: false}) + } + + fn one() -> i32 { + i32 {mag: 1, sign: false} + } + fn is_one(self: i32) -> bool { + i32_core::i32_eq(self, i32 {mag: 1, sign: false}) + } + + fn abs(self: i32) -> i32 { + i32_core::i32_abs(self) + } +} + +use orion::numbers::signed_integer::i64 as i64_core; +use orion::numbers::signed_integer::i64::i64; + +impl i64Number of NumberTrait { + fn zero() -> i64 { + i64 {mag: 0, sign: false} + } + fn is_zero(self: i64) -> bool { + i64_core::i64_eq(self, i64 {mag: 0, sign: false}) + } + + fn one() -> i64 { + i64 {mag: 1, sign: false} + } + fn is_one(self: i64) -> bool { + i64_core::i64_eq(self, i64 {mag: 1, sign: false}) + } + + fn abs(self: i64) -> i64 { + i64_core::i64_abs(self) + } +} + +use orion::numbers::signed_integer::i128 as i128_core; +use orion::numbers::signed_integer::i128::i128; + +impl i128Number of NumberTrait { + fn zero() -> i128 { + i128 {mag: 0, sign: false} + } + fn is_zero(self: i128) -> bool { + i128_core::i128_eq(self, i128 {mag: 0, sign: false}) + } + + fn one() -> i128 { + i128 {mag: 1, sign: false} + } + fn is_one(self: i128) -> bool { + i128_core::i128_eq(self, i128 {mag: 1, sign: false}) + } + + fn abs(self: i128) -> i128 { + i128_core::i128_abs(self) + } +} \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp16x16/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/core.cairo index d71bcdd2c..776764242 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/core.cairo @@ -8,8 +8,7 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; use orion::numbers::fixed_point::implementations::fp16x16::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; + // CONSTANTS @@ -360,29 +359,6 @@ impl FP16x16Rem of Rem { } } -impl FP16x16Zero of Zero { - #[inline(always)] - fn zero() -> FixedType { - return FixedTrait::ZERO(); - } - - #[inline(always)] - fn is_zero(self: FixedType) -> bool { - return self == FixedTrait::ZERO(); - } -} - -impl FP16x16One of One { - #[inline(always)] - fn one() -> FixedType { - return FixedTrait::ONE(); - } - - #[inline(always)] - fn is_one(self: FixedType) -> bool { - return self == FixedTrait::ONE(); - } -} /// INTERNAL diff --git a/src/numbers/fixed_point/implementations/fp8x23/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/core.cairo index 4c5d47796..8b757d96e 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/core.cairo @@ -8,8 +8,7 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; use orion::numbers::fixed_point::implementations::fp8x23::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; + // CONSTANTS @@ -359,30 +358,6 @@ impl FP8x23Rem of Rem { } } -impl FP8x23Zero of Zero { - #[inline(always)] - fn zero() -> FixedType { - return FixedTrait::ZERO(); - } - - #[inline(always)] - fn is_zero(self: FixedType) -> bool { - return self == FixedTrait::ZERO(); - } -} - -impl FP8x23One of One { - #[inline(always)] - fn one() -> FixedType { - return FixedTrait::ONE(); - } - - #[inline(always)] - fn is_one(self: FixedType) -> bool { - return self == FixedTrait::ONE(); - } -} - /// INTERNAL fn _i32_into_fp(x: FixedType) -> i32 { diff --git a/src/numbers/one.cairo b/src/numbers/one.cairo deleted file mode 100644 index 1614766c1..000000000 --- a/src/numbers/one.cairo +++ /dev/null @@ -1,4 +0,0 @@ -trait One { - fn one() -> T; - fn is_one(self: T) -> bool; -} \ No newline at end of file diff --git a/src/numbers/signed_integer/i128.cairo b/src/numbers/signed_integer/i128.cairo index 093a8cafa..865ebbc45 100644 --- a/src/numbers/signed_integer/i128.cairo +++ b/src/numbers/signed_integer/i128.cairo @@ -1,9 +1,6 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; - // ====================== INT 128 ====================== @@ -161,31 +158,6 @@ impl i128Neg of Neg { } } -impl I128Zero of Zero { - #[inline(always)] - fn zero() -> i128 { - return i128 { mag: 0, sign: false }; - } - - #[inline(always)] - fn is_zero(self: i128) -> bool { - return self == i128 { mag: 0, sign: false }; - } -} - -impl I128One of One { - #[inline(always)] - fn one() -> i128 { - return i128 { mag: 1, sign: false }; - } - - #[inline(always)] - fn is_one(self: i128) -> bool { - return self == i128 { mag: 1, sign: false }; - } -} - - // Checks if the given i128 integer is zero and has the correct sign. // # Arguments // * `x` - The i128 integer to check. diff --git a/src/numbers/signed_integer/i16.cairo b/src/numbers/signed_integer/i16.cairo index 34232b467..7dbbe0d5b 100644 --- a/src/numbers/signed_integer/i16.cairo +++ b/src/numbers/signed_integer/i16.cairo @@ -1,9 +1,6 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; - // ====================== INT 16 ====================== @@ -161,30 +158,6 @@ impl i16Neg of Neg { } } -impl I16Zero of Zero { - #[inline(always)] - fn zero() -> i16 { - return i16 { mag: 0, sign: false }; - } - - #[inline(always)] - fn is_zero(self: i16) -> bool { - return self == i16 { mag: 0, sign: false }; - } -} - -impl I16One of One { - #[inline(always)] - fn one() -> i16 { - return i16 { mag: 1, sign: false }; - } - - #[inline(always)] - fn is_one(self: i16) -> bool { - return self == i16 { mag: 1, sign: false }; - } -} - // Checks if the given i16 integer is zero and has the correct sign. // # Arguments // * `x` - The i16 integer to check. diff --git a/src/numbers/signed_integer/i32.cairo b/src/numbers/signed_integer/i32.cairo index 61d56aba3..2434a2963 100644 --- a/src/numbers/signed_integer/i32.cairo +++ b/src/numbers/signed_integer/i32.cairo @@ -4,9 +4,6 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; use orion::numbers::signed_integer::i8::i8; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; - // ====================== INT 32 ====================== @@ -170,30 +167,6 @@ impl I32TryIntoI8 of TryInto { } } -impl I32Zero of Zero { - #[inline(always)] - fn zero() -> i32 { - return i32 { mag: 0, sign: false }; - } - - #[inline(always)] - fn is_zero(self: i32) -> bool { - return self == i32 { mag: 0, sign: false }; - } -} - -impl I32One of One { - #[inline(always)] - fn one() -> i32 { - return i32 { mag: 1, sign: false }; - } - - #[inline(always)] - fn is_one(self: i32) -> bool { - return self == i32 { mag: 1, sign: false }; - } -} - // Checks if the given i32 integer is zero and has the correct sign. // # Arguments // * `x` - The i32 integer to check. diff --git a/src/numbers/signed_integer/i64.cairo b/src/numbers/signed_integer/i64.cairo index 25cb8748a..27624d6a9 100644 --- a/src/numbers/signed_integer/i64.cairo +++ b/src/numbers/signed_integer/i64.cairo @@ -1,9 +1,6 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; - // ====================== INT 64 ====================== @@ -161,31 +158,6 @@ impl i64Neg of Neg { } } -impl I64Zero of Zero { - #[inline(always)] - fn zero() -> i64 { - return i64 { mag: 0, sign: false }; - } - - #[inline(always)] - fn is_zero(self: i64) -> bool { - return self == i64 { mag: 0, sign: false }; - } -} - -impl I64One of One { - #[inline(always)] - fn one() -> i64 { - return i64 { mag: 1, sign: false }; - } - - #[inline(always)] - fn is_one(self: i64) -> bool { - return self == i64 { mag: 1, sign: false }; - } -} - - // Checks if the given i64 integer is zero and has the correct sign. // # Arguments // * `x` - The i64 integer to check. diff --git a/src/numbers/signed_integer/i8.cairo b/src/numbers/signed_integer/i8.cairo index cfc77ef12..b858991f0 100644 --- a/src/numbers/signed_integer/i8.cairo +++ b/src/numbers/signed_integer/i8.cairo @@ -5,9 +5,6 @@ use orion::numbers::signed_integer::i32::i32; use orion::numbers::fixed_point::implementations::fp8x23::core::ONE as ONE_fp8x23; use orion::numbers::fixed_point::implementations::fp16x16::core::ONE as ONE_fp16x16; use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::zero::Zero; -use orion::numbers::one::One; - // ====================== INT 8 ====================== @@ -186,30 +183,6 @@ impl I8IntoFP16x16 of Into { } } -impl I8Zero of Zero { - #[inline(always)] - fn zero() -> i8 { - return i8 { mag: 0, sign: false }; - } - - #[inline(always)] - fn is_zero(self: i8) -> bool { - return self == i8 { mag: 0, sign: false }; - } -} - -impl I8One of One { - #[inline(always)] - fn one() -> i8 { - return i8 { mag: 1, sign: false }; - } - - #[inline(always)] - fn is_one(self: i8) -> bool { - return self == i8 { mag: 1, sign: false }; - } -} - // Checks if the given i8 integer is zero and has the correct sign. // # Arguments // * `x` - The i8 integer to check. diff --git a/src/numbers/zero.cairo b/src/numbers/zero.cairo deleted file mode 100644 index 6bccc5d47..000000000 --- a/src/numbers/zero.cairo +++ /dev/null @@ -1,4 +0,0 @@ -trait Zero { - fn zero() -> T; - fn is_zero(self: T) -> bool; -} \ No newline at end of file From 11ee603417a075a9b208c5f1a553b58d66955706 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 14:25:28 +0300 Subject: [PATCH 011/179] create distinct fixed point types --- src/lib.cairo | 8 +- src/numbers.cairo | 91 +++++---- src/numbers/fixed_point/core.cairo | 77 ++++---- .../implementations/fp16x16/core.cairo | 182 +++++++++--------- .../implementations/fp16x16/helpers.cairo | 6 +- .../implementations/fp16x16/math/comp.cairo | 10 +- .../implementations/fp16x16/math/core.cairo | 100 +++++----- .../implementations/fp16x16/math/hyp.cairo | 14 +- .../implementations/fp16x16/math/trig.cairo | 32 +-- .../implementations/fp8x23/core.cairo | 182 +++++++++--------- .../implementations/fp8x23/helpers.cairo | 10 +- .../implementations/fp8x23/math/comp.cairo | 10 +- .../implementations/fp8x23/math/core.cairo | 104 +++++----- .../implementations/fp8x23/math/hyp.cairo | 14 +- .../implementations/fp8x23/math/trig.cairo | 38 ++-- src/numbers/signed_integer/i8.cairo | 22 +-- .../implementations/impl_tensor_fp.cairo | 5 +- .../implementations/impl_tensor_i32.cairo | 5 +- .../implementations/impl_tensor_i8.cairo | 5 +- .../implementations/impl_tensor_u32.cairo | 5 +- src/operators/tensor/math/abs.cairo | 35 +++- src/operators/tensor/math/abs/abs_fp.cairo | 3 - .../tensor/math/abs/abs_fp/core.cairo | 20 -- .../tensor/math/abs/abs_fp/fp16x16.cairo | 27 --- .../tensor/math/abs/abs_fp/fp8x23.cairo | 26 --- src/operators/tensor/math/abs/abs_i32.cairo | 24 --- src/operators/tensor/math/abs/abs_i8.cairo | 24 --- src/operators/tensor/math/abs/abs_u32.cairo | 6 - 28 files changed, 505 insertions(+), 580 deletions(-) delete mode 100644 src/operators/tensor/math/abs/abs_fp.cairo delete mode 100644 src/operators/tensor/math/abs/abs_fp/core.cairo delete mode 100644 src/operators/tensor/math/abs/abs_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/abs/abs_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/abs/abs_i32.cairo delete mode 100644 src/operators/tensor/math/abs/abs_i8.cairo delete mode 100644 src/operators/tensor/math/abs/abs_u32.cairo diff --git a/src/lib.cairo b/src/lib.cairo index 4b62df94d..07d46ec00 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,6 +1,6 @@ -mod performance; -mod operators; +// mod performance; +// mod operators; mod numbers; -mod tests; -mod utils; +// mod tests; +// mod utils; diff --git a/src/numbers.cairo b/src/numbers.cairo index 175b1ccb9..16b24af48 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -12,49 +12,48 @@ trait NumberTrait { fn abs(self: T) -> T; } -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23}; use orion::numbers::fixed_point::implementations::fp8x23::math::core as core_fp8x23; -impl FP8x23Number of NumberTrait { - fn zero() -> FixedType { +impl FP8x23Number of NumberTrait { + fn zero() -> FP8x23 { FP8x23Impl::ZERO() } - fn is_zero(self: FixedType) -> bool { + fn is_zero(self: FP8x23) -> bool { core_fp8x23::eq(@self, @FP8x23Impl::ZERO()) } - fn one() -> FixedType { + fn one() -> FP8x23 { FP8x23Impl::ONE() } - fn is_one(self: FixedType) -> bool { + fn is_one(self: FP8x23) -> bool { core_fp8x23::eq(@self, @FP8x23Impl::ONE()) } - fn abs(self: FixedType) -> FixedType { + fn abs(self: FP8x23) -> FP8x23 { core_fp8x23::abs(self) } } -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16}; use orion::numbers::fixed_point::implementations::fp16x16::math::core as core_fp16x16; -impl FP16x16Number of NumberTrait { - fn zero() -> FixedType { +impl FP16x16Number of NumberTrait { + fn zero() -> FP16x16 { FP16x16Impl::ZERO() } - fn is_zero(self: FixedType) -> bool { + fn is_zero(self: FP16x16) -> bool { core_fp16x16::eq(@self, @FP16x16Impl::ZERO()) } - fn one() -> FixedType { + fn one() -> FP16x16 { FP16x16Impl::ONE() } - fn is_one(self: FixedType) -> bool { + fn is_one(self: FP16x16) -> bool { core_fp16x16::eq(@self, @FP16x16Impl::ONE()) } - fn abs(self: FixedType) -> FixedType { + fn abs(self: FP16x16) -> FP16x16 { core_fp16x16::abs(self) } } @@ -64,17 +63,17 @@ use orion::numbers::signed_integer::i8::i8; impl I8Number of NumberTrait { fn zero() -> i8 { - i8 {mag: 0, sign: false} + i8 { mag: 0, sign: false } } fn is_zero(self: i8) -> bool { - i8_core::i8_eq(self, i8 {mag: 0, sign: false}) + i8_core::i8_eq(self, i8 { mag: 0, sign: false }) } fn one() -> i8 { - i8 {mag: 1, sign: false} + i8 { mag: 1, sign: false } } fn is_one(self: i8) -> bool { - i8_core::i8_eq(self, i8 {mag: 1, sign: false}) + i8_core::i8_eq(self, i8 { mag: 1, sign: false }) } fn abs(self: i8) -> i8 { @@ -87,17 +86,17 @@ use orion::numbers::signed_integer::i16::i16; impl i16Number of NumberTrait { fn zero() -> i16 { - i16 {mag: 0, sign: false} + i16 { mag: 0, sign: false } } fn is_zero(self: i16) -> bool { - i16_core::i16_eq(self, i16 {mag: 0, sign: false}) + i16_core::i16_eq(self, i16 { mag: 0, sign: false }) } fn one() -> i16 { - i16 {mag: 1, sign: false} + i16 { mag: 1, sign: false } } fn is_one(self: i16) -> bool { - i16_core::i16_eq(self, i16 {mag: 1, sign: false}) + i16_core::i16_eq(self, i16 { mag: 1, sign: false }) } fn abs(self: i16) -> i16 { @@ -110,17 +109,17 @@ use orion::numbers::signed_integer::i32::i32; impl i32Number of NumberTrait { fn zero() -> i32 { - i32 {mag: 0, sign: false} + i32 { mag: 0, sign: false } } fn is_zero(self: i32) -> bool { - i32_core::i32_eq(self, i32 {mag: 0, sign: false}) + i32_core::i32_eq(self, i32 { mag: 0, sign: false }) } fn one() -> i32 { - i32 {mag: 1, sign: false} + i32 { mag: 1, sign: false } } fn is_one(self: i32) -> bool { - i32_core::i32_eq(self, i32 {mag: 1, sign: false}) + i32_core::i32_eq(self, i32 { mag: 1, sign: false }) } fn abs(self: i32) -> i32 { @@ -133,17 +132,17 @@ use orion::numbers::signed_integer::i64::i64; impl i64Number of NumberTrait { fn zero() -> i64 { - i64 {mag: 0, sign: false} + i64 { mag: 0, sign: false } } fn is_zero(self: i64) -> bool { - i64_core::i64_eq(self, i64 {mag: 0, sign: false}) + i64_core::i64_eq(self, i64 { mag: 0, sign: false }) } fn one() -> i64 { - i64 {mag: 1, sign: false} + i64 { mag: 1, sign: false } } fn is_one(self: i64) -> bool { - i64_core::i64_eq(self, i64 {mag: 1, sign: false}) + i64_core::i64_eq(self, i64 { mag: 1, sign: false }) } fn abs(self: i64) -> i64 { @@ -156,20 +155,40 @@ use orion::numbers::signed_integer::i128::i128; impl i128Number of NumberTrait { fn zero() -> i128 { - i128 {mag: 0, sign: false} + i128 { mag: 0, sign: false } } fn is_zero(self: i128) -> bool { - i128_core::i128_eq(self, i128 {mag: 0, sign: false}) + i128_core::i128_eq(self, i128 { mag: 0, sign: false }) } fn one() -> i128 { - i128 {mag: 1, sign: false} + i128 { mag: 1, sign: false } } fn is_one(self: i128) -> bool { - i128_core::i128_eq(self, i128 {mag: 1, sign: false}) + i128_core::i128_eq(self, i128 { mag: 1, sign: false }) } fn abs(self: i128) -> i128 { i128_core::i128_abs(self) } -} \ No newline at end of file +} + +impl u32Number of NumberTrait { + fn zero() -> u32 { + 0 + } + fn is_zero(self: u32) -> bool { + self == 0 + } + + fn one() -> u32 { + 1 + } + fn is_one(self: u32) -> bool { + self == 1 + } + + fn abs(self: u32) -> u32 { + self + } +} diff --git a/src/numbers/fixed_point/core.cairo b/src/numbers/fixed_point/core.cairo index 24cac1fe9..038f962f5 100644 --- a/src/numbers/fixed_point/core.cairo +++ b/src/numbers/fixed_point/core.cairo @@ -1,10 +1,3 @@ -/// A struct representing a fixed point number. -#[derive(Serde, Copy, Drop)] -struct FixedType { - mag: u32, - sign: bool -} - /// A struct listing fixed point implementations. #[derive(Serde, Copy, Drop)] enum FixedImpl { @@ -47,7 +40,7 @@ enum FixedImpl { /// sinh - Returns the value of the hyperbolic sine of the fixed point number. /// tanh - Returns the value of the hyperbolic tangent of the fixed point number. /// -trait FixedTrait { +trait FixedTrait { /// # FixedTrait::new /// /// ```rust @@ -78,7 +71,7 @@ trait FixedTrait { /// >>> {mag: 65536, sign: false} // = 1 in FP16x16 /// ``` /// - fn new(mag: u32, sign: bool) -> FixedType; + fn new(mag: u32, sign: bool) -> T; /// # FixedTrait::new\_unscaled /// /// ```rust @@ -109,7 +102,7 @@ trait FixedTrait { /// >>> {mag: 65536, sign: false} /// ``` /// - fn new_unscaled(mag: u32, sign: bool) -> FixedType; + fn new_unscaled(mag: u32, sign: bool) -> T; /// # FixedTrait::from\_felt /// /// @@ -137,7 +130,7 @@ trait FixedTrait { /// >>> {mag: 190054, sign: false} // = 2.9 /// ``` /// - fn from_felt(val: felt252) -> FixedType; + fn from_felt(val: felt252) -> T; /// # fp.abs /// /// ```rust @@ -170,7 +163,7 @@ trait FixedTrait { /// >>> {mag: 65536, sign: false} // = 1 /// ``` /// - fn abs(self: FixedType) -> FixedType; + fn abs(self: T) -> T; /// # fp.ceil /// /// ```rust @@ -203,7 +196,7 @@ trait FixedTrait { /// >>> {mag: 196608, sign: false} // = 3 /// ``` /// - fn ceil(self: FixedType) -> FixedType; + fn ceil(self: T) -> T; /// # fp.exp /// /// ```rust @@ -236,7 +229,7 @@ trait FixedTrait { /// >>> {mag: 484249, sign: false} // = 7.389056317241236 /// ``` /// - fn exp(self: FixedType) -> FixedType; + fn exp(self: T) -> T; /// # fp.exp2 /// /// ```rust @@ -269,7 +262,7 @@ trait FixedTrait { /// >>> {mag: 262143, sign: false} // = 3.99999957248 /// ``` /// - fn exp2(self: FixedType) -> FixedType; + fn exp2(self: T) -> T; /// # fp.floor /// /// ```rust @@ -302,7 +295,7 @@ trait FixedTrait { /// >>> {mag: 131072, sign: false} // = 2 /// ``` /// - fn floor(self: FixedType) -> FixedType; + fn floor(self: T) -> T; /// # fp.ln /// /// @@ -336,7 +329,7 @@ trait FixedTrait { /// >>> {mag: 0, sign: false} /// ``` /// - fn ln(self: FixedType) -> FixedType; + fn ln(self: T) -> T; /// # fp.log2 /// /// ```rust @@ -373,7 +366,7 @@ trait FixedTrait { /// >>> {mag: 103872, sign: false} // = 1.58496250072 /// ``` /// - fn log2(self: FixedType) -> FixedType; + fn log2(self: T) -> T; /// # fp.log10 /// /// ```rust @@ -406,7 +399,7 @@ trait FixedTrait { /// >>> {mag: 31269, sign: false} // = 0.47712125472 /// ``` /// - fn log10(self: FixedType) -> FixedType; + fn log10(self: T) -> T; /// # fp.pow /// /// ```rust @@ -441,7 +434,7 @@ trait FixedTrait { /// >>> {mag: 5308416, sign: false} // = 81 /// ``` /// - fn pow(self: FixedType, b: FixedType) -> FixedType; + fn pow(self: T, b: T) -> T; /// # fp.round /// /// ```rust @@ -475,7 +468,7 @@ trait FixedTrait { /// >>> {mag: 196608, sign: false} // = 3 /// ``` /// - fn round(self: FixedType) -> FixedType; + fn round(self: T) -> T; /// # fp.sqrt /// /// ```rust @@ -512,7 +505,7 @@ trait FixedTrait { /// >>> {mag: 196608, sign: false} // = 3 /// ``` /// - fn sqrt(self: FixedType) -> FixedType; + fn sqrt(self: T) -> T; /// # fp.acos /// /// ```rust @@ -545,7 +538,7 @@ trait FixedTrait { /// >>> {mag: 205887, sign: false} // = 3.14159265 /// ``` /// - fn acos(self: FixedType) -> FixedType; + fn acos(self: T) -> T; /// # fp.acos_fast /// /// ```rust @@ -578,7 +571,7 @@ trait FixedTrait { /// >>> {mag: 205887, sign: false} // = 3.14159265 /// ``` /// - fn acos_fast(self: FixedType) -> FixedType; + fn acos_fast(self: T) -> T; /// # fp.asin /// /// ```rust @@ -611,7 +604,7 @@ trait FixedTrait { /// >>> {mag: 102943, sign: true} // = 1.57079633 /// ``` /// - fn asin(self: FixedType) -> FixedType; + fn asin(self: T) -> T; /// # fp.asin_fast /// /// ```rust @@ -644,7 +637,7 @@ trait FixedTrait { /// >>> {mag: 102943, sign: true} // = 1.57079633 /// ``` /// - fn asin_fast(self: FixedType) -> FixedType; + fn asin_fast(self: T) -> T; /// # fp.atan /// /// ```rust @@ -677,7 +670,7 @@ trait FixedTrait { /// >>> {mag: 72558, sign: false} // = 1.10714872 /// ``` /// - fn atan(self: FixedType) -> FixedType; + fn atan(self: T) -> T; /// # fp.atan_fast /// /// ```rust @@ -710,7 +703,7 @@ trait FixedTrait { /// >>> {mag: 72558, sign: false} // = 1.10714872 /// ``` /// - fn atan_fast(self: FixedType) -> FixedType; + fn atan_fast(self: T) -> T; /// # fp.cos /// /// ```rust @@ -743,7 +736,7 @@ trait FixedTrait { /// >>> {mag: 27273, sign: true} // = -0.41614684 /// ``` /// - fn cos(self: FixedType) -> FixedType; + fn cos(self: T) -> T; /// # fp.cos_fast /// /// ```rust @@ -776,7 +769,7 @@ trait FixedTrait { /// >>> {mag: 27273, sign: true} // = -0.41614684 /// ``` /// - fn cos_fast(self: FixedType) -> FixedType; + fn cos_fast(self: T) -> T; /// # fp.sin /// /// ```rust @@ -809,7 +802,7 @@ trait FixedTrait { /// >>> {mag: 59592, sign: false} // = 0.90929743 /// ``` /// - fn sin(self: FixedType) -> FixedType; + fn sin(self: T) -> T; /// # fp.sin_fast /// /// ```rust @@ -842,7 +835,7 @@ trait FixedTrait { /// >>> {mag: 59592, sign: false} // = 0.90929743 /// ``` /// - fn sin_fast(self: FixedType) -> FixedType; + fn sin_fast(self: T) -> T; /// # fp.tan /// /// ```rust @@ -875,7 +868,7 @@ trait FixedTrait { /// >>> {mag: 143199, sign: true} // = -2.18503986 /// ``` /// - fn tan(self: FixedType) -> FixedType; + fn tan(self: T) -> T; /// # fp.tan_fast /// /// ```rust @@ -908,7 +901,7 @@ trait FixedTrait { /// >>> {mag: 143199, sign: true} // = -2.18503986 /// ``` /// - fn tan_fast(self: FixedType) -> FixedType; + fn tan_fast(self: T) -> T; /// # fp.acosh /// /// ```rust @@ -941,7 +934,7 @@ trait FixedTrait { /// >>> {mag: 86308, sign: false} // = 1.3169579 /// ``` /// - fn acosh(self: FixedType) -> FixedType; + fn acosh(self: T) -> T; /// # fp.asinh /// /// ```rust @@ -974,7 +967,7 @@ trait FixedTrait { /// >>> {mag: 94610, sign: false} // = 1.44363548 /// ``` /// - fn asinh(self: FixedType) -> FixedType; + fn asinh(self: T) -> T; /// # fp.atanh /// /// ```rust @@ -1007,7 +1000,7 @@ trait FixedTrait { /// >>> {mag: 35999, sign: false} // = 0.54930614 /// ``` /// - fn atanh(self: FixedType) -> FixedType; + fn atanh(self: T) -> T; /// # fp.cosh /// /// ```rust @@ -1040,7 +1033,7 @@ trait FixedTrait { /// >>> {mag: 246559, sign: false} // = 3.76219569 /// ``` /// - fn cosh(self: FixedType) -> FixedType; + fn cosh(self: T) -> T; /// # fp.sinh /// /// ```rust @@ -1073,7 +1066,7 @@ trait FixedTrait { /// >>> {mag: 237690, sign: false} // = 3.62686041 /// ``` /// - fn sinh(self: FixedType) -> FixedType; + fn sinh(self: T) -> T; /// # fp.tanh /// /// ```rust @@ -1106,8 +1099,8 @@ trait FixedTrait { /// >>> {mag: 63179, sign: false} // = 0.96402758 /// ``` /// - fn tanh(self: FixedType) -> FixedType; + fn tanh(self: T) -> T; - fn ZERO() -> FixedType; - fn ONE() -> FixedType; + fn ZERO() -> T; + fn ONE() -> T; } diff --git a/src/numbers/fixed_point/implementations/fp16x16/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/core.cairo index 776764242..c906c7e75 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/core.cairo @@ -5,10 +5,16 @@ use result::{ResultTrait, ResultTraitImpl}; use traits::{TryInto, Into}; use orion::numbers::signed_integer::{i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; +/// A struct representing a fixed point number. +#[derive(Serde, Copy, Drop)] +struct FP16x16 { + mag: u32, + sign: bool +} // CONSTANTS @@ -18,169 +24,169 @@ const HALF: u32 = 32768; // 2 ** 15 const MAX: u32 = 2147483648; // 2 ** 31 -impl FP16x16Impl of FixedTrait { - fn ZERO() -> FixedType { - return FixedType { mag: 0, sign: false }; +impl FP16x16Impl of FixedTrait { + fn ZERO() -> FP16x16 { + return FP16x16 { mag: 0, sign: false }; } - fn ONE() -> FixedType { - return FixedType { mag: ONE, sign: false }; + fn ONE() -> FP16x16 { + return FP16x16 { mag: ONE, sign: false }; } - fn new(mag: u32, sign: bool) -> FixedType { - return FixedType { mag: mag, sign: sign }; + fn new(mag: u32, sign: bool) -> FP16x16 { + return FP16x16 { mag: mag, sign: sign }; } - fn new_unscaled(mag: u32, sign: bool) -> FixedType { - return FixedType { mag: mag * ONE, sign: sign }; + fn new_unscaled(mag: u32, sign: bool) -> FP16x16 { + return FP16x16 { mag: mag * ONE, sign: sign }; } - fn from_felt(val: felt252) -> FixedType { + fn from_felt(val: felt252) -> FP16x16 { let mag = integer::u32_try_from_felt252(utils::felt_abs(val)).unwrap(); return FixedTrait::new(mag, utils::felt_sign(val)); } - fn abs(self: FixedType) -> FixedType { + fn abs(self: FP16x16) -> FP16x16 { return core::abs(self); } - fn acos(self: FixedType) -> FixedType { + fn acos(self: FP16x16) -> FP16x16 { return trig::acos_fast(self); } - fn acos_fast(self: FixedType) -> FixedType { + fn acos_fast(self: FP16x16) -> FP16x16 { return trig::acos_fast(self); } - fn acosh(self: FixedType) -> FixedType { + fn acosh(self: FP16x16) -> FP16x16 { return hyp::acosh(self); } - fn asin(self: FixedType) -> FixedType { + fn asin(self: FP16x16) -> FP16x16 { return trig::asin_fast(self); } - fn asin_fast(self: FixedType) -> FixedType { + fn asin_fast(self: FP16x16) -> FP16x16 { return trig::asin_fast(self); } - fn asinh(self: FixedType) -> FixedType { + fn asinh(self: FP16x16) -> FP16x16 { return hyp::asinh(self); } - fn atan(self: FixedType) -> FixedType { + fn atan(self: FP16x16) -> FP16x16 { return trig::atan_fast(self); } - fn atan_fast(self: FixedType) -> FixedType { + fn atan_fast(self: FP16x16) -> FP16x16 { return trig::atan_fast(self); } - fn atanh(self: FixedType) -> FixedType { + fn atanh(self: FP16x16) -> FP16x16 { return hyp::atanh(self); } - fn ceil(self: FixedType) -> FixedType { + fn ceil(self: FP16x16) -> FP16x16 { return core::ceil(self); } - fn cos(self: FixedType) -> FixedType { + fn cos(self: FP16x16) -> FP16x16 { return trig::cos_fast(self); } - fn cos_fast(self: FixedType) -> FixedType { + fn cos_fast(self: FP16x16) -> FP16x16 { return trig::cos_fast(self); } - fn cosh(self: FixedType) -> FixedType { + fn cosh(self: FP16x16) -> FP16x16 { return hyp::cosh(self); } - fn floor(self: FixedType) -> FixedType { + fn floor(self: FP16x16) -> FP16x16 { return core::floor(self); } // Calculates the natural exponent of x: e^x - fn exp(self: FixedType) -> FixedType { + fn exp(self: FP16x16) -> FP16x16 { return core::exp(self); } // Calculates the binary exponent of x: 2^x - fn exp2(self: FixedType) -> FixedType { + fn exp2(self: FP16x16) -> FP16x16 { return core::exp2(self); } // Calculates the natural logarithm of x: ln(x) // self must be greater than zero - fn ln(self: FixedType) -> FixedType { + fn ln(self: FP16x16) -> FP16x16 { return core::ln(self); } // Calculates the binary logarithm of x: log2(x) // self must be greather than zero - fn log2(self: FixedType) -> FixedType { + fn log2(self: FP16x16) -> FP16x16 { return core::log2(self); } // Calculates the base 10 log of x: log10(x) // self must be greater than zero - fn log10(self: FixedType) -> FixedType { + fn log10(self: FP16x16) -> FP16x16 { return core::log10(self); } // Calclates the value of x^y and checks for overflow before returning // self is a fixed point value // b is a fixed point value - fn pow(self: FixedType, b: FixedType) -> FixedType { + fn pow(self: FP16x16, b: FP16x16) -> FP16x16 { return core::pow(self, b); } - fn round(self: FixedType) -> FixedType { + fn round(self: FP16x16) -> FP16x16 { return core::round(self); } - fn sin(self: FixedType) -> FixedType { + fn sin(self: FP16x16) -> FP16x16 { return trig::sin_fast(self); } - fn sin_fast(self: FixedType) -> FixedType { + fn sin_fast(self: FP16x16) -> FP16x16 { return trig::sin_fast(self); } - fn sinh(self: FixedType) -> FixedType { + fn sinh(self: FP16x16) -> FP16x16 { return hyp::sinh(self); } // Calculates the square root of a fixed point value // x must be positive - fn sqrt(self: FixedType) -> FixedType { + fn sqrt(self: FP16x16) -> FP16x16 { return core::sqrt(self); } - fn tan(self: FixedType) -> FixedType { + fn tan(self: FP16x16) -> FP16x16 { return trig::tan_fast(self); } - fn tan_fast(self: FixedType) -> FixedType { + fn tan_fast(self: FP16x16) -> FP16x16 { return trig::tan_fast(self); } - fn tanh(self: FixedType) -> FixedType { + fn tanh(self: FP16x16) -> FP16x16 { return hyp::tanh(self); } } -impl FP16x16Print of PrintTrait { - fn print(self: FixedType) { +impl FP16x16Print of PrintTrait { + fn print(self: FP16x16) { self.sign.print(); self.mag.print(); } } // Into a raw felt without unscaling -impl FP16x16IntoFelt252 of Into { - fn into(self: FixedType) -> felt252 { +impl FP16x16IntoFelt252 of Into { + fn into(self: FP16x16) -> felt252 { let mag_felt = self.mag.into(); if self.sign { @@ -191,21 +197,21 @@ impl FP16x16IntoFelt252 of Into { } } -impl FP16x16IntoI32 of Into { - fn into(self: FixedType) -> i32 { +impl FP16x16IntoI32 of Into { + fn into(self: FP16x16) -> i32 { _i32_into_fp(self) } } -impl FP16x16TryIntoI8 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoI8 of TryInto { + fn try_into(self: FP16x16) -> Option { _i8_try_from_fp(self) } } -impl FP16x16TryIntoU128 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoU128 of TryInto { + fn try_into(self: FP16x16) -> Option { if self.sign { return Option::None(()); } else { @@ -215,8 +221,8 @@ impl FP16x16TryIntoU128 of TryInto { } } -impl FP16x16TryIntoU64 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoU64 of TryInto { + fn try_into(self: FP16x16) -> Option { if self.sign { return Option::None(()); } else { @@ -226,8 +232,8 @@ impl FP16x16TryIntoU64 of TryInto { } } -impl FP16x16TryIntoU32 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoU32 of TryInto { + fn try_into(self: FP16x16) -> Option { if self.sign { return Option::None(()); } else { @@ -237,8 +243,8 @@ impl FP16x16TryIntoU32 of TryInto { } } -impl FP16x16TryIntoU16 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoU16 of TryInto { + fn try_into(self: FP16x16) -> Option { if self.sign { Option::None(()) } else { @@ -248,8 +254,8 @@ impl FP16x16TryIntoU16 of TryInto { } } -impl FP16x16TryIntoU8 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP16x16TryIntoU8 of TryInto { + fn try_into(self: FP16x16) -> Option { if self.sign { Option::None(()) } else { @@ -259,102 +265,102 @@ impl FP16x16TryIntoU8 of TryInto { } } -impl FP16x16PartialEq of PartialEq { +impl FP16x16PartialEq of PartialEq { #[inline(always)] - fn eq(lhs: @FixedType, rhs: @FixedType) -> bool { + fn eq(lhs: @FP16x16, rhs: @FP16x16) -> bool { return core::eq(lhs, rhs); } #[inline(always)] - fn ne(lhs: @FixedType, rhs: @FixedType) -> bool { + fn ne(lhs: @FP16x16, rhs: @FP16x16) -> bool { return core::ne(lhs, rhs); } } -impl FP16x16Add of Add { - fn add(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP16x16Add of Add { + fn add(lhs: FP16x16, rhs: FP16x16) -> FP16x16 { return core::add(lhs, rhs); } } -impl FP16x16AddEq of AddEq { +impl FP16x16AddEq of AddEq { #[inline(always)] - fn add_eq(ref self: FixedType, other: FixedType) { + fn add_eq(ref self: FP16x16, other: FP16x16) { self = Add::add(self, other); } } -impl FP16x16Sub of Sub { - fn sub(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP16x16Sub of Sub { + fn sub(lhs: FP16x16, rhs: FP16x16) -> FP16x16 { return core::sub(lhs, rhs); } } -impl FP16x16SubEq of SubEq { +impl FP16x16SubEq of SubEq { #[inline(always)] - fn sub_eq(ref self: FixedType, other: FixedType) { + fn sub_eq(ref self: FP16x16, other: FP16x16) { self = Sub::sub(self, other); } } -impl FP16x16Mul of Mul { - fn mul(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP16x16Mul of Mul { + fn mul(lhs: FP16x16, rhs: FP16x16) -> FP16x16 { return core::mul(lhs, rhs); } } -impl FP16x16MulEq of MulEq { +impl FP16x16MulEq of MulEq { #[inline(always)] - fn mul_eq(ref self: FixedType, other: FixedType) { + fn mul_eq(ref self: FP16x16, other: FP16x16) { self = Mul::mul(self, other); } } -impl FP16x16Div of Div { - fn div(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP16x16Div of Div { + fn div(lhs: FP16x16, rhs: FP16x16) -> FP16x16 { return core::div(lhs, rhs); } } -impl FP16x16DivEq of DivEq { +impl FP16x16DivEq of DivEq { #[inline(always)] - fn div_eq(ref self: FixedType, other: FixedType) { + fn div_eq(ref self: FP16x16, other: FP16x16) { self = Div::div(self, other); } } -impl FP16x16PartialOrd of PartialOrd { +impl FP16x16PartialOrd of PartialOrd { #[inline(always)] - fn ge(lhs: FixedType, rhs: FixedType) -> bool { + fn ge(lhs: FP16x16, rhs: FP16x16) -> bool { return core::ge(lhs, rhs); } #[inline(always)] - fn gt(lhs: FixedType, rhs: FixedType) -> bool { + fn gt(lhs: FP16x16, rhs: FP16x16) -> bool { return core::gt(lhs, rhs); } #[inline(always)] - fn le(lhs: FixedType, rhs: FixedType) -> bool { + fn le(lhs: FP16x16, rhs: FP16x16) -> bool { return core::le(lhs, rhs); } #[inline(always)] - fn lt(lhs: FixedType, rhs: FixedType) -> bool { + fn lt(lhs: FP16x16, rhs: FP16x16) -> bool { return core::lt(lhs, rhs); } } -impl FP16x16Neg of Neg { +impl FP16x16Neg of Neg { #[inline(always)] - fn neg(a: FixedType) -> FixedType { + fn neg(a: FP16x16) -> FP16x16 { return core::neg(a); } } -impl FP16x16Rem of Rem { +impl FP16x16Rem of Rem { #[inline(always)] - fn rem(lhs: FixedType, rhs: FixedType) -> FixedType { + fn rem(lhs: FP16x16, rhs: FP16x16) -> FP16x16 { return core::rem(lhs, rhs); } } @@ -362,11 +368,11 @@ impl FP16x16Rem of Rem { /// INTERNAL -fn _i32_into_fp(x: FixedType) -> i32 { +fn _i32_into_fp(x: FP16x16) -> i32 { i32 { mag: x.mag / ONE, sign: x.sign } } -fn _i8_try_from_fp(x: FixedType) -> Option { +fn _i8_try_from_fp(x: FP16x16) -> Option { let unscaled_mag: Option = (x.mag / ONE).try_into(); match unscaled_mag { diff --git a/src/numbers/fixed_point/implementations/fp16x16/helpers.cairo b/src/numbers/fixed_point/implementations/fp16x16/helpers.cairo index 732d2c8c0..01fb7d5c6 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/helpers.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/helpers.cairo @@ -2,14 +2,14 @@ use debug::PrintTrait; use traits::Into; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - HALF, ONE, TWO, FixedType, FP16x16Impl, FP16x16Sub, FP16x16Div, FixedTrait, FP16x16Print + HALF, ONE, TWO, FP16x16, FP16x16Impl, FP16x16Sub, FP16x16Div, FixedTrait, FP16x16Print }; const DEFAULT_PRECISION: u32 = 7; // 1e-4 // To use `DEFAULT_PRECISION`, final arg is: `Option::None(())`. // To use `custom_precision` of 430_u32: `Option::Some(430_u32)`. -fn assert_precise(result: FixedType, expected: felt252, msg: felt252, custom_precision: Option) { +fn assert_precise(result: FP16x16, expected: felt252, msg: felt252, custom_precision: Option) { let precision = match custom_precision { Option::Some(val) => val, Option::None(_) => DEFAULT_PRECISION, @@ -23,7 +23,7 @@ fn assert_precise(result: FixedType, expected: felt252, msg: felt252, custom_pre } } -fn assert_relative(result: FixedType, expected: felt252, msg: felt252, custom_precision: Option) { +fn assert_relative(result: FP16x16, expected: felt252, msg: felt252, custom_precision: Option) { let precision = match custom_precision { Option::Some(val) => val, Option::None(_) => DEFAULT_PRECISION, diff --git a/src/numbers/fixed_point/implementations/fp16x16/math/comp.cairo b/src/numbers/fixed_point/implementations/fp16x16/math/comp.cairo index 9c23e6ea0..3aa3219b5 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/math/comp.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/math/comp.cairo @@ -1,8 +1,8 @@ use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FixedType, FixedTrait, FP16x16Impl, FP16x16PartialOrd, FP16x16PartialEq + FP16x16, FixedTrait, FP16x16Impl, FP16x16PartialOrd, FP16x16PartialEq }; -fn max(a: FixedType, b: FixedType) -> FixedType { +fn max(a: FP16x16, b: FP16x16) -> FP16x16 { if (a >= b) { return a; } else { @@ -10,7 +10,7 @@ fn max(a: FixedType, b: FixedType) -> FixedType { } } -fn min(a: FixedType, b: FixedType) -> FixedType { +fn min(a: FP16x16, b: FP16x16) -> FP16x16 { if (a <= b) { return a; } else { @@ -18,7 +18,7 @@ fn min(a: FixedType, b: FixedType) -> FixedType { } } -fn xor(a: FixedType, b: FixedType) -> bool { +fn xor(a: FP16x16, b: FP16x16) -> bool { if (a == FixedTrait::new(0, false) || b == FixedTrait::new(0, false)) && (a != b) { return true; } else { @@ -26,7 +26,7 @@ fn xor(a: FixedType, b: FixedType) -> bool { } } -fn or(a: FixedType, b: FixedType) -> bool { +fn or(a: FP16x16, b: FP16x16) -> bool { let zero = FixedTrait::new(0, false); if a == zero && b == zero { return false; diff --git a/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo index d20fac0aa..1944a0744 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo @@ -5,7 +5,7 @@ use traits::{Into, TryInto}; use integer::{u32_safe_divmod, u32_as_non_zero, u32_wide_mul}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - HALF, ONE, FixedType, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, + HALF, ONE, FP16x16, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, FP16x16MulEq, FP16x16TryIntoU128, FP16x16PartialEq, FP16x16PartialOrd, FP16x16SubEq, FP16x16Neg, FP16x16Div, FP16x16IntoFelt252, FixedTrait }; @@ -13,11 +13,11 @@ use orion::numbers::fixed_point::implementations::fp16x16::math::lut; // PUBLIC -fn abs(a: FixedType) -> FixedType { +fn abs(a: FP16x16) -> FP16x16 { return FixedTrait::new(a.mag, false); } -fn add(a: FixedType, b: FixedType) -> FixedType { +fn add(a: FP16x16, b: FP16x16) -> FP16x16 { if a.sign == b.sign { return FixedTrait::new(a.mag + b.mag, a.sign); } @@ -33,7 +33,7 @@ fn add(a: FixedType, b: FixedType) -> FixedType { } } -fn ceil(a: FixedType) -> FixedType { +fn ceil(a: FP16x16) -> FP16x16 { let (div, rem) = u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if rem == 0 { @@ -47,7 +47,7 @@ fn ceil(a: FixedType) -> FixedType { } } -fn div(a: FixedType, b: FixedType) -> FixedType { +fn div(a: FP16x16, b: FP16x16) -> FP16x16 { let a_u64 = integer::u32_wide_mul(a.mag, ONE); let res_u64 = a_u64 / b.mag.into(); @@ -55,17 +55,17 @@ fn div(a: FixedType, b: FixedType) -> FixedType { return FixedTrait::new(res_u64.try_into().unwrap(), a.sign ^ b.sign); } -fn eq(a: @FixedType, b: @FixedType) -> bool { +fn eq(a: @FP16x16, b: @FP16x16) -> bool { return (*a.mag == *b.mag) && (*a.sign == *b.sign); } // Calculates the natural exponent of x: e^x -fn exp(a: FixedType) -> FixedType { +fn exp(a: FP16x16) -> FP16x16 { return exp2(FixedTrait::new(94548, false) * a); // log2(e) * 2^23 ≈ 12102203 } // Calculates the binary exponent of x: 2^x -fn exp2(a: FixedType) -> FixedType { +fn exp2(a: FP16x16) -> FP16x16 { if (a.mag == 0) { return FixedTrait::ONE(); } @@ -93,11 +93,11 @@ fn exp2(a: FixedType) -> FixedType { } } -fn exp2_int(exp: u32) -> FixedType { +fn exp2_int(exp: u32) -> FP16x16 { return FixedTrait::new_unscaled(lut::exp2(exp), false); } -fn floor(a: FixedType) -> FixedType { +fn floor(a: FP16x16) -> FP16x16 { let (div, rem) = integer::u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if rem == 0 { @@ -109,7 +109,7 @@ fn floor(a: FixedType) -> FixedType { } } -fn ge(a: FixedType, b: FixedType) -> bool { +fn ge(a: FP16x16, b: FP16x16) -> bool { if a.sign != b.sign { return !a.sign; } else { @@ -117,7 +117,7 @@ fn ge(a: FixedType, b: FixedType) -> bool { } } -fn gt(a: FixedType, b: FixedType) -> bool { +fn gt(a: FP16x16, b: FP16x16) -> bool { if a.sign != b.sign { return !a.sign; } else { @@ -125,7 +125,7 @@ fn gt(a: FixedType, b: FixedType) -> bool { } } -fn le(a: FixedType, b: FixedType) -> bool { +fn le(a: FP16x16, b: FP16x16) -> bool { if a.sign != b.sign { return a.sign; } else { @@ -135,13 +135,13 @@ fn le(a: FixedType, b: FixedType) -> bool { // Calculates the natural logarithm of x: ln(x) // self must be greater than zero -fn ln(a: FixedType) -> FixedType { +fn ln(a: FP16x16) -> FP16x16 { return FixedTrait::new(45426, false) * log2(a); // ln(2) = 0.693... } // Calculates the binary logarithm of x: log2(x) // self must be greather than zero -fn log2(a: FixedType) -> FixedType { +fn log2(a: FP16x16) -> FP16x16 { assert(a.sign == false, 'must be positive'); if (a.mag == ONE) { @@ -173,11 +173,11 @@ fn log2(a: FixedType) -> FixedType { // Calculates the base 10 log of x: log10(x) // self must be greater than zero -fn log10(a: FixedType) -> FixedType { +fn log10(a: FP16x16) -> FP16x16 { return FixedTrait::new(19728, false) * log2(a); // log10(2) = 0.301... } -fn lt(a: FixedType, b: FixedType) -> bool { +fn lt(a: FP16x16, b: FP16x16) -> bool { if a.sign != b.sign { return a.sign; } else { @@ -185,18 +185,18 @@ fn lt(a: FixedType, b: FixedType) -> bool { } } -fn mul(a: FixedType, b: FixedType) -> FixedType { +fn mul(a: FP16x16, b: FP16x16) -> FP16x16 { let prod_u128 = integer::u32_wide_mul(a.mag, b.mag); // Re-apply sign return FixedTrait::new((prod_u128 / ONE.into()).try_into().unwrap(), a.sign ^ b.sign); } -fn ne(a: @FixedType, b: @FixedType) -> bool { +fn ne(a: @FP16x16, b: @FP16x16) -> bool { return (*a.mag != *b.mag) || (*a.sign != *b.sign); } -fn neg(a: FixedType) -> FixedType { +fn neg(a: FP16x16) -> FP16x16 { if a.mag == 0 { return a; } else if !a.sign { @@ -207,9 +207,9 @@ fn neg(a: FixedType) -> FixedType { } // Calclates the value of x^y and checks for overflow before returning -// self is a FixedType point value -// b is a FixedType point value -fn pow(a: FixedType, b: FixedType) -> FixedType { +// self is a FP16x16 point value +// b is a FP16x16 point value +fn pow(a: FP16x16, b: FP16x16) -> FP16x16 { let (div, rem) = integer::u32_safe_divmod(b.mag, u32_as_non_zero(ONE)); // use the more performant integer pow when y is an int @@ -222,7 +222,7 @@ fn pow(a: FixedType, b: FixedType) -> FixedType { } // Calclates the value of a^b and checks for overflow before returning -fn pow_int(a: FixedType, b: u32, sign: bool) -> FixedType { +fn pow_int(a: FP16x16, b: u32, sign: bool) -> FP16x16 { let mut x = a; let mut n = b; @@ -255,11 +255,11 @@ fn pow_int(a: FixedType, b: u32, sign: bool) -> FixedType { return x * y; } -fn rem(a: FixedType, b: FixedType) -> FixedType { +fn rem(a: FP16x16, b: FP16x16) -> FP16x16 { return a - floor(a / b) * b; } -fn round(a: FixedType) -> FixedType { +fn round(a: FP16x16) -> FP16x16 { let (div, rem) = integer::u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if (HALF <= rem) { @@ -269,16 +269,16 @@ fn round(a: FixedType) -> FixedType { } } -// Calculates the square root of a FixedType point value +// Calculates the square root of a FP16x16 point value // x must be positive -fn sqrt(a: FixedType) -> FixedType { +fn sqrt(a: FP16x16) -> FP16x16 { assert(a.sign == false, 'must be positive'); let root = integer::u64_sqrt(a.mag.into() * ONE.into()); return FixedTrait::new(root.into(), false); } -fn sub(a: FixedType, b: FixedType) -> FixedType { +fn sub(a: FP16x16, b: FP16x16) -> FP16x16 { return add(a, -b); } @@ -291,36 +291,36 @@ use orion::numbers::fixed_point::implementations::fp16x16::math::trig::{PI, HALF #[test] fn test_into() { - let a = FixedTrait::new_unscaled(5, false); + let a = FixedTrait::::new_unscaled(5, false); assert(a.mag == 5 * ONE, 'invalid result'); } #[test] fn test_try_into_u128() { // Positive unscaled - let a = FixedTrait::new_unscaled(5, false); + let a = FixedTrait::::new_unscaled(5, false); assert(a.try_into().unwrap() == 5_u128, 'invalid result'); // Positive scaled - let b = FixedTrait::new(5 * ONE, false); + let b = FixedTrait::::new(5 * ONE, false); assert(b.try_into().unwrap() == 5_u128, 'invalid result'); // Zero - let d = FixedTrait::new_unscaled(0, false); + let d = FixedTrait::::new_unscaled(0, false); assert(d.try_into().unwrap() == 0_u128, 'invalid result'); } #[test] #[should_panic] fn test_negative_try_into_u128() { - let a = FixedTrait::new_unscaled(1, true); + let a = FixedTrait::::new_unscaled(1, true); let a: u128 = a.try_into().unwrap(); } #[test] #[available_gas(1000000)] fn test_acos() { - let a = FixedTrait::ONE(); + let a = FixedTrait::::ONE(); assert(a.acos().into() == 0, 'invalid one'); } @@ -375,7 +375,7 @@ fn test_sqrt() { #[test] #[available_gas(100000)] fn test_msb() { - let a = FixedTrait::new_unscaled(100, false); + let a = FixedTrait::::new_unscaled(100, false); let (msb, div) = lut::msb(a.mag / ONE); assert(msb == 6, 'invalid msb'); assert(div == 64, 'invalid msb ceil'); @@ -474,7 +474,7 @@ fn test_add_eq() { let mut a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(2, false); a += b; - assert(a == FixedTrait::new_unscaled(3, false), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(3, false), 'invalid result'); } #[test] @@ -482,7 +482,7 @@ fn test_sub() { let a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, false); let c = a - b; - assert(c == FixedTrait::new_unscaled(3, false), 'false result invalid'); + assert(c == FixedTrait::::new_unscaled(3, false), 'false result invalid'); } #[test] @@ -490,14 +490,14 @@ fn test_sub_eq() { let mut a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, false); a -= b; - assert(a == FixedTrait::new_unscaled(3, false), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(3, false), 'invalid result'); } #[test] #[available_gas(100000)] fn test_mul_pos() { - let a = FixedType { mag: 190054, sign: false }; - let b = FixedType { mag: 190054, sign: false }; + let a = FP16x16 { mag: 190054, sign: false }; + let b = FP16x16 { mag: 190054, sign: false }; let c = a * b; assert(c.mag == 551155, 'invalid result'); } @@ -507,7 +507,7 @@ fn test_mul_neg() { let a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, true); let c = a * b; - assert(c == FixedTrait::new_unscaled(10, true), 'invalid result'); + assert(c == FixedTrait::::new_unscaled(10, true), 'invalid result'); } #[test] @@ -515,13 +515,13 @@ fn test_mul_eq() { let mut a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, true); a *= b; - assert(a == FixedTrait::new_unscaled(10, true), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(10, true), 'invalid result'); } #[test] fn test_div() { let a = FixedTrait::new_unscaled(10, false); - let b = FixedTrait::new(190054, false); // 2.9 + let b = FixedTrait::::new(190054, false); // 2.9 let c = a / b; assert(c.mag == 225986, 'invalid pos decimal'); // 3.4482758620689653 } @@ -530,7 +530,7 @@ fn test_div() { fn test_le() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a <= a, 'a <= a'); assert(a <= b == false, 'a <= b'); @@ -549,7 +549,7 @@ fn test_le() { fn test_lt() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a < a == false, 'a < a'); assert(a < b == false, 'a < b'); @@ -568,7 +568,7 @@ fn test_lt() { fn test_ge() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a >= a, 'a >= a'); assert(a >= b, 'a >= b'); @@ -587,7 +587,7 @@ fn test_ge() { fn test_gt() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a > a == false, 'a > a'); assert(a > b, 'a > b'); @@ -605,7 +605,7 @@ fn test_gt() { #[test] #[available_gas(1000000)] fn test_cos() { - let a = FixedTrait::new(HALF_PI, false); + let a = FixedTrait::::new(HALF_PI, false); assert(a.cos().into() == 0, 'invalid half pi'); } @@ -619,6 +619,6 @@ fn test_sin() { #[test] #[available_gas(2000000)] fn test_tan() { - let a = FixedTrait::new(HALF_PI / 2, false); + let a = FixedTrait::::new(HALF_PI / 2, false); assert(a.tan().mag == 65536, 'invalid quarter pi'); } diff --git a/src/numbers/fixed_point/implementations/fp16x16/math/hyp.cairo b/src/numbers/fixed_point/implementations/fp16x16/math/hyp.cairo index 08485dcc4..c411c3879 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/math/hyp.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/math/hyp.cairo @@ -1,43 +1,43 @@ use core::debug::PrintTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - HALF, ONE, TWO, FixedType, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, + HALF, ONE, TWO, FP16x16, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, FP16x16MulEq, FP16x16TryIntoU128, FP16x16PartialEq, FP16x16PartialOrd, FP16x16SubEq, FP16x16Neg, FP16x16Div, FP16x16IntoFelt252, FixedTrait }; // Calculates hyperbolic cosine of a (fixed point) -fn cosh(a: FixedType) -> FixedType { +fn cosh(a: FP16x16) -> FP16x16 { let ea = a.exp(); return (ea + (FixedTrait::ONE() / ea)) / FixedTrait::new(TWO, false); } // Calculates hyperbolic sine of a (fixed point) -fn sinh(a: FixedType) -> FixedType { +fn sinh(a: FP16x16) -> FP16x16 { let ea = a.exp(); return (ea - (FixedTrait::ONE() / ea)) / FixedTrait::new(TWO, false); } // Calculates hyperbolic tangent of a (fixed point) -fn tanh(a: FixedType) -> FixedType { +fn tanh(a: FP16x16) -> FP16x16 { let ea = a.exp(); let ea_i = FixedTrait::ONE() / ea; return (ea - ea_i) / (ea + ea_i); } // Calculates inverse hyperbolic cosine of a (fixed point) -fn acosh(a: FixedType) -> FixedType { +fn acosh(a: FP16x16) -> FP16x16 { let root = (a * a - FixedTrait::ONE()).sqrt(); return (a + root).ln(); } // Calculates inverse hyperbolic sine of a (fixed point) -fn asinh(a: FixedType) -> FixedType { +fn asinh(a: FP16x16) -> FP16x16 { let root = (a * a + FixedTrait::ONE()).sqrt(); return (a + root).ln(); } // Calculates inverse hyperbolic tangent of a (fixed point) -fn atanh(a: FixedType) -> FixedType { +fn atanh(a: FP16x16) -> FP16x16 { let one = FixedTrait::ONE(); let ln_arg = (one + a) / (one - a); return ln_arg.ln() / FixedTrait::new(TWO, false); diff --git a/src/numbers/fixed_point/implementations/fp16x16/math/trig.cairo b/src/numbers/fixed_point/implementations/fp16x16/math/trig.cairo index 9341f34d8..00e81db24 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/math/trig.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/math/trig.cairo @@ -4,7 +4,7 @@ use option::OptionTrait; use orion::numbers::fixed_point::implementations::fp16x16::math::lut; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - HALF, ONE, TWO, FixedType, FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16Mul, FP16x16Div, + HALF, ONE, TWO, FP16x16, FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16Mul, FP16x16Div, FP16x16IntoFelt252, FixedTrait }; @@ -18,7 +18,7 @@ const HALF_PI: u32 = 102944; // Calculates arccos(a) for -1 <= a <= 1 (fixed point) // arccos(a) = arcsin(sqrt(1 - a^2)) - arctan identity has discontinuity at zero -fn acos(a: FixedType) -> FixedType { +fn acos(a: FP16x16) -> FP16x16 { let asin_arg = (FixedTrait::ONE() - a * a).sqrt(); // will fail if a > 1 let asin_res = asin(asin_arg); @@ -29,7 +29,7 @@ fn acos(a: FixedType) -> FixedType { } } -fn acos_fast(a: FixedType) -> FixedType { +fn acos_fast(a: FP16x16) -> FP16x16 { let asin_arg = (FixedTrait::ONE() - a * a).sqrt(); // will fail if a > 1 let asin_res = asin_fast(asin_arg); @@ -42,7 +42,7 @@ fn acos_fast(a: FixedType) -> FixedType { // Calculates arcsin(a) for -1 <= a <= 1 (fixed point) // arcsin(a) = arctan(a / sqrt(1 - a^2)) -fn asin(a: FixedType) -> FixedType { +fn asin(a: FP16x16) -> FP16x16 { if (a.mag == ONE) { return FixedTrait::new(HALF_PI, a.sign); } @@ -51,7 +51,7 @@ fn asin(a: FixedType) -> FixedType { return atan(a / div); } -fn asin_fast(a: FixedType) -> FixedType { +fn asin_fast(a: FP16x16) -> FP16x16 { if (a.mag == ONE) { return FixedTrait::new(HALF_PI, a.sign); } @@ -62,7 +62,7 @@ fn asin_fast(a: FixedType) -> FixedType { // Calculates arctan(a) (fixed point) // See https://stackoverflow.com/a/50894477 for range adjustments -fn atan(a: FixedType) -> FixedType { +fn atan(a: FP16x16) -> FP16x16 { let mut at = a.abs(); let mut shift = false; let mut invert = false; @@ -104,7 +104,7 @@ fn atan(a: FixedType) -> FixedType { } -fn atan_fast(a: FixedType) -> FixedType { +fn atan_fast(a: FP16x16) -> FP16x16 { let mut at = a.abs(); let mut shift = false; let mut invert = false; @@ -132,22 +132,22 @@ fn atan_fast(a: FixedType) -> FixedType { } if (invert) { - res = res - FixedTrait::new(HALF_PI, false); + res = res - FixedTrait::::new(HALF_PI, false); } return FixedTrait::new(res.mag, a.sign); } // Calculates cos(a) with a in radians (fixed point) -fn cos(a: FixedType) -> FixedType { +fn cos(a: FP16x16) -> FP16x16 { return sin(FixedTrait::new(HALF_PI, false) - a); } -fn cos_fast(a: FixedType) -> FixedType { +fn cos_fast(a: FP16x16) -> FP16x16 { return sin_fast(FixedTrait::new(HALF_PI, false) - a); } -fn sin(a: FixedType) -> FixedType { +fn sin(a: FP16x16) -> FP16x16 { let a1 = a.mag % TWO_PI; let (whole_rem, partial_rem) = u32_safe_divmod(a1, u32_as_non_zero(PI)); let a2 = FixedTrait::new(partial_rem, false); @@ -157,7 +157,7 @@ fn sin(a: FixedType) -> FixedType { return FixedTrait::new(loop_res.mag, a.sign ^ partial_sign && loop_res.mag != 0); } -fn sin_fast(a: FixedType) -> FixedType { +fn sin_fast(a: FP16x16) -> FP16x16 { let a1 = a.mag % TWO_PI; let (whole_rem, mut partial_rem) = u32_safe_divmod(a1, u32_as_non_zero(PI)); let partial_sign = whole_rem == 1; @@ -169,20 +169,20 @@ fn sin_fast(a: FixedType) -> FixedType { let (start, low, high) = lut::sin(partial_rem); let partial_step = FixedTrait::new(partial_rem - start, false) / FixedTrait::new(402, false); let res = partial_step * (FixedTrait::new(high, false) - FixedTrait::new(low, false)) - + FixedTrait::new(low, false); + + FixedTrait::::new(low, false); return FixedTrait::new(res.mag, a.sign ^ partial_sign && res.mag != 0); } // Calculates tan(a) with a in radians (fixed point) -fn tan(a: FixedType) -> FixedType { +fn tan(a: FP16x16) -> FP16x16 { let sinx = sin(a); let cosx = cos(a); assert(cosx.mag != 0, 'tan undefined'); return sinx / cosx; } -fn tan_fast(a: FixedType) -> FixedType { +fn tan_fast(a: FP16x16) -> FP16x16 { let sinx = sin_fast(a); let cosx = cos_fast(a); assert(cosx.mag != 0, 'tan undefined'); @@ -190,7 +190,7 @@ fn tan_fast(a: FixedType) -> FixedType { } // Helper function to calculate Taylor series for sin -fn _sin_loop(a: FixedType, i: u32, acc: FixedType) -> FixedType { +fn _sin_loop(a: FP16x16, i: u32, acc: FP16x16) -> FP16x16 { let div = (2 * i + 2) * (2 * i + 3); let term = a * a * acc / FixedTrait::new_unscaled(div, false); let new_acc = FixedTrait::ONE() - term; diff --git a/src/numbers/fixed_point/implementations/fp8x23/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/core.cairo index 8b757d96e..aab159354 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/core.cairo @@ -5,10 +5,16 @@ use result::{ResultTrait, ResultTraitImpl}; use traits::{TryInto, Into}; use orion::numbers::signed_integer::{i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::math::{core, trig, hyp}; use orion::numbers::fixed_point::utils; +/// A struct representing a fixed point number. +#[derive(Serde, Copy, Drop)] +struct FP8x23 { + mag: u32, + sign: bool +} // CONSTANTS @@ -18,169 +24,169 @@ const HALF: u32 = 4194304; // 2 ** 22 const MAX: u32 = 2147483648; // 2 ** 31 -impl FP8x23Impl of FixedTrait { - fn ZERO() -> FixedType { - return FixedType { mag: 0, sign: false }; +impl FP8x23Impl of FixedTrait { + fn ZERO() -> FP8x23 { + return FP8x23 { mag: 0, sign: false }; } - fn ONE() -> FixedType { - return FixedType { mag: ONE, sign: false }; + fn ONE() -> FP8x23 { + return FP8x23 { mag: ONE, sign: false }; } - fn new(mag: u32, sign: bool) -> FixedType { - return FixedType { mag: mag, sign: sign }; + fn new(mag: u32, sign: bool) -> FP8x23 { + return FP8x23 { mag: mag, sign: sign }; } - fn new_unscaled(mag: u32, sign: bool) -> FixedType { - return FixedType { mag: mag * ONE, sign: sign }; + fn new_unscaled(mag: u32, sign: bool) -> FP8x23 { + return FP8x23 { mag: mag * ONE, sign: sign }; } - fn from_felt(val: felt252) -> FixedType { + fn from_felt(val: felt252) -> FP8x23 { let mag = integer::u32_try_from_felt252(utils::felt_abs(val)).unwrap(); return FixedTrait::new(mag, utils::felt_sign(val)); } - fn abs(self: FixedType) -> FixedType { + fn abs(self: FP8x23) -> FP8x23 { return core::abs(self); } - fn acos(self: FixedType) -> FixedType { + fn acos(self: FP8x23) -> FP8x23 { return trig::acos_fast(self); } - fn acos_fast(self: FixedType) -> FixedType { + fn acos_fast(self: FP8x23) -> FP8x23 { return trig::acos_fast(self); } - fn acosh(self: FixedType) -> FixedType { + fn acosh(self: FP8x23) -> FP8x23 { return hyp::acosh(self); } - fn asin(self: FixedType) -> FixedType { + fn asin(self: FP8x23) -> FP8x23 { return trig::asin_fast(self); } - fn asin_fast(self: FixedType) -> FixedType { + fn asin_fast(self: FP8x23) -> FP8x23 { return trig::asin_fast(self); } - fn asinh(self: FixedType) -> FixedType { + fn asinh(self: FP8x23) -> FP8x23 { return hyp::asinh(self); } - fn atan(self: FixedType) -> FixedType { + fn atan(self: FP8x23) -> FP8x23 { return trig::atan_fast(self); } - fn atan_fast(self: FixedType) -> FixedType { + fn atan_fast(self: FP8x23) -> FP8x23 { return trig::atan_fast(self); } - fn atanh(self: FixedType) -> FixedType { + fn atanh(self: FP8x23) -> FP8x23 { return hyp::atanh(self); } - fn ceil(self: FixedType) -> FixedType { + fn ceil(self: FP8x23) -> FP8x23 { return core::ceil(self); } - fn cos(self: FixedType) -> FixedType { + fn cos(self: FP8x23) -> FP8x23 { return trig::cos_fast(self); } - fn cos_fast(self: FixedType) -> FixedType { + fn cos_fast(self: FP8x23) -> FP8x23 { return trig::cos_fast(self); } - fn cosh(self: FixedType) -> FixedType { + fn cosh(self: FP8x23) -> FP8x23 { return hyp::cosh(self); } - fn floor(self: FixedType) -> FixedType { + fn floor(self: FP8x23) -> FP8x23 { return core::floor(self); } // Calculates the natural exponent of x: e^x - fn exp(self: FixedType) -> FixedType { + fn exp(self: FP8x23) -> FP8x23 { return core::exp(self); } // Calculates the binary exponent of x: 2^x - fn exp2(self: FixedType) -> FixedType { + fn exp2(self: FP8x23) -> FP8x23 { return core::exp2(self); } // Calculates the natural logarithm of x: ln(x) // self must be greater than zero - fn ln(self: FixedType) -> FixedType { + fn ln(self: FP8x23) -> FP8x23 { return core::ln(self); } // Calculates the binary logarithm of x: log2(x) // self must be greather than zero - fn log2(self: FixedType) -> FixedType { + fn log2(self: FP8x23) -> FP8x23 { return core::log2(self); } // Calculates the base 10 log of x: log10(x) // self must be greater than zero - fn log10(self: FixedType) -> FixedType { + fn log10(self: FP8x23) -> FP8x23 { return core::log10(self); } // Calclates the value of x^y and checks for overflow before returning // self is a fixed point value // b is a fixed point value - fn pow(self: FixedType, b: FixedType) -> FixedType { + fn pow(self: FP8x23, b: FP8x23) -> FP8x23 { return core::pow(self, b); } - fn round(self: FixedType) -> FixedType { + fn round(self: FP8x23) -> FP8x23 { return core::round(self); } - fn sin(self: FixedType) -> FixedType { + fn sin(self: FP8x23) -> FP8x23 { return trig::sin_fast(self); } - fn sin_fast(self: FixedType) -> FixedType { + fn sin_fast(self: FP8x23) -> FP8x23 { return trig::sin_fast(self); } - fn sinh(self: FixedType) -> FixedType { + fn sinh(self: FP8x23) -> FP8x23 { return hyp::sinh(self); } // Calculates the square root of a fixed point value // x must be positive - fn sqrt(self: FixedType) -> FixedType { + fn sqrt(self: FP8x23) -> FP8x23 { return core::sqrt(self); } - fn tan(self: FixedType) -> FixedType { + fn tan(self: FP8x23) -> FP8x23 { return trig::tan_fast(self); } - fn tan_fast(self: FixedType) -> FixedType { + fn tan_fast(self: FP8x23) -> FP8x23 { return trig::tan_fast(self); } - fn tanh(self: FixedType) -> FixedType { + fn tanh(self: FP8x23) -> FP8x23 { return hyp::tanh(self); } } -impl FP8x23Print of PrintTrait { - fn print(self: FixedType) { +impl FP8x23Print of PrintTrait { + fn print(self: FP8x23) { self.sign.print(); self.mag.print(); } } // Into a raw felt without unscaling -impl FP8x23IntoFelt252 of Into { - fn into(self: FixedType) -> felt252 { +impl FP8x23IntoFelt252 of Into { + fn into(self: FP8x23) -> felt252 { let mag_felt = self.mag.into(); if self.sign { @@ -191,8 +197,8 @@ impl FP8x23IntoFelt252 of Into { } } -impl FP8x23TryIntoU128 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoU128 of TryInto { + fn try_into(self: FP8x23) -> Option { if self.sign { return Option::None(()); } else { @@ -202,8 +208,8 @@ impl FP8x23TryIntoU128 of TryInto { } } -impl FP8x23TryIntoU64 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoU64 of TryInto { + fn try_into(self: FP8x23) -> Option { if self.sign { return Option::None(()); } else { @@ -213,8 +219,8 @@ impl FP8x23TryIntoU64 of TryInto { } } -impl FP8x23TryIntoU32 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoU32 of TryInto { + fn try_into(self: FP8x23) -> Option { if self.sign { return Option::None(()); } else { @@ -224,8 +230,8 @@ impl FP8x23TryIntoU32 of TryInto { } } -impl FP8x23TryIntoU16 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoU16 of TryInto { + fn try_into(self: FP8x23) -> Option { if self.sign { Option::None(()) } else { @@ -235,8 +241,8 @@ impl FP8x23TryIntoU16 of TryInto { } } -impl FP8x23TryIntoU8 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoU8 of TryInto { + fn try_into(self: FP8x23) -> Option { if self.sign { Option::None(()) } else { @@ -246,125 +252,125 @@ impl FP8x23TryIntoU8 of TryInto { } } -impl FP8x23IntoI32 of Into { - fn into(self: FixedType) -> i32 { +impl FP8x23IntoI32 of Into { + fn into(self: FP8x23) -> i32 { _i32_into_fp(self) } } -impl FP8x23TryIntoI8 of TryInto { - fn try_into(self: FixedType) -> Option { +impl FP8x23TryIntoI8 of TryInto { + fn try_into(self: FP8x23) -> Option { _i8_try_from_fp(self) } } -impl FP8x23PartialEq of PartialEq { +impl FP8x23PartialEq of PartialEq { #[inline(always)] - fn eq(lhs: @FixedType, rhs: @FixedType) -> bool { + fn eq(lhs: @FP8x23, rhs: @FP8x23) -> bool { return core::eq(lhs, rhs); } #[inline(always)] - fn ne(lhs: @FixedType, rhs: @FixedType) -> bool { + fn ne(lhs: @FP8x23, rhs: @FP8x23) -> bool { return core::ne(lhs, rhs); } } -impl FP8x23Add of Add { - fn add(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP8x23Add of Add { + fn add(lhs: FP8x23, rhs: FP8x23) -> FP8x23 { return core::add(lhs, rhs); } } -impl FP8x23AddEq of AddEq { +impl FP8x23AddEq of AddEq { #[inline(always)] - fn add_eq(ref self: FixedType, other: FixedType) { + fn add_eq(ref self: FP8x23, other: FP8x23) { self = Add::add(self, other); } } -impl FP8x23Sub of Sub { - fn sub(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP8x23Sub of Sub { + fn sub(lhs: FP8x23, rhs: FP8x23) -> FP8x23 { return core::sub(lhs, rhs); } } -impl FP8x23SubEq of SubEq { +impl FP8x23SubEq of SubEq { #[inline(always)] - fn sub_eq(ref self: FixedType, other: FixedType) { + fn sub_eq(ref self: FP8x23, other: FP8x23) { self = Sub::sub(self, other); } } -impl FP8x23Mul of Mul { - fn mul(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP8x23Mul of Mul { + fn mul(lhs: FP8x23, rhs: FP8x23) -> FP8x23 { return core::mul(lhs, rhs); } } -impl FP8x23MulEq of MulEq { +impl FP8x23MulEq of MulEq { #[inline(always)] - fn mul_eq(ref self: FixedType, other: FixedType) { + fn mul_eq(ref self: FP8x23, other: FP8x23) { self = Mul::mul(self, other); } } -impl FP8x23Div of Div { - fn div(lhs: FixedType, rhs: FixedType) -> FixedType { +impl FP8x23Div of Div { + fn div(lhs: FP8x23, rhs: FP8x23) -> FP8x23 { return core::div(lhs, rhs); } } -impl FP8x23DivEq of DivEq { +impl FP8x23DivEq of DivEq { #[inline(always)] - fn div_eq(ref self: FixedType, other: FixedType) { + fn div_eq(ref self: FP8x23, other: FP8x23) { self = Div::div(self, other); } } -impl FP8x23PartialOrd of PartialOrd { +impl FP8x23PartialOrd of PartialOrd { #[inline(always)] - fn ge(lhs: FixedType, rhs: FixedType) -> bool { + fn ge(lhs: FP8x23, rhs: FP8x23) -> bool { return core::ge(lhs, rhs); } #[inline(always)] - fn gt(lhs: FixedType, rhs: FixedType) -> bool { + fn gt(lhs: FP8x23, rhs: FP8x23) -> bool { return core::gt(lhs, rhs); } #[inline(always)] - fn le(lhs: FixedType, rhs: FixedType) -> bool { + fn le(lhs: FP8x23, rhs: FP8x23) -> bool { return core::le(lhs, rhs); } #[inline(always)] - fn lt(lhs: FixedType, rhs: FixedType) -> bool { + fn lt(lhs: FP8x23, rhs: FP8x23) -> bool { return core::lt(lhs, rhs); } } -impl FP8x23Neg of Neg { +impl FP8x23Neg of Neg { #[inline(always)] - fn neg(a: FixedType) -> FixedType { + fn neg(a: FP8x23) -> FP8x23 { return core::neg(a); } } -impl FP8x23Rem of Rem { +impl FP8x23Rem of Rem { #[inline(always)] - fn rem(lhs: FixedType, rhs: FixedType) -> FixedType { + fn rem(lhs: FP8x23, rhs: FP8x23) -> FP8x23 { return core::rem(lhs, rhs); } } /// INTERNAL -fn _i32_into_fp(x: FixedType) -> i32 { +fn _i32_into_fp(x: FP8x23) -> i32 { i32 { mag: x.mag / ONE, sign: x.sign } } -fn _i8_try_from_fp(x: FixedType) -> Option { +fn _i8_try_from_fp(x: FP8x23) -> Option { let unscaled_mag: Option = (x.mag / ONE).try_into(); match unscaled_mag { diff --git a/src/numbers/fixed_point/implementations/fp8x23/helpers.cairo b/src/numbers/fixed_point/implementations/fp8x23/helpers.cairo index 4eb0244e5..e63b1fe6a 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/helpers.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/helpers.cairo @@ -2,16 +2,14 @@ use debug::PrintTrait; use traits::Into; use orion::numbers::fixed_point::implementations::fp8x23::core::{ - HALF, ONE, TWO, FixedType, FP8x23Impl, FP8x23Sub, FP8x23Div, FixedTrait, FP8x23Print + HALF, ONE, TWO, FP8x23, FP8x23Sub, FP8x23Div, FixedTrait, FP8x23Print }; const DEFAULT_PRECISION: u32 = 8; // 1e-6 // To use `DEFAULT_PRECISION`, final arg is: `Option::None(())`. // To use `custom_precision` of 430_u32: `Option::Some(430_u32)`. -fn assert_precise( - result: FixedType, expected: felt252, msg: felt252, custom_precision: Option -) { +fn assert_precise(result: FP8x23, expected: felt252, msg: felt252, custom_precision: Option) { let precision = match custom_precision { Option::Some(val) => val, Option::None(_) => DEFAULT_PRECISION, @@ -25,9 +23,7 @@ fn assert_precise( } } -fn assert_relative( - result: FixedType, expected: felt252, msg: felt252, custom_precision: Option -) { +fn assert_relative(result: FP8x23, expected: felt252, msg: felt252, custom_precision: Option) { let precision = match custom_precision { Option::Some(val) => val, Option::None(_) => DEFAULT_PRECISION, diff --git a/src/numbers/fixed_point/implementations/fp8x23/math/comp.cairo b/src/numbers/fixed_point/implementations/fp8x23/math/comp.cairo index de2ba6780..53b1f2e1d 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/math/comp.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/math/comp.cairo @@ -1,8 +1,8 @@ use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FixedType, FixedTrait, FP8x23Impl, FP8x23PartialOrd, FP8x23PartialEq + FP8x23, FixedTrait, FP8x23PartialOrd, FP8x23PartialEq }; -fn max(a: FixedType, b: FixedType) -> FixedType { +fn max(a: FP8x23, b: FP8x23) -> FP8x23 { if (a >= b) { return a; } else { @@ -10,7 +10,7 @@ fn max(a: FixedType, b: FixedType) -> FixedType { } } -fn min(a: FixedType, b: FixedType) -> FixedType { +fn min(a: FP8x23, b: FP8x23) -> FP8x23 { if (a <= b) { return a; } else { @@ -18,7 +18,7 @@ fn min(a: FixedType, b: FixedType) -> FixedType { } } -fn xor(a: FixedType, b: FixedType) -> bool { +fn xor(a: FP8x23, b: FP8x23) -> bool { if (a == FixedTrait::new(0, false) || b == FixedTrait::new(0, false)) && (a != b) { return true; } else { @@ -26,7 +26,7 @@ fn xor(a: FixedType, b: FixedType) -> bool { } } -fn or(a: FixedType, b: FixedType) -> bool { +fn or(a: FP8x23, b: FP8x23) -> bool { let zero = FixedTrait::new(0, false); if a == zero && b == zero { return false; diff --git a/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo index 6398fbbd4..dd44b5c10 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo @@ -5,7 +5,7 @@ use traits::{Into, TryInto}; use integer::{u32_safe_divmod, u32_as_non_zero, u32_wide_mul}; use orion::numbers::fixed_point::implementations::fp8x23::core::{ - HALF, ONE, FixedType, FP8x23Impl, FP8x23Add, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, + HALF, ONE, FP8x23, FP8x23Add, FP8x23Impl, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, FP8x23TryIntoU128, FP8x23PartialEq, FP8x23PartialOrd, FP8x23SubEq, FP8x23Neg, FP8x23Div, FP8x23IntoFelt252, FixedTrait }; @@ -13,11 +13,11 @@ use orion::numbers::fixed_point::implementations::fp8x23::math::lut; // PUBLIC -fn abs(a: FixedType) -> FixedType { +fn abs(a: FP8x23) -> FP8x23 { return FixedTrait::new(a.mag, false); } -fn add(a: FixedType, b: FixedType) -> FixedType { +fn add(a: FP8x23, b: FP8x23) -> FP8x23 { if a.sign == b.sign { return FixedTrait::new(a.mag + b.mag, a.sign); } @@ -33,7 +33,7 @@ fn add(a: FixedType, b: FixedType) -> FixedType { } } -fn ceil(a: FixedType) -> FixedType { +fn ceil(a: FP8x23) -> FP8x23 { let (div, rem) = u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if rem == 0 { @@ -47,7 +47,7 @@ fn ceil(a: FixedType) -> FixedType { } } -fn div(a: FixedType, b: FixedType) -> FixedType { +fn div(a: FP8x23, b: FP8x23) -> FP8x23 { let a_u64 = integer::u32_wide_mul(a.mag, ONE); let res_u64 = a_u64 / b.mag.into(); @@ -55,17 +55,17 @@ fn div(a: FixedType, b: FixedType) -> FixedType { return FixedTrait::new(res_u64.try_into().unwrap(), a.sign ^ b.sign); } -fn eq(a: @FixedType, b: @FixedType) -> bool { +fn eq(a: @FP8x23, b: @FP8x23) -> bool { return (*a.mag == *b.mag) && (*a.sign == *b.sign); } // Calculates the natural exponent of x: e^x -fn exp(a: FixedType) -> FixedType { +fn exp(a: FP8x23) -> FP8x23 { return exp2(FixedTrait::new(12102203, false) * a); // log2(e) * 2^23 ≈ 12102203 } // Calculates the binary exponent of x: 2^x -fn exp2(a: FixedType) -> FixedType { +fn exp2(a: FP8x23) -> FP8x23 { if (a.mag == 0) { return FixedTrait::ONE(); } @@ -94,11 +94,11 @@ fn exp2(a: FixedType) -> FixedType { } } -fn exp2_int(exp: u32) -> FixedType { +fn exp2_int(exp: u32) -> FP8x23 { return FixedTrait::new_unscaled(lut::exp2(exp), false); } -fn floor(a: FixedType) -> FixedType { +fn floor(a: FP8x23) -> FP8x23 { let (div, rem) = integer::u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if rem == 0 { @@ -110,7 +110,7 @@ fn floor(a: FixedType) -> FixedType { } } -fn ge(a: FixedType, b: FixedType) -> bool { +fn ge(a: FP8x23, b: FP8x23) -> bool { if a.sign != b.sign { return !a.sign; } else { @@ -118,7 +118,7 @@ fn ge(a: FixedType, b: FixedType) -> bool { } } -fn gt(a: FixedType, b: FixedType) -> bool { +fn gt(a: FP8x23, b: FP8x23) -> bool { if a.sign != b.sign { return !a.sign; } else { @@ -126,7 +126,7 @@ fn gt(a: FixedType, b: FixedType) -> bool { } } -fn le(a: FixedType, b: FixedType) -> bool { +fn le(a: FP8x23, b: FP8x23) -> bool { if a.sign != b.sign { return a.sign; } else { @@ -136,13 +136,13 @@ fn le(a: FixedType, b: FixedType) -> bool { // Calculates the natural logarithm of x: ln(x) // self must be greater than zero -fn ln(a: FixedType) -> FixedType { +fn ln(a: FP8x23) -> FP8x23 { return FixedTrait::new(5814540, false) * log2(a); // ln(2) = 0.693... } // Calculates the binary logarithm of x: log2(x) // self must be greather than zero -fn log2(a: FixedType) -> FixedType { +fn log2(a: FP8x23) -> FP8x23 { assert(a.sign == false, 'must be positive'); if (a.mag == ONE) { @@ -174,11 +174,11 @@ fn log2(a: FixedType) -> FixedType { // Calculates the base 10 log of x: log10(x) // self must be greater than zero -fn log10(a: FixedType) -> FixedType { +fn log10(a: FP8x23) -> FP8x23 { return FixedTrait::new(2525223, false) * log2(a); // log10(2) = 0.301... } -fn lt(a: FixedType, b: FixedType) -> bool { +fn lt(a: FP8x23, b: FP8x23) -> bool { if a.sign != b.sign { return a.sign; } else { @@ -186,18 +186,18 @@ fn lt(a: FixedType, b: FixedType) -> bool { } } -fn mul(a: FixedType, b: FixedType) -> FixedType { +fn mul(a: FP8x23, b: FP8x23) -> FP8x23 { let prod_u128 = integer::u32_wide_mul(a.mag, b.mag); // Re-apply sign return FixedTrait::new((prod_u128 / ONE.into()).try_into().unwrap(), a.sign ^ b.sign); } -fn ne(a: @FixedType, b: @FixedType) -> bool { +fn ne(a: @FP8x23, b: @FP8x23) -> bool { return (*a.mag != *b.mag) || (*a.sign != *b.sign); } -fn neg(a: FixedType) -> FixedType { +fn neg(a: FP8x23) -> FP8x23 { if a.mag == 0 { return a; } else if !a.sign { @@ -208,9 +208,9 @@ fn neg(a: FixedType) -> FixedType { } // Calclates the value of x^y and checks for overflow before returning -// self is a FixedType point value -// b is a FixedType point value -fn pow(a: FixedType, b: FixedType) -> FixedType { +// self is a FP8x23 point value +// b is a FP8x23 point value +fn pow(a: FP8x23, b: FP8x23) -> FP8x23 { let (div, rem) = integer::u32_safe_divmod(b.mag, u32_as_non_zero(ONE)); // use the more performant integer pow when y is an int @@ -223,7 +223,7 @@ fn pow(a: FixedType, b: FixedType) -> FixedType { } // Calclates the value of a^b and checks for overflow before returning -fn pow_int(a: FixedType, b: u32, sign: bool) -> FixedType { +fn pow_int(a: FP8x23, b: u32, sign: bool) -> FP8x23 { let mut x = a; let mut n = b; @@ -256,11 +256,11 @@ fn pow_int(a: FixedType, b: u32, sign: bool) -> FixedType { return x * y; } -fn rem(a: FixedType, b: FixedType) -> FixedType { +fn rem(a: FP8x23, b: FP8x23) -> FP8x23 { return a - floor(a / b) * b; } -fn round(a: FixedType) -> FixedType { +fn round(a: FP8x23) -> FP8x23 { let (div, rem) = integer::u32_safe_divmod(a.mag, u32_as_non_zero(ONE)); if (HALF <= rem) { @@ -270,56 +270,58 @@ fn round(a: FixedType) -> FixedType { } } -// Calculates the square root of a FixedType point value +// Calculates the square root of a FP8x23 point value // x must be positive -fn sqrt(a: FixedType) -> FixedType { +fn sqrt(a: FP8x23) -> FP8x23 { assert(a.sign == false, 'must be positive'); let root = integer::u64_sqrt(a.mag.into() * ONE.into()); return FixedTrait::new(root.into(), false); } -fn sub(a: FixedType, b: FixedType) -> FixedType { +fn sub(a: FP8x23, b: FP8x23) -> FP8x23 { return add(a, -b); } // Tests -------------------------------------------------------------------------------------------------------------- -use orion::numbers::fixed_point::implementations::fp8x23::helpers::{assert_precise, assert_relative}; +use orion::numbers::fixed_point::implementations::fp8x23::helpers::{ + assert_precise, assert_relative +}; use orion::numbers::fixed_point::implementations::fp8x23::math::trig::{PI, HALF_PI}; #[test] fn test_into() { - let a = FixedTrait::new_unscaled(5, false); + let a = FixedTrait::::new_unscaled(5, false); assert(a.mag == 5 * ONE, 'invalid result'); } #[test] fn test_try_into_u128() { // Positive unscaled - let a = FixedTrait::new_unscaled(5, false); + let a = FixedTrait::::new_unscaled(5, false); assert(a.try_into().unwrap() == 5_u128, 'invalid result'); // Positive scaled - let b = FixedTrait::new(5 * ONE, false); + let b = FixedTrait::::new(5 * ONE, false); assert(b.try_into().unwrap() == 5_u128, 'invalid result'); // Zero - let d = FixedTrait::new_unscaled(0, false); + let d = FixedTrait::::new_unscaled(0, false); assert(d.try_into().unwrap() == 0_u128, 'invalid result'); } #[test] #[should_panic] fn test_negative_try_into_u128() { - let a = FixedTrait::new_unscaled(1, true); + let a = FixedTrait::::new_unscaled(1, true); let a: u128 = a.try_into().unwrap(); } #[test] #[available_gas(1000000)] fn test_acos() { - let a = FixedTrait::ONE(); + let a = FixedTrait::::ONE(); assert(a.acos().into() == 0, 'invalid one'); } @@ -374,7 +376,7 @@ fn test_sqrt() { #[test] #[available_gas(100000)] fn test_msb() { - let a = FixedTrait::new_unscaled(100, false); + let a = FixedTrait::::new_unscaled(100, false); let (msb, div) = lut::msb(a.mag / ONE); assert(msb == 6, 'invalid msb'); assert(div == 64, 'invalid msb ceil'); @@ -473,7 +475,7 @@ fn test_add_eq() { let mut a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(2, false); a += b; - assert(a == FixedTrait::new_unscaled(3, false), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(3, false), 'invalid result'); } #[test] @@ -481,7 +483,7 @@ fn test_sub() { let a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, false); let c = a - b; - assert(c == FixedTrait::new_unscaled(3, false), 'false result invalid'); + assert(c == FixedTrait::::new_unscaled(3, false), 'false result invalid'); } #[test] @@ -489,14 +491,14 @@ fn test_sub_eq() { let mut a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, false); a -= b; - assert(a == FixedTrait::new_unscaled(3, false), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(3, false), 'invalid result'); } #[test] #[available_gas(100000)] fn test_mul_pos() { - let a = FixedType { mag: 24326963, sign: false }; - let b = FixedType { mag: 24326963, sign: false }; + let a = FP8x23 { mag: 24326963, sign: false }; + let b = FP8x23 { mag: 24326963, sign: false }; let c = a * b; assert(c.mag == 70548192, 'invalid result'); } @@ -506,7 +508,7 @@ fn test_mul_neg() { let a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, true); let c = a * b; - assert(c == FixedTrait::new_unscaled(10, true), 'invalid result'); + assert(c == FixedTrait::::new_unscaled(10, true), 'invalid result'); } #[test] @@ -514,13 +516,13 @@ fn test_mul_eq() { let mut a = FixedTrait::new_unscaled(5, false); let b = FixedTrait::new_unscaled(2, true); a *= b; - assert(a == FixedTrait::new_unscaled(10, true), 'invalid result'); + assert(a == FixedTrait::::new_unscaled(10, true), 'invalid result'); } #[test] fn test_div() { let a = FixedTrait::new_unscaled(10, false); - let b = FixedTrait::new(24326963, false); // 2.9 + let b = FixedTrait::::new(24326963, false); // 2.9 let c = a / b; assert(c.mag == 28926234, 'invalid pos decimal'); // 3.4482758620689653 } @@ -529,7 +531,7 @@ fn test_div() { fn test_le() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a <= a, 'a <= a'); assert(a <= b == false, 'a <= b'); @@ -548,7 +550,7 @@ fn test_le() { fn test_lt() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a < a == false, 'a < a'); assert(a < b == false, 'a < b'); @@ -567,7 +569,7 @@ fn test_lt() { fn test_ge() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a >= a, 'a >= a'); assert(a >= b, 'a >= b'); @@ -586,7 +588,7 @@ fn test_ge() { fn test_gt() { let a = FixedTrait::new_unscaled(1, false); let b = FixedTrait::new_unscaled(0, false); - let c = FixedTrait::new_unscaled(1, true); + let c = FixedTrait::::new_unscaled(1, true); assert(a > a == false, 'a > a'); assert(a > b, 'a > b'); @@ -604,7 +606,7 @@ fn test_gt() { #[test] #[available_gas(1000000)] fn test_cos() { - let a = FixedTrait::new(HALF_PI, false); + let a = FixedTrait::::new(HALF_PI, false); assert(a.cos().into() == 0, 'invalid half pi'); } @@ -618,6 +620,6 @@ fn test_sin() { #[test] #[available_gas(2000000)] fn test_tan() { - let a = FixedTrait::new(HALF_PI / 2, false); + let a = FixedTrait::::new(HALF_PI / 2, false); assert(a.tan().mag == 8388608, 'invalid quarter pi'); } diff --git a/src/numbers/fixed_point/implementations/fp8x23/math/hyp.cairo b/src/numbers/fixed_point/implementations/fp8x23/math/hyp.cairo index 1f87a235d..a81faf9c9 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/math/hyp.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/math/hyp.cairo @@ -1,43 +1,43 @@ use core::debug::PrintTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::{ - HALF, ONE, TWO, FixedType, FP8x23Impl, FP8x23Add, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, + HALF, ONE, TWO, FP8x23, FP8x23Impl, FP8x23Add, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, FP8x23TryIntoU128, FP8x23PartialEq, FP8x23PartialOrd, FP8x23SubEq, FP8x23Neg, FP8x23Div, FP8x23IntoFelt252, FixedTrait }; // Calculates hyperbolic cosine of a (fixed point) -fn cosh(a: FixedType) -> FixedType { +fn cosh(a: FP8x23) -> FP8x23 { let ea = a.exp(); return (ea + (FixedTrait::ONE() / ea)) / FixedTrait::new(TWO, false); } // Calculates hyperbolic sine of a (fixed point) -fn sinh(a: FixedType) -> FixedType { +fn sinh(a: FP8x23) -> FP8x23 { let ea = a.exp(); return (ea - (FixedTrait::ONE() / ea)) / FixedTrait::new(TWO, false); } // Calculates hyperbolic tangent of a (fixed point) -fn tanh(a: FixedType) -> FixedType { +fn tanh(a: FP8x23) -> FP8x23 { let ea = a.exp(); let ea_i = FixedTrait::ONE() / ea; return (ea - ea_i) / (ea + ea_i); } // Calculates inverse hyperbolic cosine of a (fixed point) -fn acosh(a: FixedType) -> FixedType { +fn acosh(a: FP8x23) -> FP8x23 { let root = (a * a - FixedTrait::ONE()).sqrt(); return (a + root).ln(); } // Calculates inverse hyperbolic sine of a (fixed point) -fn asinh(a: FixedType) -> FixedType { +fn asinh(a: FP8x23) -> FP8x23 { let root = (a * a + FixedTrait::ONE()).sqrt(); return (a + root).ln(); } // Calculates inverse hyperbolic tangent of a (fixed point) -fn atanh(a: FixedType) -> FixedType { +fn atanh(a: FP8x23) -> FP8x23 { let one = FixedTrait::ONE(); let ln_arg = (one + a) / (one - a); return ln_arg.ln() / FixedTrait::new(TWO, false); diff --git a/src/numbers/fixed_point/implementations/fp8x23/math/trig.cairo b/src/numbers/fixed_point/implementations/fp8x23/math/trig.cairo index 00ef22fa0..b998f1a4b 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/math/trig.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/math/trig.cairo @@ -4,8 +4,8 @@ use option::OptionTrait; use orion::numbers::fixed_point::implementations::fp8x23::math::lut; use orion::numbers::fixed_point::implementations::fp8x23::core::{ - HALF, ONE, TWO, FixedType, FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23Mul, FP8x23Div, FP8x23IntoFelt252, - FixedTrait + HALF, ONE, TWO, FP8x23, FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23Mul, FP8x23Div, + FP8x23IntoFelt252, FixedTrait }; // CONSTANTS @@ -18,7 +18,7 @@ const HALF_PI: u32 = 13176795; // Calculates arccos(a) for -1 <= a <= 1 (fixed point) // arccos(a) = arcsin(sqrt(1 - a^2)) - arctan identity has discontinuity at zero -fn acos(a: FixedType) -> FixedType { +fn acos(a: FP8x23) -> FP8x23 { let asin_arg = (FixedTrait::ONE() - a * a).sqrt(); // will fail if a > 1 let asin_res = asin(asin_arg); @@ -29,7 +29,7 @@ fn acos(a: FixedType) -> FixedType { } } -fn acos_fast(a: FixedType) -> FixedType { +fn acos_fast(a: FP8x23) -> FP8x23 { let asin_arg = (FixedTrait::ONE() - a * a).sqrt(); // will fail if a > 1 let asin_res = asin_fast(asin_arg); @@ -42,7 +42,7 @@ fn acos_fast(a: FixedType) -> FixedType { // Calculates arcsin(a) for -1 <= a <= 1 (fixed point) // arcsin(a) = arctan(a / sqrt(1 - a^2)) -fn asin(a: FixedType) -> FixedType { +fn asin(a: FP8x23) -> FP8x23 { if (a.mag == ONE) { return FixedTrait::new(HALF_PI, a.sign); } @@ -51,7 +51,7 @@ fn asin(a: FixedType) -> FixedType { return atan(a / div); } -fn asin_fast(a: FixedType) -> FixedType { +fn asin_fast(a: FP8x23) -> FP8x23 { if (a.mag == ONE) { return FixedTrait::new(HALF_PI, a.sign); } @@ -62,7 +62,7 @@ fn asin_fast(a: FixedType) -> FixedType { // Calculates arctan(a) (fixed point) // See https://stackoverflow.com/a/50894477 for range adjustments -fn atan(a: FixedType) -> FixedType { +fn atan(a: FP8x23) -> FP8x23 { let mut at = a.abs(); let mut shift = false; let mut invert = false; @@ -103,7 +103,7 @@ fn atan(a: FixedType) -> FixedType { return FixedTrait::new(res.mag, a.sign); } -fn atan_fast(a: FixedType) -> FixedType { +fn atan_fast(a: FP8x23) -> FP8x23 { let mut at = a.abs(); let mut shift = false; let mut invert = false; @@ -131,22 +131,22 @@ fn atan_fast(a: FixedType) -> FixedType { } if (invert) { - res = res - FixedTrait::new(HALF_PI, false); + res = res - FixedTrait::::new(HALF_PI, false); } return FixedTrait::new(res.mag, a.sign); } // Calculates cos(a) with a in radians (fixed point) -fn cos(a: FixedType) -> FixedType { +fn cos(a: FP8x23) -> FP8x23 { return sin(FixedTrait::new(HALF_PI, false) - a); } -fn cos_fast(a: FixedType) -> FixedType { +fn cos_fast(a: FP8x23) -> FP8x23 { return sin_fast(FixedTrait::new(HALF_PI, false) - a); } -fn sin(a: FixedType) -> FixedType { +fn sin(a: FP8x23) -> FP8x23 { let a1 = a.mag % TWO_PI; let (whole_rem, partial_rem) = u32_safe_divmod(a1, u32_as_non_zero(PI)); let a2 = FixedTrait::new(partial_rem, false); @@ -156,7 +156,7 @@ fn sin(a: FixedType) -> FixedType { return FixedTrait::new(loop_res.mag, a.sign ^ partial_sign && loop_res.mag != 0); } -fn sin_fast(a: FixedType) -> FixedType { +fn sin_fast(a: FP8x23) -> FP8x23 { let a1 = a.mag % TWO_PI; let (whole_rem, mut partial_rem) = u32_safe_divmod(a1, u32_as_non_zero(PI)); let partial_sign = whole_rem == 1; @@ -168,20 +168,20 @@ fn sin_fast(a: FixedType) -> FixedType { let (start, low, high) = lut::sin(partial_rem); let partial_step = FixedTrait::new(partial_rem - start, false) / FixedTrait::new(51472, false); let res = partial_step * (FixedTrait::new(high, false) - FixedTrait::new(low, false)) - + FixedTrait::new(low, false); + + FixedTrait::::new(low, false); return FixedTrait::new(res.mag, a.sign ^ partial_sign && res.mag != 0); } // Calculates tan(a) with a in radians (fixed point) -fn tan(a: FixedType) -> FixedType { +fn tan(a: FP8x23) -> FP8x23 { let sinx = sin(a); let cosx = cos(a); assert(cosx.mag != 0, 'tan undefined'); return sinx / cosx; } -fn tan_fast(a: FixedType) -> FixedType { +fn tan_fast(a: FP8x23) -> FP8x23 { let sinx = sin_fast(a); let cosx = cos_fast(a); assert(cosx.mag != 0, 'tan undefined'); @@ -189,7 +189,7 @@ fn tan_fast(a: FixedType) -> FixedType { } // Helper function to calculate Taylor series for sin -fn _sin_loop(a: FixedType, i: u32, acc: FixedType) -> FixedType { +fn _sin_loop(a: FP8x23, i: u32, acc: FP8x23) -> FP8x23 { let div = (2 * i + 2) * (2 * i + 3); let term = a * a * acc / FixedTrait::new_unscaled(div, false); let new_acc = FixedTrait::ONE() - term; @@ -205,7 +205,9 @@ fn _sin_loop(a: FixedType, i: u32, acc: FixedType) -> FixedType { use traits::Into; -use orion::numbers::fixed_point::implementations::fp8x23::helpers::{assert_precise, assert_relative}; +use orion::numbers::fixed_point::implementations::fp8x23::helpers::{ + assert_precise, assert_relative +}; #[test] #[available_gas(3000000)] diff --git a/src/numbers/signed_integer/i8.cairo b/src/numbers/signed_integer/i8.cairo index b858991f0..3c5fc83e4 100644 --- a/src/numbers/signed_integer/i8.cairo +++ b/src/numbers/signed_integer/i8.cairo @@ -2,9 +2,9 @@ use traits::Into; use orion::numbers::signed_integer::integer_trait::IntegerTrait; use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::ONE as ONE_fp8x23; -use orion::numbers::fixed_point::implementations::fp16x16::core::ONE as ONE_fp16x16; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; +use orion::numbers::fixed_point::implementations::fp8x23::core::{ONE as ONE_fp8x23, FP8x23}; +use orion::numbers::fixed_point::implementations::fp16x16::core::{ONE as ONE_fp16x16, FP16x16}; +use orion::numbers::fixed_point::core::FixedTrait; // ====================== INT 8 ====================== @@ -170,15 +170,15 @@ impl I8IntoI32 of Into { } // Implements the Into trait for i8 to fp_8x23. -impl I8IntoFP8x23 of Into { - fn into(self: i8) -> FixedType { +impl I8IntoFP8x23 of Into { + fn into(self: i8) -> FP8x23 { i8_to_fp8x23(self) } } // Implements the Into trait for i8 to fp_16x16. -impl I8IntoFP16x16 of Into { - fn into(self: i8) -> FixedType { +impl I8IntoFP16x16 of Into { + fn into(self: i8) -> FP16x16 { i8_to_fp16x16(self) } } @@ -495,12 +495,12 @@ fn i8_to_i32(x: i8) -> i32 { i32 { mag: x.mag.into(), sign: x.sign } } -fn i8_to_fp8x23(x: i8) -> FixedType { - FixedType { mag: x.mag.into() * ONE_fp8x23, sign: x.sign } +fn i8_to_fp8x23(x: i8) -> FP8x23 { + FP8x23 { mag: x.mag.into() * ONE_fp8x23, sign: x.sign } } -fn i8_to_fp16x16(x: i8) -> FixedType { - FixedType { mag: x.mag.into() * ONE_fp16x16, sign: x.sign } +fn i8_to_fp16x16(x: i8) -> FP16x16 { + FP16x16 { mag: x.mag.into() * ONE_fp16x16, sign: x.sign } } fn ensure_non_negative_zero(mag: u8, sign: bool) -> i8 { diff --git a/src/operators/tensor/implementations/impl_tensor_fp.cairo b/src/operators/tensor/implementations/impl_tensor_fp.cairo index 21d4a8ded..fa761a7c8 100644 --- a/src/operators/tensor/implementations/impl_tensor_fp.cairo +++ b/src/operators/tensor/implementations/impl_tensor_fp.cairo @@ -10,12 +10,13 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; + +use orion::operators::tensor::math; use orion::operators::tensor::math::min::min_fp::core::min_in_tensor; use orion::operators::tensor::math::max::max_fp::core::max_in_tensor; use orion::operators::tensor::math::equal::equal_fp::core::equal; use orion::operators::tensor::math::less::less_fp::core::less; use orion::operators::tensor::math::less_equal::less_equal_fp::core::less_equal; -use orion::operators::tensor::math::abs::abs_fp::core::abs; use orion::operators::tensor::math::ceil::ceil_fp::core::ceil; use orion::operators::tensor::math::reduce_sum::reduce_sum_fp::core::reduce_sum; use orion::operators::tensor::math::argmax::argmax_fp::core::argmax; @@ -140,7 +141,7 @@ impl Tensor_fp of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - abs(*self).unwrap() + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/impl_tensor_i32.cairo b/src/operators/tensor/implementations/impl_tensor_i32.cairo index 82e368956..300210f5c 100644 --- a/src/operators/tensor/implementations/impl_tensor_i32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i32.cairo @@ -11,6 +11,8 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; + +use orion::operators::tensor::math; use orion::operators::tensor::math::min::min_i32::min_in_tensor; use orion::operators::tensor::math::max::max_i32::max_in_tensor; use orion::operators::tensor::math::reduce_sum::reduce_sum_i32::reduce_sum; @@ -21,7 +23,6 @@ use orion::operators::tensor::math::greater::greater_i32::greater; use orion::operators::tensor::math::greater_equal::greater_equal_i32::greater_equal; use orion::operators::tensor::math::less::less_i32::less; use orion::operators::tensor::math::less_equal::less_equal_i32::less_equal; -use orion::operators::tensor::math::abs::abs_i32::abs; use orion::operators::tensor::linalg::matmul::matmul_i32::matmul; use orion::operators::tensor::linalg::transpose::transpose_i32::transpose; use orion::operators::tensor::math::exp::exp_i32::core::exp_i32; @@ -130,7 +131,7 @@ impl Tensor_i32 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - abs(*self) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/impl_tensor_i8.cairo b/src/operators/tensor/implementations/impl_tensor_i8.cairo index 8df3c9d13..c26fc51b7 100644 --- a/src/operators/tensor/implementations/impl_tensor_i8.cairo +++ b/src/operators/tensor/implementations/impl_tensor_i8.cairo @@ -14,6 +14,8 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; + +use orion::operators::tensor::math; use orion::operators::tensor::math::min::min_i8::min_in_tensor; use orion::operators::tensor::math::max::max_i8::max_in_tensor; use orion::operators::tensor::math::reduce_sum::reduce_sum_i8::reduce_sum; @@ -24,7 +26,6 @@ use orion::operators::tensor::math::greater::greater_i8::greater; use orion::operators::tensor::math::greater_equal::greater_equal_i8::greater_equal; use orion::operators::tensor::math::less::less_i8::less; use orion::operators::tensor::math::less_equal::less_equal_i8::less_equal; -use orion::operators::tensor::math::abs::abs_i8::abs; use orion::operators::tensor::linalg::matmul::matmul_i8::matmul; use orion::operators::tensor::linalg::transpose::transpose_i8::transpose; use orion::operators::tensor::math::exp::exp_i8::core::exp_i8; @@ -133,7 +134,7 @@ impl Tensor_i8 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - abs(*self) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/impl_tensor_u32.cairo b/src/operators/tensor/implementations/impl_tensor_u32.cairo index 5dcbe14c0..4bf17fc4c 100644 --- a/src/operators/tensor/implementations/impl_tensor_u32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_u32.cairo @@ -10,6 +10,8 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ExtraParams, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; + +use orion::operators::tensor::math; use orion::operators::tensor::math::min::min_u32::min_in_tensor; use orion::operators::tensor::math::max::max_u32::max_in_tensor; use orion::operators::tensor::math::reduce_sum::reduce_sum_u32::reduce_sum; @@ -21,7 +23,6 @@ use orion::operators::tensor::math::greater::greater_u32::greater; use orion::operators::tensor::math::greater_equal::greater_equal_u32::greater_equal; use orion::operators::tensor::math::less::less_u32::less; use orion::operators::tensor::math::less_equal::less_equal_u32::less_equal; -use orion::operators::tensor::math::abs::abs_u32::abs; use orion::operators::tensor::linalg::transpose::transpose_u32::transpose; use orion::operators::tensor::math::exp::exp_u32::core::exp_u32; use orion::operators::tensor::math::log::log_u32::core::log_u32; @@ -130,7 +131,7 @@ impl Tensor_u32 of TensorTrait { fn abs(self: @Tensor) -> Tensor { - abs(self) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math/abs.cairo b/src/operators/tensor/math/abs.cairo index d56ebb732..aa0f4cc1d 100644 --- a/src/operators/tensor/math/abs.cairo +++ b/src/operators/tensor/math/abs.cairo @@ -1,4 +1,31 @@ -mod abs_i8; -mod abs_i32; -mod abs_u32; -mod abs_fp; \ No newline at end of file +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::abs docstring +fn abs< + T, + impl TTensor: TensorTrait, + impl TNumberTrait: NumberTrait, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + loop { + match z.data.pop_front() { + Option::Some(item) => { + data_result.append((*item).abs()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::::new(z.shape, data_result.span(), z.extra); +} diff --git a/src/operators/tensor/math/abs/abs_fp.cairo b/src/operators/tensor/math/abs/abs_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/abs/abs_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/abs/abs_fp/core.cairo b/src/operators/tensor/math/abs/abs_fp/core.cairo deleted file mode 100644 index b30f1c412..000000000 --- a/src/operators/tensor/math/abs/abs_fp/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::math::abs::abs_fp::fp8x23; -use orion::operators::tensor::math::abs::abs_fp::fp16x16; - - -/// Cf: TensorTrait::abs docstring -fn abs(z: Tensor) -> Option> { - match z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::abs(z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::abs(z)), - }, - Option::None(_) => Option::Some(fp16x16::abs(z)), - }, - Option::None(_) => Option::Some(fp16x16::abs(z)), - } -} diff --git a/src/operators/tensor/math/abs/abs_fp/fp16x16.cairo b/src/operators/tensor/math/abs/abs_fp/fp16x16.cairo deleted file mode 100644 index 522ad6914..000000000 --- a/src/operators/tensor/math/abs/abs_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::abs docstring -fn abs(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).abs()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/tensor/math/abs/abs_fp/fp8x23.cairo b/src/operators/tensor/math/abs/abs_fp/fp8x23.cairo deleted file mode 100644 index ca4cd8c60..000000000 --- a/src/operators/tensor/math/abs/abs_fp/fp8x23.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::abs docstring -fn abs(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).abs()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/tensor/math/abs/abs_i32.cairo b/src/operators/tensor/math/abs/abs_i32.cairo deleted file mode 100644 index e7cf77f13..000000000 --- a/src/operators/tensor/math/abs/abs_i32.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::abs docstring -fn abs(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).abs()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/tensor/math/abs/abs_i8.cairo b/src/operators/tensor/math/abs/abs_i8.cairo deleted file mode 100644 index 1ab947f45..000000000 --- a/src/operators/tensor/math/abs/abs_i8.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::abs docstring -fn abs(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).abs()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/tensor/math/abs/abs_u32.cairo b/src/operators/tensor/math/abs/abs_u32.cairo deleted file mode 100644 index 36046410e..000000000 --- a/src/operators/tensor/math/abs/abs_u32.cairo +++ /dev/null @@ -1,6 +0,0 @@ -use orion::operators::tensor::core::Tensor; - -/// Cf: TensorTrait::abs docstring -fn abs(z: @Tensor) -> Tensor { - return *z; -} From 3e84272041ea3f587741232bf1de2a1768a47021 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 14:26:38 +0300 Subject: [PATCH 012/179] update utils --- src/lib.cairo | 2 +- src/utils.cairo | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib.cairo b/src/lib.cairo index 07d46ec00..78e5c1549 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -2,5 +2,5 @@ // mod operators; mod numbers; // mod tests; -// mod utils; +mod utils; diff --git a/src/utils.cairo b/src/utils.cairo index fde3b88c5..b8062f733 100644 --- a/src/utils.cairo +++ b/src/utils.cairo @@ -3,11 +3,6 @@ use option::OptionTrait; use array::ArrayTrait; use array::SpanTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, ONE as ONE_8x23}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, ONE as ONE_16x16}; - fn u32_max(a: u32, b: u32) -> u32 { if a > b { a From fcd501a0d6401d0339707c60db3324aca2066dee Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 14:45:47 +0300 Subject: [PATCH 013/179] add generic FixedPoint into TensorTrait --- src/lib.cairo | 2 +- src/operators.cairo | 2 +- src/operators/tensor.cairo | 6 +++--- src/operators/tensor/core.cairo | 34 ++++++++++++++++----------------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/lib.cairo b/src/lib.cairo index 78e5c1549..b5e8d7e19 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,5 +1,5 @@ // mod performance; -// mod operators; +mod operators; mod numbers; // mod tests; mod utils; diff --git a/src/operators.cairo b/src/operators.cairo index 989bc1209..d1bf082ac 100644 --- a/src/operators.cairo +++ b/src/operators.cairo @@ -1,3 +1,3 @@ mod tensor; -mod nn; +// mod nn; diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 3a2e5fc9b..8d108e711 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -1,5 +1,5 @@ mod core; mod helpers; -mod math; -mod linalg; -mod implementations; +// mod math; +// mod linalg; +// mod implementations; diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index a238591a6..d27a53b46 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -4,7 +4,7 @@ use option::OptionTrait; use orion::operators::tensor::helpers::{len_from_shape, check_shape}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; +use orion::numbers::fixed_point::core::{FixedImpl}; #[derive(Copy, Drop)] struct Tensor { @@ -77,7 +77,7 @@ impl TensorSerde, impl TDrop: Drop> of Serde { +trait TensorTrait { /// # tensor.new /// /// ```rust @@ -900,7 +900,7 @@ trait TensorTrait { /// // [[1, 2.718281],[7.38905, 20.085536]] /// ``` /// - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; /// # tensor.log /// /// ```rust @@ -945,7 +945,7 @@ trait TensorTrait { /// /// [[0, 0.693147, 1.098612, 4.605170]] /// ``` /// - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; /// #tensor.equal /// /// ```rust @@ -1489,7 +1489,7 @@ trait TensorTrait { /// // [0,0.8414...,0.9092...] /// ``` /// - fn sin(self: @Tensor) -> Tensor; + fn sin(self: @Tensor) -> Tensor; /// #tensor.cos /// /// ```rust @@ -1538,7 +1538,7 @@ trait TensorTrait { /// // [1, 0.5403...,-0.4161] /// ``` /// - fn cos(self: @Tensor) -> Tensor; + fn cos(self: @Tensor) -> Tensor; /// # tensor.cumsum /// /// ```rust @@ -1780,7 +1780,7 @@ trait TensorTrait { /// // [[0, 1.175201],[3.62686, 10.0178749]] /// ``` /// - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; /// # tensor.tanh /// /// ```rust @@ -1830,7 +1830,7 @@ trait TensorTrait { /// // [[0, 0.761594],[0.96403, 0.9951]] /// ``` /// - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; /// # tensor.cosh /// /// ```rust @@ -1880,7 +1880,7 @@ trait TensorTrait { /// // [[, 1.54308],[3.762196, 10.067662]] /// ``` /// - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; /// # tensor.asinh /// /// ```rust @@ -1930,7 +1930,7 @@ trait TensorTrait { /// // [[0, 0.8814],[1.44364, 1.8185]] /// ``` /// - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; /// # tensor.acosh /// /// ```rust @@ -1980,7 +1980,7 @@ trait TensorTrait { /// // [[0, 1.31696],[1.76275, 2.06344]] /// ``` /// - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; /// #tensor.atan /// /// ```rust @@ -2028,7 +2028,7 @@ trait TensorTrait { /// // [0,0.7853...,1.1071...] /// ``` /// - fn atan(self: @Tensor) -> Tensor; + fn atan(self: @Tensor) -> Tensor; /// #tensor.asin /// /// ```rust @@ -2075,7 +2075,7 @@ trait TensorTrait { /// // [0, 1.5707...] /// ``` /// - fn asin(self: @Tensor) -> Tensor; + fn asin(self: @Tensor) -> Tensor; /// #tensor.or /// /// ```rust @@ -2284,7 +2284,7 @@ trait TensorTrait { /// // [1.5707..., 0] /// ``` /// - fn acos(self: @Tensor) -> Tensor; + fn acos(self: @Tensor) -> Tensor; /// # tensor.onehot /// /// ```rust @@ -2385,7 +2385,7 @@ trait TensorTrait { /// // [0,1,1.4142...] /// ``` /// - fn sqrt(self: @Tensor) -> Tensor; + fn sqrt(self: @Tensor) -> Tensor; /// # tensor.concat /// /// ```rust @@ -2449,7 +2449,7 @@ trait TensorTrait { /// >>> (2, 4 ) /// ``` /// - fn concat(tensors: Span>, axis: usize, ) -> Tensor; + fn concat(tensors: Span>, axis: usize,) -> Tensor; } @@ -2548,7 +2548,7 @@ fn at_tensor(self: @Tensor, indices: Span) -> @T { } // Return true if two tensor are equal -fn tensor_eq>(mut lhs: Tensor, mut rhs: Tensor, ) -> bool { +fn tensor_eq>(mut lhs: Tensor, mut rhs: Tensor,) -> bool { let mut is_eq = true; loop { From a02df80fb2c8b99c646320c4d4da04317c57a438 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 15:35:48 +0300 Subject: [PATCH 014/179] add generic min max tensor --- src/numbers.cairo | 144 ++++++++++++ .../implementations/fp16x16/math/core.cairo | 2 +- .../implementations/fp8x23/math/core.cairo | 2 +- src/operators/tensor.cairo | 2 +- src/operators/tensor/implementations.cairo | 8 +- .../implementations/impl_tensor_u32.cairo | 206 ++++++++++++++++-- src/operators/tensor/math.cairo | 58 ++--- src/operators/tensor/math/max.cairo | 37 +++- src/operators/tensor/math/max/max_fp.cairo | 3 - .../tensor/math/max/max_fp/core.cairo | 18 -- .../tensor/math/max/max_fp/fp16x16.cairo | 31 --- .../tensor/math/max/max_fp/fp8x23.cairo | 28 --- src/operators/tensor/math/max/max_i32.cairo | 26 --- src/operators/tensor/math/max/max_i8.cairo | 26 --- src/operators/tensor/math/max/max_u32.cairo | 23 -- src/operators/tensor/math/min.cairo | 37 +++- src/operators/tensor/math/min/min_fp.cairo | 3 - .../tensor/math/min/min_fp/core.cairo | 18 -- .../tensor/math/min/min_fp/fp16x16.cairo | 30 --- .../tensor/math/min/min_fp/fp8x23.cairo | 28 --- src/operators/tensor/math/min/min_i32.cairo | 27 --- src/operators/tensor/math/min/min_i8.cairo | 26 --- src/operators/tensor/math/min/min_u32.cairo | 25 --- src/operators/tensor/math/reduce_sum.cairo | 4 - 24 files changed, 433 insertions(+), 379 deletions(-) delete mode 100644 src/operators/tensor/math/max/max_fp.cairo delete mode 100644 src/operators/tensor/math/max/max_fp/core.cairo delete mode 100644 src/operators/tensor/math/max/max_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/max/max_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/max/max_i32.cairo delete mode 100644 src/operators/tensor/math/max/max_i8.cairo delete mode 100644 src/operators/tensor/math/max/max_u32.cairo delete mode 100644 src/operators/tensor/math/min/min_fp.cairo delete mode 100644 src/operators/tensor/math/min/min_fp/core.cairo delete mode 100644 src/operators/tensor/math/min/min_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/min/min_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/min/min_i32.cairo delete mode 100644 src/operators/tensor/math/min/min_i8.cairo delete mode 100644 src/operators/tensor/math/min/min_u32.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 16b24af48..6156ed876 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -10,10 +10,17 @@ trait NumberTrait { fn is_one(self: T) -> bool; fn abs(self: T) -> T; + + fn min_value() -> T; + fn max_value() -> T; + + fn min(self: T, other: T) -> T; + fn max(self: T, other: T) -> T; } use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23}; use orion::numbers::fixed_point::implementations::fp8x23::math::core as core_fp8x23; +use orion::numbers::fixed_point::implementations::fp8x23::math::comp as comp_fp8x23; impl FP8x23Number of NumberTrait { fn zero() -> FP8x23 { @@ -33,10 +40,27 @@ impl FP8x23Number of NumberTrait { fn abs(self: FP8x23) -> FP8x23 { core_fp8x23::abs(self) } + + fn min_value() -> FP8x23 { + FP8x23 { mag: core_fp8x23::MAX, sign: true } + } + + fn max_value() -> FP8x23 { + FP8x23 { mag: core_fp8x23::MAX, sign: false } + } + + fn min(self: FP8x23, other: FP8x23) -> FP8x23 { + comp_fp8x23::min(self, other) + } + + fn max(self: FP8x23, other: FP8x23) -> FP8x23 { + comp_fp8x23::max(self, other) + } } use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16}; use orion::numbers::fixed_point::implementations::fp16x16::math::core as core_fp16x16; +use orion::numbers::fixed_point::implementations::fp16x16::math::comp as comp_fp16x16; impl FP16x16Number of NumberTrait { fn zero() -> FP16x16 { @@ -56,6 +80,22 @@ impl FP16x16Number of NumberTrait { fn abs(self: FP16x16) -> FP16x16 { core_fp16x16::abs(self) } + + fn min_value() -> FP16x16 { + FP16x16 { mag: core_fp16x16::MAX, sign: true } + } + + fn max_value() -> FP16x16 { + FP16x16 { mag: core_fp16x16::MAX, sign: false } + } + + fn min(self: FP16x16, other: FP16x16) -> FP16x16 { + comp_fp16x16::min(self, other) + } + + fn max(self: FP16x16, other: FP16x16) -> FP16x16 { + comp_fp16x16::max(self, other) + } } use orion::numbers::signed_integer::i8 as i8_core; @@ -79,6 +119,22 @@ impl I8Number of NumberTrait { fn abs(self: i8) -> i8 { i8_core::i8_abs(self) } + + fn min_value() -> i8 { + i8 { mag: 128, sign: true } + } + + fn max_value() -> i8 { + i8 { mag: 127, sign: false } + } + + fn min(self: i8, other: i8) -> i8 { + i8_core::i8_min(self, other) + } + + fn max(self: i8, other: i8) -> i8 { + i8_core::i8_max(self, other) + } } use orion::numbers::signed_integer::i16 as i16_core; @@ -102,6 +158,22 @@ impl i16Number of NumberTrait { fn abs(self: i16) -> i16 { i16_core::i16_abs(self) } + + fn min_value() -> i16 { + i16 { mag: 32768, sign: true } + } + + fn max_value() -> i16 { + i16 { mag: 32767, sign: false } + } + + fn min(self: i16, other: i16) -> i16 { + i16_core::i16_min(self, other) + } + + fn max(self: i16, other: i16) -> i16 { + i16_core::i16_max(self, other) + } } use orion::numbers::signed_integer::i32 as i32_core; @@ -125,6 +197,22 @@ impl i32Number of NumberTrait { fn abs(self: i32) -> i32 { i32_core::i32_abs(self) } + + fn min_value() -> i32 { + i32 { mag: 2147483648, sign: true } + } + + fn max_value() -> i32 { + i32 { mag: 2147483647, sign: false } + } + + fn min(self: i32, other: i32) -> i32 { + i32_core::i32_min(self, other) + } + + fn max(self: i32, other: i32) -> i32 { + i32_core::i32_max(self, other) + } } use orion::numbers::signed_integer::i64 as i64_core; @@ -148,6 +236,22 @@ impl i64Number of NumberTrait { fn abs(self: i64) -> i64 { i64_core::i64_abs(self) } + + fn min_value() -> i64 { + i64 { mag: 9223372036854775808, sign: true } + } + + fn max_value() -> i64 { + i64 { mag: 9223372036854775807, sign: false } + } + + fn min(self: i64, other: i64) -> i64 { + i64_core::i64_min(self, other) + } + + fn max(self: i64, other: i64) -> i64 { + i64_core::i64_max(self, other) + } } use orion::numbers::signed_integer::i128 as i128_core; @@ -171,6 +275,22 @@ impl i128Number of NumberTrait { fn abs(self: i128) -> i128 { i128_core::i128_abs(self) } + + fn min_value() -> i128 { + i128 { mag: 170141183460469231731687303715884105728, sign: true } + } + + fn max_value() -> i128 { + i128 { mag: 170141183460469231731687303715884105727, sign: false } + } + + fn min(self: i128, other: i128) -> i128 { + i128_core::i128_min(self, other) + } + + fn max(self: i128, other: i128) -> i128 { + i128_core::i128_max(self, other) + } } impl u32Number of NumberTrait { @@ -191,4 +311,28 @@ impl u32Number of NumberTrait { fn abs(self: u32) -> u32 { self } + + fn min_value() -> u32 { + 0 + } + + fn max_value() -> u32 { + 4294967295 + } + + fn min(self: u32, other: u32) -> u32 { + if self < other { + return self; + } else { + other + } + } + + fn max(self: u32, other: u32) -> u32 { + if self > other { + return self; + } else { + other + } + } } diff --git a/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo index 1944a0744..db517475c 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/math/core.cairo @@ -5,7 +5,7 @@ use traits::{Into, TryInto}; use integer::{u32_safe_divmod, u32_as_non_zero, u32_wide_mul}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - HALF, ONE, FP16x16, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, + HALF, ONE, MAX, FP16x16, FP16x16Impl, FP16x16Add, FP16x16AddEq, FP16x16Sub, FP16x16Mul, FP16x16MulEq, FP16x16TryIntoU128, FP16x16PartialEq, FP16x16PartialOrd, FP16x16SubEq, FP16x16Neg, FP16x16Div, FP16x16IntoFelt252, FixedTrait }; diff --git a/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo index dd44b5c10..82bfda0b9 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/math/core.cairo @@ -5,7 +5,7 @@ use traits::{Into, TryInto}; use integer::{u32_safe_divmod, u32_as_non_zero, u32_wide_mul}; use orion::numbers::fixed_point::implementations::fp8x23::core::{ - HALF, ONE, FP8x23, FP8x23Add, FP8x23Impl, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, + HALF, ONE, MAX, FP8x23, FP8x23Add, FP8x23Impl, FP8x23AddEq, FP8x23Sub, FP8x23Mul, FP8x23MulEq, FP8x23TryIntoU128, FP8x23PartialEq, FP8x23PartialOrd, FP8x23SubEq, FP8x23Neg, FP8x23Div, FP8x23IntoFelt252, FixedTrait }; diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 8d108e711..c3295fad4 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -1,5 +1,5 @@ mod core; mod helpers; -// mod math; +mod math; // mod linalg; // mod implementations; diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index 821646433..650e15d54 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -1,4 +1,4 @@ -mod impl_tensor_fp; -mod impl_tensor_i32; -mod impl_tensor_u32; -mod impl_tensor_i8; +// mod impl_tensor_fp; +// mod impl_tensor_i32; +// mod impl_tensor_u32; +// mod impl_tensor_i8; diff --git a/src/operators/tensor/implementations/impl_tensor_u32.cairo b/src/operators/tensor/implementations/impl_tensor_u32.cairo index 4bf17fc4c..4442cd35e 100644 --- a/src/operators/tensor/implementations/impl_tensor_u32.cairo +++ b/src/operators/tensor/implementations/impl_tensor_u32.cairo @@ -4,7 +4,8 @@ use array::ArrayTrait; use array::SpanTrait; use core::option::OptionTrait; -use orion::numbers::fixed_point::core::FixedType; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ExtraParams, ravel_index, unravel_index, reshape, @@ -44,7 +45,7 @@ use orion::operators::tensor::math::sqrt::sqrt_u32::core::sqrt_u32; use orion::operators::tensor::math::concat::concat_u32::concat_u32; -impl Tensor_u32 of TensorTrait { +impl Tensor_u32_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { new_tensor(shape, data, extra) } @@ -101,11 +102,11 @@ impl Tensor_u32 of TensorTrait { matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { + fn exp(self: @Tensor) -> Tensor { exp_u32(self).unwrap() } - fn log(self: @Tensor) -> Tensor { + fn log(self: @Tensor) -> Tensor { log_u32(self).unwrap() } @@ -138,15 +139,15 @@ impl Tensor_u32 of TensorTrait { panic(array!['not supported with u32']) } - fn sin(self: @Tensor) -> Tensor { + fn sin(self: @Tensor) -> Tensor { sin_u32(self).unwrap() } - fn cos(self: @Tensor) -> Tensor { + fn cos(self: @Tensor) -> Tensor { cos_u32(self).unwrap() } - fn asin(self: @Tensor) -> Tensor { + fn asin(self: @Tensor) -> Tensor { panic(array!['not supported with u32']) } @@ -160,31 +161,31 @@ impl Tensor_u32 of TensorTrait { flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { + fn sinh(self: @Tensor) -> Tensor { sinh_u32(self).unwrap() } - fn tanh(self: @Tensor) -> Tensor { + fn tanh(self: @Tensor) -> Tensor { tanh_u32(self).unwrap() } - fn cosh(self: @Tensor) -> Tensor { + fn cosh(self: @Tensor) -> Tensor { cosh_u32(self).unwrap() } - fn acosh(self: @Tensor) -> Tensor { + fn acosh(self: @Tensor) -> Tensor { acosh_u32(self).unwrap() } - fn asinh(self: @Tensor) -> Tensor { + fn asinh(self: @Tensor) -> Tensor { asinh_u32(self).unwrap() } - fn atan(self: @Tensor) -> Tensor { + fn atan(self: @Tensor) -> Tensor { atan_u32(self).unwrap() } - fn acos(self: @Tensor) -> Tensor { + fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with u32']) } @@ -202,13 +203,180 @@ impl Tensor_u32 of TensorTrait { onehot(self, depth, axis, values) } - fn sqrt(self: @Tensor) -> Tensor { + fn sqrt(self: @Tensor) -> Tensor { sqrt_u32(self).unwrap() - } + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + concat_u32(tensors, axis) + } +} + +impl Tensor_u32_fp16x16 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> u32 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> u32 { + min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> u32 { + max_in_tensor(*self.data) + } - fn concat( tensors: Span>, axis: usize, ) -> Tensor { - concat_u32(tensors, axis) - } + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + argmax(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + argmin(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + exp_u32(self).unwrap() + } + + fn log(self: @Tensor) -> Tensor { + log_u32(self).unwrap() + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + less_equal(self, other) + } + + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn sin(self: @Tensor) -> Tensor { + sin_u32(self).unwrap() + } + + fn cos(self: @Tensor) -> Tensor { + cos_u32(self).unwrap() + } + + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + sinh_u32(self).unwrap() + } + + fn tanh(self: @Tensor) -> Tensor { + tanh_u32(self).unwrap() + } + + fn cosh(self: @Tensor) -> Tensor { + cosh_u32(self).unwrap() + } + + fn acosh(self: @Tensor) -> Tensor { + acosh_u32(self).unwrap() + } + + fn asinh(self: @Tensor) -> Tensor { + asinh_u32(self).unwrap() + } + + fn atan(self: @Tensor) -> Tensor { + atan_u32(self).unwrap() + } + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + or(self, other) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + sqrt_u32(self).unwrap() + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + concat_u32(tensors, axis) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 428c00880..c0b4d6572 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -1,32 +1,32 @@ mod min; mod max; mod reduce_sum; -mod argmax; -mod argmin; -mod exp; -mod log; -mod arithmetic; -mod equal; -mod greater; -mod greater_equal; -mod less; -mod less_equal; -mod abs; -mod ceil; -mod sin; -mod cos; -mod asin; -mod cumsum; -mod flatten; -mod sinh; -mod tanh; -mod cosh; -mod acosh; -mod asinh; -mod atan; -mod xor; -mod or; -mod acos; -mod onehot; -mod sqrt; -mod concat; +// mod argmax; +// mod argmin; +// mod exp; +// mod log; +// mod arithmetic; +// mod equal; +// mod greater; +// mod greater_equal; +// mod less; +// mod less_equal; +// mod abs; +// mod ceil; +// mod sin; +// mod cos; +// mod asin; +// mod cumsum; +// mod flatten; +// mod sinh; +// mod tanh; +// mod cosh; +// mod acosh; +// mod asinh; +// mod atan; +// mod xor; +// mod or; +// mod acos; +// mod onehot; +// mod sqrt; +// mod concat; diff --git a/src/operators/tensor/math/max.cairo b/src/operators/tensor/math/max.cairo index 9d3205543..1bdd75789 100644 --- a/src/operators/tensor/math/max.cairo +++ b/src/operators/tensor/math/max.cairo @@ -1,4 +1,33 @@ -mod max_i8; -mod max_i32; -mod max_u32; -mod max_fp; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::max docstring +fn max_in_tensor< + T, + impl TNumber: NumberTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut vec: Span:: +) -> T { + let mut max_value: T = NumberTrait::min_value(); + + loop { + match vec.pop_front() { + Option::Some(item) => { + let check_max = max_value.max(*item); + if (max_value < check_max) { + max_value = check_max; + } + }, + Option::None(_) => { + break; + } + }; + }; + + return max_value; +} diff --git a/src/operators/tensor/math/max/max_fp.cairo b/src/operators/tensor/math/max/max_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/max/max_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/max/max_fp/core.cairo b/src/operators/tensor/math/max/max_fp/core.cairo deleted file mode 100644 index e98b0038a..000000000 --- a/src/operators/tensor/math/max/max_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::ExtraParams; -use orion::operators::tensor::math::max::max_fp::fp8x23; -use orion::operators::tensor::math::max::max_fp::fp16x16; - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::, extra: Option) -> Option { - match extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::max_in_tensor(vec)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::max_in_tensor(vec)), - }, - Option::None(_) => Option::Some(fp16x16::max_in_tensor(vec)), - }, - Option::None(_) => Option::Some(fp16x16::max_in_tensor(vec)), - } -} diff --git a/src/operators/tensor/math/max/max_fp/fp16x16.cairo b/src/operators/tensor/math/max/max_fp/fp16x16.cairo deleted file mode 100644 index 74c5c4b20..000000000 --- a/src/operators/tensor/math/max/max_fp/fp16x16.cairo +++ /dev/null @@ -1,31 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, MAX, FP16x16PartialOrd -}; -use orion::numbers::fixed_point::implementations::fp16x16::math::comp::max; - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::) -> FixedType { - let mut max_value: FixedType = FixedTrait::new(MAX, true); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_max = max(max_value, *item); - if (max_value < check_max) { - max_value = check_max; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return max_value; -} - - diff --git a/src/operators/tensor/math/max/max_fp/fp8x23.cairo b/src/operators/tensor/math/max/max_fp/fp8x23.cairo deleted file mode 100644 index 937fce55b..000000000 --- a/src/operators/tensor/math/max/max_fp/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, MAX, FP8x23PartialOrd}; -use orion::numbers::fixed_point::implementations::fp8x23::math::comp::max; - - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::) -> FixedType { - let mut max_value: FixedType = FixedTrait::new(MAX, true); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_max = max(max_value, *item); - if (max_value < check_max) { - max_value = check_max; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return max_value; -} diff --git a/src/operators/tensor/math/max/max_i32.cairo b/src/operators/tensor/math/max/max_i32.cairo deleted file mode 100644 index 0812544c6..000000000 --- a/src/operators/tensor/math/max/max_i32.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::) -> i32 { - let mut max_value: i32 = IntegerTrait::new(2147483647, true); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_max = max_value.max(*item); - if (max_value < check_max) { - max_value = check_max; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return max_value; -} diff --git a/src/operators/tensor/math/max/max_i8.cairo b/src/operators/tensor/math/max/max_i8.cairo deleted file mode 100644 index 2bf17c935..000000000 --- a/src/operators/tensor/math/max/max_i8.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::) -> i8 { - let mut max_value: i8 = IntegerTrait::new(128, true); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_max = max_value.max(*item); - if (max_value < check_max) { - max_value = check_max; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return max_value; -} diff --git a/src/operators/tensor/math/max/max_u32.cairo b/src/operators/tensor/math/max/max_u32.cairo deleted file mode 100644 index 994c5fb13..000000000 --- a/src/operators/tensor/math/max/max_u32.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - - -/// Cf: TensorTrait::max docstring -fn max_in_tensor(mut vec: Span::) -> u32 { - let mut max_value = 0; - - loop { - match vec.pop_front() { - Option::Some(item) => { - if (max_value < *item) { - max_value = *item; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return max_value; -} diff --git a/src/operators/tensor/math/min.cairo b/src/operators/tensor/math/min.cairo index c21a59f76..9bd29e50e 100644 --- a/src/operators/tensor/math/min.cairo +++ b/src/operators/tensor/math/min.cairo @@ -1,4 +1,33 @@ -mod min_i8; -mod min_i32; -mod min_u32; -mod min_fp; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::min docstring +fn min_in_tensor< + T, + impl TNumber: NumberTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut vec: Span:: +) -> T { + let mut min_value: T = NumberTrait::max_value(); + + loop { + match vec.pop_front() { + Option::Some(item) => { + let check_min = min_value.min(*item); + if (min_value > check_min) { + min_value = check_min; + } + }, + Option::None(_) => { + break; + } + }; + }; + + return min_value; +} diff --git a/src/operators/tensor/math/min/min_fp.cairo b/src/operators/tensor/math/min/min_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/min/min_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/min/min_fp/core.cairo b/src/operators/tensor/math/min/min_fp/core.cairo deleted file mode 100644 index ef7873ed0..000000000 --- a/src/operators/tensor/math/min/min_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::ExtraParams; -use orion::operators::tensor::math::min::min_fp::fp8x23; -use orion::operators::tensor::math::min::min_fp::fp16x16; - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::, extra: Option) -> Option { - match extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::min_in_tensor(vec)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::min_in_tensor(vec)), - }, - Option::None(_) => Option::Some(fp16x16::min_in_tensor(vec)), - }, - Option::None(_) => Option::Some(fp16x16::min_in_tensor(vec)), - } -} diff --git a/src/operators/tensor/math/min/min_fp/fp16x16.cairo b/src/operators/tensor/math/min/min_fp/fp16x16.cairo deleted file mode 100644 index 3b3e43c62..000000000 --- a/src/operators/tensor/math/min/min_fp/fp16x16.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, MAX, FP16x16PartialOrd -}; -use orion::numbers::fixed_point::implementations::fp16x16::math::comp::min; - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::) -> FixedType { - let mut min_value: FixedType = FixedTrait::new(MAX - 1, false); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_min = min(min_value, *item); - if (min_value > check_min) { - min_value = check_min; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return min_value; -} - diff --git a/src/operators/tensor/math/min/min_fp/fp8x23.cairo b/src/operators/tensor/math/min/min_fp/fp8x23.cairo deleted file mode 100644 index 4bdb2d887..000000000 --- a/src/operators/tensor/math/min/min_fp/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, MAX, FP8x23PartialOrd}; -use orion::numbers::fixed_point::implementations::fp8x23::math::comp::min; - - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::) -> FixedType { - let mut min_value: FixedType = FixedTrait::new(MAX - 1, false); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_min = min(min_value, *item); - if (min_value > check_min) { - min_value = check_min; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return min_value; -} diff --git a/src/operators/tensor/math/min/min_i32.cairo b/src/operators/tensor/math/min/min_i32.cairo deleted file mode 100644 index 730c96e13..000000000 --- a/src/operators/tensor/math/min/min_i32.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::) -> i32 { - let mut min_value: i32 = IntegerTrait::new(2147483647, false); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_min = min_value.min(*item); - if (min_value > check_min) { - min_value = check_min; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return min_value; -} - diff --git a/src/operators/tensor/math/min/min_i8.cairo b/src/operators/tensor/math/min/min_i8.cairo deleted file mode 100644 index 14534a167..000000000 --- a/src/operators/tensor/math/min/min_i8.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::) -> i8 { - let mut min_value: i8 = IntegerTrait::new(127, false); - - loop { - match vec.pop_front() { - Option::Some(item) => { - let check_min = min_value.min(*item); - if (min_value > check_min) { - min_value = check_min; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return min_value; -} diff --git a/src/operators/tensor/math/min/min_u32.cairo b/src/operators/tensor/math/min/min_u32.cairo deleted file mode 100644 index e842111f3..000000000 --- a/src/operators/tensor/math/min/min_u32.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; - - -/// Cf: TensorTrait::min docstring -fn min_in_tensor(mut vec: Span::) -> u32 { - let mut min_value = 4294967295; - - loop { - match vec.pop_front() { - Option::Some(item) => { - if (min_value > *item) { - min_value = *item; - } - }, - Option::None(_) => { - break; - } - }; - }; - - return min_value; -} diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index 8f23622a5..e69de29bb 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -1,4 +0,0 @@ -mod reduce_sum_i8; -mod reduce_sum_i32; -mod reduce_sum_u32; -mod reduce_sum_fp; From e5152e6feeabbd9d93d20a44fedb6f96ead1a74b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 15:43:52 +0300 Subject: [PATCH 015/179] add generic reduce_sum --- src/operators/tensor/math/reduce_sum.cairo | 109 ++++++++++++++++++ .../math/reduce_sum/reduce_sum_fp.cairo | 3 - .../math/reduce_sum/reduce_sum_fp/core.cairo | 20 ---- .../reduce_sum/reduce_sum_fp/fp16x16.cairo | 103 ----------------- .../reduce_sum/reduce_sum_fp/fp8x23.cairo | 103 ----------------- .../math/reduce_sum/reduce_sum_i32.cairo | 98 ---------------- .../math/reduce_sum/reduce_sum_i8.cairo | 98 ---------------- .../math/reduce_sum/reduce_sum_u32.cairo | 97 ---------------- 8 files changed, 109 insertions(+), 522 deletions(-) delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_fp.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_fp/core.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_i32.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_i8.cairo delete mode 100644 src/operators/tensor/math/reduce_sum/reduce_sum_u32.cairo diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index e69de29bb..8e04cfe52 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -0,0 +1,109 @@ +use core::option::OptionTrait; +use array::ArrayTrait; +use array::SpanTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; +use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; + + +/// Cf: TensorTrait::reduce_sum docstring +fn reduce_sum< + T, + F, + impl TTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TAddEq: AddEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, axis: usize, keepdims: bool +) -> Tensor { + let mut output_data = ArrayTrait::new(); + + if (*self.shape).len() == 1 { + assert(axis == 0, 'axis out of dimensions'); + let current_sum = accumulate_sum::(*self.data, *self.shape, *self.shape, axis); + output_data.append(current_sum); + + let mut output_shape = ArrayTrait::new(); + output_shape.append(1); + + return TensorTrait::new(output_shape.span(), output_data.span(), *self.extra); + } else { + assert(axis <= (*self.shape).len(), 'axis out of dimensions'); + let output_shape = reduce_output_shape(*self.shape, axis, false); + let output_data_len = len_from_shape(output_shape); + let mut index: usize = 0; + loop { + let output_indices = unravel_index(index, output_shape); + let current_sum = accumulate_sum::(*self.data, *self.shape, output_indices, axis); + + output_data.append(current_sum); + + index += 1; + if index == output_data_len { + break (); + }; + }; + + if keepdims { + let output_shape = reduce_output_shape(*self.shape, axis, true); + return TensorTrait::::new(output_shape, output_data.span(), *self.extra); + } else { + return TensorTrait::::new(output_shape, output_data.span(), *self.extra); + } + } +} + + +/// Helper function that accumulates the sum of elements along a specific axis. +/// +/// # Arguments +/// * `input_data` - The input's data. +/// * `input_shape` - The input's shape. +/// * `output_indices` - A span of output indices. +/// * `axis` - The axis along which to accumulate the sum. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * An i32 value representing the accumulated sum along the specified axis. +fn accumulate_sum< + T, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TCopy: Copy, impl TDrop: Drop +>( + mut input_data: Span, input_shape: Span, output_indices: Span, axis: usize +) -> T { + let axis_len = *(input_shape)[axis]; + let mut acc: T = NumberTrait::zero(); + + let mut axis_index: usize = 0; + + if (input_shape).len() > 1 { + loop { + if axis_index == axis_len { + break (); + } + + let input_indices = combine_indices(output_indices, axis_index, axis); + let input_index = ravel_index(input_shape, input_indices); + let ele = *(input_data)[input_index]; + acc += ele; + axis_index += 1; + }; + } else { + loop { + match input_data.pop_front() { + Option::Some(item) => { + acc += *item; + }, + Option::None(_) => { + break; + } + }; + }; + } + + return acc; +} diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_fp.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/core.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_fp/core.cairo deleted file mode 100644 index 752eefff7..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::reduce_sum::reduce_sum_fp::fp8x23; -use orion::operators::tensor::math::reduce_sum::reduce_sum_fp::fp16x16; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::reduce_sum(self, axis, keepdims)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::reduce_sum(self, axis, keepdims)), - }, - Option::None(_) => Option::Some(fp16x16::reduce_sum(self, axis, keepdims)), - }, - Option::None(_) => Option::Some(fp16x16::reduce_sum(self, axis, keepdims)), - } -} - diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp16x16.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp16x16.cairo deleted file mode 100644 index 91b11a853..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp16x16.cairo +++ /dev/null @@ -1,103 +0,0 @@ -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16AddEq}; - -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - let mut output_data = ArrayTrait::new(); - - if (*self.shape).len() == 1 { - assert(axis == 0, 'axis out of dimensions'); - let current_sum = accumulate_sum(*self.data, *self.shape, *self.shape, axis); - output_data.append(current_sum); - - let mut output_shape = ArrayTrait::new(); - output_shape.append(1); - - return TensorTrait::::new(output_shape.span(), output_data.span(), *self.extra); - } else { - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_sum = accumulate_sum(*self.data, *self.shape, output_indices, axis); - - output_data.append(current_sum); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - if keepdims { - let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } - } -} - - -/// Helper function that accumulates the sum of elements along a specific axis. -/// -/// # Arguments -/// * `input_data` - The input's data. -/// * `input_shape` - The input's shape. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to accumulate the sum. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An FixedType value representing the accumulated sum along the specified axis. -fn accumulate_sum( - mut input_data: Span, - input_shape: Span, - output_indices: Span, - axis: usize -) -> FixedType { - let axis_len = *(input_shape)[axis]; - let mut acc = FixedTrait::new(0, false); - - let mut axis_index: usize = 0; - - if (input_shape).len() > 1 { - loop { - if axis_index == axis_len { - break (); - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(input_shape, input_indices); - let ele = *(input_data)[input_index]; - acc += ele; - axis_index += 1; - }; - } else { - loop { - match input_data.pop_front() { - Option::Some(item) => { - acc += *item; - }, - Option::None(_) => { - break; - } - }; - }; - } - - return acc; -} diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp8x23.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp8x23.cairo deleted file mode 100644 index 869805fe1..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_fp/fp8x23.cairo +++ /dev/null @@ -1,103 +0,0 @@ -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23AddEq}; - -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - let mut output_data = ArrayTrait::new(); - - if (*self.shape).len() == 1 { - assert(axis == 0, 'axis out of dimensions'); - let current_sum = accumulate_sum(*self.data, *self.shape, *self.shape, axis); - output_data.append(current_sum); - - let mut output_shape = ArrayTrait::new(); - output_shape.append(1); - - return TensorTrait::::new(output_shape.span(), output_data.span(), *self.extra); - } else { - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_sum = accumulate_sum(*self.data, *self.shape, output_indices, axis); - - output_data.append(current_sum); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - if keepdims { - let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } - } -} - - -/// Helper function that accumulates the sum of elements along a specific axis. -/// -/// # Arguments -/// * `input_data` - The input's data. -/// * `input_shape` - The input's shape. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to accumulate the sum. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An FixedType value representing the accumulated sum along the specified axis. -fn accumulate_sum( - mut input_data: Span, - input_shape: Span, - output_indices: Span, - axis: usize -) -> FixedType { - let axis_len = *(input_shape)[axis]; - let mut acc = FixedTrait::new(0, false); - - let mut axis_index: usize = 0; - - if (input_shape).len() > 1 { - loop { - if axis_index == axis_len { - break (); - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(input_shape, input_indices); - let ele = *(input_data)[input_index]; - acc += ele; - axis_index += 1; - }; - } else { - loop { - match input_data.pop_front() { - Option::Some(item) => { - acc += *item; - }, - Option::None(_) => { - break; - } - }; - }; - } - - return acc; -} diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_i32.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_i32.cairo deleted file mode 100644 index 8ce5922f6..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_i32.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - let mut output_data = ArrayTrait::new(); - - if (*self.shape).len() == 1 { - assert(axis == 0, 'axis out of dimensions'); - let current_sum = accumulate_sum(*self.data, *self.shape, *self.shape, axis); - output_data.append(current_sum); - - let mut output_shape = ArrayTrait::new(); - output_shape.append(1); - - return TensorTrait::::new(output_shape.span(), output_data.span(), *self.extra); - } else { - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_sum = accumulate_sum(*self.data, *self.shape, output_indices, axis); - - output_data.append(current_sum); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - if keepdims { - let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } - } -} - - -/// Helper function that accumulates the sum of elements along a specific axis. -/// -/// # Arguments -/// * `input_data` - The input's data. -/// * `input_shape` - The input's shape. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to accumulate the sum. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An i32 value representing the accumulated sum along the specified axis. -fn accumulate_sum( - mut input_data: Span, input_shape: Span, output_indices: Span, axis: usize -) -> i32 { - let axis_len = *(input_shape)[axis]; - let mut acc = IntegerTrait::new(0, false); - - let mut axis_index: usize = 0; - - if (input_shape).len() > 1 { - loop { - if axis_index == axis_len { - break (); - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(input_shape, input_indices); - let ele = *(input_data)[input_index]; - acc += ele; - axis_index += 1; - }; - } else { - loop { - match input_data.pop_front() { - Option::Some(item) => { - acc += *item; - }, - Option::None(_) => { - break; - } - }; - }; - } - - return acc; -} diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_i8.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_i8.cairo deleted file mode 100644 index d5e51fdcf..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_i8.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - let mut output_data = ArrayTrait::new(); - - if (*self.shape).len() == 1 { - assert(axis == 0, 'axis out of dimensions'); - let current_sum = accumulate_sum(*self.data, *self.shape, *self.shape, axis); - output_data.append(current_sum); - - let mut output_shape = ArrayTrait::new(); - output_shape.append(1); - - return TensorTrait::::new(output_shape.span(), output_data.span(), *self.extra); - } else { - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_sum = accumulate_sum(*self.data, *self.shape, output_indices, axis); - - output_data.append(current_sum); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - if keepdims { - let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } - } -} - - -/// Helper function that accumulates the sum of elements along a specific axis. -/// -/// # Arguments -/// * `input_data` - The input's data. -/// * `input_shape` - The input's shape. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to accumulate the sum. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An i8 value representing the accumulated sum along the specified axis. -fn accumulate_sum( - mut input_data: Span, input_shape: Span, output_indices: Span, axis: usize -) -> i8 { - let axis_len = *(input_shape)[axis]; - let mut acc = IntegerTrait::new(0, false); - - let mut axis_index: usize = 0; - - if (input_shape).len() > 1 { - loop { - if axis_index == axis_len { - break (); - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(input_shape, input_indices); - let ele = *(input_data)[input_index]; - acc += ele; - axis_index += 1; - }; - } else { - loop { - match input_data.pop_front() { - Option::Some(item) => { - acc += *item; - }, - Option::None(_) => { - break; - } - }; - }; - } - - return acc; -} diff --git a/src/operators/tensor/math/reduce_sum/reduce_sum_u32.cairo b/src/operators/tensor/math/reduce_sum/reduce_sum_u32.cairo deleted file mode 100644 index acad569fc..000000000 --- a/src/operators/tensor/math/reduce_sum/reduce_sum_u32.cairo +++ /dev/null @@ -1,97 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; - - -/// Cf: TensorTrait::reduce_sum docstring -fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - let mut output_data = ArrayTrait::new(); - - if (*self.shape).len() == 1 { - assert(axis == 0, 'axis out of dimensions'); - let current_sum = accumulate_sum(*self.data, *self.shape, *self.shape, axis); - output_data.append(current_sum); - - let mut output_shape = ArrayTrait::new(); - output_shape.append(1); - - return TensorTrait::::new(output_shape.span(), output_data.span(), *self.extra); - } else { - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_sum = accumulate_sum(*self.data, *self.shape, output_indices, axis); - - output_data.append(current_sum); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - if keepdims { - let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); - } - } -} - - -/// Helper function that accumulates the sum of elements along a specific axis. -/// -/// # Arguments -/// * `input_data` - The input's data. -/// * `input_shape` - The input's shape. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to accumulate the sum. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An u32 value representing the accumulated sum along the specified axis. -fn accumulate_sum( - mut input_data: Span, input_shape: Span, output_indices: Span, axis: usize -) -> u32 { - let axis_len = *(input_shape)[axis]; - let mut acc = 0; - - let mut axis_index: usize = 0; - - if (input_shape).len() > 1 { - loop { - if axis_index == axis_len { - break (); - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(input_shape, input_indices); - let ele = *(input_data)[input_index]; - acc += ele; - axis_index += 1; - }; - } else { - loop { - match input_data.pop_front() { - Option::Some(item) => { - acc += *item; - }, - Option::None(_) => { - break; - } - }; - }; - } - - return acc; -} From f86f4928501e1fc44f7d7e8f31ccb46f21693aad Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 16:00:41 +0300 Subject: [PATCH 016/179] add generic argmax --- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/argmax.cairo | 192 +++++++++++++++++- .../tensor/math/argmax/argmax_fp.cairo | 3 - .../tensor/math/argmax/argmax_fp/core.cairo | 26 --- .../math/argmax/argmax_fp/fp16x16.cairo | 57 ------ .../tensor/math/argmax/argmax_fp/fp8x23.cairo | 57 ------ .../tensor/math/argmax/argmax_i32.cairo | 54 ----- .../tensor/math/argmax/argmax_i8.cairo | 54 ----- .../tensor/math/argmax/argmax_u32.cairo | 51 ----- .../tensor/math/argmax/helpers.cairo | 132 ------------ 10 files changed, 188 insertions(+), 440 deletions(-) delete mode 100644 src/operators/tensor/math/argmax/argmax_fp.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_fp/core.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_i32.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_i8.cairo delete mode 100644 src/operators/tensor/math/argmax/argmax_u32.cairo delete mode 100644 src/operators/tensor/math/argmax/helpers.cairo diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index c0b4d6572..e34c6af27 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -1,7 +1,7 @@ mod min; mod max; mod reduce_sum; -// mod argmax; +mod argmax; // mod argmin; // mod exp; // mod log; diff --git a/src/operators/tensor/math/argmax.cairo b/src/operators/tensor/math/argmax.cairo index 4ba28d1b4..02824efb9 100644 --- a/src/operators/tensor/math/argmax.cairo +++ b/src/operators/tensor/math/argmax.cairo @@ -1,5 +1,187 @@ -mod argmax_i8; -mod argmax_i32; -mod argmax_u32; -mod argmax_fp; -mod helpers; +use core::debug::PrintTrait; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; +use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::argmax docstring +fn argmax< + T, + F, + impl UsizeTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option +) -> Tensor { + let keepdims = match keepdims { + Option::Some(val) => val, + Option::None(_) => true, + }; + + let select_last_index = match select_last_index { + Option::Some(val) => val, + Option::None(_) => false, + }; + + assert(axis <= (*self.shape).len(), 'axis out of dimensions'); + + if (*self.shape).len() == 1 { + return find_argmax_1D::(*self, axis, true, select_last_index); + } + + let mut output_data = ArrayTrait::new(); + + let output_shape = reduce_output_shape(*self.shape, axis, false); + let output_data_len = len_from_shape(output_shape); + + let MIN = NumberTrait::min_value(); + + let mut index: usize = 0; + loop { + let output_indices = unravel_index(index, output_shape); + let current_argmax = find_argmax(self, output_indices, axis, 0, MIN, 0, select_last_index); + + output_data.append(current_argmax); + + index += 1; + if index == output_data_len { + break (); + }; + }; + + return TensorTrait::::new( + reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra + ); +} + +/// Helper function that finds the index of the maximum value in a flat tensor. +/// +/// # Arguments +/// * `input` - The input tensor. +/// * `axis` - The axis along which to find the maximum value. +/// * `keepdims` - Whether to keep the reduced dimension or not. +/// * `select_last_index` - Whether to selƒect last occurrence of the max value along the axis. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * A usize value representing the index of the maximum value along the specified axis. +fn find_argmax_1D< + T, + F, + impl UsizeTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + mut input: Tensor, axis: usize, keepdims: bool, select_last_index: bool +) -> Tensor { + let mut output_data = ArrayTrait::::new(); + + let mut max = match input.data.pop_front() { + Option::Some(item) => *item, + Option::None(_) => { + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra + ); + } + }; + let mut max_index = 0; + let mut count = 0; + + loop { + match input.data.pop_front() { + Option::Some(item) => { + count += 1; + + if *item > max { + max = *item; + max_index = count; + } else { + if select_last_index && item == @max { + max_index = count; + } + }; + }, + Option::None(_) => { + break; + } + }; + }; + + output_data.append(max_index); + + return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra); +} + + +/// Recursive helper function that finds the index of the maximum value along a specific axis. +/// +/// # Arguments +/// * `input` - The input tensor. +/// * `output_indices` - A span of output indices. +/// * `axis` - The axis along which to find the maximum value. +/// * `axis_index` - The current index along the specified axis. +/// * `max_value` - The current maximum value found along the axis. +/// * `argmax` - The current index of the maximum value along the axis. +/// * `select_last_index` - Whether to select last occurrence of the max value along the axis. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * A usize value representing the index of the maximum value along the specified axis. +fn find_argmax< + T, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + input: @Tensor, + output_indices: Span, + axis: usize, + axis_index: usize, + max_value: T, + argmax: usize, + select_last_index: bool +) -> usize { + if axis_index == *(*input.shape)[axis] { + return argmax; + } + + let input_indices = combine_indices(output_indices, axis_index, axis); + let input_index = ravel_index(*input.shape, input_indices); + let ele = *(*input.data)[input_index]; + + let (new_max_value, new_argmax) = if ele > max_value { + (ele, axis_index) + } else { + if select_last_index && ele == max_value { + (ele, axis_index) + } else { + (max_value, argmax) + } + }; + + return find_argmax( + input, + output_indices, + axis, + axis_index + 1_usize, + new_max_value, + new_argmax, + select_last_index + ); +} diff --git a/src/operators/tensor/math/argmax/argmax_fp.cairo b/src/operators/tensor/math/argmax/argmax_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/argmax/argmax_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/argmax/argmax_fp/core.cairo b/src/operators/tensor/math/argmax/argmax_fp/core.cairo deleted file mode 100644 index 32d310da8..000000000 --- a/src/operators/tensor/math/argmax/argmax_fp/core.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::argmax::argmax_fp::fp8x23; -use orion::operators::tensor::math::argmax::argmax_fp::fp16x16; - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::argmax(self, axis, keepdims, select_last_index) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::argmax(self, axis, keepdims, select_last_index) - ), - }, - Option::None(_) => Option::Some( - fp16x16::argmax(self, axis, keepdims, select_last_index) - ), - }, - Option::None(_) => Option::Some(fp16x16::argmax(self, axis, keepdims, select_last_index)), - } -} diff --git a/src/operators/tensor/math/argmax/argmax_fp/fp16x16.cairo b/src/operators/tensor/math/argmax/argmax_fp/fp16x16.cairo deleted file mode 100644 index c2648032a..000000000 --- a/src/operators/tensor/math/argmax/argmax_fp/fp16x16.cairo +++ /dev/null @@ -1,57 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialOrd, FP16x16PartialEq, MAX -}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmax::helpers::{find_argmax_1D, find_argmax}; - - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmax_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MIN = FixedTrait::new(MAX, true); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmax = find_argmax(self, output_indices, axis, 0, MIN, 0, select_last_index); - - output_data.append(current_argmax); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmax/argmax_fp/fp8x23.cairo b/src/operators/tensor/math/argmax/argmax_fp/fp8x23.cairo deleted file mode 100644 index d6fab9329..000000000 --- a/src/operators/tensor/math/argmax/argmax_fp/fp8x23.cairo +++ /dev/null @@ -1,57 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23PartialOrd, FP8x23PartialEq, MAX -}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmax::helpers::{find_argmax_1D, find_argmax}; - - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmax_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MIN = FixedTrait::new(MAX, true); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmax = find_argmax(self, output_indices, axis, 0, MIN, 0, select_last_index); - - output_data.append(current_argmax); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmax/argmax_i32.cairo b/src/operators/tensor/math/argmax/argmax_i32.cairo deleted file mode 100644 index 17b91dc73..000000000 --- a/src/operators/tensor/math/argmax/argmax_i32.cairo +++ /dev/null @@ -1,54 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32::Tensor_u32}; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmax::helpers::{find_argmax_1D, find_argmax}; - - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmax_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MIN = IntegerTrait::::new(2147483648, true); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmax = find_argmax(self, output_indices, axis, 0, MIN, 0, select_last_index); - - output_data.append(current_argmax); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmax/argmax_i8.cairo b/src/operators/tensor/math/argmax/argmax_i8.cairo deleted file mode 100644 index 6d1f63b37..000000000 --- a/src/operators/tensor/math/argmax/argmax_i8.cairo +++ /dev/null @@ -1,54 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::{impl_tensor_i8, impl_tensor_u32::Tensor_u32}; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmax::helpers::{find_argmax_1D, find_argmax}; - - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmax_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MIN = IntegerTrait::::new(128, true); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmax = find_argmax(self, output_indices, axis, 0, MIN, 0, select_last_index); - - output_data.append(current_argmax); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmax/argmax_u32.cairo b/src/operators/tensor/math/argmax/argmax_u32.cairo deleted file mode 100644 index 48d22725b..000000000 --- a/src/operators/tensor/math/argmax/argmax_u32.cairo +++ /dev/null @@ -1,51 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmax::helpers::{find_argmax_1D, find_argmax}; - - -/// Cf: TensorTrait::argmax docstring -fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmax_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmax = find_argmax(self, output_indices, axis, 0, 0, 0, select_last_index); - - output_data.append(current_argmax); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmax/helpers.cairo b/src/operators/tensor/math/argmax/helpers.cairo deleted file mode 100644 index f13d52698..000000000 --- a/src/operators/tensor/math/argmax/helpers.cairo +++ /dev/null @@ -1,132 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, combine_indices}; - - -/// Helper function that finds the index of the maximum value in a flat tensor. -/// -/// # Arguments -/// * `input` - The input tensor. -/// * `axis` - The axis along which to find the maximum value. -/// * `keepdims` - Whether to keep the reduced dimension or not. -/// * `select_last_index` - Whether to select last occurrence of the max value along the axis. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A usize value representing the index of the maximum value along the specified axis. -fn find_argmax_1D< - T, - impl TPartialOrd: PartialOrd, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop, ->( - mut input: Tensor, axis: usize, keepdims: bool, select_last_index: bool -) -> Tensor { - let mut output_data = ArrayTrait::::new(); - - let mut max = match input.data.pop_front() { - Option::Some(item) => *item, - Option::None(_) => { - return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra - ); - } - }; - let mut max_index = 0; - let mut count = 0; - - loop { - match input.data.pop_front() { - Option::Some(item) => { - count += 1; - - if *item > max { - max = *item; - max_index = count; - } else { - if select_last_index && item == @max { - max_index = count; - } - }; - }, - Option::None(_) => { - break; - } - }; - }; - - output_data.append(max_index); - - return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra - ); -} - - -/// Recursive helper function that finds the index of the maximum value along a specific axis. -/// -/// # Arguments -/// * `input` - The input tensor. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to find the maximum value. -/// * `axis_index` - The current index along the specified axis. -/// * `max_value` - The current maximum value found along the axis. -/// * `argmax` - The current index of the maximum value along the axis. -/// * `select_last_index` - Whether to select last occurrence of the max value along the axis. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A usize value representing the index of the maximum value along the specified axis. -fn find_argmax< - T, - impl TPartialOrd: PartialOrd, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop, ->( - input: @Tensor, - output_indices: Span, - axis: usize, - axis_index: usize, - max_value: T, - argmax: usize, - select_last_index: bool -) -> usize { - if axis_index == *(*input.shape)[axis] { - return argmax; - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(*input.shape, input_indices); - let ele = *(*input.data)[input_index]; - - let (new_max_value, new_argmax) = if ele > max_value { - (ele, axis_index) - } else { - if select_last_index && ele == max_value { - (ele, axis_index) - } else { - (max_value, argmax) - } - }; - - return find_argmax( - input, - output_indices, - axis, - axis_index + 1_usize, - new_max_value, - new_argmax, - select_last_index - ); -} From ceb0dea1ca488cd55ed34dfc9e9ac2eec8a13ea0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 29 Aug 2023 16:04:47 +0300 Subject: [PATCH 017/179] add generic argmin --- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/argmin.cairo | 195 +++++++++++++++++- .../tensor/math/argmin/argmin_fp.cairo | 3 - .../tensor/math/argmin/argmin_fp/core.cairo | 26 --- .../math/argmin/argmin_fp/fp16x16.cairo | 58 ------ .../tensor/math/argmin/argmin_fp/fp8x23.cairo | 56 ----- .../tensor/math/argmin/argmin_i32.cairo | 54 ----- .../tensor/math/argmin/argmin_i8.cairo | 54 ----- .../tensor/math/argmin/argmin_u32.cairo | 53 ----- .../tensor/math/argmin/helpers.cairo | 135 ------------ 10 files changed, 191 insertions(+), 445 deletions(-) delete mode 100644 src/operators/tensor/math/argmin/argmin_fp.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_fp/core.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_i32.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_i8.cairo delete mode 100644 src/operators/tensor/math/argmin/argmin_u32.cairo delete mode 100644 src/operators/tensor/math/argmin/helpers.cairo diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index e34c6af27..fafb4849a 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -2,7 +2,7 @@ mod min; mod max; mod reduce_sum; mod argmax; -// mod argmin; +mod argmin; // mod exp; // mod log; // mod arithmetic; diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index 292471efd..634fa577f 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -1,5 +1,190 @@ -mod argmin_i8; -mod argmin_i32; -mod argmin_u32; -mod argmin_fp; -mod helpers; +use core::debug::PrintTrait; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; +use orion::operators::tensor::helpers::{reduce_output_shape, combine_indices, len_from_shape}; +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::argmin docstring +fn argmin< + T, + F, + impl UsizeTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option +) -> Tensor { + let keepdims = match keepdims { + Option::Some(val) => val, + Option::None(_) => true, + }; + + let select_last_index = match select_last_index { + Option::Some(val) => val, + Option::None(_) => false, + }; + + assert(axis <= (*self.shape).len(), 'axis out of dimensions'); + + if (*self.shape).len() == 1 { + return find_argmin_1D(*self, axis, true, select_last_index); + } + + let mut output_data = ArrayTrait::new(); + + let output_shape = reduce_output_shape(*self.shape, axis, false); + let output_data_len = len_from_shape(output_shape); + + let MAX = NumberTrait::max_value(); + + let mut index: usize = 0; + loop { + let output_indices = unravel_index(index, output_shape); + let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); + + output_data.append(current_argmin); + + index += 1; + if index == output_data_len { + break (); + }; + }; + + return TensorTrait::::new( + reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra + ); +} + + +/// Helper function that finds the index of the minimum value in a flat tensor. +/// +/// # Arguments +/// * `input` - The input tensor. +/// * `axis` - The axis along which to find the minimum value. +/// * `keepdims` - Whether to keep the reduced dimension or not. +/// * `select_last_index` - Whether to select last occurrence of the min value along the axis. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * A usize value representing the index of the minimum value along the specified axis. +fn find_argmin_1D< + T, + F, + impl UsizeTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + mut input: Tensor, axis: usize, keepdims: bool, select_last_index: bool +) -> Tensor { + let mut output_data = ArrayTrait::::new(); + + let mut min = match input.data.pop_front() { + Option::Some(item) => *item, + Option::None(_) => { + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra + ); + } + }; + let mut min_index = 0; + let mut count = 0; + + loop { + match input.data.pop_front() { + Option::Some(item) => { + count += 1; + + if *item < min { + min = *item; + min_index = count; + } else { + if select_last_index && item == @min { + min_index = count; + } + }; + }, + Option::None(_) => { + break; + } + }; + }; + + output_data.append(min_index); + + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra + ); +} + + +/// Recursive helper function that finds the index of the minimum value along a specific axis. +/// +/// # Arguments +/// * `input` - The input tensor. +/// * `output_indices` - A span of output indices. +/// * `axis` - The axis along which to find the minimum value. +/// * `axis_index` - The current index along the specified axis. +/// * `min_value` - The current minimum value found along the axis. +/// * `argmin` - The current index of the minimum value along the axis. +/// * `select_last_index` - Whether to select last occurrence of the min value along the axis. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * A usize value representing the index of the minimum value along the specified axis. +fn find_argmin< + T, + impl TPartialOrd: PartialOrd, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop, +>( + input: @Tensor, + output_indices: Span, + axis: usize, + axis_index: usize, + min_value: T, + argmin: usize, + select_last_index: bool +) -> usize { + if axis_index == *(*input.shape)[axis] { + return argmin; + } + + let input_indices = combine_indices(output_indices, axis_index, axis); + let input_index = ravel_index(*input.shape, input_indices); + let ele = *(*input.data)[input_index]; + + let (new_min_value, new_argmin) = if ele < min_value { + (ele, axis_index) + } else { + if select_last_index && ele == min_value { + (ele, axis_index) + } else { + (min_value, argmin) + } + }; + + return find_argmin( + input, + output_indices, + axis, + axis_index + 1_usize, + new_min_value, + new_argmin, + select_last_index + ); +} + diff --git a/src/operators/tensor/math/argmin/argmin_fp.cairo b/src/operators/tensor/math/argmin/argmin_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/argmin/argmin_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/argmin/argmin_fp/core.cairo b/src/operators/tensor/math/argmin/argmin_fp/core.cairo deleted file mode 100644 index 282758b5c..000000000 --- a/src/operators/tensor/math/argmin/argmin_fp/core.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::argmin::argmin_fp::fp8x23; -use orion::operators::tensor::math::argmin::argmin_fp::fp16x16; - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::argmin(self, axis, keepdims, select_last_index) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::argmin(self, axis, keepdims, select_last_index) - ), - }, - Option::None(_) => Option::Some( - fp16x16::argmin(self, axis, keepdims, select_last_index) - ), - }, - Option::None(_) => Option::Some(fp16x16::argmin(self, axis, keepdims, select_last_index)), - } -} diff --git a/src/operators/tensor/math/argmin/argmin_fp/fp16x16.cairo b/src/operators/tensor/math/argmin/argmin_fp/fp16x16.cairo deleted file mode 100644 index 0f620aa6a..000000000 --- a/src/operators/tensor/math/argmin/argmin_fp/fp16x16.cairo +++ /dev/null @@ -1,58 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialOrd, FP16x16PartialEq, MAX -}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmin::helpers::{find_argmin_1D, find_argmin}; - - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmin_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MAX = FixedTrait::new(MAX, false); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); - - output_data.append(current_argmin); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} - diff --git a/src/operators/tensor/math/argmin/argmin_fp/fp8x23.cairo b/src/operators/tensor/math/argmin/argmin_fp/fp8x23.cairo deleted file mode 100644 index ff567cec3..000000000 --- a/src/operators/tensor/math/argmin/argmin_fp/fp8x23.cairo +++ /dev/null @@ -1,56 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23PartialOrd, FP8x23PartialEq, MAX -}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmin::helpers::{find_argmin_1D, find_argmin}; - - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmin_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MAX = FixedTrait::new(MAX, false); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); - - output_data.append(current_argmin); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmin/argmin_i32.cairo b/src/operators/tensor/math/argmin/argmin_i32.cairo deleted file mode 100644 index 60448455b..000000000 --- a/src/operators/tensor/math/argmin/argmin_i32.cairo +++ /dev/null @@ -1,54 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32::Tensor_u32}; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmin::helpers::{find_argmin_1D, find_argmin}; - - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmin_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MAX = IntegerTrait::::new(2147483647, false); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); - - output_data.append(current_argmin); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmin/argmin_i8.cairo b/src/operators/tensor/math/argmin/argmin_i8.cairo deleted file mode 100644 index fc4585b6b..000000000 --- a/src/operators/tensor/math/argmin/argmin_i8.cairo +++ /dev/null @@ -1,54 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::{impl_tensor_i8, impl_tensor_u32::Tensor_u32}; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmin::helpers::{find_argmin_1D, find_argmin}; - - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmin_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MAX = IntegerTrait::::new(127, false); - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); - - output_data.append(current_argmin); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmin/argmin_u32.cairo b/src/operators/tensor/math/argmin/argmin_u32.cairo deleted file mode 100644 index 0ef4e9a13..000000000 --- a/src/operators/tensor/math/argmin/argmin_u32.cairo +++ /dev/null @@ -1,53 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, combine_indices}; -use orion::operators::tensor::math::argmin::helpers::{find_argmin_1D, find_argmin}; - - -/// Cf: TensorTrait::argmin docstring -fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option -) -> Tensor { - let keepdims = match keepdims { - Option::Some(val) => val, - Option::None(_) => true, - }; - - let select_last_index = match select_last_index { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis <= (*self.shape).len(), 'axis out of dimensions'); - - if (*self.shape).len() == 1 { - return find_argmin_1D(*self, axis, true, select_last_index); - } - - let mut output_data = ArrayTrait::new(); - - let output_shape = reduce_output_shape(*self.shape, axis, false); - let output_data_len = len_from_shape(output_shape); - - let MAX = 4294967295; // 2 ** 32 - 1 - - let mut index: usize = 0; - loop { - let output_indices = unravel_index(index, output_shape); - let current_argmin = find_argmin(self, output_indices, axis, 0, MAX, 0, select_last_index); - - output_data.append(current_argmin); - - index += 1; - if index == output_data_len { - break (); - }; - }; - - return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra - ); -} diff --git a/src/operators/tensor/math/argmin/helpers.cairo b/src/operators/tensor/math/argmin/helpers.cairo deleted file mode 100644 index 895213d5c..000000000 --- a/src/operators/tensor/math/argmin/helpers.cairo +++ /dev/null @@ -1,135 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index}; -use orion::operators::tensor::helpers::{reduce_output_shape, combine_indices}; - - -/// Helper function that finds the index of the minimum value in a flat tensor. -/// -/// # Arguments -/// * `input` - The input tensor. -/// * `axis` - The axis along which to find the minimum value. -/// * `keepdims` - Whether to keep the reduced dimension or not. -/// * `select_last_index` - Whether to select last occurrence of the min value along the axis. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A usize value representing the index of the minimum value along the specified axis. -fn find_argmin_1D< - T, - impl TPartialOrd: PartialOrd, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop, ->( - mut input: Tensor, axis: usize, keepdims: bool, select_last_index: bool -) -> Tensor { - let mut output_data = ArrayTrait::::new(); - - let mut min = match input.data.pop_front() { - Option::Some(item) => *item, - Option::None(_) => { - return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra - ); - } - }; - let mut min_index = 0; - let mut count = 0; - - loop { - match input.data.pop_front() { - Option::Some(item) => { - count += 1; - - if *item < min { - min = *item; - min_index = count; - } else { - if select_last_index && item == @min { - min_index = count; - } - }; - }, - Option::None(_) => { - break; - } - }; - }; - - - - output_data.append(min_index); - - return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra - ); -} - - -/// Recursive helper function that finds the index of the minimum value along a specific axis. -/// -/// # Arguments -/// * `input` - The input tensor. -/// * `output_indices` - A span of output indices. -/// * `axis` - The axis along which to find the minimum value. -/// * `axis_index` - The current index along the specified axis. -/// * `min_value` - The current minimum value found along the axis. -/// * `argmin` - The current index of the minimum value along the axis. -/// * `select_last_index` - Whether to select last occurrence of the min value along the axis. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A usize value representing the index of the minimum value along the specified axis. -fn find_argmin< - T, - impl TPartialOrd: PartialOrd, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop, ->( - input: @Tensor, - output_indices: Span, - axis: usize, - axis_index: usize, - min_value: T, - argmin: usize, - select_last_index: bool -) -> usize { - if axis_index == *(*input.shape)[axis] { - return argmin; - } - - let input_indices = combine_indices(output_indices, axis_index, axis); - let input_index = ravel_index(*input.shape, input_indices); - let ele = *(*input.data)[input_index]; - - let (new_min_value, new_argmin) = if ele < min_value { - (ele, axis_index) - } else { - if select_last_index && ele == min_value { - (ele, axis_index) - } else { - (min_value, argmin) - } - }; - - return find_argmin( - input, - output_indices, - axis, - axis_index + 1_usize, - new_min_value, - new_argmin, - select_last_index - ); -} - From d24266cb771154b78f07c377ccb51e0beea408af Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 10:22:43 +0300 Subject: [PATCH 018/179] add generic exp --- src/numbers.cairo | 85 +++++++++++++++++-- src/numbers/fixed_point/core.cairo | 6 +- .../implementations/fp16x16/core.cairo | 2 +- .../implementations/fp8x23/core.cairo | 2 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/argmax.cairo | 3 +- src/operators/tensor/math/argmin.cairo | 3 +- src/operators/tensor/math/exp.cairo | 73 +++++++++++++++- src/operators/tensor/math/exp/exp_fp.cairo | 3 - .../tensor/math/exp/exp_fp/core.cairo | 18 ---- .../tensor/math/exp/exp_fp/fp16x16.cairo | 27 ------ .../tensor/math/exp/exp_fp/fp8x23.cairo | 27 ------ src/operators/tensor/math/exp/exp_i32.cairo | 3 - .../tensor/math/exp/exp_i32/core.cairo | 19 ----- .../tensor/math/exp/exp_i32/fp16x16.cairo | 29 ------- .../tensor/math/exp/exp_i32/fp8x23.cairo | 29 ------- src/operators/tensor/math/exp/exp_i8.cairo | 3 - .../tensor/math/exp/exp_i8/core.cairo | 19 ----- .../tensor/math/exp/exp_i8/fp16x16.cairo | 29 ------- .../tensor/math/exp/exp_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/exp/exp_u32.cairo | 3 - .../tensor/math/exp/exp_u32/core.cairo | 19 ----- .../tensor/math/exp/exp_u32/fp16x16.cairo | 29 ------- .../tensor/math/exp/exp_u32/fp8x23.cairo | 29 ------- src/operators/tensor/math/max.cairo | 3 +- src/operators/tensor/math/min.cairo | 3 +- src/operators/tensor/math/reduce_sum.cairo | 10 ++- 27 files changed, 167 insertions(+), 340 deletions(-) delete mode 100644 src/operators/tensor/math/exp/exp_fp.cairo delete mode 100644 src/operators/tensor/math/exp/exp_fp/core.cairo delete mode 100644 src/operators/tensor/math/exp/exp_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/exp/exp_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i32.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i32/core.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i8.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i8/core.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/exp/exp_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/exp/exp_u32.cairo delete mode 100644 src/operators/tensor/math/exp/exp_u32/core.cairo delete mode 100644 src/operators/tensor/math/exp/exp_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/exp/exp_u32/fp8x23.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 6156ed876..8918d0cff 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -2,7 +2,7 @@ mod fixed_point; mod signed_integer; // Common methods from Fixed Point and Signed Integers. -trait NumberTrait { +trait NumberTrait { fn zero() -> T; fn is_zero(self: T) -> bool; @@ -16,13 +16,16 @@ trait NumberTrait { fn min(self: T, other: T) -> T; fn max(self: T, other: T) -> T; + + fn mag(self: T) -> MAG; + fn is_neg(self: T) -> bool; } use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23}; use orion::numbers::fixed_point::implementations::fp8x23::math::core as core_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::math::comp as comp_fp8x23; -impl FP8x23Number of NumberTrait { +impl FP8x23Number of NumberTrait { fn zero() -> FP8x23 { FP8x23Impl::ZERO() } @@ -56,13 +59,21 @@ impl FP8x23Number of NumberTrait { fn max(self: FP8x23, other: FP8x23) -> FP8x23 { comp_fp8x23::max(self, other) } + + fn mag(self: FP8x23) -> u32 { + self.mag + } + + fn is_neg(self: FP8x23) -> bool { + self.sign + } } use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16}; use orion::numbers::fixed_point::implementations::fp16x16::math::core as core_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::math::comp as comp_fp16x16; -impl FP16x16Number of NumberTrait { +impl FP16x16Number of NumberTrait { fn zero() -> FP16x16 { FP16x16Impl::ZERO() } @@ -96,12 +107,20 @@ impl FP16x16Number of NumberTrait { fn max(self: FP16x16, other: FP16x16) -> FP16x16 { comp_fp16x16::max(self, other) } + + fn mag(self: FP16x16) -> u32 { + self.mag + } + + fn is_neg(self: FP16x16) -> bool { + self.sign + } } use orion::numbers::signed_integer::i8 as i8_core; use orion::numbers::signed_integer::i8::i8; -impl I8Number of NumberTrait { +impl I8Number of NumberTrait { fn zero() -> i8 { i8 { mag: 0, sign: false } } @@ -135,12 +154,20 @@ impl I8Number of NumberTrait { fn max(self: i8, other: i8) -> i8 { i8_core::i8_max(self, other) } + + fn mag(self: i8) -> u8 { + self.mag + } + + fn is_neg(self: i8) -> bool { + self.sign + } } use orion::numbers::signed_integer::i16 as i16_core; use orion::numbers::signed_integer::i16::i16; -impl i16Number of NumberTrait { +impl i16Number of NumberTrait { fn zero() -> i16 { i16 { mag: 0, sign: false } } @@ -174,12 +201,20 @@ impl i16Number of NumberTrait { fn max(self: i16, other: i16) -> i16 { i16_core::i16_max(self, other) } + + fn mag(self: i16) -> u16 { + self.mag + } + + fn is_neg(self: i16) -> bool { + self.sign + } } use orion::numbers::signed_integer::i32 as i32_core; use orion::numbers::signed_integer::i32::i32; -impl i32Number of NumberTrait { +impl i32Number of NumberTrait { fn zero() -> i32 { i32 { mag: 0, sign: false } } @@ -213,12 +248,20 @@ impl i32Number of NumberTrait { fn max(self: i32, other: i32) -> i32 { i32_core::i32_max(self, other) } + + fn mag(self: i32) -> u32 { + self.mag + } + + fn is_neg(self: i32) -> bool { + self.sign + } } use orion::numbers::signed_integer::i64 as i64_core; use orion::numbers::signed_integer::i64::i64; -impl i64Number of NumberTrait { +impl i64Number of NumberTrait { fn zero() -> i64 { i64 { mag: 0, sign: false } } @@ -252,12 +295,20 @@ impl i64Number of NumberTrait { fn max(self: i64, other: i64) -> i64 { i64_core::i64_max(self, other) } + + fn mag(self: i64) -> u64 { + self.mag + } + + fn is_neg(self: i64) -> bool { + self.sign + } } use orion::numbers::signed_integer::i128 as i128_core; use orion::numbers::signed_integer::i128::i128; -impl i128Number of NumberTrait { +impl i128Number of NumberTrait { fn zero() -> i128 { i128 { mag: 0, sign: false } } @@ -291,9 +342,17 @@ impl i128Number of NumberTrait { fn max(self: i128, other: i128) -> i128 { i128_core::i128_max(self, other) } + + fn mag(self: i128) -> u128 { + self.mag + } + + fn is_neg(self: i128) -> bool { + self.sign + } } -impl u32Number of NumberTrait { +impl u32Number of NumberTrait { fn zero() -> u32 { 0 } @@ -335,4 +394,12 @@ impl u32Number of NumberTrait { other } } + + fn mag(self: u32) -> u32 { + self + } + + fn is_neg(self: u32) -> bool { + false + } } diff --git a/src/numbers/fixed_point/core.cairo b/src/numbers/fixed_point/core.cairo index 038f962f5..fcc33d934 100644 --- a/src/numbers/fixed_point/core.cairo +++ b/src/numbers/fixed_point/core.cairo @@ -40,7 +40,7 @@ enum FixedImpl { /// sinh - Returns the value of the hyperbolic sine of the fixed point number. /// tanh - Returns the value of the hyperbolic tangent of the fixed point number. /// -trait FixedTrait { +trait FixedTrait { /// # FixedTrait::new /// /// ```rust @@ -71,7 +71,7 @@ trait FixedTrait { /// >>> {mag: 65536, sign: false} // = 1 in FP16x16 /// ``` /// - fn new(mag: u32, sign: bool) -> T; + fn new(mag: MAG, sign: bool) -> T; /// # FixedTrait::new\_unscaled /// /// ```rust @@ -102,7 +102,7 @@ trait FixedTrait { /// >>> {mag: 65536, sign: false} /// ``` /// - fn new_unscaled(mag: u32, sign: bool) -> T; + fn new_unscaled(mag: MAG, sign: bool) -> T; /// # FixedTrait::from\_felt /// /// diff --git a/src/numbers/fixed_point/implementations/fp16x16/core.cairo b/src/numbers/fixed_point/implementations/fp16x16/core.cairo index c906c7e75..28dfc3197 100644 --- a/src/numbers/fixed_point/implementations/fp16x16/core.cairo +++ b/src/numbers/fixed_point/implementations/fp16x16/core.cairo @@ -24,7 +24,7 @@ const HALF: u32 = 32768; // 2 ** 15 const MAX: u32 = 2147483648; // 2 ** 31 -impl FP16x16Impl of FixedTrait { +impl FP16x16Impl of FixedTrait { fn ZERO() -> FP16x16 { return FP16x16 { mag: 0, sign: false }; } diff --git a/src/numbers/fixed_point/implementations/fp8x23/core.cairo b/src/numbers/fixed_point/implementations/fp8x23/core.cairo index aab159354..6063a948c 100644 --- a/src/numbers/fixed_point/implementations/fp8x23/core.cairo +++ b/src/numbers/fixed_point/implementations/fp8x23/core.cairo @@ -24,7 +24,7 @@ const HALF: u32 = 4194304; // 2 ** 22 const MAX: u32 = 2147483648; // 2 ** 31 -impl FP8x23Impl of FixedTrait { +impl FP8x23Impl of FixedTrait { fn ZERO() -> FP8x23 { return FP8x23 { mag: 0, sign: false }; } diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index fafb4849a..04762583d 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -3,7 +3,7 @@ mod max; mod reduce_sum; mod argmax; mod argmin; -// mod exp; +mod exp; // mod log; // mod arithmetic; // mod equal; diff --git a/src/operators/tensor/math/argmax.cairo b/src/operators/tensor/math/argmax.cairo index 02824efb9..0d643a33a 100644 --- a/src/operators/tensor/math/argmax.cairo +++ b/src/operators/tensor/math/argmax.cairo @@ -11,8 +11,9 @@ use orion::numbers::NumberTrait; fn argmax< T, F, + MAG, impl UsizeTensor: TensorTrait, - impl TNumber: NumberTrait, + impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index 634fa577f..2c7668ae2 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -11,8 +11,9 @@ use orion::numbers::NumberTrait; fn argmin< T, F, + MAG, impl UsizeTensor: TensorTrait, - impl TNumber: NumberTrait, + impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index 4872b572c..d269e1dcf 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -1,4 +1,69 @@ -mod exp_i8; -mod exp_u32; -mod exp_i32; -mod exp_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::exp docstring +fn exp_from_int< + T, + F, + MAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl TCopy: Copy, + impl TDrop: Drop, + impl FCopy: Copy, + impl FDrop: Drop, + impl MDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled((*item).mag(), (*item).is_neg()).exp() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +fn exp_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).exp()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/exp/exp_fp.cairo b/src/operators/tensor/math/exp/exp_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/exp/exp_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/exp/exp_fp/core.cairo b/src/operators/tensor/math/exp/exp_fp/core.cairo deleted file mode 100644 index b26551f69..000000000 --- a/src/operators/tensor/math/exp/exp_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::exp::exp_fp::fp8x23; -use orion::operators::tensor::math::exp::exp_fp::fp16x16; - -/// Cf: TensorTrait::exp docstring -fn exp(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::exp(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - } -} diff --git a/src/operators/tensor/math/exp/exp_fp/fp16x16.cairo b/src/operators/tensor/math/exp/exp_fp/fp16x16.cairo deleted file mode 100644 index a94ffe263..000000000 --- a/src/operators/tensor/math/exp/exp_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_fp/fp8x23.cairo b/src/operators/tensor/math/exp/exp_fp/fp8x23.cairo deleted file mode 100644 index 6366f025f..000000000 --- a/src/operators/tensor/math/exp/exp_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_i32.cairo b/src/operators/tensor/math/exp/exp_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/exp/exp_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/exp/exp_i32/core.cairo b/src/operators/tensor/math/exp/exp_i32/core.cairo deleted file mode 100644 index b856f0f14..000000000 --- a/src/operators/tensor/math/exp/exp_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::exp::exp_i32::fp8x23; -use orion::operators::tensor::math::exp::exp_i32::fp16x16; - -/// Cf: TensorTrait::exp docstring -fn exp_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::exp(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - } -} diff --git a/src/operators/tensor/math/exp/exp_i32/fp16x16.cairo b/src/operators/tensor/math/exp/exp_i32/fp16x16.cairo deleted file mode 100644 index 10a6dce0e..000000000 --- a/src/operators/tensor/math/exp/exp_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_i32/fp8x23.cairo b/src/operators/tensor/math/exp/exp_i32/fp8x23.cairo deleted file mode 100644 index e8bc126f1..000000000 --- a/src/operators/tensor/math/exp/exp_i32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_i8.cairo b/src/operators/tensor/math/exp/exp_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/exp/exp_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/exp/exp_i8/core.cairo b/src/operators/tensor/math/exp/exp_i8/core.cairo deleted file mode 100644 index d8b2a129b..000000000 --- a/src/operators/tensor/math/exp/exp_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::exp::exp_i8::fp8x23; -use orion::operators::tensor::math::exp::exp_i8::fp16x16; - -/// Cf: TensorTrait::exp docstring -fn exp_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::exp(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - } -} diff --git a/src/operators/tensor/math/exp/exp_i8/fp16x16.cairo b/src/operators/tensor/math/exp/exp_i8/fp16x16.cairo deleted file mode 100644 index bcb904813..000000000 --- a/src/operators/tensor/math/exp/exp_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_i8/fp8x23.cairo b/src/operators/tensor/math/exp/exp_i8/fp8x23.cairo deleted file mode 100644 index c0cf4588d..000000000 --- a/src/operators/tensor/math/exp/exp_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_u32.cairo b/src/operators/tensor/math/exp/exp_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/exp/exp_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/exp/exp_u32/core.cairo b/src/operators/tensor/math/exp/exp_u32/core.cairo deleted file mode 100644 index 9761775d0..000000000 --- a/src/operators/tensor/math/exp/exp_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::exp::exp_u32::fp8x23; -use orion::operators::tensor::math::exp::exp_u32::fp16x16; - -/// Cf: TensorTrait::exp docstring -fn exp_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::exp(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - }, - Option::None(_) => Option::Some(fp16x16::exp(*self)), - } -} diff --git a/src/operators/tensor/math/exp/exp_u32/fp16x16.cairo b/src/operators/tensor/math/exp/exp_u32/fp16x16.cairo deleted file mode 100644 index ec5c87381..000000000 --- a/src/operators/tensor/math/exp/exp_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/exp/exp_u32/fp8x23.cairo b/src/operators/tensor/math/exp/exp_u32/fp8x23.cairo deleted file mode 100644 index ab9d8cd68..000000000 --- a/src/operators/tensor/math/exp/exp_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::exp docstring -fn exp(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).exp()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/max.cairo b/src/operators/tensor/math/max.cairo index 1bdd75789..854ef9613 100644 --- a/src/operators/tensor/math/max.cairo +++ b/src/operators/tensor/math/max.cairo @@ -6,7 +6,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::max docstring fn max_in_tensor< T, - impl TNumber: NumberTrait, + MAG, + impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/min.cairo b/src/operators/tensor/math/min.cairo index 9bd29e50e..518e0eb69 100644 --- a/src/operators/tensor/math/min.cairo +++ b/src/operators/tensor/math/min.cairo @@ -6,7 +6,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::min docstring fn min_in_tensor< T, - impl TNumber: NumberTrait, + MAG, + impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index 8e04cfe52..d487c92ce 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -11,8 +11,9 @@ use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, com fn reduce_sum< T, F, + MAG, impl TTensor: TensorTrait, - impl TNumber: NumberTrait, + impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TCopy: Copy, impl TDrop: Drop @@ -71,7 +72,12 @@ fn reduce_sum< /// # Returns /// * An i32 value representing the accumulated sum along the specified axis. fn accumulate_sum< - T, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TCopy: Copy, impl TDrop: Drop + T, + MAG, + impl TNumber: NumberTrait, + impl TAddEq: AddEq, + impl TCopy: Copy, + impl TDrop: Drop >( mut input_data: Span, input_shape: Span, output_indices: Span, axis: usize ) -> T { From 7d7e746443f487b33236cab7c7d44412fb3bd154 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 11:22:43 +0300 Subject: [PATCH 019/179] fix implementations --- src/operators/tensor.cairo | 2 +- src/operators/tensor/implementations.cairo | 8 +- .../implementations/impl_tensor_fp.cairo | 406 ---------------- .../implementations/impl_tensor_u32.cairo | 452 ------------------ .../implementations/tensor_fp8x23.cairo | 280 +++++++++++ ...nsor_i32.cairo => tensor_i32_fp8x23.cairo} | 177 ++++--- ...tensor_i8.cairo => tensor_i8_fp8x23.cairo} | 214 ++++----- .../implementations/tensor_u32_fp8x23.cairo | 305 ++++++++++++ src/operators/tensor/math/exp.cairo | 19 +- 9 files changed, 782 insertions(+), 1081 deletions(-) delete mode 100644 src/operators/tensor/implementations/impl_tensor_fp.cairo delete mode 100644 src/operators/tensor/implementations/impl_tensor_u32.cairo create mode 100644 src/operators/tensor/implementations/tensor_fp8x23.cairo rename src/operators/tensor/implementations/{impl_tensor_i32.cairo => tensor_i32_fp8x23.cairo} (55%) rename src/operators/tensor/implementations/{impl_tensor_i8.cairo => tensor_i8_fp8x23.cairo} (52%) create mode 100644 src/operators/tensor/implementations/tensor_u32_fp8x23.cairo diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index c3295fad4..358fd3464 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -2,4 +2,4 @@ mod core; mod helpers; mod math; // mod linalg; -// mod implementations; +mod implementations; diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index 650e15d54..3b8c16b1f 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -1,4 +1,4 @@ -// mod impl_tensor_fp; -// mod impl_tensor_i32; -// mod impl_tensor_u32; -// mod impl_tensor_i8; +mod tensor_fp8x23; +mod tensor_i32_fp8x23; +mod tensor_u32_fp8x23; +mod tensor_i8_fp8x23; diff --git a/src/operators/tensor/implementations/impl_tensor_fp.cairo b/src/operators/tensor/implementations/impl_tensor_fp.cairo deleted file mode 100644 index fa761a7c8..000000000 --- a/src/operators/tensor/implementations/impl_tensor_fp.cairo +++ /dev/null @@ -1,406 +0,0 @@ -//! This module defines and implement a Tensor for FixedType values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::FixedType; - -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq -}; - -use orion::operators::tensor::math; -use orion::operators::tensor::math::min::min_fp::core::min_in_tensor; -use orion::operators::tensor::math::max::max_fp::core::max_in_tensor; -use orion::operators::tensor::math::equal::equal_fp::core::equal; -use orion::operators::tensor::math::less::less_fp::core::less; -use orion::operators::tensor::math::less_equal::less_equal_fp::core::less_equal; -use orion::operators::tensor::math::ceil::ceil_fp::core::ceil; -use orion::operators::tensor::math::reduce_sum::reduce_sum_fp::core::reduce_sum; -use orion::operators::tensor::math::argmax::argmax_fp::core::argmax; -use orion::operators::tensor::math::argmin::argmin_fp::core::argmin; -use orion::operators::tensor::linalg::matmul::matmul_fp::core::matmul; -use orion::operators::tensor::linalg::transpose::transpose_fp::core::transpose; -use orion::operators::tensor::math::exp::exp_fp::core::exp; -use orion::operators::tensor::math::log::log_fp::core::log; -use orion::operators::tensor::math::arithmetic::arithmetic_fp::core::{add, sub, mul, div}; -use orion::operators::tensor::math::greater::greater_fp::core::greater; -use orion::operators::tensor::math::greater_equal::greater_equal_fp::core::greater_equal; -use orion::operators::tensor::math::cumsum::cumsum_fp::core::cumsum; -use orion::operators::tensor::math::flatten::flatten_fp::core::flatten; -use orion::operators::tensor::math::sinh::sinh_fp::core::sinh; -use orion::operators::tensor::math::tanh::tanh_fp::core::tanh; -use orion::operators::tensor::math::cosh::cosh_fp::core::cosh; -use orion::operators::tensor::math::acosh::acosh_fp::core::acosh; -use orion::operators::tensor::math::asinh::asinh_fp::core::asinh; -use orion::operators::tensor::math::sin::sin_fp::core::sin; -use orion::operators::tensor::math::cos::cos_fp::core::cos; -use orion::operators::tensor::math::asin::asin_fp::core::asin; -use orion::operators::tensor::math::atan::atan_fp::core::atan; -use orion::operators::tensor::math::xor::xor_fp::core::xor; -use orion::operators::tensor::math::or::or_fp::core::or; -use orion::operators::tensor::math::acos::acos_fp::core::acos; -use orion::operators::tensor::math::onehot::onehot_fp::core::onehot; -use orion::operators::tensor::math::sqrt::sqrt_fp::core::sqrt; -use orion::operators::tensor::math::concat::concat_fp::core::concat; - - -impl Tensor_fp of TensorTrait { - fn new( - shape: Span, data: Span, extra: Option - ) -> Tensor { - new_tensor(shape, data, extra) - } - - fn at(self: @Tensor, indices: Span) -> FixedType { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> FixedType { - min_in_tensor(*self.data, *self.extra).unwrap() - } - - fn max(self: @Tensor) -> FixedType { - max_in_tensor(*self.data, *self.extra).unwrap() - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - reduce_sum(self, axis, keepdims).unwrap() - } - - fn argmax( - self: @Tensor, - axis: usize, - keepdims: Option, - select_last_index: Option - ) -> Tensor { - argmax(self, axis, keepdims, select_last_index).unwrap() - } - - fn argmin( - self: @Tensor, - axis: usize, - keepdims: Option, - select_last_index: Option - ) -> Tensor { - argmin(self, axis, keepdims, select_last_index).unwrap() - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - transpose(self, axes).unwrap() - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - matmul(self, other).unwrap() - } - - fn exp(self: @Tensor) -> Tensor { - exp(self).unwrap() - } - - fn log(self: @Tensor) -> Tensor { - log(self).unwrap() - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - equal(self, other).unwrap() - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - greater(self, other).unwrap() - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - greater_equal(self, other).unwrap() - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - less(self, other).unwrap() - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - less_equal(self, other).unwrap() - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - ceil(self).unwrap() - } - - fn sin(self: @Tensor) -> Tensor { - sin(self).unwrap() - } - - fn cos(self: @Tensor) -> Tensor { - cos(self).unwrap() - } - - fn asin(self: @Tensor) -> Tensor { - asin(self).unwrap() - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - cumsum(self, axis, exclusive, reverse).unwrap() - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - flatten(self, axis).unwrap() - } - - fn sinh(self: @Tensor) -> Tensor { - sinh(self).unwrap() - } - - fn tanh(self: @Tensor) -> Tensor { - tanh(self).unwrap() - } - - fn cosh(self: @Tensor) -> Tensor { - cosh(self).unwrap() - } - - fn acosh(self: @Tensor) -> Tensor { - acosh(self).unwrap() - } - - fn asinh(self: @Tensor) -> Tensor { - asinh(self).unwrap() - } - - fn atan(self: @Tensor) -> Tensor { - atan(self).unwrap() - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - xor(self, other).unwrap() - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - or(self, other).unwrap() - } - - fn acos(self: @Tensor) -> Tensor { - acos(*self).unwrap() - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - onehot(self, depth, axis, values).unwrap() - } - - fn sqrt(self: @Tensor) -> Tensor { - sqrt(self).unwrap() - } - - fn concat( tensors: Span>, axis: usize, ) -> Tensor { - concat(tensors, axis).unwrap() - } - -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl FixedTypeTensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - add(@lhs, @rhs).unwrap() - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl FixedTypeTensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - sub(@lhs, @rhs).unwrap() - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl FixedTypeTensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - mul(@lhs, @rhs).unwrap() - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl FixedTypeTensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - div(@lhs, @rhs).unwrap() - } -} - - -mod FP8x23Tensor { - use array::{ArrayTrait, SpanTrait}; - use option::OptionTrait; - use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23PartialEq, FP8x23Impl, FP8x23Sub, FP8x23Div - }; - use super::{Tensor, FixedType}; - - const PRECISION: u32 = 75497; // 0.009 - - fn relative_eq(lhs: @FixedType, rhs: @FixedType) -> bool { - let diff = *lhs - *rhs; - - let rel_diff = if *lhs.mag != 0 { - (diff / *lhs).mag - } else { - diff.mag - }; - - rel_diff <= PRECISION - } - - - fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor, ) -> bool { - let mut is_eq = true; - - loop { - if lhs.shape.len() == 0 || !is_eq { - break; - } - - is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); - }; - - if !is_eq { - return false; - } - - loop { - if lhs.data.len() == 0 || !is_eq { - break; - } - - is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); - }; - - return is_eq; - } - - /// Implements partial equal for two `Tensor` using the `PartialEq` trait. - impl FPTensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } - } -} - -mod FP16x16Tensor { - use array::{ArrayTrait, SpanTrait}; - use option::OptionTrait; - use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16PartialEq, FP16x16Impl, FP16x16Sub, FP16x16Div - }; - use super::{Tensor, FixedType}; - - const PRECISION: u32 = 589; // 0.009 - - fn relative_eq(lhs: @FixedType, rhs: @FixedType) -> bool { - let diff = *lhs - *rhs; - - let rel_diff = if *lhs.mag != 0 { - (diff / *lhs).mag - } else { - diff.mag - }; - - rel_diff <= PRECISION - } - - - fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor, ) -> bool { - let mut is_eq = true; - - loop { - if lhs.shape.len() == 0 || !is_eq { - break; - } - - is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); - }; - - if !is_eq { - return false; - } - - loop { - if lhs.data.len() == 0 || !is_eq { - break; - } - - is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); - }; - - return is_eq; - } - - /// Implements partial equal for two `Tensor` using the `PartialEq` trait. - impl FPTensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } - } -} diff --git a/src/operators/tensor/implementations/impl_tensor_u32.cairo b/src/operators/tensor/implementations/impl_tensor_u32.cairo deleted file mode 100644 index 4442cd35e..000000000 --- a/src/operators/tensor/implementations/impl_tensor_u32.cairo +++ /dev/null @@ -1,452 +0,0 @@ -//! This module defines and implement a Tensor for u32 values. - -use array::ArrayTrait; -use array::SpanTrait; -use core::option::OptionTrait; - -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; - -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ExtraParams, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq -}; - -use orion::operators::tensor::math; -use orion::operators::tensor::math::min::min_u32::min_in_tensor; -use orion::operators::tensor::math::max::max_u32::max_in_tensor; -use orion::operators::tensor::math::reduce_sum::reduce_sum_u32::reduce_sum; -use orion::operators::tensor::math::argmax::argmax_u32::argmax; -use orion::operators::tensor::math::argmin::argmin_u32::argmin; -use orion::operators::tensor::linalg::matmul::matmul_u32::matmul; -use orion::operators::tensor::math::equal::equal_u32::equal; -use orion::operators::tensor::math::greater::greater_u32::greater; -use orion::operators::tensor::math::greater_equal::greater_equal_u32::greater_equal; -use orion::operators::tensor::math::less::less_u32::less; -use orion::operators::tensor::math::less_equal::less_equal_u32::less_equal; -use orion::operators::tensor::linalg::transpose::transpose_u32::transpose; -use orion::operators::tensor::math::exp::exp_u32::core::exp_u32; -use orion::operators::tensor::math::log::log_u32::core::log_u32; -use orion::operators::tensor::math::arithmetic::arithmetic_u32::{add, sub, mul, div}; -use orion::operators::tensor::math::cumsum::cumsum_u32::cumsum; -use orion::operators::tensor::math::flatten::flatten_u32::flatten; -use orion::operators::tensor::math::sinh::sinh_u32::core::sinh_u32; -use orion::operators::tensor::math::tanh::tanh_u32::core::tanh_u32; -use orion::operators::tensor::math::cosh::cosh_u32::core::cosh_u32; -use orion::operators::tensor::math::acosh::acosh_u32::core::acosh_u32; -use orion::operators::tensor::math::asinh::asinh_u32::core::asinh_u32; -use orion::operators::tensor::math::sin::sin_u32::core::sin_u32; -use orion::operators::tensor::math::cos::cos_u32::core::cos_u32; -use orion::operators::tensor::math::atan::atan_u32::core::atan_u32; -use orion::operators::tensor::math::xor::xor_u32::xor; -use orion::operators::tensor::math::or::or_u32::or; -use orion::operators::tensor::math::onehot::onehot_u32::onehot; -use orion::operators::tensor::math::sqrt::sqrt_u32::core::sqrt_u32; -use orion::operators::tensor::math::concat::concat_u32::concat_u32; - - -impl Tensor_u32_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) - } - - fn at(self: @Tensor, indices: Span) -> u32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> u32 { - min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> u32 { - max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - argmax(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - argmin(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - exp_u32(self).unwrap() - } - - fn log(self: @Tensor) -> Tensor { - log_u32(self).unwrap() - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - less_equal(self, other) - } - - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn sin(self: @Tensor) -> Tensor { - sin_u32(self).unwrap() - } - - fn cos(self: @Tensor) -> Tensor { - cos_u32(self).unwrap() - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - sinh_u32(self).unwrap() - } - - fn tanh(self: @Tensor) -> Tensor { - tanh_u32(self).unwrap() - } - - fn cosh(self: @Tensor) -> Tensor { - cosh_u32(self).unwrap() - } - - fn acosh(self: @Tensor) -> Tensor { - acosh_u32(self).unwrap() - } - - fn asinh(self: @Tensor) -> Tensor { - asinh_u32(self).unwrap() - } - - fn atan(self: @Tensor) -> Tensor { - atan_u32(self).unwrap() - } - - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - or(self, other) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - onehot(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - sqrt_u32(self).unwrap() - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - concat_u32(tensors, axis) - } -} - -impl Tensor_u32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) - } - - fn at(self: @Tensor, indices: Span) -> u32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> u32 { - min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> u32 { - max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - argmax(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - argmin(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - exp_u32(self).unwrap() - } - - fn log(self: @Tensor) -> Tensor { - log_u32(self).unwrap() - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - less_equal(self, other) - } - - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn sin(self: @Tensor) -> Tensor { - sin_u32(self).unwrap() - } - - fn cos(self: @Tensor) -> Tensor { - cos_u32(self).unwrap() - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - sinh_u32(self).unwrap() - } - - fn tanh(self: @Tensor) -> Tensor { - tanh_u32(self).unwrap() - } - - fn cosh(self: @Tensor) -> Tensor { - cosh_u32(self).unwrap() - } - - fn acosh(self: @Tensor) -> Tensor { - acosh_u32(self).unwrap() - } - - fn asinh(self: @Tensor) -> Tensor { - asinh_u32(self).unwrap() - } - - fn atan(self: @Tensor) -> Tensor { - atan_u32(self).unwrap() - } - - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - or(self, other) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - onehot(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - sqrt_u32(self).unwrap() - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - concat_u32(tensors, axis) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl u32TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl u32TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl u32TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl u32TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - div(@lhs, @rhs) - } -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl u32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} - diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo new file mode 100644 index 000000000..cc7096052 --- /dev/null +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -0,0 +1,280 @@ +//! This module defines and implement a Tensor for FP8x23 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::math; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; + +impl Tensor_fp8x23 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> FP8x23 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> FP8x23 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> FP8x23 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + //transpose(self, axes) + panic(array![]) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + //matmul(self, other) + panic(array![]) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_fp::(*self) + } + + fn log(self: @Tensor) -> Tensor { + //log_FP8x23(self).unwrap() + panic(array![]) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + //equal(self, other) + panic(array![]) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + // greater(self, other) + panic(array![]) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + //greater_equal(self, other) + panic(array![]) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + //less(self, other) + panic(array![]) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + //less_equal(self, other) + panic(array![]) + } + + fn abs(self: @Tensor) -> Tensor { + //math::abs::abs(*self) + panic(array![]) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with FP8x23']) + } + + fn sin(self: @Tensor) -> Tensor { + // sin_FP8x23(self).unwrap() + panic(array![]) + } + + fn cos(self: @Tensor) -> Tensor { + // cos_FP8x23(self).unwrap() + panic(array![]) + } + + fn asin(self: @Tensor) -> Tensor { + // panic(array!['not supported with FP8x23']) + panic(array![]) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + // cumsum(self, axis, exclusive, reverse) + panic(array![]) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + //flatten(self, axis) + panic(array![]) + } + + fn sinh(self: @Tensor) -> Tensor { + // sinh_FP8x23(self).unwrap() + panic(array![]) + } + + fn tanh(self: @Tensor) -> Tensor { + // tanh_FP8x23(self).unwrap() + panic(array![]) + } + + fn cosh(self: @Tensor) -> Tensor { + // cosh_FP8x23(self).unwrap() + panic(array![]) + } + + fn acosh(self: @Tensor) -> Tensor { + // acosh_FP8x23(self).unwrap() + panic(array![]) + } + + fn asinh(self: @Tensor) -> Tensor { + // asinh_FP8x23(self).unwrap() + panic(array![]) + } + + fn atan(self: @Tensor) -> Tensor { + // atan_FP8x23(self).unwrap() + panic(array![]) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + // xor(self, other) + panic(array![]) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + // or(self, other) + panic(array![]) + } + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with FP8x23']) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + // onehot(self, depth, axis, values) + panic(array![]) + } + + fn sqrt(self: @Tensor) -> Tensor { + // sqrt_FP8x23(self).unwrap() + panic(array![]) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + // concat_FP8x23(tensors, axis) + panic(array![]) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl FP8x23TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + //add(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl FP8x23TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + // sub(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl FP8x23TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + // mul(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl FP8x23TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + // div(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl FP8x23TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} diff --git a/src/operators/tensor/implementations/impl_tensor_i32.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo similarity index 55% rename from src/operators/tensor/implementations/impl_tensor_i32.cairo rename to src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 300210f5c..11d7464a2 100644 --- a/src/operators/tensor/implementations/impl_tensor_i32.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -3,49 +3,20 @@ use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; +use traits::{Into, TryInto}; use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::core::FixedType; - +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; - use orion::operators::tensor::math; -use orion::operators::tensor::math::min::min_i32::min_in_tensor; -use orion::operators::tensor::math::max::max_i32::max_in_tensor; -use orion::operators::tensor::math::reduce_sum::reduce_sum_i32::reduce_sum; -use orion::operators::tensor::math::argmax::argmax_i32::argmax; -use orion::operators::tensor::math::argmin::argmin_i32::argmin; -use orion::operators::tensor::math::equal::equal_i32::equal; -use orion::operators::tensor::math::greater::greater_i32::greater; -use orion::operators::tensor::math::greater_equal::greater_equal_i32::greater_equal; -use orion::operators::tensor::math::less::less_i32::less; -use orion::operators::tensor::math::less_equal::less_equal_i32::less_equal; -use orion::operators::tensor::linalg::matmul::matmul_i32::matmul; -use orion::operators::tensor::linalg::transpose::transpose_i32::transpose; -use orion::operators::tensor::math::exp::exp_i32::core::exp_i32; -use orion::operators::tensor::math::log::log_i32::core::log_i32; -use orion::operators::tensor::math::arithmetic::arithmetic_i32::{add, sub, mul, div}; -use orion::operators::tensor::math::cumsum::cumsum_i32::cumsum; -use orion::operators::tensor::math::flatten::flatten_i32::flatten; -use orion::operators::tensor::math::sinh::sinh_i32::core::sinh_i32; -use orion::operators::tensor::math::tanh::tanh_i32::core::tanh_i32; -use orion::operators::tensor::math::cosh::cosh_i32::core::cosh_i32; -use orion::operators::tensor::math::acosh::acosh_i32::core::acosh_i32; -use orion::operators::tensor::math::asinh::asinh_i32::core::asinh_i32; -use orion::operators::tensor::math::sin::sin_i32::core::sin_i32; -use orion::operators::tensor::math::cos::cos_i32::core::cos_i32; -use orion::operators::tensor::math::atan::atan_i32::core::atan_i32; -use orion::operators::tensor::math::xor::xor_i32::xor; -use orion::operators::tensor::math::or::or_i32::or; -use orion::operators::tensor::math::onehot::onehot_i32::onehot; -use orion::operators::tensor::math::sqrt::sqrt_i32::core::sqrt_i32; -use orion::operators::tensor::math::concat::concat_i32::concat_i32; - - -impl Tensor_i32 of TensorTrait { +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + +impl Tensor_i32_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { new_tensor(shape, data, extra) } @@ -55,11 +26,11 @@ impl Tensor_i32 of TensorTrait { } fn min(self: @Tensor) -> i32 { - min_in_tensor(*self.data) + math::min::min_in_tensor(*self.data) } fn max(self: @Tensor) -> i32 { - max_in_tensor(*self.data) + math::max::max_in_tensor(*self.data) } fn stride(self: @Tensor) -> Span { @@ -79,137 +50,160 @@ impl Tensor_i32 of TensorTrait { } fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - reduce_sum(self, axis, keepdims) + math::reduce_sum::reduce_sum(self, axis, keepdims) } fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - argmax(self, axis, keepdims, select_last_index) + math::argmax::argmax::(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - argmin(self, axis, keepdims, select_last_index) + math::argmin::argmin::(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { - transpose(self, axes) + //transpose(self, axes) + panic(array![]) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - matmul(self, other) + //matmul(self, other) + panic(array![]) } - fn exp(self: @Tensor) -> Tensor { - exp_i32(self).unwrap() + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) } - fn log(self: @Tensor) -> Tensor { - log_i32(self).unwrap() + fn log(self: @Tensor) -> Tensor { + //log_i32(self).unwrap() + panic(array![]) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - equal(self, other) + //equal(self, other) + panic(array![]) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - greater(self, other) + // greater(self, other) + panic(array![]) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - greater_equal(self, other) + //greater_equal(self, other) + panic(array![]) } fn less(self: @Tensor, other: @Tensor) -> Tensor { - less(self, other) + //less(self, other) + panic(array![]) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - less_equal(self, other) + //less_equal(self, other) + panic(array![]) } fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) + //math::abs::abs(*self) + panic(array![]) } fn ceil(self: @Tensor) -> Tensor { panic(array!['not supported with i32']) } - fn sin(self: @Tensor) -> Tensor { - sin_i32(self).unwrap() + fn sin(self: @Tensor) -> Tensor { + // sin_i32(self).unwrap() + panic(array![]) } - fn cos(self: @Tensor) -> Tensor { - cos_i32(self).unwrap() + fn cos(self: @Tensor) -> Tensor { + // cos_i32(self).unwrap() + panic(array![]) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + fn asin(self: @Tensor) -> Tensor { + // panic(array!['not supported with i32']) + panic(array![]) } fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - cumsum(self, axis, exclusive, reverse) + // cumsum(self, axis, exclusive, reverse) + panic(array![]) } fn flatten(self: @Tensor, axis: usize) -> Tensor { - flatten(self, axis) + //flatten(self, axis) + panic(array![]) } - fn sinh(self: @Tensor) -> Tensor { - sinh_i32(self).unwrap() + fn sinh(self: @Tensor) -> Tensor { + // sinh_i32(self).unwrap() + panic(array![]) } - fn tanh(self: @Tensor) -> Tensor { - tanh_i32(self).unwrap() + fn tanh(self: @Tensor) -> Tensor { + // tanh_i32(self).unwrap() + panic(array![]) } - fn cosh(self: @Tensor) -> Tensor { - cosh_i32(self).unwrap() + fn cosh(self: @Tensor) -> Tensor { + // cosh_i32(self).unwrap() + panic(array![]) } - fn acosh(self: @Tensor) -> Tensor { - acosh_i32(self).unwrap() + fn acosh(self: @Tensor) -> Tensor { + // acosh_i32(self).unwrap() + panic(array![]) } - fn asinh(self: @Tensor) -> Tensor { - asinh_i32(self).unwrap() + fn asinh(self: @Tensor) -> Tensor { + // asinh_i32(self).unwrap() + panic(array![]) } - fn atan(self: @Tensor) -> Tensor { - atan_i32(self).unwrap() + fn atan(self: @Tensor) -> Tensor { + // atan_i32(self).unwrap() + panic(array![]) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - xor(self, other) + // xor(self, other) + panic(array![]) } fn or(self: @Tensor, other: @Tensor) -> Tensor { - or(self, other) + // or(self, other) + panic(array![]) } - - fn acos(self: @Tensor) -> Tensor { + fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with i32']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - onehot(self, depth, axis, values) + // onehot(self, depth, axis, values) + panic(array![]) } - - fn sqrt(self: @Tensor) -> Tensor { - sqrt_i32(self).unwrap() - } + fn sqrt(self: @Tensor) -> Tensor { + // sqrt_i32(self).unwrap() + panic(array![]) + } - fn concat( tensors: Span>, axis: usize, ) -> Tensor { - concat_i32(tensors, axis) - } + fn concat(tensors: Span>, axis: usize,) -> Tensor { + // concat_i32(tensors, axis) + panic(array![]) + } } /// Implements addition for `Tensor` using the `Add` trait. @@ -223,7 +217,8 @@ impl i32TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - add(@lhs, @rhs) + //add(@lhs, @rhs) + panic(array![]) } } @@ -238,7 +233,8 @@ impl i32TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - sub(@lhs, @rhs) + // sub(@lhs, @rhs) + panic(array![]) } } @@ -253,7 +249,8 @@ impl i32TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - mul(@lhs, @rhs) + // mul(@lhs, @rhs) + panic(array![]) } } @@ -268,10 +265,12 @@ impl i32TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - div(@lhs, @rhs) + // div(@lhs, @rhs) + panic(array![]) } } + /// Implements partial equal for two `Tensor` using the `PartialEq` trait. impl i32TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { diff --git a/src/operators/tensor/implementations/impl_tensor_i8.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo similarity index 52% rename from src/operators/tensor/implementations/impl_tensor_i8.cairo rename to src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index c26fc51b7..09b117723 100644 --- a/src/operators/tensor/implementations/impl_tensor_i8.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -3,52 +3,22 @@ use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::Into; +use traits::{Into, TryInto}; use orion::numbers::signed_integer::{i8::i8, i32::i32}; use orion::numbers::signed_integer::i8::{i8_to_fp8x23, i8_to_fp16x16}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; - use orion::operators::tensor::math; -use orion::operators::tensor::math::min::min_i8::min_in_tensor; -use orion::operators::tensor::math::max::max_i8::max_in_tensor; -use orion::operators::tensor::math::reduce_sum::reduce_sum_i8::reduce_sum; -use orion::operators::tensor::math::argmax::argmax_i8::argmax; -use orion::operators::tensor::math::argmin::argmin_i8::argmin; -use orion::operators::tensor::math::equal::equal_i8::equal; -use orion::operators::tensor::math::greater::greater_i8::greater; -use orion::operators::tensor::math::greater_equal::greater_equal_i8::greater_equal; -use orion::operators::tensor::math::less::less_i8::less; -use orion::operators::tensor::math::less_equal::less_equal_i8::less_equal; -use orion::operators::tensor::linalg::matmul::matmul_i8::matmul; -use orion::operators::tensor::linalg::transpose::transpose_i8::transpose; -use orion::operators::tensor::math::exp::exp_i8::core::exp_i8; -use orion::operators::tensor::math::log::log_i8::core::log_i8; -use orion::operators::tensor::math::arithmetic::arithmetic_i8::{add, sub, mul, div}; -use orion::operators::tensor::math::cumsum::cumsum_i8::cumsum; -use orion::operators::tensor::math::flatten::flatten_i8::flatten; -use orion::operators::tensor::math::sinh::sinh_i8::core::sinh_i8; -use orion::operators::tensor::math::tanh::tanh_i8::core::tanh_i8; -use orion::operators::tensor::math::cosh::cosh_i8::core::cosh_i8; -use orion::operators::tensor::math::acosh::acosh_i8::core::acosh_i8; -use orion::operators::tensor::math::asinh::asinh_i8::core::asinh_i8; -use orion::operators::tensor::math::sin::sin_i8::core::sin_i8; -use orion::operators::tensor::math::cos::cos_i8::core::cos_i8; -use orion::operators::tensor::math::atan::atan_i8::core::atan_i8; -use orion::operators::tensor::math::xor::xor_i8::xor; -use orion::operators::tensor::math::or::or_i8::or; -use orion::operators::tensor::math::onehot::onehot_i8::onehot; -use orion::operators::tensor::math::sqrt::sqrt_i8::core::sqrt_i8; -use orion::operators::tensor::math::concat::concat_i8::concat_i8; - - -impl Tensor_i8 of TensorTrait { +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + +impl Tensor_i8_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { new_tensor(shape, data, extra) } @@ -58,11 +28,11 @@ impl Tensor_i8 of TensorTrait { } fn min(self: @Tensor) -> i8 { - min_in_tensor(*self.data) + math::min::min_in_tensor(*self.data) } fn max(self: @Tensor) -> i8 { - max_in_tensor(*self.data) + math::max::max_in_tensor(*self.data) } fn stride(self: @Tensor) -> Span { @@ -82,135 +52,160 @@ impl Tensor_i8 of TensorTrait { } fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - reduce_sum(self, axis, keepdims) + math::reduce_sum::reduce_sum(self, axis, keepdims) } fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - argmax(self, axis, keepdims, select_last_index) + math::argmax::argmax::(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - argmin(self, axis, keepdims, select_last_index) + math::argmin::argmin::(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { - transpose(self, axes) + //transpose(self, axes) + panic(array![]) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - matmul(self, other) + //matmul(self, other) + panic(array![]) } - fn exp(self: @Tensor) -> Tensor { - exp_i8(self).unwrap() + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) } - fn log(self: @Tensor) -> Tensor { - log_i8(self).unwrap() + fn log(self: @Tensor) -> Tensor { + //log_i8(self).unwrap() + panic(array![]) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - equal(self, other) + //equal(self, other) + panic(array![]) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - greater(self, other) + // greater(self, other) + panic(array![]) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - greater_equal(self, other) + //greater_equal(self, other) + panic(array![]) } fn less(self: @Tensor, other: @Tensor) -> Tensor { - less(self, other) + //less(self, other) + panic(array![]) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - less_equal(self, other) + //less_equal(self, other) + panic(array![]) } fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) + //math::abs::abs(*self) + panic(array![]) } fn ceil(self: @Tensor) -> Tensor { panic(array!['not supported with i8']) } - fn sin(self: @Tensor) -> Tensor { - sin_i8(self).unwrap() + fn sin(self: @Tensor) -> Tensor { + // sin_i8(self).unwrap() + panic(array![]) } - fn cos(self: @Tensor) -> Tensor { - cos_i8(self).unwrap() + fn cos(self: @Tensor) -> Tensor { + // cos_i8(self).unwrap() + panic(array![]) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + fn asin(self: @Tensor) -> Tensor { + // panic(array!['not supported with i8']) + panic(array![]) } fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - cumsum(self, axis, exclusive, reverse) + // cumsum(self, axis, exclusive, reverse) + panic(array![]) } fn flatten(self: @Tensor, axis: usize) -> Tensor { - flatten(self, axis) + //flatten(self, axis) + panic(array![]) } - fn sinh(self: @Tensor) -> Tensor { - sinh_i8(self).unwrap() + fn sinh(self: @Tensor) -> Tensor { + // sinh_i8(self).unwrap() + panic(array![]) } - fn tanh(self: @Tensor) -> Tensor { - tanh_i8(self).unwrap() + fn tanh(self: @Tensor) -> Tensor { + // tanh_i8(self).unwrap() + panic(array![]) } - fn cosh(self: @Tensor) -> Tensor { - cosh_i8(self).unwrap() + fn cosh(self: @Tensor) -> Tensor { + // cosh_i8(self).unwrap() + panic(array![]) } - fn acosh(self: @Tensor) -> Tensor { - acosh_i8(self).unwrap() + fn acosh(self: @Tensor) -> Tensor { + // acosh_i8(self).unwrap() + panic(array![]) } - fn asinh(self: @Tensor) -> Tensor { - asinh_i8(self).unwrap() + fn asinh(self: @Tensor) -> Tensor { + // asinh_i8(self).unwrap() + panic(array![]) } - fn atan(self: @Tensor) -> Tensor { - atan_i8(self).unwrap() + fn atan(self: @Tensor) -> Tensor { + // atan_i8(self).unwrap() + panic(array![]) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - xor(self, other) + // xor(self, other) + panic(array![]) } fn or(self: @Tensor, other: @Tensor) -> Tensor { - or(self, other) + // or(self, other) + panic(array![]) } - fn acos(self: @Tensor) -> Tensor { + fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with i8']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - onehot(self, depth, axis, values) + // onehot(self, depth, axis, values) + panic(array![]) } - fn sqrt(self: @Tensor) -> Tensor { - sqrt_i8(self).unwrap() - } + fn sqrt(self: @Tensor) -> Tensor { + // sqrt_i8(self).unwrap() + panic(array![]) + } - fn concat( tensors: Span>, axis: usize, ) -> Tensor { - concat_i8(tensors, axis) - } + fn concat(tensors: Span>, axis: usize,) -> Tensor { + // concat_i8(tensors, axis) + panic(array![]) + } } /// Implements addition for `Tensor` using the `Add` trait. @@ -224,7 +219,8 @@ impl i8TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - add(@lhs, @rhs) + //add(@lhs, @rhs) + panic(array![]) } } @@ -239,7 +235,8 @@ impl i8TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - sub(@lhs, @rhs) + // sub(@lhs, @rhs) + panic(array![]) } } @@ -254,7 +251,8 @@ impl i8TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - mul(@lhs, @rhs) + // mul(@lhs, @rhs) + panic(array![]) } } @@ -269,7 +267,8 @@ impl i8TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - div(@lhs, @rhs) + // div(@lhs, @rhs) + panic(array![]) } } @@ -281,9 +280,9 @@ impl TensorI8IntoTensorI32 of Into, Tensor> { } // Implements the Into trait for i8 tensor to fp tensor. -impl TensorI8IntoTensorFP of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_tensor_fp(@self).unwrap() +impl TensorI8IntoTensorFP8x23 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_fp8x23(@self) } } @@ -302,21 +301,9 @@ fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { return TensorTrait::new(*x.shape, result_data.span(), *x.extra); } -fn tensor_i8_to_tensor_fp(x: @Tensor) -> Option> { - match *x.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(tensor_i8_to_fp8x23(x)), - FixedImpl::FP16x16(()) => Option::Some(tensor_i8_to_fp16x16(x)), - }, - Option::None(_) => Option::Some(tensor_i8_to_fp16x16(x)), - }, - Option::None(_) => Option::Some(tensor_i8_to_fp16x16(x)), - } -} -fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); +fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); let mut data = *x.data; loop { @@ -330,21 +317,6 @@ fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { return TensorTrait::new(*x.shape, result_data.span(), *x.extra); } -fn tensor_i8_to_fp16x16(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append(i8_to_fp16x16(*data.pop_front().unwrap())); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::new(*x.shape, result_data.span(), *x.extra); -} - /// Implements partial equal for two `Tensor` using the `PartialEq` trait. impl i8TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo new file mode 100644 index 000000000..08c84fe5f --- /dev/null +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -0,0 +1,305 @@ +//! This module defines and implement a Tensor for u32 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::math; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; + +impl Tensor_u32_fp8x23 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> u32 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> u32 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> u32 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + //transpose(self, axes) + panic(array![]) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + //matmul(self, other) + panic(array![]) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) + } + + fn log(self: @Tensor) -> Tensor { + //log_u32(self).unwrap() + panic(array![]) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + //equal(self, other) + panic(array![]) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + // greater(self, other) + panic(array![]) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + //greater_equal(self, other) + panic(array![]) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + //less(self, other) + panic(array![]) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + //less_equal(self, other) + panic(array![]) + } + + fn abs(self: @Tensor) -> Tensor { + //math::abs::abs(*self) + panic(array![]) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn sin(self: @Tensor) -> Tensor { + // sin_u32(self).unwrap() + panic(array![]) + } + + fn cos(self: @Tensor) -> Tensor { + // cos_u32(self).unwrap() + panic(array![]) + } + + fn asin(self: @Tensor) -> Tensor { + // panic(array!['not supported with u32']) + panic(array![]) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + // cumsum(self, axis, exclusive, reverse) + panic(array![]) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + //flatten(self, axis) + panic(array![]) + } + + fn sinh(self: @Tensor) -> Tensor { + // sinh_u32(self).unwrap() + panic(array![]) + } + + fn tanh(self: @Tensor) -> Tensor { + // tanh_u32(self).unwrap() + panic(array![]) + } + + fn cosh(self: @Tensor) -> Tensor { + // cosh_u32(self).unwrap() + panic(array![]) + } + + fn acosh(self: @Tensor) -> Tensor { + // acosh_u32(self).unwrap() + panic(array![]) + } + + fn asinh(self: @Tensor) -> Tensor { + // asinh_u32(self).unwrap() + panic(array![]) + } + + fn atan(self: @Tensor) -> Tensor { + // atan_u32(self).unwrap() + panic(array![]) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + // xor(self, other) + panic(array![]) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + // or(self, other) + panic(array![]) + } + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + // onehot(self, depth, axis, values) + panic(array![]) + } + + fn sqrt(self: @Tensor) -> Tensor { + // sqrt_u32(self).unwrap() + panic(array![]) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + // concat_u32(tensors, axis) + panic(array![]) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl u32TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + //add(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl u32TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + // sub(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl u32TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + // mul(@lhs, @rhs) + panic(array![]) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl u32TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + // div(@lhs, @rhs) + panic(array![]) + } +} + + +// Implements the Into trait for u32 tensor to fp tensor. +impl Tensoru32IntoTensorFP8x23 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_u32_to_fp8x23(@self) + } +} + + +fn tensor_u32_to_fp8x23(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::::new(*x.shape, result_data.span(), *x.extra); +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl u32TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index d269e1dcf..818285a6b 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::Into; +use traits::{Into, TryInto}; use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; @@ -11,15 +11,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; fn exp_from_int< T, F, - MAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, impl FTensor: TensorTrait, + impl MAGInto: Into, impl TCopy: Copy, impl TDrop: Drop, - impl FCopy: Copy, impl FDrop: Drop, - impl MDrop: Drop + impl FPMAGDrop: Drop >( mut self: Tensor ) -> Tensor { @@ -30,7 +31,9 @@ fn exp_from_int< Option::Some(item) => { result .append( - FixedTrait::::new_unscaled((*item).mag(), (*item).is_neg()).exp() + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .exp() ); }, Option::None(_) => { @@ -39,7 +42,7 @@ fn exp_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::::new(self.shape, result.span(), self.extra); } fn exp_from_fp< From c38b1d14952c1a3b2fa76671dc2c4da83d9487b0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 11:30:28 +0300 Subject: [PATCH 020/179] add log generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/exp.cairo | 1 + src/operators/tensor/math/log.cairo | 78 ++++++++++++++++++- src/operators/tensor/math/log/log_fp.cairo | 3 - .../tensor/math/log/log_fp/core.cairo | 18 ----- .../tensor/math/log/log_fp/fp16x16.cairo | 26 ------- .../tensor/math/log/log_fp/fp8x23.cairo | 27 ------- src/operators/tensor/math/log/log_i32.cairo | 3 - .../tensor/math/log/log_i32/core.cairo | 19 ----- .../tensor/math/log/log_i32/fp16x16.cairo | 29 ------- .../tensor/math/log/log_i32/fp8x23.cairo | 29 ------- src/operators/tensor/math/log/log_i8.cairo | 3 - .../tensor/math/log/log_i8/core.cairo | 19 ----- .../tensor/math/log/log_i8/fp16x16.cairo | 29 ------- .../tensor/math/log/log_i8/fp8x23.cairo | 30 ------- src/operators/tensor/math/log/log_u32.cairo | 3 - .../tensor/math/log/log_u32/core.cairo | 18 ----- .../tensor/math/log/log_u32/fp16x16.cairo | 30 ------- .../tensor/math/log/log_u32/fp8x23.cairo | 29 ------- 23 files changed, 80 insertions(+), 328 deletions(-) delete mode 100644 src/operators/tensor/math/log/log_fp.cairo delete mode 100644 src/operators/tensor/math/log/log_fp/core.cairo delete mode 100644 src/operators/tensor/math/log/log_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/log/log_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/log/log_i32.cairo delete mode 100644 src/operators/tensor/math/log/log_i32/core.cairo delete mode 100644 src/operators/tensor/math/log/log_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/log/log_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/log/log_i8.cairo delete mode 100644 src/operators/tensor/math/log/log_i8/core.cairo delete mode 100644 src/operators/tensor/math/log/log_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/log/log_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/log/log_u32.cairo delete mode 100644 src/operators/tensor/math/log/log_u32/core.cairo delete mode 100644 src/operators/tensor/math/log/log_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/log/log_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index cc7096052..99cb63460 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -78,8 +78,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn log(self: @Tensor) -> Tensor { - //log_FP8x23(self).unwrap() - panic(array![]) + math::log::log_from_fp::(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 11d7464a2..b0ceef0ba 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -80,8 +80,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn log(self: @Tensor) -> Tensor { - //log_i32(self).unwrap() - panic(array![]) + math::log::log_from_int::(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 09b117723..c170a38b4 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -82,8 +82,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn log(self: @Tensor) -> Tensor { - //log_i8(self).unwrap() - panic(array![]) + math::log::log_from_int::(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 08c84fe5f..5cc61e9a9 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -79,8 +79,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn log(self: @Tensor) -> Tensor { - //log_u32(self).unwrap() - panic(array![]) + math::log::log_from_int::(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 04762583d..9d4735791 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -4,7 +4,7 @@ mod reduce_sum; mod argmax; mod argmin; mod exp; -// mod log; +mod log; // mod arithmetic; // mod equal; // mod greater; diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index 818285a6b..f6338e167 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -45,6 +45,7 @@ fn exp_from_int< return TensorTrait::::new(self.shape, result.span(), self.extra); } +/// Cf: TensorTrait::exp docstring fn exp_from_fp< F, MAG, diff --git a/src/operators/tensor/math/log.cairo b/src/operators/tensor/math/log.cairo index 650d93998..d98b6820c 100644 --- a/src/operators/tensor/math/log.cairo +++ b/src/operators/tensor/math/log.cairo @@ -1,4 +1,74 @@ -mod log_i8; -mod log_u32; -mod log_i32; -mod log_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: TensorTrait::log docstring +fn log_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .ln() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::log docstring +fn log_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).ln()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/log/log_fp.cairo b/src/operators/tensor/math/log/log_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/log/log_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/log/log_fp/core.cairo b/src/operators/tensor/math/log/log_fp/core.cairo deleted file mode 100644 index f92f64827..000000000 --- a/src/operators/tensor/math/log/log_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::log::log_fp::fp8x23; -use orion::operators::tensor::math::log::log_fp::fp16x16; - -/// Cf: TensorTrait::log docstring -fn log(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::log(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - } -} diff --git a/src/operators/tensor/math/log/log_fp/fp16x16.cairo b/src/operators/tensor/math/log/log_fp/fp16x16.cairo deleted file mode 100644 index 3c88dc152..000000000 --- a/src/operators/tensor/math/log/log_fp/fp16x16.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_fp/fp8x23.cairo b/src/operators/tensor/math/log/log_fp/fp8x23.cairo deleted file mode 100644 index 96eb88d0b..000000000 --- a/src/operators/tensor/math/log/log_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_i32.cairo b/src/operators/tensor/math/log/log_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/log/log_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/log/log_i32/core.cairo b/src/operators/tensor/math/log/log_i32/core.cairo deleted file mode 100644 index aadd63f47..000000000 --- a/src/operators/tensor/math/log/log_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::log::log_i32::fp8x23; -use orion::operators::tensor::math::log::log_i32::fp16x16; - -/// Cf: TensorTrait::log docstring -fn log_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::log(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - } -} diff --git a/src/operators/tensor/math/log/log_i32/fp16x16.cairo b/src/operators/tensor/math/log/log_i32/fp16x16.cairo deleted file mode 100644 index de356ccef..000000000 --- a/src/operators/tensor/math/log/log_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_i32/fp8x23.cairo b/src/operators/tensor/math/log/log_i32/fp8x23.cairo deleted file mode 100644 index a761b48de..000000000 --- a/src/operators/tensor/math/log/log_i32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_i8.cairo b/src/operators/tensor/math/log/log_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/log/log_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/log/log_i8/core.cairo b/src/operators/tensor/math/log/log_i8/core.cairo deleted file mode 100644 index 0b63f263f..000000000 --- a/src/operators/tensor/math/log/log_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::log::log_i8::fp8x23; -use orion::operators::tensor::math::log::log_i8::fp16x16; - -/// Cf: TensorTrait::log docstring -fn log_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::log(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - } -} diff --git a/src/operators/tensor/math/log/log_i8/fp16x16.cairo b/src/operators/tensor/math/log/log_i8/fp16x16.cairo deleted file mode 100644 index f3a06364b..000000000 --- a/src/operators/tensor/math/log/log_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_i8/fp8x23.cairo b/src/operators/tensor/math/log/log_i8/fp8x23.cairo deleted file mode 100644 index 14cbe2349..000000000 --- a/src/operators/tensor/math/log/log_i8/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/log/log_u32.cairo b/src/operators/tensor/math/log/log_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/log/log_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/log/log_u32/core.cairo b/src/operators/tensor/math/log/log_u32/core.cairo deleted file mode 100644 index c77f0c408..000000000 --- a/src/operators/tensor/math/log/log_u32/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::log::log_u32::fp8x23; -use orion::operators::tensor::math::log::log_u32::fp16x16; - -/// Cf: TensorTrait::log docstring -fn log_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::log(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - }, - Option::None(_) => Option::Some(fp16x16::log(*self)), - } -} diff --git a/src/operators/tensor/math/log/log_u32/fp16x16.cairo b/src/operators/tensor/math/log/log_u32/fp16x16.cairo deleted file mode 100644 index 152c95a6f..000000000 --- a/src/operators/tensor/math/log/log_u32/fp16x16.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/log/log_u32/fp8x23.cairo b/src/operators/tensor/math/log/log_u32/fp8x23.cairo deleted file mode 100644 index 28b90e001..000000000 --- a/src/operators/tensor/math/log/log_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::log docstring -fn log(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).ln()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From e317f43e0959e284b8e3ec25edc572d4923eeaf0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:00:57 +0300 Subject: [PATCH 021/179] add arithmetic generic --- .../implementations/tensor_fp8x23.cairo | 12 +- .../implementations/tensor_i32_fp8x23.cairo | 12 +- .../implementations/tensor_i8_fp8x23.cairo | 12 +- .../implementations/tensor_u32_fp8x23.cairo | 12 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/arithmetic.cairo | 334 ++++++++++++++- .../math/arithmetic/arithmetic_fp.cairo | 3 - .../math/arithmetic/arithmetic_fp/core.cairo | 56 --- .../arithmetic/arithmetic_fp/fp16x16.cairo | 386 ------------------ .../arithmetic/arithmetic_fp/fp8x23.cairo | 386 ------------------ .../math/arithmetic/arithmetic_i32.cairo | 338 --------------- .../math/arithmetic/arithmetic_i8.cairo | 319 --------------- .../math/arithmetic/arithmetic_u32.cairo | 158 ------- 13 files changed, 347 insertions(+), 1683 deletions(-) delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_fp.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_fp/core.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_i32.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_i8.cairo delete mode 100644 src/operators/tensor/math/arithmetic/arithmetic_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 99cb63460..7115cb47d 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -214,8 +214,7 @@ impl FP8x23TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - //add(@lhs, @rhs) - panic(array![]) + math::arithmetic::add(@lhs, @rhs) } } @@ -230,8 +229,7 @@ impl FP8x23TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - // sub(@lhs, @rhs) - panic(array![]) + math::arithmetic::sub(@lhs, @rhs) } } @@ -246,8 +244,7 @@ impl FP8x23TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - // mul(@lhs, @rhs) - panic(array![]) + math::arithmetic::mul(@lhs, @rhs) } } @@ -262,8 +259,7 @@ impl FP8x23TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - // div(@lhs, @rhs) - panic(array![]) + math::arithmetic::div(@lhs, @rhs) } } diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index b0ceef0ba..2fe64335e 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -216,8 +216,7 @@ impl i32TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - //add(@lhs, @rhs) - panic(array![]) + math::arithmetic::add(@lhs, @rhs) } } @@ -232,8 +231,7 @@ impl i32TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - // sub(@lhs, @rhs) - panic(array![]) + math::arithmetic::sub(@lhs, @rhs) } } @@ -248,8 +246,7 @@ impl i32TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - // mul(@lhs, @rhs) - panic(array![]) + math::arithmetic::mul(@lhs, @rhs) } } @@ -264,8 +261,7 @@ impl i32TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - // div(@lhs, @rhs) - panic(array![]) + math::arithmetic::div(@lhs, @rhs) } } diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index c170a38b4..877f745c0 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -218,8 +218,7 @@ impl i8TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - //add(@lhs, @rhs) - panic(array![]) + math::arithmetic::add(@lhs, @rhs) } } @@ -234,8 +233,7 @@ impl i8TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - // sub(@lhs, @rhs) - panic(array![]) + math::arithmetic::sub(@lhs, @rhs) } } @@ -250,8 +248,7 @@ impl i8TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - // mul(@lhs, @rhs) - panic(array![]) + math::arithmetic::mul(@lhs, @rhs) } } @@ -266,8 +263,7 @@ impl i8TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - // div(@lhs, @rhs) - panic(array![]) + math::arithmetic::div(@lhs, @rhs) } } diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 5cc61e9a9..eba3972fd 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -215,8 +215,7 @@ impl u32TensorAdd of Add> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise addition. fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - //add(@lhs, @rhs) - panic(array![]) + math::arithmetic::add(@lhs, @rhs) } } @@ -231,8 +230,7 @@ impl u32TensorSub of Sub> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise subtraction. fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - // sub(@lhs, @rhs) - panic(array![]) + math::arithmetic::sub(@lhs, @rhs) } } @@ -247,8 +245,7 @@ impl u32TensorMul of Mul> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise multiplication. fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - // mul(@lhs, @rhs) - panic(array![]) + math::arithmetic::mul(@lhs, @rhs) } } @@ -263,8 +260,7 @@ impl u32TensorDiv of Div> { /// # Returns /// * A `Tensor` instance representing the result of the element-wise division. fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - // div(@lhs, @rhs) - panic(array![]) + math::arithmetic::div(@lhs, @rhs) } } diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 9d4735791..b6c97052b 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -5,7 +5,7 @@ mod argmax; mod argmin; mod exp; mod log; -// mod arithmetic; +mod arithmetic; // mod equal; // mod greater; // mod greater_equal; diff --git a/src/operators/tensor/math/arithmetic.cairo b/src/operators/tensor/math/arithmetic.cairo index 9432de7da..4015aaaf6 100644 --- a/src/operators/tensor/math/arithmetic.cairo +++ b/src/operators/tensor/math/arithmetic.cairo @@ -1,4 +1,330 @@ -mod arithmetic_i8; -mod arithmetic_fp; -mod arithmetic_i32; -mod arithmetic_u32; +use core::option::OptionTrait; +use core::traits::TryInto; +use array::ArrayTrait; +use array::SpanTrait; + +use orion::operators::tensor::helpers::broadcast_shape; + +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index,}; +use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape,}; +use orion::utils::saturate; + +fn add< + T, + F, + impl TTensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, other: @Tensor +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn saturated_add< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TAdd: Add, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop, +>( + self: @Tensor, other: @Tensor, min_saturation: T, max_saturation: T +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result + .append( + saturate( + min_saturation, + max_saturation, + *(*self.data)[indices_self] + *(*other.data)[indices_other] + ) + .try_into() + .unwrap() + ); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn sub< + T, + F, + impl TTensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, other: @Tensor +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn saturated_sub< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TSub: Sub, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop, +>( + self: @Tensor, other: @Tensor, min_saturation: T, max_saturation: T +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result + .append( + saturate( + min_saturation, + max_saturation, + *(*self.data)[indices_self] - *(*other.data)[indices_other] + ) + .try_into() + .unwrap() + ); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn mul< + T, + F, + impl TTensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, other: @Tensor +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn saturated_mul< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TMul: Mul, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop, +>( + self: @Tensor, other: @Tensor, min_saturation: T, max_saturation: T +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result + .append( + saturate( + min_saturation, + max_saturation, + *(*self.data)[indices_self] * *(*other.data)[indices_other] + ) + .try_into() + .unwrap() + ); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn div< + T, + F, + impl TTensor: TensorTrait, + impl TMul: Div, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, other: @Tensor +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} + +fn saturated_div< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TDiv: Div, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop, +>( + self: @Tensor, other: @Tensor, min_saturation: T, max_saturation: T +) -> Tensor { + let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); + let mut result = ArrayTrait::new(); + + let num_elements = len_from_shape(broadcasted_shape); + + let mut n: usize = 0; + loop { + let indices_broadcasted = unravel_index(n, broadcasted_shape); + + let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); + + result + .append( + saturate( + min_saturation, + max_saturation, + *(*self.data)[indices_self] / *(*other.data)[indices_other] + ) + .try_into() + .unwrap() + ); + + n += 1; + if n == num_elements { + break (); + }; + }; + + return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); +} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_fp.cairo b/src/operators/tensor/math/arithmetic/arithmetic_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/arithmetic/arithmetic_fp/core.cairo b/src/operators/tensor/math/arithmetic/arithmetic_fp/core.cairo deleted file mode 100644 index a14b0b046..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_fp/core.cairo +++ /dev/null @@ -1,56 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::arithmetic::arithmetic_fp::fp8x23; -use orion::operators::tensor::math::arithmetic::arithmetic_fp::fp16x16; - -fn add(self: @Tensor, other: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::add(self, other)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::add(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::add(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::add(self, other)), - } -} - -fn sub(self: @Tensor, other: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sub(self, other)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sub(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::sub(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::sub(self, other)), - } -} - -fn mul(self: @Tensor, other: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::mul(self, other)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::mul(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::mul(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::mul(self, other)), - } -} - -fn div(self: @Tensor, other: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::div(self, other)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::div(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::div(self, other)), - }, - Option::None(_) => Option::Some(fp16x16::div(self, other)), - } -} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_fp/fp16x16.cairo b/src/operators/tensor/math/arithmetic/arithmetic_fp/fp16x16.cairo deleted file mode 100644 index 7b2cbe425..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_fp/fp16x16.cairo +++ /dev/null @@ -1,386 +0,0 @@ -use core::traits::Into; -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; -use traits::{TryInto}; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16Mul, FP16x16Div, FP16x16PartialOrd, FP16x16TryIntoI8 -}; -use orion::operators::tensor::helpers::broadcast_shape; -use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; -use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, }; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - -use orion::utils::saturate; - -/// Adds two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting. -fn add(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise addition of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting and saturation. -fn saturated_add_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] + *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Subtracts two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting. -fn sub(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise substraction of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise substraction with broadcasting and saturation. -fn saturated_sub_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] - *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - - -/// Multiplies two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting. -fn mul(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise multiplication of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting and saturation. -fn saturated_mul_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] * *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Divides two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting. -fn div(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div( - self: @Tensor, other: @Tensor, min: FixedType, max: FixedType -) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] / *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] / *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_fp/fp8x23.cairo b/src/operators/tensor/math/arithmetic/arithmetic_fp/fp8x23.cairo deleted file mode 100644 index 322f899ba..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_fp/fp8x23.cairo +++ /dev/null @@ -1,386 +0,0 @@ -use core::traits::Into; -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; -use traits::{TryInto}; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23Mul, FP8x23Div, FP8x23PartialOrd, FP8x23TryIntoI8 -}; -use orion::operators::tensor::helpers::broadcast_shape; -use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; -use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, }; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - -use orion::utils::saturate; - -/// Adds two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting. -fn add(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise addition of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting and saturation. -fn saturated_add_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] + *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Subtracts two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting. -fn sub(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise substraction of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise substraction with broadcasting and saturation. -fn saturated_sub_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] - *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - - -/// Multiplies two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting. -fn mul(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise multiplication of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting and saturation. -fn saturated_mul_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] * *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Divides two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting. -fn div(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div( - self: @Tensor, other: @Tensor, min: FixedType, max: FixedType -) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] / *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - *(*self.data)[indices_self] / *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_i32.cairo b/src/operators/tensor/math/arithmetic/arithmetic_i32.cairo deleted file mode 100644 index 71f531b0b..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_i32.cairo +++ /dev/null @@ -1,338 +0,0 @@ -use core::option::OptionTrait; -use core::traits::TryInto; -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::{i32::i32, i8::i8}; -use orion::operators::tensor::helpers::broadcast_shape; - -use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index, }; -use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, }; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - -use orion::utils::saturate; - -/// Adds two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting. -fn add(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise addition of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting and saturation. -fn saturated_add_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - *(*self.data)[indices_self] + *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Subtracts two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting. -fn sub(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise subtraction of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting and saturation. -fn saturated_sub_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - *(*self.data)[indices_self] - *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Multiplies two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting. -fn mul(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise multriplication of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting and saturation. -fn saturated_mul_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - *(*self.data)[indices_self] * *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Divides two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting. -fn div(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation [-128;127]. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div_i8(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate( - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - *(*self.data)[indices_self] / *(*other.data)[indices_other] - ) - .try_into() - .unwrap() - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_i8.cairo b/src/operators/tensor/math/arithmetic/arithmetic_i8.cairo deleted file mode 100644 index 9ec01202c..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_i8.cairo +++ /dev/null @@ -1,319 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::helpers::broadcast_shape; - -use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index, }; -use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, }; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - -use orion::utils::saturate; - -/// Adds two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting. -fn add(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise addition of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting and saturation. -fn saturated_add(self: @Tensor, other: @Tensor, min: i8, max: i8) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] + *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Subtracts two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting. -fn sub(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise substraction of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise substraction with broadcasting and saturation. -fn saturated_sub(self: @Tensor, other: @Tensor, min: i8, max: i8) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] - *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Multiplies two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting. -fn mul(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise multiplication of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting and saturation. -fn saturated_mul(self: @Tensor, other: @Tensor, min: i8, max: i8) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] * *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Divides two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting. -fn div(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Performs element-wise division of two `Tensor` instances with broadcasting and saturation. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// * `min` - The minimum value for saturation. -/// * `max` - The maximum value for saturation. -/// -/// # Panics -/// * Panics if the shapes of the tensors are not compatible. -/// * Panics if the gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting and saturation. -fn saturated_div(self: @Tensor, other: @Tensor, min: i8, max: i8) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result - .append( - saturate(min, max, *(*self.data)[indices_self] / *(*other.data)[indices_other]) - ); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} diff --git a/src/operators/tensor/math/arithmetic/arithmetic_u32.cairo b/src/operators/tensor/math/arithmetic/arithmetic_u32.cairo deleted file mode 100644 index cb3435be2..000000000 --- a/src/operators/tensor/math/arithmetic/arithmetic_u32.cairo +++ /dev/null @@ -1,158 +0,0 @@ -use core::option::OptionTrait; -use array::ArrayTrait; -use array::SpanTrait; -use core::traits::TryInto; - -use orion::operators::tensor::helpers::broadcast_shape; -use orion::numbers::signed_integer::{i32::i32, i8::i8}; -use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index, }; -use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, }; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - -use orion::utils::saturate; - - -/// Adds two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise addition with broadcasting. -fn add(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] + *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Subtracts two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise subtraction with broadcasting. -fn sub(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] - *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Multiplies two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise multiplication with broadcasting. -fn mul(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] * *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} - -/// Divides two `Tensor` instances element-wise with broadcasting. -/// -/// # Arguments -/// * `self` - The first tensor. -/// * `other` - The second tensor. -/// -/// # Panics -/// * Panics if the shape of tensors are not compatible. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A `Tensor` instance representing the result of the element-wise division with broadcasting. -fn div(self: @Tensor, other: @Tensor) -> Tensor { - let broadcasted_shape = broadcast_shape(*self.shape, *other.shape); - let mut result = ArrayTrait::new(); - - let num_elements = len_from_shape(broadcasted_shape); - - let mut n: usize = 0; - loop { - let indices_broadcasted = unravel_index(n, broadcasted_shape); - - let indices_self = broadcast_index_mapping(*self.shape, indices_broadcasted); - let indices_other = broadcast_index_mapping(*other.shape, indices_broadcasted); - - result.append(*(*self.data)[indices_self] / *(*other.data)[indices_other]); - - n += 1; - if n == num_elements { - break (); - }; - }; - - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); -} From 6352998fe62933bf7782bc6dfe4084bd65a0af6d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:24:22 +0300 Subject: [PATCH 022/179] add generic equal --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/equal.cairo | 54 +++++++++++++++++-- .../tensor/math/equal/equal_fp.cairo | 3 -- .../tensor/math/equal/equal_fp/core.cairo | 18 ------- .../tensor/math/equal/equal_fp/fp16x16.cairo | 48 ----------------- .../tensor/math/equal/equal_fp/fp8x23.cairo | 48 ----------------- .../tensor/math/equal/equal_i32.cairo | 43 --------------- .../tensor/math/equal/equal_i8.cairo | 43 --------------- .../tensor/math/equal/equal_u32.cairo | 42 --------------- 13 files changed, 55 insertions(+), 258 deletions(-) delete mode 100644 src/operators/tensor/math/equal/equal_fp.cairo delete mode 100644 src/operators/tensor/math/equal/equal_fp/core.cairo delete mode 100644 src/operators/tensor/math/equal/equal_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/equal/equal_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/equal/equal_i32.cairo delete mode 100644 src/operators/tensor/math/equal/equal_i8.cairo delete mode 100644 src/operators/tensor/math/equal/equal_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 7115cb47d..b06390547 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -82,8 +82,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - //equal(self, other) - panic(array![]) + math::equal::equal(self, other) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 2fe64335e..3f746fc8f 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -84,8 +84,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - //equal(self, other) - panic(array![]) + math::equal::equal(self, other) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 877f745c0..853041596 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -86,8 +86,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - //equal(self, other) - panic(array![]) + math::equal::equal(self, other) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index eba3972fd..4f425da5d 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -83,8 +83,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn equal(self: @Tensor, other: @Tensor) -> Tensor { - //equal(self, other) - panic(array![]) + math::equal::equal(self, other) } fn greater(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index b6c97052b..8d2e73788 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -6,7 +6,7 @@ mod argmin; mod exp; mod log; mod arithmetic; -// mod equal; +mod equal; // mod greater; // mod greater_equal; // mod less; diff --git a/src/operators/tensor/math/equal.cairo b/src/operators/tensor/math/equal.cairo index e3dbe48a0..7adf487ab 100644 --- a/src/operators/tensor/math/equal.cairo +++ b/src/operators/tensor/math/equal.cairo @@ -1,4 +1,50 @@ -mod equal_i8; -mod equal_i32; -mod equal_u32; -mod equal_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::equal docstring +fn equal< + T, + F, + impl UsizeFTensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { + (y, z) + } else { + (z, y) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + if bigger_current_index == smaller_current_index { + data_result.append(1); + } else { + data_result.append(0); + }; + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/equal/equal_fp.cairo b/src/operators/tensor/math/equal/equal_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/equal/equal_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/equal/equal_fp/core.cairo b/src/operators/tensor/math/equal/equal_fp/core.cairo deleted file mode 100644 index aba2e6e73..000000000 --- a/src/operators/tensor/math/equal/equal_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::equal::equal_fp::fp8x23; -use orion::operators::tensor::math::equal::equal_fp::fp16x16; - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::equal(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::equal(y, z)), - } -} diff --git a/src/operators/tensor/math/equal/equal_fp/fp16x16.cairo b/src/operators/tensor/math/equal/equal_fp/fp16x16.cairo deleted file mode 100644 index 4ed415c10..000000000 --- a/src/operators/tensor/math/equal/equal_fp/fp16x16.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialEq; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - if bigger_current_index == smaller_current_index { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/equal/equal_fp/fp8x23.cairo b/src/operators/tensor/math/equal/equal_fp/fp8x23.cairo deleted file mode 100644 index f1acc3f75..000000000 --- a/src/operators/tensor/math/equal/equal_fp/fp8x23.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialEq; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - if bigger_current_index == smaller_current_index { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/equal/equal_i32.cairo b/src/operators/tensor/math/equal/equal_i32.cairo deleted file mode 100644 index 43e1071db..000000000 --- a/src/operators/tensor/math/equal/equal_i32.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - if bigger_current_index == smaller_current_index { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/equal/equal_i8.cairo b/src/operators/tensor/math/equal/equal_i8.cairo deleted file mode 100644 index 4509aa253..000000000 --- a/src/operators/tensor/math/equal/equal_i8.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - if bigger_current_index == smaller_current_index { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/equal/equal_u32.cairo b/src/operators/tensor/math/equal/equal_u32.cairo deleted file mode 100644 index dfc678a30..000000000 --- a/src/operators/tensor/math/equal/equal_u32.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::equal docstring -fn equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - if bigger_current_index == smaller_current_index { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From e901b14155720cc9b2d010bae68e4810c25bb7a6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:28:50 +0300 Subject: [PATCH 023/179] add greater generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/greater.cairo | 60 +++++++++++++++++-- .../tensor/math/greater/greater_fp.cairo | 3 - .../tensor/math/greater/greater_fp/core.cairo | 18 ------ .../math/greater/greater_fp/fp16x16.cairo | 52 ---------------- .../math/greater/greater_fp/fp8x23.cairo | 52 ---------------- .../tensor/math/greater/greater_i32.cairo | 49 --------------- .../tensor/math/greater/greater_i8.cairo | 49 --------------- .../tensor/math/greater/greater_u32.cairo | 48 --------------- 13 files changed, 61 insertions(+), 284 deletions(-) delete mode 100644 src/operators/tensor/math/greater/greater_fp.cairo delete mode 100644 src/operators/tensor/math/greater/greater_fp/core.cairo delete mode 100644 src/operators/tensor/math/greater/greater_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/greater/greater_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/greater/greater_i32.cairo delete mode 100644 src/operators/tensor/math/greater/greater_i8.cairo delete mode 100644 src/operators/tensor/math/greater/greater_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index b06390547..0245f0e38 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -86,8 +86,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - // greater(self, other) - panic(array![]) + math::greater::greater(self, other) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 3f746fc8f..921b42415 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -88,8 +88,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - // greater(self, other) - panic(array![]) + math::greater::greater(self, other) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 853041596..2778e93f0 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -90,8 +90,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - // greater(self, other) - panic(array![]) + math::greater::greater(self, other) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 4f425da5d..61cc56daa 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -87,8 +87,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn greater(self: @Tensor, other: @Tensor) -> Tensor { - // greater(self, other) - panic(array![]) + math::greater::greater(self, other) } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 8d2e73788..80db2c841 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -7,7 +7,7 @@ mod exp; mod log; mod arithmetic; mod equal; -// mod greater; +mod greater; // mod greater_equal; // mod less; // mod less_equal; diff --git a/src/operators/tensor/math/greater.cairo b/src/operators/tensor/math/greater.cairo index e6e48bb70..ac20b6d09 100644 --- a/src/operators/tensor/math/greater.cairo +++ b/src/operators/tensor/math/greater.cairo @@ -1,4 +1,56 @@ -mod greater_i8; -mod greater_i32; -mod greater_u32; -mod greater_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::greater docstring +fn greater< + T, + F, + impl UsizeFTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if y_value > z_value { + data_result.append(1); + } else { + data_result.append(0); + }; + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/greater/greater_fp.cairo b/src/operators/tensor/math/greater/greater_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/greater/greater_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/greater/greater_fp/core.cairo b/src/operators/tensor/math/greater/greater_fp/core.cairo deleted file mode 100644 index f58a10621..000000000 --- a/src/operators/tensor/math/greater/greater_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::greater::greater_fp::fp8x23; -use orion::operators::tensor::math::greater::greater_fp::fp16x16; - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::greater(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::greater(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::greater(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::greater(y, z)), - } -} diff --git a/src/operators/tensor/math/greater/greater_fp/fp16x16.cairo b/src/operators/tensor/math/greater/greater_fp/fp16x16.cairo deleted file mode 100644 index 50b522436..000000000 --- a/src/operators/tensor/math/greater/greater_fp/fp16x16.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; - -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater/greater_fp/fp8x23.cairo b/src/operators/tensor/math/greater/greater_fp/fp8x23.cairo deleted file mode 100644 index d80fd8049..000000000 --- a/src/operators/tensor/math/greater/greater_fp/fp8x23.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; - -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater/greater_i32.cairo b/src/operators/tensor/math/greater/greater_i32.cairo deleted file mode 100644 index d4767a329..000000000 --- a/src/operators/tensor/math/greater/greater_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater/greater_i8.cairo b/src/operators/tensor/math/greater/greater_i8.cairo deleted file mode 100644 index d10a4e139..000000000 --- a/src/operators/tensor/math/greater/greater_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater/greater_u32.cairo b/src/operators/tensor/math/greater/greater_u32.cairo deleted file mode 100644 index 0918d3110..000000000 --- a/src/operators/tensor/math/greater/greater_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater docstring -fn greater(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From f37096271d4aaf79962e97147c9535b114350ceb Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:31:30 +0300 Subject: [PATCH 024/179] add generic greater_equal --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/greater_equal.cairo | 60 +++++++++++++++++-- .../math/greater_equal/greater_equal_fp.cairo | 3 - .../greater_equal/greater_equal_fp/core.cairo | 19 ------ .../greater_equal_fp/fp16x16.cairo | 51 ---------------- .../greater_equal_fp/fp8x23.cairo | 52 ---------------- .../greater_equal/greater_equal_i32.cairo | 49 --------------- .../math/greater_equal/greater_equal_i8.cairo | 49 --------------- .../greater_equal/greater_equal_u32.cairo | 48 --------------- 13 files changed, 61 insertions(+), 284 deletions(-) delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_fp.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_fp/core.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_i32.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_i8.cairo delete mode 100644 src/operators/tensor/math/greater_equal/greater_equal_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 0245f0e38..927720a2c 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -90,8 +90,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - //greater_equal(self, other) - panic(array![]) + math::greater_equal::greater_equal(self, other) } fn less(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 921b42415..fe516b985 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -92,8 +92,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - //greater_equal(self, other) - panic(array![]) + math::greater_equal::greater_equal(self, other) } fn less(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 2778e93f0..b8e36e5f5 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -94,8 +94,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - //greater_equal(self, other) - panic(array![]) + math::greater_equal::greater_equal(self, other) } fn less(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 61cc56daa..9e7d87e87 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -91,8 +91,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - //greater_equal(self, other) - panic(array![]) + math::greater_equal::greater_equal(self, other) } fn less(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 80db2c841..476b91a50 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -8,7 +8,7 @@ mod log; mod arithmetic; mod equal; mod greater; -// mod greater_equal; +mod greater_equal; // mod less; // mod less_equal; // mod abs; diff --git a/src/operators/tensor/math/greater_equal.cairo b/src/operators/tensor/math/greater_equal.cairo index 5c2aeb345..582760204 100644 --- a/src/operators/tensor/math/greater_equal.cairo +++ b/src/operators/tensor/math/greater_equal.cairo @@ -1,4 +1,56 @@ -mod greater_equal_i8; -mod greater_equal_i32; -mod greater_equal_u32; -mod greater_equal_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::greater_equal docstring +fn greater_equal< + T, + F, + impl UsizeFTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if y_value >= z_value { + data_result.append(1); + } else { + data_result.append(0); + }; + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_fp.cairo b/src/operators/tensor/math/greater_equal/greater_equal_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/greater_equal/greater_equal_fp/core.cairo b/src/operators/tensor/math/greater_equal/greater_equal_fp/core.cairo deleted file mode 100644 index e15b2bb3e..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_fp/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::greater_equal::greater_equal_fp::fp8x23; -use orion::operators::tensor::math::greater_equal::greater_equal_fp::fp16x16; - - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::greater_equal(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::greater_equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::greater_equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::greater_equal(y, z)), - } -} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_fp/fp16x16.cairo b/src/operators/tensor/math/greater_equal/greater_equal_fp/fp16x16.cairo deleted file mode 100644 index eced1f429..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_fp/fp16x16.cairo +++ /dev/null @@ -1,51 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; - -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_fp/fp8x23.cairo b/src/operators/tensor/math/greater_equal/greater_equal_fp/fp8x23.cairo deleted file mode 100644 index f2a773cf1..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_fp/fp8x23.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; - -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_i32.cairo b/src/operators/tensor/math/greater_equal/greater_equal_i32.cairo deleted file mode 100644 index dab6500c5..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_i8.cairo b/src/operators/tensor/math/greater_equal/greater_equal_i8.cairo deleted file mode 100644 index 69427ffbf..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/greater_equal/greater_equal_u32.cairo b/src/operators/tensor/math/greater_equal/greater_equal_u32.cairo deleted file mode 100644 index f49383ba1..000000000 --- a/src/operators/tensor/math/greater_equal/greater_equal_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::greater_equal docstring -fn greater_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From bcb28b56dc5d3000947da6b2e4db36db6399672d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:34:33 +0300 Subject: [PATCH 025/179] add less generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/less.cairo | 61 +++++++++++++++++-- src/operators/tensor/math/less/less_fp.cairo | 3 - .../tensor/math/less/less_fp/core.cairo | 18 ------ .../tensor/math/less/less_fp/fp16x16.cairo | 52 ---------------- .../tensor/math/less/less_fp/fp8x23.cairo | 52 ---------------- src/operators/tensor/math/less/less_i32.cairo | 50 --------------- src/operators/tensor/math/less/less_i8.cairo | 50 --------------- src/operators/tensor/math/less/less_u32.cairo | 48 --------------- 13 files changed, 62 insertions(+), 286 deletions(-) delete mode 100644 src/operators/tensor/math/less/less_fp.cairo delete mode 100644 src/operators/tensor/math/less/less_fp/core.cairo delete mode 100644 src/operators/tensor/math/less/less_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/less/less_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/less/less_i32.cairo delete mode 100644 src/operators/tensor/math/less/less_i8.cairo delete mode 100644 src/operators/tensor/math/less/less_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 927720a2c..b02fb0a29 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -94,8 +94,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn less(self: @Tensor, other: @Tensor) -> Tensor { - //less(self, other) - panic(array![]) + math::less::less(self, other) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index fe516b985..a1f47471c 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -96,8 +96,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn less(self: @Tensor, other: @Tensor) -> Tensor { - //less(self, other) - panic(array![]) + math::less::less(self, other) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index b8e36e5f5..5d4878316 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -98,8 +98,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn less(self: @Tensor, other: @Tensor) -> Tensor { - //less(self, other) - panic(array![]) + math::less::less(self, other) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 9e7d87e87..90e196a3f 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -95,8 +95,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn less(self: @Tensor, other: @Tensor) -> Tensor { - //less(self, other) - panic(array![]) + math::less::less(self, other) } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 476b91a50..f53d832eb 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -9,7 +9,7 @@ mod arithmetic; mod equal; mod greater; mod greater_equal; -// mod less; +mod less; // mod less_equal; // mod abs; // mod ceil; diff --git a/src/operators/tensor/math/less.cairo b/src/operators/tensor/math/less.cairo index db7c80491..2f2733888 100644 --- a/src/operators/tensor/math/less.cairo +++ b/src/operators/tensor/math/less.cairo @@ -1,4 +1,57 @@ -mod less_i8; -mod less_i32; -mod less_u32; -mod less_fp; +use core::debug::PrintTrait; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::less docstring +fn less< + T, + F, + impl UsizeFTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if y_value < z_value { + data_result.append(1); + } else { + data_result.append(0); + }; + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/less/less_fp.cairo b/src/operators/tensor/math/less/less_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/less/less_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/less/less_fp/core.cairo b/src/operators/tensor/math/less/less_fp/core.cairo deleted file mode 100644 index a38b961fa..000000000 --- a/src/operators/tensor/math/less/less_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::less::less_fp::fp8x23; -use orion::operators::tensor::math::less::less_fp::fp16x16; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::less(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::less(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::less(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::less(y, z)), - } -} diff --git a/src/operators/tensor/math/less/less_fp/fp16x16.cairo b/src/operators/tensor/math/less/less_fp/fp16x16.cairo deleted file mode 100644 index 1f8cd8cf6..000000000 --- a/src/operators/tensor/math/less/less_fp/fp16x16.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less/less_fp/fp8x23.cairo b/src/operators/tensor/math/less/less_fp/fp8x23.cairo deleted file mode 100644 index 79b5fbf81..000000000 --- a/src/operators/tensor/math/less/less_fp/fp8x23.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less/less_i32.cairo b/src/operators/tensor/math/less/less_i32.cairo deleted file mode 100644 index 7f35cd8b6..000000000 --- a/src/operators/tensor/math/less/less_i32.cairo +++ /dev/null @@ -1,50 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less/less_i8.cairo b/src/operators/tensor/math/less/less_i8.cairo deleted file mode 100644 index 19c387235..000000000 --- a/src/operators/tensor/math/less/less_i8.cairo +++ /dev/null @@ -1,50 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less/less_u32.cairo b/src/operators/tensor/math/less/less_u32.cairo deleted file mode 100644 index 230852809..000000000 --- a/src/operators/tensor/math/less/less_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less docstring -fn less(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From ba717d21c1af21d882afe800103dc9903c2088c0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:36:25 +0300 Subject: [PATCH 026/179] add less_equal generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/less_equal.cairo | 60 +++++++++++++++++-- .../math/less_equal/less_equal_fp.cairo | 3 - .../math/less_equal/less_equal_fp/core.cairo | 18 ------ .../less_equal/less_equal_fp/fp16x16.cairo | 51 ---------------- .../less_equal/less_equal_fp/fp8x23.cairo | 51 ---------------- .../math/less_equal/less_equal_i32.cairo | 49 --------------- .../math/less_equal/less_equal_i8.cairo | 49 --------------- .../math/less_equal/less_equal_u32.cairo | 48 --------------- 13 files changed, 61 insertions(+), 282 deletions(-) delete mode 100644 src/operators/tensor/math/less_equal/less_equal_fp.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_fp/core.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_i32.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_i8.cairo delete mode 100644 src/operators/tensor/math/less_equal/less_equal_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index b02fb0a29..b19757ef8 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -98,8 +98,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - //less_equal(self, other) - panic(array![]) + math::less_equal::less_equal(self, other) } fn abs(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index a1f47471c..1c23e3e57 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -100,8 +100,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - //less_equal(self, other) - panic(array![]) + math::less_equal::less_equal(self, other) } fn abs(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 5d4878316..bee77a2c7 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -102,8 +102,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - //less_equal(self, other) - panic(array![]) + math::less_equal::less_equal(self, other) } fn abs(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 90e196a3f..cbbb724a0 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -99,8 +99,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - //less_equal(self, other) - panic(array![]) + math::less_equal::less_equal(self, other) } fn abs(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index f53d832eb..544d76c28 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -10,7 +10,7 @@ mod equal; mod greater; mod greater_equal; mod less; -// mod less_equal; +mod less_equal; // mod abs; // mod ceil; // mod sin; diff --git a/src/operators/tensor/math/less_equal.cairo b/src/operators/tensor/math/less_equal.cairo index 7f0937936..86c06a7f8 100644 --- a/src/operators/tensor/math/less_equal.cairo +++ b/src/operators/tensor/math/less_equal.cairo @@ -1,4 +1,56 @@ -mod less_equal_i8; -mod less_equal_i32; -mod less_equal_u32; -mod less_equal_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::less_equal docstring +fn less_equal< + T, + F, + impl UsizeFTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if y_value <= z_value { + data_result.append(1); + } else { + data_result.append(0); + }; + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/less_equal/less_equal_fp.cairo b/src/operators/tensor/math/less_equal/less_equal_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/less_equal/less_equal_fp/core.cairo b/src/operators/tensor/math/less_equal/less_equal_fp/core.cairo deleted file mode 100644 index e15f69199..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::less_equal::less_equal_fp::fp8x23; -use orion::operators::tensor::math::less_equal::less_equal_fp::fp16x16; - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::less_equal(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::less_equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::less_equal(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::less_equal(y, z)), - } -} diff --git a/src/operators/tensor/math/less_equal/less_equal_fp/fp16x16.cairo b/src/operators/tensor/math/less_equal/less_equal_fp/fp16x16.cairo deleted file mode 100644 index f1f432b4f..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_fp/fp16x16.cairo +++ /dev/null @@ -1,51 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less_equal/less_equal_fp/fp8x23.cairo b/src/operators/tensor/math/less_equal/less_equal_fp/fp8x23.cairo deleted file mode 100644 index 7ed0f3862..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_fp/fp8x23.cairo +++ /dev/null @@ -1,51 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less_equal/less_equal_i32.cairo b/src/operators/tensor/math/less_equal/less_equal_i32.cairo deleted file mode 100644 index c00b2a2bc..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less_equal/less_equal_i8.cairo b/src/operators/tensor/math/less_equal/less_equal_i8.cairo deleted file mode 100644 index 6bc455c66..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/less_equal/less_equal_u32.cairo b/src/operators/tensor/math/less_equal/less_equal_u32.cairo deleted file mode 100644 index 2fb861bc8..000000000 --- a/src/operators/tensor/math/less_equal/less_equal_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::less_equal docstring -fn less_equal(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); - }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From acd9af185caf6ad180b5a590355d7c18bdfc4a00 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:39:19 +0300 Subject: [PATCH 027/179] add abs generic --- src/operators/tensor/implementations/tensor_fp8x23.cairo | 3 +-- .../tensor/implementations/tensor_i32_fp8x23.cairo | 3 +-- src/operators/tensor/implementations/tensor_i8_fp8x23.cairo | 3 +-- .../tensor/implementations/tensor_u32_fp8x23.cairo | 3 +-- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/abs.cairo | 6 ++++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index b19757ef8..f849bff9f 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -102,8 +102,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - //math::abs::abs(*self) - panic(array![]) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 1c23e3e57..4cb1273e6 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -104,8 +104,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - //math::abs::abs(*self) - panic(array![]) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index bee77a2c7..1cd1fc922 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -106,8 +106,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - //math::abs::abs(*self) - panic(array![]) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index cbbb724a0..664cb9790 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -103,8 +103,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn abs(self: @Tensor) -> Tensor { - //math::abs::abs(*self) - panic(array![]) + math::abs::abs(*self) } fn ceil(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 544d76c28..81ef6fcf7 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -11,7 +11,7 @@ mod greater; mod greater_equal; mod less; mod less_equal; -// mod abs; +mod abs; // mod ceil; // mod sin; // mod cos; diff --git a/src/operators/tensor/math/abs.cairo b/src/operators/tensor/math/abs.cairo index aa0f4cc1d..aa2d64806 100644 --- a/src/operators/tensor/math/abs.cairo +++ b/src/operators/tensor/math/abs.cairo @@ -8,8 +8,10 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::abs docstring fn abs< T, - impl TTensor: TensorTrait, - impl TNumberTrait: NumberTrait, + F, + MAG, + impl TTensor: TensorTrait, + impl TNumberTrait: NumberTrait, impl TCopy: Copy, impl TDrop: Drop >( From 4f7e0f3f1430e90a283bb20bf23ed41ad647d2cf Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:44:34 +0300 Subject: [PATCH 028/179] add generic ceil --- .../implementations/tensor_fp8x23.cairo | 2 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/ceil.cairo | 35 ++++++++++++++++++- src/operators/tensor/math/ceil/ceil_fp.cairo | 3 -- .../tensor/math/ceil/ceil_fp/core.cairo | 20 ----------- .../tensor/math/ceil/ceil_fp/fp16x16.cairo | 26 -------------- .../tensor/math/ceil/ceil_fp/fp8x23.cairo | 27 -------------- 7 files changed, 36 insertions(+), 79 deletions(-) delete mode 100644 src/operators/tensor/math/ceil/ceil_fp.cairo delete mode 100644 src/operators/tensor/math/ceil/ceil_fp/core.cairo delete mode 100644 src/operators/tensor/math/ceil/ceil_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/ceil/ceil_fp/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index f849bff9f..3d8e6dfc1 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -106,7 +106,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with FP8x23']) + math::ceil::ceil(*self) } fn sin(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 81ef6fcf7..41b0e08a6 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -12,7 +12,7 @@ mod greater_equal; mod less; mod less_equal; mod abs; -// mod ceil; +mod ceil; // mod sin; // mod cos; // mod asin; diff --git a/src/operators/tensor/math/ceil.cairo b/src/operators/tensor/math/ceil.cairo index 2aff6ecb7..3e83ea605 100644 --- a/src/operators/tensor/math/ceil.cairo +++ b/src/operators/tensor/math/ceil.cairo @@ -1 +1,34 @@ -mod ceil_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::ceil docstring +fn ceil< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + data_result.append((*item).ceil()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + diff --git a/src/operators/tensor/math/ceil/ceil_fp.cairo b/src/operators/tensor/math/ceil/ceil_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/ceil/ceil_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/ceil/ceil_fp/core.cairo b/src/operators/tensor/math/ceil/ceil_fp/core.cairo deleted file mode 100644 index 8b40cc10c..000000000 --- a/src/operators/tensor/math/ceil/ceil_fp/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::math::ceil::ceil_fp::fp8x23; -use orion::operators::tensor::math::ceil::ceil_fp::fp16x16; - - -/// Cf: TensorTrait::ceil docstring -fn ceil(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::ceil(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::ceil(*z)), - }, - Option::None(_) => Option::Some(fp16x16::ceil(*z)), - }, - Option::None(_) => Option::Some(fp16x16::ceil(*z)), - } -} diff --git a/src/operators/tensor/math/ceil/ceil_fp/fp16x16.cairo b/src/operators/tensor/math/ceil/ceil_fp/fp16x16.cairo deleted file mode 100644 index ea3ce845c..000000000 --- a/src/operators/tensor/math/ceil/ceil_fp/fp16x16.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::ceil docstring -fn ceil(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).ceil()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/tensor/math/ceil/ceil_fp/fp8x23.cairo b/src/operators/tensor/math/ceil/ceil_fp/fp8x23.cairo deleted file mode 100644 index 814618b1e..000000000 --- a/src/operators/tensor/math/ceil/ceil_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::ceil docstring -fn ceil(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - data_result.append((*item).ceil()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - From 72bfa85c722c9881178449026848faa1b964bcb6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:49:28 +0300 Subject: [PATCH 029/179] add generic sin --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/sin.cairo | 78 ++++++++++++++++++- src/operators/tensor/math/sin/sin_fp.cairo | 3 - .../tensor/math/sin/sin_fp/core.cairo | 18 ----- .../tensor/math/sin/sin_fp/fp16x16.cairo | 27 ------- .../tensor/math/sin/sin_fp/fp8x23.cairo | 28 ------- src/operators/tensor/math/sin/sin_i32.cairo | 3 - .../tensor/math/sin/sin_i32/core.cairo | 19 ----- .../tensor/math/sin/sin_i32/fp16x16.cairo | 29 ------- .../tensor/math/sin/sin_i32/fp8x23.cairo | 30 ------- src/operators/tensor/math/sin/sin_i8.cairo | 3 - .../tensor/math/sin/sin_i8/core.cairo | 19 ----- .../tensor/math/sin/sin_i8/fp16x16.cairo | 29 ------- .../tensor/math/sin/sin_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/sin/sin_u32.cairo | 3 - .../tensor/math/sin/sin_u32/core.cairo | 19 ----- .../tensor/math/sin/sin_u32/fp16x16.cairo | 29 ------- .../tensor/math/sin/sin_u32/fp8x23.cairo | 29 ------- 22 files changed, 79 insertions(+), 330 deletions(-) delete mode 100644 src/operators/tensor/math/sin/sin_fp.cairo delete mode 100644 src/operators/tensor/math/sin/sin_fp/core.cairo delete mode 100644 src/operators/tensor/math/sin/sin_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sin/sin_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i32.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i32/core.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i8.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i8/core.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sin/sin_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sin/sin_u32.cairo delete mode 100644 src/operators/tensor/math/sin/sin_u32/core.cairo delete mode 100644 src/operators/tensor/math/sin/sin_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sin/sin_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 3d8e6dfc1..cf128ba43 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -110,8 +110,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - // sin_FP8x23(self).unwrap() - panic(array![]) + math::sin::sin_from_fp(*self) } fn cos(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 4cb1273e6..ed1ce3816 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -112,8 +112,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - // sin_i32(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn cos(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 1cd1fc922..8c615078a 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -114,8 +114,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - // sin_i8(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn cos(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 664cb9790..459525302 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -111,8 +111,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - // sin_u32(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn cos(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 41b0e08a6..428041ca3 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -13,7 +13,7 @@ mod less; mod less_equal; mod abs; mod ceil; -// mod sin; +mod sin; // mod cos; // mod asin; // mod cumsum; diff --git a/src/operators/tensor/math/sin.cairo b/src/operators/tensor/math/sin.cairo index 7d26fe617..a94b35d0f 100644 --- a/src/operators/tensor/math/sin.cairo +++ b/src/operators/tensor/math/sin.cairo @@ -1,4 +1,74 @@ -mod sin_i8; -mod sin_i32; -mod sin_u32; -mod sin_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::sin docstring +fn sin_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .sin() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::sin docstring +fn sin_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).sin()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + diff --git a/src/operators/tensor/math/sin/sin_fp.cairo b/src/operators/tensor/math/sin/sin_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sin/sin_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sin/sin_fp/core.cairo b/src/operators/tensor/math/sin/sin_fp/core.cairo deleted file mode 100644 index f761707af..000000000 --- a/src/operators/tensor/math/sin/sin_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::sin::sin_fp::fp8x23; -use orion::operators::tensor::math::sin::sin_fp::fp16x16; - -/// Cf: TensorTrait::sin docstring -fn sin(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sin(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - } -} diff --git a/src/operators/tensor/math/sin/sin_fp/fp16x16.cairo b/src/operators/tensor/math/sin/sin_fp/fp16x16.cairo deleted file mode 100644 index 296eeed09..000000000 --- a/src/operators/tensor/math/sin/sin_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sin/sin_fp/fp8x23.cairo b/src/operators/tensor/math/sin/sin_fp/fp8x23.cairo deleted file mode 100644 index 31a39449b..000000000 --- a/src/operators/tensor/math/sin/sin_fp/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sin/sin_i32.cairo b/src/operators/tensor/math/sin/sin_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sin/sin_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sin/sin_i32/core.cairo b/src/operators/tensor/math/sin/sin_i32/core.cairo deleted file mode 100644 index 4bcbd118e..000000000 --- a/src/operators/tensor/math/sin/sin_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sin::sin_i32::fp8x23; -use orion::operators::tensor::math::sin::sin_i32::fp16x16; - -/// Cf: TensorTrait::sin docstring -fn sin_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sin(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - } -} diff --git a/src/operators/tensor/math/sin/sin_i32/fp16x16.cairo b/src/operators/tensor/math/sin/sin_i32/fp16x16.cairo deleted file mode 100644 index b9b4032ad..000000000 --- a/src/operators/tensor/math/sin/sin_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sin/sin_i32/fp8x23.cairo b/src/operators/tensor/math/sin/sin_i32/fp8x23.cairo deleted file mode 100644 index 5510fd5d7..000000000 --- a/src/operators/tensor/math/sin/sin_i32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sin/sin_i8.cairo b/src/operators/tensor/math/sin/sin_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sin/sin_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sin/sin_i8/core.cairo b/src/operators/tensor/math/sin/sin_i8/core.cairo deleted file mode 100644 index f16fcea69..000000000 --- a/src/operators/tensor/math/sin/sin_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::sin::sin_i8::fp8x23; -use orion::operators::tensor::math::sin::sin_i8::fp16x16; - -/// Cf: TensorTrait::sin docstring -fn sin_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sin(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - } -} diff --git a/src/operators/tensor/math/sin/sin_i8/fp16x16.cairo b/src/operators/tensor/math/sin/sin_i8/fp16x16.cairo deleted file mode 100644 index c04d639a1..000000000 --- a/src/operators/tensor/math/sin/sin_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sin/sin_i8/fp8x23.cairo b/src/operators/tensor/math/sin/sin_i8/fp8x23.cairo deleted file mode 100644 index badd8b4ee..000000000 --- a/src/operators/tensor/math/sin/sin_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sin/sin_u32.cairo b/src/operators/tensor/math/sin/sin_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sin/sin_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sin/sin_u32/core.cairo b/src/operators/tensor/math/sin/sin_u32/core.cairo deleted file mode 100644 index c3cb26fa1..000000000 --- a/src/operators/tensor/math/sin/sin_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sin::sin_u32::fp8x23; -use orion::operators::tensor::math::sin::sin_u32::fp16x16; - -/// Cf: TensorTrait::sin docstring -fn sin_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sin(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sin(*self)), - } -} diff --git a/src/operators/tensor/math/sin/sin_u32/fp16x16.cairo b/src/operators/tensor/math/sin/sin_u32/fp16x16.cairo deleted file mode 100644 index c784e5721..000000000 --- a/src/operators/tensor/math/sin/sin_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sin/sin_u32/fp8x23.cairo b/src/operators/tensor/math/sin/sin_u32/fp8x23.cairo deleted file mode 100644 index 0a70bd8dc..000000000 --- a/src/operators/tensor/math/sin/sin_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sin docstring -fn sin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From 7fbd3f103867f995d407690e2bd1a1f780be1893 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:54:29 +0300 Subject: [PATCH 030/179] add generic cos --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/cos.cairo | 78 ++++++++++++++++++- src/operators/tensor/math/cos/cos_fp.cairo | 3 - .../tensor/math/cos/cos_fp/core.cairo | 18 ----- .../tensor/math/cos/cos_fp/fp16x16.cairo | 27 ------- .../tensor/math/cos/cos_fp/fp8x23.cairo | 27 ------- src/operators/tensor/math/cos/cos_i32.cairo | 3 - .../tensor/math/cos/cos_i32/core.cairo | 19 ----- .../tensor/math/cos/cos_i32/fp16x16.cairo | 29 ------- .../tensor/math/cos/cos_i32/fp8x23.cairo | 29 ------- src/operators/tensor/math/cos/cos_i8.cairo | 3 - .../tensor/math/cos/cos_i8/core.cairo | 19 ----- .../tensor/math/cos/cos_i8/fp16x16.cairo | 29 ------- .../tensor/math/cos/cos_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/cos/cos_u32.cairo | 3 - .../tensor/math/cos/cos_u32/core.cairo | 19 ----- .../tensor/math/cos/cos_u32/fp16x16.cairo | 29 ------- .../tensor/math/cos/cos_u32/fp8x23.cairo | 29 ------- 22 files changed, 79 insertions(+), 328 deletions(-) delete mode 100644 src/operators/tensor/math/cos/cos_fp.cairo delete mode 100644 src/operators/tensor/math/cos/cos_fp/core.cairo delete mode 100644 src/operators/tensor/math/cos/cos_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cos/cos_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i32.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i32/core.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i8.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i8/core.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cos/cos_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cos/cos_u32.cairo delete mode 100644 src/operators/tensor/math/cos/cos_u32/core.cairo delete mode 100644 src/operators/tensor/math/cos/cos_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cos/cos_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index cf128ba43..d884b194d 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -114,8 +114,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn cos(self: @Tensor) -> Tensor { - // cos_FP8x23(self).unwrap() - panic(array![]) + math::cos::cos_from_fp(*self) } fn asin(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index ed1ce3816..31ce8663b 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -116,8 +116,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn cos(self: @Tensor) -> Tensor { - // cos_i32(self).unwrap() - panic(array![]) + math::cos::cos_from_int(*self) } fn asin(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 8c615078a..37cbf6d08 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -118,8 +118,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn cos(self: @Tensor) -> Tensor { - // cos_i8(self).unwrap() - panic(array![]) + math::cos::cos_from_int(*self) } fn asin(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 459525302..19d0d4b54 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -115,8 +115,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn cos(self: @Tensor) -> Tensor { - // cos_u32(self).unwrap() - panic(array![]) + math::cos::cos_from_int(*self) } fn asin(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 428041ca3..9cabe2848 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -14,7 +14,7 @@ mod less_equal; mod abs; mod ceil; mod sin; -// mod cos; +mod cos; // mod asin; // mod cumsum; // mod flatten; diff --git a/src/operators/tensor/math/cos.cairo b/src/operators/tensor/math/cos.cairo index 6184ac825..aab2ecfe2 100644 --- a/src/operators/tensor/math/cos.cairo +++ b/src/operators/tensor/math/cos.cairo @@ -1,4 +1,74 @@ -mod cos_i8; -mod cos_i32; -mod cos_u32; -mod cos_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: TensorTrait::cos docstring +fn cos_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .cos() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::cos docstring +fn cos_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).cos()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/cos/cos_fp.cairo b/src/operators/tensor/math/cos/cos_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cos/cos_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cos/cos_fp/core.cairo b/src/operators/tensor/math/cos/cos_fp/core.cairo deleted file mode 100644 index cae21faf3..000000000 --- a/src/operators/tensor/math/cos/cos_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::cos::cos_fp::fp8x23; -use orion::operators::tensor::math::cos::cos_fp::fp16x16; - -/// Cf: TensorTrait::cos docstring -fn cos(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cos(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - } -} diff --git a/src/operators/tensor/math/cos/cos_fp/fp16x16.cairo b/src/operators/tensor/math/cos/cos_fp/fp16x16.cairo deleted file mode 100644 index 747638960..000000000 --- a/src/operators/tensor/math/cos/cos_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_fp/fp8x23.cairo b/src/operators/tensor/math/cos/cos_fp/fp8x23.cairo deleted file mode 100644 index 88878ac8f..000000000 --- a/src/operators/tensor/math/cos/cos_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_i32.cairo b/src/operators/tensor/math/cos/cos_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cos/cos_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cos/cos_i32/core.cairo b/src/operators/tensor/math/cos/cos_i32/core.cairo deleted file mode 100644 index baf106dd2..000000000 --- a/src/operators/tensor/math/cos/cos_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::cos::cos_i32::fp8x23; -use orion::operators::tensor::math::cos::cos_i32::fp16x16; - -/// Cf: TensorTrait::cos docstring -fn cos_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cos(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - } -} diff --git a/src/operators/tensor/math/cos/cos_i32/fp16x16.cairo b/src/operators/tensor/math/cos/cos_i32/fp16x16.cairo deleted file mode 100644 index a3f9a67aa..000000000 --- a/src/operators/tensor/math/cos/cos_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_i32/fp8x23.cairo b/src/operators/tensor/math/cos/cos_i32/fp8x23.cairo deleted file mode 100644 index 794c6ccaa..000000000 --- a/src/operators/tensor/math/cos/cos_i32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_i8.cairo b/src/operators/tensor/math/cos/cos_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cos/cos_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cos/cos_i8/core.cairo b/src/operators/tensor/math/cos/cos_i8/core.cairo deleted file mode 100644 index 7b66ebf58..000000000 --- a/src/operators/tensor/math/cos/cos_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::cos::cos_i8::fp8x23; -use orion::operators::tensor::math::cos::cos_i8::fp16x16; - -/// Cf: TensorTrait::cos docstring -fn cos_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cos(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - } -} diff --git a/src/operators/tensor/math/cos/cos_i8/fp16x16.cairo b/src/operators/tensor/math/cos/cos_i8/fp16x16.cairo deleted file mode 100644 index c6e3e03be..000000000 --- a/src/operators/tensor/math/cos/cos_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_i8/fp8x23.cairo b/src/operators/tensor/math/cos/cos_i8/fp8x23.cairo deleted file mode 100644 index 8be684847..000000000 --- a/src/operators/tensor/math/cos/cos_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_u32.cairo b/src/operators/tensor/math/cos/cos_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cos/cos_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cos/cos_u32/core.cairo b/src/operators/tensor/math/cos/cos_u32/core.cairo deleted file mode 100644 index 322b1010f..000000000 --- a/src/operators/tensor/math/cos/cos_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::cos::cos_u32::fp8x23; -use orion::operators::tensor::math::cos::cos_u32::fp16x16; - -/// Cf: TensorTrait::cos docstring -fn cos_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cos(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cos(*self)), - } -} diff --git a/src/operators/tensor/math/cos/cos_u32/fp16x16.cairo b/src/operators/tensor/math/cos/cos_u32/fp16x16.cairo deleted file mode 100644 index b7450b8e4..000000000 --- a/src/operators/tensor/math/cos/cos_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cos/cos_u32/fp8x23.cairo b/src/operators/tensor/math/cos/cos_u32/fp8x23.cairo deleted file mode 100644 index 4b7f9cb79..000000000 --- a/src/operators/tensor/math/cos/cos_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cos docstring -fn cos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).cos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From 5e03a6d47fbda1a1f52190db949b21b8fbff2d7d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 12:56:40 +0300 Subject: [PATCH 031/179] add generic asin --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/asin.cairo | 34 ++++++++++++++++++- src/operators/tensor/math/asin/asin_fp.cairo | 3 -- .../tensor/math/asin/asin_fp/core.cairo | 18 ---------- .../tensor/math/asin/asin_fp/fp16x16.cairo | 27 --------------- .../tensor/math/asin/asin_fp/fp8x23.cairo | 27 --------------- 10 files changed, 38 insertions(+), 85 deletions(-) delete mode 100644 src/operators/tensor/math/asin/asin_fp.cairo delete mode 100644 src/operators/tensor/math/asin/asin_fp/core.cairo delete mode 100644 src/operators/tensor/math/asin/asin_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/asin/asin_fp/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index d884b194d..81082c139 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -118,8 +118,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn asin(self: @Tensor) -> Tensor { - // panic(array!['not supported with FP8x23']) - panic(array![]) + math::asin::asin(*self) } fn cumsum( diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 31ce8663b..b6ebadc6a 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -120,8 +120,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn asin(self: @Tensor) -> Tensor { - // panic(array!['not supported with i32']) - panic(array![]) + panic(array!['not supported with i32']) } fn cumsum( diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 37cbf6d08..bf165e361 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -122,8 +122,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn asin(self: @Tensor) -> Tensor { - // panic(array!['not supported with i8']) - panic(array![]) + panic(array!['not supported with i8']) } fn cumsum( diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 19d0d4b54..88c4d158e 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -119,8 +119,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn asin(self: @Tensor) -> Tensor { - // panic(array!['not supported with u32']) - panic(array![]) + panic(array!['not supported with u32']) } fn cumsum( diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 9cabe2848..6044a65bd 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -15,7 +15,7 @@ mod abs; mod ceil; mod sin; mod cos; -// mod asin; +mod asin; // mod cumsum; // mod flatten; // mod sinh; diff --git a/src/operators/tensor/math/asin.cairo b/src/operators/tensor/math/asin.cairo index 0bbe2037c..4a14e988b 100644 --- a/src/operators/tensor/math/asin.cairo +++ b/src/operators/tensor/math/asin.cairo @@ -1 +1,33 @@ -mod asin_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::asin docstring +fn asin< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).asin()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/asin/asin_fp.cairo b/src/operators/tensor/math/asin/asin_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/asin/asin_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/asin/asin_fp/core.cairo b/src/operators/tensor/math/asin/asin_fp/core.cairo deleted file mode 100644 index 89767e9bc..000000000 --- a/src/operators/tensor/math/asin/asin_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::asin::asin_fp::fp8x23; -use orion::operators::tensor::math::asin::asin_fp::fp16x16; - -/// Cf: TensorTrait::asin docstring -fn asin(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::asin(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::asin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asin(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asin(*self)), - } -} diff --git a/src/operators/tensor/math/asin/asin_fp/fp16x16.cairo b/src/operators/tensor/math/asin/asin_fp/fp16x16.cairo deleted file mode 100644 index f7cce7502..000000000 --- a/src/operators/tensor/math/asin/asin_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::asin docstring -fn asin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).asin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/asin/asin_fp/fp8x23.cairo b/src/operators/tensor/math/asin/asin_fp/fp8x23.cairo deleted file mode 100644 index 80db7fbd6..000000000 --- a/src/operators/tensor/math/asin/asin_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::asin docstring -fn asin(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).asin()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From c4ce069f855b1a3c405061bc501a7d6bb1b18273 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:03:37 +0300 Subject: [PATCH 032/179] add generic cumsum --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/cumsum.cairo | 180 +++++++++++++++++- .../tensor/math/cumsum/cumsum_fp.cairo | 3 - .../tensor/math/cumsum/cumsum_fp/core.cairo | 24 --- .../math/cumsum/cumsum_fp/fp16x16.cairo | 24 --- .../tensor/math/cumsum/cumsum_fp/fp8x23.cairo | 24 --- .../tensor/math/cumsum/cumsum_i32.cairo | 20 -- .../tensor/math/cumsum/cumsum_i8.cairo | 20 -- .../tensor/math/cumsum/cumsum_u32.cairo | 19 -- .../tensor/math/cumsum/helpers.cairo | 149 --------------- 14 files changed, 180 insertions(+), 297 deletions(-) delete mode 100644 src/operators/tensor/math/cumsum/cumsum_fp.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_fp/core.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_i32.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_i8.cairo delete mode 100644 src/operators/tensor/math/cumsum/cumsum_u32.cairo delete mode 100644 src/operators/tensor/math/cumsum/helpers.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 81082c139..db841c221 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -124,8 +124,7 @@ impl Tensor_fp8x23 of TensorTrait { fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - // cumsum(self, axis, exclusive, reverse) - panic(array![]) + math::cumsum::cumsum(self, axis, exclusive, reverse) } fn flatten(self: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index b6ebadc6a..f2e76efaf 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -126,8 +126,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - // cumsum(self, axis, exclusive, reverse) - panic(array![]) + math::cumsum::cumsum(self, axis, exclusive, reverse) } fn flatten(self: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index bf165e361..d705b6e2d 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -128,8 +128,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - // cumsum(self, axis, exclusive, reverse) - panic(array![]) + math::cumsum::cumsum(self, axis, exclusive, reverse) } fn flatten(self: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 88c4d158e..1d278fb1f 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -125,8 +125,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn cumsum( self: @Tensor, axis: usize, exclusive: Option, reverse: Option ) -> Tensor { - // cumsum(self, axis, exclusive, reverse) - panic(array![]) + math::cumsum::cumsum(self, axis, exclusive, reverse) } fn flatten(self: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 6044a65bd..64d7b4d6c 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -16,7 +16,7 @@ mod ceil; mod sin; mod cos; mod asin; -// mod cumsum; +mod cumsum; // mod flatten; // mod sinh; // mod tanh; diff --git a/src/operators/tensor/math/cumsum.cairo b/src/operators/tensor/math/cumsum.cairo index b6863d403..5c172585e 100644 --- a/src/operators/tensor/math/cumsum.cairo +++ b/src/operators/tensor/math/cumsum.cairo @@ -1,6 +1,176 @@ -mod cumsum_i8; -mod cumsum_i32; -mod cumsum_u32; -mod cumsum_fp; -mod helpers; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use debug::PrintTrait; +use orion::operators::tensor::helpers::replace_index; +use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::cumsum docstring +fn cumsum< + T, + F, + MAG, + impl TTensorTrait: TensorTrait, + impl TNumber: NumberTrait, + impl TAddEq: AddEq, + impl TAdd: Add, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option +) -> Tensor { + let reverse = match reverse { + Option::Some(val) => val, + Option::None(_) => false + }; + + if reverse { + cumsum_reverse::(self, axis, exclusive, NumberTrait::zero()) + } else { + cumsum_forward::(self, axis, exclusive, NumberTrait::zero()) + } +} + +/// Cf: TensorTrait::cumsum docstring +fn cumsum_forward< + T, + F, + impl TTensorTrait: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, axis: usize, exclusive: Option, zero: T, +) -> Tensor { + let exclusive = match exclusive { + Option::Some(val) => val, + Option::None(_) => false, + }; + + assert(axis < (*self.shape).len(), 'axis out of dimensions'); + + let data = *self.data; + + let mut output_data = ArrayTrait::new(); + + let mut index: usize = 0; + + loop { + if index == data.len() { + break (); + }; + + let current_indices = unravel_index(index, *self.shape); + let axis_value = *current_indices[axis]; + if axis_value == 0 { + if exclusive { + output_data.append(zero); + } else { + output_data.append(*(data)[index]); + } + } else { + let previous_axis_element_indices = replace_index( + current_indices, axis, axis_value - 1 + ); + let previous_axis_element_index = ravel_index( + *self.shape, previous_axis_element_indices + ); + + if exclusive { + output_data + .append( + *output_data[previous_axis_element_index] + + *(data)[previous_axis_element_index] + ); + } else { + output_data.append(*output_data[previous_axis_element_index] + *(data)[index]); + }; + } + + index += 1; + }; + + return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); +} + + +/// Cf: TensorTrait::cumsum docstring +fn cumsum_reverse< + T, + F, + impl TTensorTrait: TensorTrait, + impl TAddEq: AddEq, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, axis: usize, exclusive: Option, zero: T, +) -> Tensor { + let exclusive = match exclusive { + Option::Some(val) => val, + Option::None(_) => false, + }; + + assert(axis < (*self.shape).len(), 'axis out of dimensions'); + let data = *self.data; + let mut output_data = ArrayTrait::new(); + let mut index: usize = 0; + loop { + if index == data.len() { + break (); + }; + + let current_indices = unravel_index(index, *self.shape); + let mut axis_value = *current_indices[axis]; + + if axis_value == 0 { + // If the axis value is 0, we need to sum all the elements + // in the axis. + + let mut sum = *(data)[index]; + if exclusive { + sum = zero; + } + + let end_index = *(*self.shape)[axis] - 1; + + loop { + axis_value += 1; + if axis_value > end_index { + break (); + } + + let next_axis_element_indices = replace_index(current_indices, axis, axis_value); + let next_axis_element_index = ravel_index(*self.shape, next_axis_element_indices); + sum += *data[next_axis_element_index]; + }; + output_data.append(sum); + } else { + // If the axis value is not 0, we only need to do a subtraction + let previous_axis_element_indices = replace_index( + current_indices, axis, axis_value - 1 + ); + let previous_axis_element_index = ravel_index( + *self.shape, previous_axis_element_indices + ); + let mut z = *(data)[previous_axis_element_index]; + + if exclusive { + output_data.append(*output_data[previous_axis_element_index] - *(data)[index]); + } else { + output_data + .append( + *output_data[previous_axis_element_index] + - *(data)[previous_axis_element_index] + ); + } + } + + index += 1; + }; + + return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); +} diff --git a/src/operators/tensor/math/cumsum/cumsum_fp.cairo b/src/operators/tensor/math/cumsum/cumsum_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cumsum/cumsum_fp/core.cairo b/src/operators/tensor/math/cumsum/cumsum_fp/core.cairo deleted file mode 100644 index 9906299ab..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_fp/core.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::cumsum_fp::fp8x23; -use orion::operators::tensor::math::cumsum::cumsum_fp::fp16x16; - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option -) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::cumsum(self, axis, exclusive, reverse) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::cumsum(self, axis, exclusive, reverse) - ), - }, - Option::None(_) => Option::Some(fp16x16::cumsum(self, axis, exclusive, reverse)), - }, - Option::None(_) => Option::Some(fp16x16::cumsum(self, axis, exclusive, reverse)), - } -} diff --git a/src/operators/tensor/math/cumsum/cumsum_fp/fp16x16.cairo b/src/operators/tensor/math/cumsum/cumsum_fp/fp16x16.cairo deleted file mode 100644 index d8303db36..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_fp/fp16x16.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; - - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option -) -> Tensor { - let reverse = match reverse { - Option::Some(val) => val, - Option::None(_) => false - }; - - if reverse { - cumsum_reverse(self, axis, exclusive, FixedTrait::new(0, false)) - } else { - cumsum_forward(self, axis, exclusive, FixedTrait::new(0, false)) - } -} diff --git a/src/operators/tensor/math/cumsum/cumsum_fp/fp8x23.cairo b/src/operators/tensor/math/cumsum/cumsum_fp/fp8x23.cairo deleted file mode 100644 index 3ee7544b5..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_fp/fp8x23.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23AddEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; - - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option -) -> Tensor { - let reverse = match reverse { - Option::Some(val) => val, - Option::None(_) => false - }; - - if reverse { - cumsum_reverse(self, axis, exclusive, FixedTrait::new(0, false)) - } else { - cumsum_forward(self, axis, exclusive, FixedTrait::new(0, false)) - } -} diff --git a/src/operators/tensor/math/cumsum/cumsum_i32.cairo b/src/operators/tensor/math/cumsum/cumsum_i32.cairo deleted file mode 100644 index ba401f713..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_i32.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option -) -> Tensor { - let reverse = match reverse { - Option::Some(val) => val, - Option::None(_) => false - }; - - if reverse { - cumsum_reverse(self, axis, exclusive, IntegerTrait::new(0, false)) - } else { - cumsum_forward(self, axis, exclusive, IntegerTrait::new(0, false)) - } -} diff --git a/src/operators/tensor/math/cumsum/cumsum_i8.cairo b/src/operators/tensor/math/cumsum/cumsum_i8.cairo deleted file mode 100644 index a5d3ae93c..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_i8.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option -) -> Tensor { - let reverse = match reverse { - Option::Some(val) => val, - Option::None(_) => false - }; - - if reverse { - cumsum_reverse(self, axis, exclusive, IntegerTrait::new(0, false)) - } else { - cumsum_forward(self, axis, exclusive, IntegerTrait::new(0, false)) - } -} diff --git a/src/operators/tensor/math/cumsum/cumsum_u32.cairo b/src/operators/tensor/math/cumsum/cumsum_u32.cairo deleted file mode 100644 index 84a3492ad..000000000 --- a/src/operators/tensor/math/cumsum/cumsum_u32.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; - -/// Cf: TensorTrait::cumsum docstring -fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option, -) -> Tensor { - let reverse = match reverse { - Option::Some(val) => val, - Option::None(_) => false - }; - - if reverse { - cumsum_reverse(self, axis, exclusive, 0) - } else { - cumsum_forward(self, axis, exclusive, 0) - } -} diff --git a/src/operators/tensor/math/cumsum/helpers.cairo b/src/operators/tensor/math/cumsum/helpers.cairo deleted file mode 100644 index 7953cc3e6..000000000 --- a/src/operators/tensor/math/cumsum/helpers.cairo +++ /dev/null @@ -1,149 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use debug::PrintTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; -use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::core::{Tensor, TensorTrait, ravel_index, unravel_index}; - - -/// Cf: TensorTrait::cumsum docstring -fn cumsum_forward< - T, - impl TTensorTrait: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, ->( - self: @Tensor, axis: usize, exclusive: Option, zero: T, -) -> Tensor { - let exclusive = match exclusive { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis < (*self.shape).len(), 'axis out of dimensions'); - - let data = *self.data; - - let mut output_data = ArrayTrait::new(); - - let mut index: usize = 0; - - loop { - if index == data.len() { - break (); - }; - - let current_indices = unravel_index(index, *self.shape); - let axis_value = *current_indices[axis]; - if axis_value == 0 { - if exclusive { - output_data.append(zero); - } else { - output_data.append(*(data)[index]); - } - } else { - let previous_axis_element_indices = replace_index( - current_indices, axis, axis_value - 1 - ); - let previous_axis_element_index = ravel_index( - *self.shape, previous_axis_element_indices - ); - - if exclusive { - output_data - .append( - *output_data[previous_axis_element_index] - + *(data)[previous_axis_element_index] - ); - } else { - output_data.append(*output_data[previous_axis_element_index] + *(data)[index]); - }; - } - - index += 1; - }; - - return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); -} - - -/// Cf: TensorTrait::cumsum docstring -fn cumsum_reverse< - T, - impl TTensorTrait: TensorTrait, - impl TAddEq: AddEq, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop, ->( - self: @Tensor, axis: usize, exclusive: Option, zero: T, -) -> Tensor { - let exclusive = match exclusive { - Option::Some(val) => val, - Option::None(_) => false, - }; - - assert(axis < (*self.shape).len(), 'axis out of dimensions'); - let data = *self.data; - let mut output_data = ArrayTrait::new(); - let mut index: usize = 0; - loop { - if index == data.len() { - break (); - }; - - let current_indices = unravel_index(index, *self.shape); - let mut axis_value = *current_indices[axis]; - - if axis_value == 0 { - // If the axis value is 0, we need to sum all the elements - // in the axis. - - let mut sum = *(data)[index]; - if exclusive { - sum = zero; - } - - let end_index = *(*self.shape)[axis] - 1; - - loop { - axis_value += 1; - if axis_value > end_index { - break (); - } - - let next_axis_element_indices = replace_index(current_indices, axis, axis_value); - let next_axis_element_index = ravel_index(*self.shape, next_axis_element_indices); - sum += *data[next_axis_element_index]; - }; - output_data.append(sum); - } else { - // If the axis value is not 0, we only need to do a subtraction - let previous_axis_element_indices = replace_index( - current_indices, axis, axis_value - 1 - ); - let previous_axis_element_index = ravel_index( - *self.shape, previous_axis_element_indices - ); - let mut z = *(data)[previous_axis_element_index]; - - if exclusive { - output_data.append(*output_data[previous_axis_element_index] - *(data)[index]); - } else { - output_data - .append( - *output_data[previous_axis_element_index] - - *(data)[previous_axis_element_index] - ); - } - } - - index += 1; - }; - - return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); -} From 4a8948b47b697f59a03746104b052a5e17f6ddb7 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:06:02 +0300 Subject: [PATCH 033/179] add generic flatten --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/flatten.cairo | 35 ++++++++++++++++--- .../tensor/math/flatten/flatten_fp.cairo | 3 -- .../tensor/math/flatten/flatten_fp/core.cairo | 18 ---------- .../math/flatten/flatten_fp/fp16x16.cairo | 9 ----- .../math/flatten/flatten_fp/fp8x23.cairo | 9 ----- .../tensor/math/flatten/flatten_i32.cairo | 9 ----- .../tensor/math/flatten/flatten_i8.cairo | 9 ----- .../tensor/math/flatten/flatten_u32.cairo | 8 ----- .../tensor/math/flatten/helpers.cairo | 30 ---------------- 14 files changed, 35 insertions(+), 109 deletions(-) delete mode 100644 src/operators/tensor/math/flatten/flatten_fp.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_fp/core.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_i32.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_i8.cairo delete mode 100644 src/operators/tensor/math/flatten/flatten_u32.cairo delete mode 100644 src/operators/tensor/math/flatten/helpers.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index db841c221..fba87531c 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -128,8 +128,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn flatten(self: @Tensor, axis: usize) -> Tensor { - //flatten(self, axis) - panic(array![]) + math::flatten::flatten(self, axis) } fn sinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index f2e76efaf..f3029a7f2 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -130,8 +130,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn flatten(self: @Tensor, axis: usize) -> Tensor { - //flatten(self, axis) - panic(array![]) + math::flatten::flatten(self, axis) } fn sinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index d705b6e2d..79aeeb042 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -132,8 +132,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn flatten(self: @Tensor, axis: usize) -> Tensor { - //flatten(self, axis) - panic(array![]) + math::flatten::flatten(self, axis) } fn sinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 1d278fb1f..44dde495a 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -129,8 +129,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn flatten(self: @Tensor, axis: usize) -> Tensor { - //flatten(self, axis) - panic(array![]) + math::flatten::flatten(self, axis) } fn sinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 64d7b4d6c..128efc21d 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -17,7 +17,7 @@ mod sin; mod cos; mod asin; mod cumsum; -// mod flatten; +mod flatten; // mod sinh; // mod tanh; // mod cosh; diff --git a/src/operators/tensor/math/flatten.cairo b/src/operators/tensor/math/flatten.cairo index 011187607..bede9adc7 100644 --- a/src/operators/tensor/math/flatten.cairo +++ b/src/operators/tensor/math/flatten.cairo @@ -1,6 +1,31 @@ -mod flatten_i8; -mod flatten_i32; -mod flatten_u32; -mod flatten_fp; -mod helpers; +use array::ArrayTrait; +use array::SpanTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: TensorTrait::flatten docstring +fn flatten>(self: @Tensor, axis: usize) -> Tensor { + let current_shape = *self.shape; + assert(axis < current_shape.len(), 'axis out of dimensions'); + + let mut new_shape_first_axis = 1; + let mut index = 0; + loop { + if index == axis { + break; + } + + new_shape_first_axis *= *current_shape[index]; + + index += 1; + }; + + let new_shape_second_axis = (*self.data).len() / new_shape_first_axis; + + let mut new_shape = ArrayTrait::::new(); + new_shape.append(new_shape_first_axis); + new_shape.append(new_shape_second_axis); + + return self.reshape(new_shape.span()); +} diff --git a/src/operators/tensor/math/flatten/flatten_fp.cairo b/src/operators/tensor/math/flatten/flatten_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/flatten/flatten_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/flatten/flatten_fp/core.cairo b/src/operators/tensor/math/flatten/flatten_fp/core.cairo deleted file mode 100644 index a1b0e3bc2..000000000 --- a/src/operators/tensor/math/flatten/flatten_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::flatten_fp::fp8x23; -use orion::operators::tensor::math::flatten::flatten_fp::fp16x16; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::flatten(self, axis)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::flatten(self, axis)), - }, - Option::None(_) => Option::Some(fp16x16::flatten(self, axis)), - }, - Option::None(_) => Option::Some(fp16x16::flatten(self, axis)), - } -} diff --git a/src/operators/tensor/math/flatten/flatten_fp/fp16x16.cairo b/src/operators/tensor/math/flatten/flatten_fp/fp16x16.cairo deleted file mode 100644 index 6b32cbd27..000000000 --- a/src/operators/tensor/math/flatten/flatten_fp/fp16x16.cairo +++ /dev/null @@ -1,9 +0,0 @@ -use orion::numbers::fixed_point::core::FixedType; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::helpers::_flatten; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Tensor { - _flatten(self, axis) -} diff --git a/src/operators/tensor/math/flatten/flatten_fp/fp8x23.cairo b/src/operators/tensor/math/flatten/flatten_fp/fp8x23.cairo deleted file mode 100644 index 6b32cbd27..000000000 --- a/src/operators/tensor/math/flatten/flatten_fp/fp8x23.cairo +++ /dev/null @@ -1,9 +0,0 @@ -use orion::numbers::fixed_point::core::FixedType; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::helpers::_flatten; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Tensor { - _flatten(self, axis) -} diff --git a/src/operators/tensor/math/flatten/flatten_i32.cairo b/src/operators/tensor/math/flatten/flatten_i32.cairo deleted file mode 100644 index e2c2718ff..000000000 --- a/src/operators/tensor/math/flatten/flatten_i32.cairo +++ /dev/null @@ -1,9 +0,0 @@ -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::helpers::_flatten; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Tensor { - _flatten(self, axis) -} diff --git a/src/operators/tensor/math/flatten/flatten_i8.cairo b/src/operators/tensor/math/flatten/flatten_i8.cairo deleted file mode 100644 index cc9ca7a42..000000000 --- a/src/operators/tensor/math/flatten/flatten_i8.cairo +++ /dev/null @@ -1,9 +0,0 @@ -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::helpers::_flatten; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Tensor { - _flatten(self, axis) -} diff --git a/src/operators/tensor/math/flatten/flatten_u32.cairo b/src/operators/tensor/math/flatten/flatten_u32.cairo deleted file mode 100644 index 1a8015cf3..000000000 --- a/src/operators/tensor/math/flatten/flatten_u32.cairo +++ /dev/null @@ -1,8 +0,0 @@ -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::flatten::helpers::_flatten; - -/// Cf: TensorTrait::flatten docstring -fn flatten(self: @Tensor, axis: usize) -> Tensor { - _flatten(self, axis) -} diff --git a/src/operators/tensor/math/flatten/helpers.cairo b/src/operators/tensor/math/flatten/helpers.cairo deleted file mode 100644 index 5706c9b89..000000000 --- a/src/operators/tensor/math/flatten/helpers.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: TensorTrait::flatten docstring -fn _flatten>(self: @Tensor, axis: usize) -> Tensor { - let current_shape = *self.shape; - assert(axis < current_shape.len(), 'axis out of dimensions'); - - let mut new_shape_first_axis = 1; - let mut index = 0; - loop { - if index == axis { - break; - } - - new_shape_first_axis *= *current_shape[index]; - - index += 1; - }; - - let new_shape_second_axis = (*self.data).len() / new_shape_first_axis; - - let mut new_shape = ArrayTrait::::new(); - new_shape.append(new_shape_first_axis); - new_shape.append(new_shape_second_axis); - - return self.reshape(new_shape.span()); -} From d5ba8a718ea5b16d384f60d06e8a0c34456ee254 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:12:55 +0300 Subject: [PATCH 034/179] add generic sinh --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/sinh.cairo | 77 ++++++++++++++++++- src/operators/tensor/math/sinh/sinh_fp.cairo | 3 - .../tensor/math/sinh/sinh_fp/core.cairo | 18 ----- .../tensor/math/sinh/sinh_fp/fp16x16.cairo | 28 ------- .../tensor/math/sinh/sinh_fp/fp8x23.cairo | 28 ------- src/operators/tensor/math/sinh/sinh_i32.cairo | 3 - .../tensor/math/sinh/sinh_i32/core.cairo | 19 ----- .../tensor/math/sinh/sinh_i32/fp16x16.cairo | 30 -------- .../tensor/math/sinh/sinh_i32/fp8x23.cairo | 30 -------- src/operators/tensor/math/sinh/sinh_i8.cairo | 3 - .../tensor/math/sinh/sinh_i8/core.cairo | 19 ----- .../tensor/math/sinh/sinh_i8/fp16x16.cairo | 29 ------- .../tensor/math/sinh/sinh_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/sinh/sinh_u32.cairo | 3 - .../tensor/math/sinh/sinh_u32/core.cairo | 19 ----- .../tensor/math/sinh/sinh_u32/fp16x16.cairo | 29 ------- .../tensor/math/sinh/sinh_u32/fp8x23.cairo | 29 ------- 22 files changed, 78 insertions(+), 332 deletions(-) delete mode 100644 src/operators/tensor/math/sinh/sinh_fp.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_fp/core.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i32.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i32/core.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i8.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i8/core.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_u32.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_u32/core.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sinh/sinh_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index fba87531c..d923001b5 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -132,8 +132,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - // sinh_FP8x23(self).unwrap() - panic(array![]) + math::sin::sin_from_fp(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index f3029a7f2..a85516afd 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -134,8 +134,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - // sinh_i32(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 79aeeb042..9264bf6d1 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -136,8 +136,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - // sinh_i8(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 44dde495a..dfcb02075 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -133,8 +133,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - // sinh_u32(self).unwrap() - panic(array![]) + math::sin::sin_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 128efc21d..e864fde23 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -18,7 +18,7 @@ mod cos; mod asin; mod cumsum; mod flatten; -// mod sinh; +mod sinh; // mod tanh; // mod cosh; // mod acosh; diff --git a/src/operators/tensor/math/sinh.cairo b/src/operators/tensor/math/sinh.cairo index e141690a7..92349643a 100644 --- a/src/operators/tensor/math/sinh.cairo +++ b/src/operators/tensor/math/sinh.cairo @@ -1,4 +1,73 @@ -mod sinh_i8; -mod sinh_i32; -mod sinh_u32; -mod sinh_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::sinh docstring +fn sinh_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .sinh() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::sinh docstring +fn sinh_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).sinh()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/sinh/sinh_fp.cairo b/src/operators/tensor/math/sinh/sinh_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sinh/sinh_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sinh/sinh_fp/core.cairo b/src/operators/tensor/math/sinh/sinh_fp/core.cairo deleted file mode 100644 index affbc65f9..000000000 --- a/src/operators/tensor/math/sinh/sinh_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::sinh::sinh_fp::fp8x23; -use orion::operators::tensor::math::sinh::sinh_fp::fp16x16; - -/// Cf: TensorTrait::sinh docstring -fn sinh(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - } -} diff --git a/src/operators/tensor/math/sinh/sinh_fp/fp16x16.cairo b/src/operators/tensor/math/sinh/sinh_fp/fp16x16.cairo deleted file mode 100644 index 9cfbc4219..000000000 --- a/src/operators/tensor/math/sinh/sinh_fp/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sinh/sinh_fp/fp8x23.cairo b/src/operators/tensor/math/sinh/sinh_fp/fp8x23.cairo deleted file mode 100644 index c4dc93141..000000000 --- a/src/operators/tensor/math/sinh/sinh_fp/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sinh/sinh_i32.cairo b/src/operators/tensor/math/sinh/sinh_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sinh/sinh_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sinh/sinh_i32/core.cairo b/src/operators/tensor/math/sinh/sinh_i32/core.cairo deleted file mode 100644 index bfe7dd0a4..000000000 --- a/src/operators/tensor/math/sinh/sinh_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sinh::sinh_i32::fp8x23; -use orion::operators::tensor::math::sinh::sinh_i32::fp16x16; - -/// Cf: TensorTrait::sinh docstring -fn sinh_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - } -} diff --git a/src/operators/tensor/math/sinh/sinh_i32/fp16x16.cairo b/src/operators/tensor/math/sinh/sinh_i32/fp16x16.cairo deleted file mode 100644 index 0a7899a61..000000000 --- a/src/operators/tensor/math/sinh/sinh_i32/fp16x16.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sinh/sinh_i32/fp8x23.cairo b/src/operators/tensor/math/sinh/sinh_i32/fp8x23.cairo deleted file mode 100644 index 1af870b89..000000000 --- a/src/operators/tensor/math/sinh/sinh_i32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/sinh/sinh_i8.cairo b/src/operators/tensor/math/sinh/sinh_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sinh/sinh_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sinh/sinh_i8/core.cairo b/src/operators/tensor/math/sinh/sinh_i8/core.cairo deleted file mode 100644 index a77278c6d..000000000 --- a/src/operators/tensor/math/sinh/sinh_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::sinh::sinh_i8::fp8x23; -use orion::operators::tensor::math::sinh::sinh_i8::fp16x16; - -/// Cf: TensorTrait::sinh docstring -fn sinh_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - } -} diff --git a/src/operators/tensor/math/sinh/sinh_i8/fp16x16.cairo b/src/operators/tensor/math/sinh/sinh_i8/fp16x16.cairo deleted file mode 100644 index c37bbcb16..000000000 --- a/src/operators/tensor/math/sinh/sinh_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sinh/sinh_i8/fp8x23.cairo b/src/operators/tensor/math/sinh/sinh_i8/fp8x23.cairo deleted file mode 100644 index af3e8caea..000000000 --- a/src/operators/tensor/math/sinh/sinh_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sinh/sinh_u32.cairo b/src/operators/tensor/math/sinh/sinh_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/sinh/sinh_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/sinh/sinh_u32/core.cairo b/src/operators/tensor/math/sinh/sinh_u32/core.cairo deleted file mode 100644 index 2fa9b82d1..000000000 --- a/src/operators/tensor/math/sinh/sinh_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sinh::sinh_u32::fp8x23; -use orion::operators::tensor::math::sinh::sinh_u32::fp16x16; - -/// Cf: TensorTrait::sinh docstring -fn sinh_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sinh(*self)), - } -} diff --git a/src/operators/tensor/math/sinh/sinh_u32/fp16x16.cairo b/src/operators/tensor/math/sinh/sinh_u32/fp16x16.cairo deleted file mode 100644 index 3e406a877..000000000 --- a/src/operators/tensor/math/sinh/sinh_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sinh/sinh_u32/fp8x23.cairo b/src/operators/tensor/math/sinh/sinh_u32/fp8x23.cairo deleted file mode 100644 index fb3c8e42c..000000000 --- a/src/operators/tensor/math/sinh/sinh_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::sinh docstring -fn sinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file From a0df1128d4cc7504417cd7d48ebfc59e6d4d3c13 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:16:06 +0300 Subject: [PATCH 035/179] add generic tanh --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/tanh.cairo | 78 ++++++++++++++++++- src/operators/tensor/math/tanh/tanh_fp.cairo | 3 - .../tensor/math/tanh/tanh_fp/core.cairo | 18 ----- .../tensor/math/tanh/tanh_fp/fp16x16.cairo | 28 ------- .../tensor/math/tanh/tanh_fp/fp8x23.cairo | 27 ------- src/operators/tensor/math/tanh/tanh_i32.cairo | 3 - .../tensor/math/tanh/tanh_i32/core.cairo | 19 ----- .../tensor/math/tanh/tanh_i32/fp16x16.cairo | 29 ------- .../tensor/math/tanh/tanh_i32/fp8x23.cairo | 29 ------- src/operators/tensor/math/tanh/tanh_i8.cairo | 3 - .../tensor/math/tanh/tanh_i8/core.cairo | 19 ----- .../tensor/math/tanh/tanh_i8/fp16x16.cairo | 29 ------- .../tensor/math/tanh/tanh_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/tanh/tanh_u32.cairo | 3 - .../tensor/math/tanh/tanh_u32/core.cairo | 19 ----- .../tensor/math/tanh/tanh_u32/fp16x16.cairo | 29 ------- .../tensor/math/tanh/tanh_u32/fp8x23.cairo | 29 ------- 22 files changed, 79 insertions(+), 329 deletions(-) delete mode 100644 src/operators/tensor/math/tanh/tanh_fp.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_fp/core.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i32.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i32/core.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i8.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i8/core.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_u32.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_u32/core.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/tanh/tanh_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index d923001b5..63b996c30 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -136,8 +136,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn tanh(self: @Tensor) -> Tensor { - // tanh_FP8x23(self).unwrap() - panic(array![]) + math::tanh::tanh_from_fp(*self) } fn cosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index a85516afd..e410296d2 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -138,8 +138,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn tanh(self: @Tensor) -> Tensor { - // tanh_i32(self).unwrap() - panic(array![]) + math::tanh::tanh_from_int(*self) } fn cosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 9264bf6d1..e7d070506 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -140,8 +140,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn tanh(self: @Tensor) -> Tensor { - // tanh_i8(self).unwrap() - panic(array![]) + math::tanh::tanh_from_int(*self) } fn cosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index dfcb02075..ab292be0c 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -137,8 +137,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn tanh(self: @Tensor) -> Tensor { - // tanh_u32(self).unwrap() - panic(array![]) + math::tanh::tanh_from_int(*self) } fn cosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index e864fde23..c05e5df29 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -19,7 +19,7 @@ mod asin; mod cumsum; mod flatten; mod sinh; -// mod tanh; +mod tanh; // mod cosh; // mod acosh; // mod asinh; diff --git a/src/operators/tensor/math/tanh.cairo b/src/operators/tensor/math/tanh.cairo index 9edd60e20..6d5b0b540 100644 --- a/src/operators/tensor/math/tanh.cairo +++ b/src/operators/tensor/math/tanh.cairo @@ -1,4 +1,74 @@ -mod tanh_i8; -mod tanh_i32; -mod tanh_u32; -mod tanh_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: TensorTrait::tanh docstring +fn tanh_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .tanh() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::tanh docstring +fn tanh_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).tanh()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/tanh/tanh_fp.cairo b/src/operators/tensor/math/tanh/tanh_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/tanh/tanh_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/tanh/tanh_fp/core.cairo b/src/operators/tensor/math/tanh/tanh_fp/core.cairo deleted file mode 100644 index d3cef366b..000000000 --- a/src/operators/tensor/math/tanh/tanh_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::tanh::tanh_fp::fp8x23; -use orion::operators::tensor::math::tanh::tanh_fp::fp16x16; - -/// Cf: TensorTrait::tanh docstring -fn tanh(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::tanh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - } -} diff --git a/src/operators/tensor/math/tanh/tanh_fp/fp16x16.cairo b/src/operators/tensor/math/tanh/tanh_fp/fp16x16.cairo deleted file mode 100644 index 443d726f7..000000000 --- a/src/operators/tensor/math/tanh/tanh_fp/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/tanh/tanh_fp/fp8x23.cairo b/src/operators/tensor/math/tanh/tanh_fp/fp8x23.cairo deleted file mode 100644 index 0ed37fe99..000000000 --- a/src/operators/tensor/math/tanh/tanh_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/tanh/tanh_i32.cairo b/src/operators/tensor/math/tanh/tanh_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/tanh/tanh_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/tanh/tanh_i32/core.cairo b/src/operators/tensor/math/tanh/tanh_i32/core.cairo deleted file mode 100644 index 600c99386..000000000 --- a/src/operators/tensor/math/tanh/tanh_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::tanh::tanh_i32::fp8x23; -use orion::operators::tensor::math::tanh::tanh_i32::fp16x16; - -/// Cf: TensorTrait::tanh docstring -fn tanh_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::tanh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - } -} diff --git a/src/operators/tensor/math/tanh/tanh_i32/fp16x16.cairo b/src/operators/tensor/math/tanh/tanh_i32/fp16x16.cairo deleted file mode 100644 index cc6b03b40..000000000 --- a/src/operators/tensor/math/tanh/tanh_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/tanh/tanh_i32/fp8x23.cairo b/src/operators/tensor/math/tanh/tanh_i32/fp8x23.cairo deleted file mode 100644 index a2891fa74..000000000 --- a/src/operators/tensor/math/tanh/tanh_i32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/tanh/tanh_i8.cairo b/src/operators/tensor/math/tanh/tanh_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/tanh/tanh_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/tanh/tanh_i8/core.cairo b/src/operators/tensor/math/tanh/tanh_i8/core.cairo deleted file mode 100644 index b4ce797ff..000000000 --- a/src/operators/tensor/math/tanh/tanh_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::tanh::tanh_i8::fp8x23; -use orion::operators::tensor::math::tanh::tanh_i8::fp16x16; - -/// Cf: TensorTrait::tanh docstring -fn tanh_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::tanh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - } -} diff --git a/src/operators/tensor/math/tanh/tanh_i8/fp16x16.cairo b/src/operators/tensor/math/tanh/tanh_i8/fp16x16.cairo deleted file mode 100644 index 668de1f85..000000000 --- a/src/operators/tensor/math/tanh/tanh_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/tanh/tanh_i8/fp8x23.cairo b/src/operators/tensor/math/tanh/tanh_i8/fp8x23.cairo deleted file mode 100644 index f60adb4e7..000000000 --- a/src/operators/tensor/math/tanh/tanh_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/tanh/tanh_u32.cairo b/src/operators/tensor/math/tanh/tanh_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/tanh/tanh_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/tanh/tanh_u32/core.cairo b/src/operators/tensor/math/tanh/tanh_u32/core.cairo deleted file mode 100644 index 03b0655f1..000000000 --- a/src/operators/tensor/math/tanh/tanh_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::tanh::tanh_u32::fp8x23; -use orion::operators::tensor::math::tanh::tanh_u32::fp16x16; - -/// Cf: TensorTrait::tanh docstring -fn tanh_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::tanh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::tanh(*self)), - } -} diff --git a/src/operators/tensor/math/tanh/tanh_u32/fp16x16.cairo b/src/operators/tensor/math/tanh/tanh_u32/fp16x16.cairo deleted file mode 100644 index 500ab9db8..000000000 --- a/src/operators/tensor/math/tanh/tanh_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/tanh/tanh_u32/fp8x23.cairo b/src/operators/tensor/math/tanh/tanh_u32/fp8x23.cairo deleted file mode 100644 index cfd29bfe4..000000000 --- a/src/operators/tensor/math/tanh/tanh_u32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::tanh docstring -fn tanh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).tanh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From 81b0adfc03e9cbd25e475c43d94371ee0d3cea44 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:19:55 +0300 Subject: [PATCH 036/179] add cosh generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/cosh.cairo | 78 ++++++++++++++++++- src/operators/tensor/math/cosh/cosh_fp.cairo | 3 - .../tensor/math/cosh/cosh_fp/core.cairo | 18 ----- .../tensor/math/cosh/cosh_fp/fp16x16.cairo | 27 ------- .../tensor/math/cosh/cosh_fp/fp8x23.cairo | 27 ------- src/operators/tensor/math/cosh/cosh_i32.cairo | 3 - .../tensor/math/cosh/cosh_i32/core.cairo | 19 ----- .../tensor/math/cosh/cosh_i32/fp16x16.cairo | 29 ------- .../tensor/math/cosh/cosh_i32/fp8x23.cairo | 30 ------- src/operators/tensor/math/cosh/cosh_i8.cairo | 3 - .../tensor/math/cosh/cosh_i8/core.cairo | 19 ----- .../tensor/math/cosh/cosh_i8/fp16x16.cairo | 29 ------- .../tensor/math/cosh/cosh_i8/fp8x23.cairo | 30 ------- src/operators/tensor/math/cosh/cosh_u32.cairo | 3 - .../tensor/math/cosh/cosh_u32/core.cairo | 19 ----- .../tensor/math/cosh/cosh_u32/fp16x16.cairo | 29 ------- .../tensor/math/cosh/cosh_u32/fp8x23.cairo | 30 ------- 22 files changed, 79 insertions(+), 331 deletions(-) delete mode 100644 src/operators/tensor/math/cosh/cosh_fp.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_fp/core.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i32.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i32/core.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i8.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i8/core.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_u32.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_u32/core.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/cosh/cosh_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 63b996c30..05262e45b 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -140,8 +140,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn cosh(self: @Tensor) -> Tensor { - // cosh_FP8x23(self).unwrap() - panic(array![]) + math::cosh::cosh_from_fp(*self) } fn acosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index e410296d2..25f884dcb 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -142,8 +142,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn cosh(self: @Tensor) -> Tensor { - // cosh_i32(self).unwrap() - panic(array![]) + math::cosh::cosh_from_int(*self) } fn acosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index e7d070506..d9cb48794 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -144,8 +144,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn cosh(self: @Tensor) -> Tensor { - // cosh_i8(self).unwrap() - panic(array![]) + math::cosh::cosh_from_int(*self) } fn acosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index ab292be0c..c0b750f2d 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -141,8 +141,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn cosh(self: @Tensor) -> Tensor { - // cosh_u32(self).unwrap() - panic(array![]) + math::cosh::cosh_from_int(*self) } fn acosh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index c05e5df29..8cba8cf97 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -20,7 +20,7 @@ mod cumsum; mod flatten; mod sinh; mod tanh; -// mod cosh; +mod cosh; // mod acosh; // mod asinh; // mod atan; diff --git a/src/operators/tensor/math/cosh.cairo b/src/operators/tensor/math/cosh.cairo index 6131c2780..97790ec78 100644 --- a/src/operators/tensor/math/cosh.cairo +++ b/src/operators/tensor/math/cosh.cairo @@ -1,4 +1,74 @@ -mod cosh_i8; -mod cosh_i32; -mod cosh_u32; -mod cosh_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: TensorTrait::cosh docstring +fn cosh_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .cosh() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::cosh docstring +fn cosh_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).cosh()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/cosh/cosh_fp.cairo b/src/operators/tensor/math/cosh/cosh_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cosh/cosh_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cosh/cosh_fp/core.cairo b/src/operators/tensor/math/cosh/cosh_fp/core.cairo deleted file mode 100644 index 0ff8378bc..000000000 --- a/src/operators/tensor/math/cosh/cosh_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::cosh::cosh_fp::fp8x23; -use orion::operators::tensor::math::cosh::cosh_fp::fp16x16; - -/// Cf: TensorTrait::cosh docstring -fn cosh(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - } -} diff --git a/src/operators/tensor/math/cosh/cosh_fp/fp16x16.cairo b/src/operators/tensor/math/cosh/cosh_fp/fp16x16.cairo deleted file mode 100644 index 17d6a4bb5..000000000 --- a/src/operators/tensor/math/cosh/cosh_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/cosh/cosh_fp/fp8x23.cairo b/src/operators/tensor/math/cosh/cosh_fp/fp8x23.cairo deleted file mode 100644 index d8ec5ad1d..000000000 --- a/src/operators/tensor/math/cosh/cosh_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cosh/cosh_i32.cairo b/src/operators/tensor/math/cosh/cosh_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cosh/cosh_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cosh/cosh_i32/core.cairo b/src/operators/tensor/math/cosh/cosh_i32/core.cairo deleted file mode 100644 index ed557dfdf..000000000 --- a/src/operators/tensor/math/cosh/cosh_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::cosh::cosh_i32::fp8x23; -use orion::operators::tensor::math::cosh::cosh_i32::fp16x16; - -/// Cf: TensorTrait::cosh docstring -fn cosh_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - } -} diff --git a/src/operators/tensor/math/cosh/cosh_i32/fp16x16.cairo b/src/operators/tensor/math/cosh/cosh_i32/fp16x16.cairo deleted file mode 100644 index d4f381d0b..000000000 --- a/src/operators/tensor/math/cosh/cosh_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cosh/cosh_i32/fp8x23.cairo b/src/operators/tensor/math/cosh/cosh_i32/fp8x23.cairo deleted file mode 100644 index 395214d5f..000000000 --- a/src/operators/tensor/math/cosh/cosh_i32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/cosh/cosh_i8.cairo b/src/operators/tensor/math/cosh/cosh_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cosh/cosh_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cosh/cosh_i8/core.cairo b/src/operators/tensor/math/cosh/cosh_i8/core.cairo deleted file mode 100644 index cf1b18d50..000000000 --- a/src/operators/tensor/math/cosh/cosh_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::cosh::cosh_i8::fp8x23; -use orion::operators::tensor::math::cosh::cosh_i8::fp16x16; - -/// Cf: TensorTrait::cosh docstring -fn cosh_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - } -} diff --git a/src/operators/tensor/math/cosh/cosh_i8/fp16x16.cairo b/src/operators/tensor/math/cosh/cosh_i8/fp16x16.cairo deleted file mode 100644 index 7ab17385d..000000000 --- a/src/operators/tensor/math/cosh/cosh_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cosh/cosh_i8/fp8x23.cairo b/src/operators/tensor/math/cosh/cosh_i8/fp8x23.cairo deleted file mode 100644 index 61fdbdee2..000000000 --- a/src/operators/tensor/math/cosh/cosh_i8/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/cosh/cosh_u32.cairo b/src/operators/tensor/math/cosh/cosh_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/cosh/cosh_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/cosh/cosh_u32/core.cairo b/src/operators/tensor/math/cosh/cosh_u32/core.cairo deleted file mode 100644 index 8017aa912..000000000 --- a/src/operators/tensor/math/cosh/cosh_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::cosh::cosh_u32::fp8x23; -use orion::operators::tensor::math::cosh::cosh_u32::fp16x16; - -/// Cf: TensorTrait::cosh docstring -fn cosh_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::cosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::cosh(*self)), - } -} diff --git a/src/operators/tensor/math/cosh/cosh_u32/fp16x16.cairo b/src/operators/tensor/math/cosh/cosh_u32/fp16x16.cairo deleted file mode 100644 index c360a9d7b..000000000 --- a/src/operators/tensor/math/cosh/cosh_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/cosh/cosh_u32/fp8x23.cairo b/src/operators/tensor/math/cosh/cosh_u32/fp8x23.cairo deleted file mode 100644 index 69e00eba4..000000000 --- a/src/operators/tensor/math/cosh/cosh_u32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::cosh docstring -fn cosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).cosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - From 483b481aa001fdab52612dedbd239bd446919b5f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:23:14 +0300 Subject: [PATCH 037/179] add generic acosh --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/acosh.cairo | 77 ++++++++++++++++++- .../tensor/math/acosh/acosh_fp.cairo | 3 - .../tensor/math/acosh/acosh_fp/core.cairo | 18 ----- .../tensor/math/acosh/acosh_fp/fp16x16.cairo | 27 ------- .../tensor/math/acosh/acosh_fp/fp8x23.cairo | 27 ------- .../tensor/math/acosh/acosh_i32.cairo | 3 - .../tensor/math/acosh/acosh_i32/core.cairo | 19 ----- .../tensor/math/acosh/acosh_i32/fp16x16.cairo | 29 ------- .../tensor/math/acosh/acosh_i32/fp8x23.cairo | 29 ------- .../tensor/math/acosh/acosh_i8.cairo | 3 - .../tensor/math/acosh/acosh_i8/core.cairo | 19 ----- .../tensor/math/acosh/acosh_i8/fp16x16.cairo | 29 ------- .../tensor/math/acosh/acosh_i8/fp8x23.cairo | 29 ------- .../tensor/math/acosh/acosh_u32.cairo | 3 - .../tensor/math/acosh/acosh_u32/core.cairo | 19 ----- .../tensor/math/acosh/acosh_u32/fp16x16.cairo | 29 ------- .../tensor/math/acosh/acosh_u32/fp8x23.cairo | 30 -------- 22 files changed, 78 insertions(+), 329 deletions(-) delete mode 100644 src/operators/tensor/math/acosh/acosh_fp.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_fp/core.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i32.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i32/core.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i8.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i8/core.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_u32.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_u32/core.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/acosh/acosh_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 05262e45b..d6c173fe4 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -144,8 +144,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn acosh(self: @Tensor) -> Tensor { - // acosh_FP8x23(self).unwrap() - panic(array![]) + math::acosh::acosh_from_fp(*self) } fn asinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 25f884dcb..d5f35753b 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -146,8 +146,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn acosh(self: @Tensor) -> Tensor { - // acosh_i32(self).unwrap() - panic(array![]) + math::acosh::acosh_from_int(*self) } fn asinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index d9cb48794..ebfe20ba3 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -148,8 +148,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn acosh(self: @Tensor) -> Tensor { - // acosh_i8(self).unwrap() - panic(array![]) + math::acosh::acosh_from_int(*self) } fn asinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index c0b750f2d..8b19d6ff6 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -145,8 +145,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn acosh(self: @Tensor) -> Tensor { - // acosh_u32(self).unwrap() - panic(array![]) + math::acosh::acosh_from_int(*self) } fn asinh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 8cba8cf97..dfdf360f6 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -21,7 +21,7 @@ mod flatten; mod sinh; mod tanh; mod cosh; -// mod acosh; +mod acosh; // mod asinh; // mod atan; // mod xor; diff --git a/src/operators/tensor/math/acosh.cairo b/src/operators/tensor/math/acosh.cairo index cfa1a6a06..85e40c075 100644 --- a/src/operators/tensor/math/acosh.cairo +++ b/src/operators/tensor/math/acosh.cairo @@ -1,4 +1,73 @@ -mod acosh_i8; -mod acosh_i32; -mod acosh_u32; -mod acosh_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::acosh docstring +fn acosh_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .acosh() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::acosh docstring +fn acosh_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).acosh()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/acosh/acosh_fp.cairo b/src/operators/tensor/math/acosh/acosh_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/acosh/acosh_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/acosh/acosh_fp/core.cairo b/src/operators/tensor/math/acosh/acosh_fp/core.cairo deleted file mode 100644 index 8aebbb985..000000000 --- a/src/operators/tensor/math/acosh/acosh_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::acosh::acosh_fp::fp8x23; -use orion::operators::tensor::math::acosh::acosh_fp::fp16x16; - -/// Cf: TensorTrait::acosh docstring -fn acosh(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::acosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - } -} diff --git a/src/operators/tensor/math/acosh/acosh_fp/fp16x16.cairo b/src/operators/tensor/math/acosh/acosh_fp/fp16x16.cairo deleted file mode 100644 index 5d619ccba..000000000 --- a/src/operators/tensor/math/acosh/acosh_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_fp/fp8x23.cairo b/src/operators/tensor/math/acosh/acosh_fp/fp8x23.cairo deleted file mode 100644 index 2aaba0682..000000000 --- a/src/operators/tensor/math/acosh/acosh_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_i32.cairo b/src/operators/tensor/math/acosh/acosh_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/acosh/acosh_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/acosh/acosh_i32/core.cairo b/src/operators/tensor/math/acosh/acosh_i32/core.cairo deleted file mode 100644 index 1922952bd..000000000 --- a/src/operators/tensor/math/acosh/acosh_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::acosh::acosh_i32::fp8x23; -use orion::operators::tensor::math::acosh::acosh_i32::fp16x16; - -/// Cf: TensorTrait::acosh docstring -fn acosh_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::acosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - } -} diff --git a/src/operators/tensor/math/acosh/acosh_i32/fp16x16.cairo b/src/operators/tensor/math/acosh/acosh_i32/fp16x16.cairo deleted file mode 100644 index e13b27b16..000000000 --- a/src/operators/tensor/math/acosh/acosh_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_i32/fp8x23.cairo b/src/operators/tensor/math/acosh/acosh_i32/fp8x23.cairo deleted file mode 100644 index 0fb381607..000000000 --- a/src/operators/tensor/math/acosh/acosh_i32/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/acosh/acosh_i8.cairo b/src/operators/tensor/math/acosh/acosh_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/acosh/acosh_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/acosh/acosh_i8/core.cairo b/src/operators/tensor/math/acosh/acosh_i8/core.cairo deleted file mode 100644 index b8b075a0b..000000000 --- a/src/operators/tensor/math/acosh/acosh_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::acosh::acosh_i8::fp8x23; -use orion::operators::tensor::math::acosh::acosh_i8::fp16x16; - -/// Cf: TensorTrait::acosh docstring -fn acosh_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::acosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - } -} diff --git a/src/operators/tensor/math/acosh/acosh_i8/fp16x16.cairo b/src/operators/tensor/math/acosh/acosh_i8/fp16x16.cairo deleted file mode 100644 index 282a5a1e5..000000000 --- a/src/operators/tensor/math/acosh/acosh_i8/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_i8/fp8x23.cairo b/src/operators/tensor/math/acosh/acosh_i8/fp8x23.cairo deleted file mode 100644 index 2df839315..000000000 --- a/src/operators/tensor/math/acosh/acosh_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_u32.cairo b/src/operators/tensor/math/acosh/acosh_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/acosh/acosh_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/acosh/acosh_u32/core.cairo b/src/operators/tensor/math/acosh/acosh_u32/core.cairo deleted file mode 100644 index dc8f4be36..000000000 --- a/src/operators/tensor/math/acosh/acosh_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::acosh::acosh_u32::fp8x23; -use orion::operators::tensor::math::acosh::acosh_u32::fp16x16; - -/// Cf: TensorTrait::acosh docstring -fn acosh_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::acosh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::acosh(*self)), - } -} diff --git a/src/operators/tensor/math/acosh/acosh_u32/fp16x16.cairo b/src/operators/tensor/math/acosh/acosh_u32/fp16x16.cairo deleted file mode 100644 index d588aa7a2..000000000 --- a/src/operators/tensor/math/acosh/acosh_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acosh/acosh_u32/fp8x23.cairo b/src/operators/tensor/math/acosh/acosh_u32/fp8x23.cairo deleted file mode 100644 index 9c7308d84..000000000 --- a/src/operators/tensor/math/acosh/acosh_u32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::acosh docstring -fn acosh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).acosh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - From 364d7260fd7ed81b94d8dea8ef774bb93b5cc5d8 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:26:19 +0300 Subject: [PATCH 038/179] add generic asinh --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/asinh.cairo | 78 ++++++++++++++++++- .../tensor/math/asinh/asinh_fp.cairo | 3 - .../tensor/math/asinh/asinh_fp/core.cairo | 18 ----- .../tensor/math/asinh/asinh_fp/fp16x16.cairo | 27 ------- .../tensor/math/asinh/asinh_fp/fp8x23.cairo | 27 ------- .../tensor/math/asinh/asinh_i32.cairo | 3 - .../tensor/math/asinh/asinh_i32/core.cairo | 19 ----- .../tensor/math/asinh/asinh_i32/fp16x16.cairo | 29 ------- .../tensor/math/asinh/asinh_i32/fp8x23.cairo | 30 ------- .../tensor/math/asinh/asinh_i8.cairo | 3 - .../tensor/math/asinh/asinh_i8/core.cairo | 19 ----- .../tensor/math/asinh/asinh_i8/fp16x16.cairo | 30 ------- .../tensor/math/asinh/asinh_i8/fp8x23.cairo | 30 ------- .../tensor/math/asinh/asinh_u32.cairo | 3 - .../tensor/math/asinh/asinh_u32/core.cairo | 19 ----- .../tensor/math/asinh/asinh_u32/fp16x16.cairo | 29 ------- .../tensor/math/asinh/asinh_u32/fp8x23.cairo | 30 ------- 22 files changed, 79 insertions(+), 332 deletions(-) delete mode 100644 src/operators/tensor/math/asinh/asinh_fp.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_fp/core.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i32.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i32/core.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i8.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i8/core.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_u32.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_u32/core.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/asinh/asinh_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index d6c173fe4..f6a51eac1 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -148,8 +148,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn asinh(self: @Tensor) -> Tensor { - // asinh_FP8x23(self).unwrap() - panic(array![]) + math::asinh::asinh_from_fp(*self) } fn atan(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index d5f35753b..fd8671dbb 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -150,8 +150,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn asinh(self: @Tensor) -> Tensor { - // asinh_i32(self).unwrap() - panic(array![]) + math::asinh::asinh_from_int(*self) } fn atan(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index ebfe20ba3..d2b78b6e5 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -152,8 +152,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn asinh(self: @Tensor) -> Tensor { - // asinh_i8(self).unwrap() - panic(array![]) + math::asinh::asinh_from_int(*self) } fn atan(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 8b19d6ff6..f0075d08c 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -149,8 +149,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn asinh(self: @Tensor) -> Tensor { - // asinh_u32(self).unwrap() - panic(array![]) + math::asinh::asinh_from_int(*self) } fn atan(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index dfdf360f6..47a182763 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -22,7 +22,7 @@ mod sinh; mod tanh; mod cosh; mod acosh; -// mod asinh; +mod asinh; // mod atan; // mod xor; // mod or; diff --git a/src/operators/tensor/math/asinh.cairo b/src/operators/tensor/math/asinh.cairo index 05e6aea0d..2b26c8613 100644 --- a/src/operators/tensor/math/asinh.cairo +++ b/src/operators/tensor/math/asinh.cairo @@ -1,4 +1,74 @@ -mod asinh_i8; -mod asinh_i32; -mod asinh_u32; -mod asinh_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::asinh docstring +fn asinh_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .asinh() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +/// Cf: TensorTrait::asinh docstring +fn asinh_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).asinh()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + diff --git a/src/operators/tensor/math/asinh/asinh_fp.cairo b/src/operators/tensor/math/asinh/asinh_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/asinh/asinh_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/asinh/asinh_fp/core.cairo b/src/operators/tensor/math/asinh/asinh_fp/core.cairo deleted file mode 100644 index 31bd8ae0d..000000000 --- a/src/operators/tensor/math/asinh/asinh_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::asinh::asinh_fp::fp8x23; -use orion::operators::tensor::math::asinh::asinh_fp::fp16x16; - -/// Cf: TensorTrait::asinh docstring -fn asinh(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::asinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - } -} diff --git a/src/operators/tensor/math/asinh/asinh_fp/fp16x16.cairo b/src/operators/tensor/math/asinh/asinh_fp/fp16x16.cairo deleted file mode 100644 index a040ced67..000000000 --- a/src/operators/tensor/math/asinh/asinh_fp/fp16x16.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/asinh/asinh_fp/fp8x23.cairo b/src/operators/tensor/math/asinh/asinh_fp/fp8x23.cairo deleted file mode 100644 index 0c72347f3..000000000 --- a/src/operators/tensor/math/asinh/asinh_fp/fp8x23.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/asinh/asinh_i32.cairo b/src/operators/tensor/math/asinh/asinh_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/asinh/asinh_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/asinh/asinh_i32/core.cairo b/src/operators/tensor/math/asinh/asinh_i32/core.cairo deleted file mode 100644 index db7728ee7..000000000 --- a/src/operators/tensor/math/asinh/asinh_i32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::asinh::asinh_i32::fp8x23; -use orion::operators::tensor::math::asinh::asinh_i32::fp16x16; - -/// Cf: TensorTrait:asinh docstring -fn asinh_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::asinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - } -} diff --git a/src/operators/tensor/math/asinh/asinh_i32/fp16x16.cairo b/src/operators/tensor/math/asinh/asinh_i32/fp16x16.cairo deleted file mode 100644 index a79e0f3d1..000000000 --- a/src/operators/tensor/math/asinh/asinh_i32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/asinh/asinh_i32/fp8x23.cairo b/src/operators/tensor/math/asinh/asinh_i32/fp8x23.cairo deleted file mode 100644 index da47d5205..000000000 --- a/src/operators/tensor/math/asinh/asinh_i32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/asinh/asinh_i8.cairo b/src/operators/tensor/math/asinh/asinh_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/asinh/asinh_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/asinh/asinh_i8/core.cairo b/src/operators/tensor/math/asinh/asinh_i8/core.cairo deleted file mode 100644 index 0215e9a86..000000000 --- a/src/operators/tensor/math/asinh/asinh_i8/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::asinh::asinh_i8::fp8x23; -use orion::operators::tensor::math::asinh::asinh_i8::fp16x16; - -/// Cf: TensorTrait:asinh docstring -fn asinh_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::asinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - } -} diff --git a/src/operators/tensor/math/asinh/asinh_i8/fp16x16.cairo b/src/operators/tensor/math/asinh/asinh_i8/fp16x16.cairo deleted file mode 100644 index 7a95383ae..000000000 --- a/src/operators/tensor/math/asinh/asinh_i8/fp16x16.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/asinh/asinh_i8/fp8x23.cairo b/src/operators/tensor/math/asinh/asinh_i8/fp8x23.cairo deleted file mode 100644 index 6ee4de9de..000000000 --- a/src/operators/tensor/math/asinh/asinh_i8/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/asinh/asinh_u32.cairo b/src/operators/tensor/math/asinh/asinh_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/asinh/asinh_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/asinh/asinh_u32/core.cairo b/src/operators/tensor/math/asinh/asinh_u32/core.cairo deleted file mode 100644 index 5afc2550f..000000000 --- a/src/operators/tensor/math/asinh/asinh_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::asinh::asinh_u32::fp8x23; -use orion::operators::tensor::math::asinh::asinh_u32::fp16x16; - -/// Cf: TensorTrait::asinh docstring -fn asinh_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::asinh(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - }, - Option::None(_) => Option::Some(fp16x16::asinh(*self)), - } -} diff --git a/src/operators/tensor/math/asinh/asinh_u32/fp16x16.cairo b/src/operators/tensor/math/asinh/asinh_u32/fp16x16.cairo deleted file mode 100644 index 7d73ec207..000000000 --- a/src/operators/tensor/math/asinh/asinh_u32/fp16x16.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/asinh/asinh_u32/fp8x23.cairo b/src/operators/tensor/math/asinh/asinh_u32/fp8x23.cairo deleted file mode 100644 index 91fcad656..000000000 --- a/src/operators/tensor/math/asinh/asinh_u32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::asinh docstring -fn asinh(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).asinh()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - From f42e555e19cabd698ee37ca5909e1690d0bb7cee Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 13:35:42 +0300 Subject: [PATCH 039/179] add atan generic --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/atan.cairo | 76 ++++++++++++++++++- src/operators/tensor/math/atan/atan_fp.cairo | 3 - .../tensor/math/atan/atan_fp/core.cairo | 18 ----- .../tensor/math/atan/atan_fp/fp16x16.cairo | 26 ------- .../tensor/math/atan/atan_fp/fp8x23.cairo | 26 ------- src/operators/tensor/math/atan/atan_i32.cairo | 3 - .../tensor/math/atan/atan_i32/core.cairo | 18 ----- .../tensor/math/atan/atan_i32/fp16x16.cairo | 28 ------- .../tensor/math/atan/atan_i32/fp8x23.cairo | 28 ------- src/operators/tensor/math/atan/atan_i8.cairo | 3 - .../tensor/math/atan/atan_i8/core.cairo | 18 ----- .../tensor/math/atan/atan_i8/fp16x16.cairo | 28 ------- .../tensor/math/atan/atan_i8/fp8x23.cairo | 29 ------- src/operators/tensor/math/atan/atan_u32.cairo | 3 - .../tensor/math/atan/atan_u32/core.cairo | 18 ----- .../tensor/math/atan/atan_u32/fp16x16.cairo | 28 ------- .../tensor/math/atan/atan_u32/fp8x23.cairo | 28 ------- 22 files changed, 77 insertions(+), 318 deletions(-) delete mode 100644 src/operators/tensor/math/atan/atan_fp.cairo delete mode 100644 src/operators/tensor/math/atan/atan_fp/core.cairo delete mode 100644 src/operators/tensor/math/atan/atan_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/atan/atan_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i32.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i32/core.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i8.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i8/core.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/atan/atan_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/atan/atan_u32.cairo delete mode 100644 src/operators/tensor/math/atan/atan_u32/core.cairo delete mode 100644 src/operators/tensor/math/atan/atan_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/atan/atan_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index f6a51eac1..16c9af6a7 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -152,8 +152,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn atan(self: @Tensor) -> Tensor { - // atan_FP8x23(self).unwrap() - panic(array![]) + math::atan::atan_from_fp(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index fd8671dbb..89895516c 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -154,8 +154,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn atan(self: @Tensor) -> Tensor { - // atan_i32(self).unwrap() - panic(array![]) + math::atan::atan_from_int(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index d2b78b6e5..e07a0d61e 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -156,8 +156,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn atan(self: @Tensor) -> Tensor { - // atan_i8(self).unwrap() - panic(array![]) + math::atan::atan_from_int(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index f0075d08c..d5c7a5a94 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -153,8 +153,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn atan(self: @Tensor) -> Tensor { - // atan_u32(self).unwrap() - panic(array![]) + math::atan::atan_from_int(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 47a182763..84640a424 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -23,7 +23,7 @@ mod tanh; mod cosh; mod acosh; mod asinh; -// mod atan; +mod atan; // mod xor; // mod or; // mod acos; diff --git a/src/operators/tensor/math/atan.cairo b/src/operators/tensor/math/atan.cairo index 8d111caee..0d823be89 100644 --- a/src/operators/tensor/math/atan.cairo +++ b/src/operators/tensor/math/atan.cairo @@ -1,4 +1,72 @@ -mod atan_i8; -mod atan_i32; -mod atan_u32; -mod atan_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +fn atan_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .atan() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +fn atan_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).atan()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/atan/atan_fp.cairo b/src/operators/tensor/math/atan/atan_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/atan/atan_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/atan/atan_fp/core.cairo b/src/operators/tensor/math/atan/atan_fp/core.cairo deleted file mode 100644 index 3d06bab6f..000000000 --- a/src/operators/tensor/math/atan/atan_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::atan::atan_fp::fp8x23; -use orion::operators::tensor::math::atan::atan_fp::fp16x16; - -/// Cf: TensorTrait::atan docstring -fn atan(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::atan(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - } -} diff --git a/src/operators/tensor/math/atan/atan_fp/fp16x16.cairo b/src/operators/tensor/math/atan/atan_fp/fp16x16.cairo deleted file mode 100644 index c4235c39a..000000000 --- a/src/operators/tensor/math/atan/atan_fp/fp16x16.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_fp/fp8x23.cairo b/src/operators/tensor/math/atan/atan_fp/fp8x23.cairo deleted file mode 100644 index b1bd2f050..000000000 --- a/src/operators/tensor/math/atan/atan_fp/fp8x23.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_i32.cairo b/src/operators/tensor/math/atan/atan_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/atan/atan_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/atan/atan_i32/core.cairo b/src/operators/tensor/math/atan/atan_i32/core.cairo deleted file mode 100644 index 57bb7d649..000000000 --- a/src/operators/tensor/math/atan/atan_i32/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::atan::atan_i32::fp8x23; -use orion::operators::tensor::math::atan::atan_i32::fp16x16; - -fn atan_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::atan(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - } -} diff --git a/src/operators/tensor/math/atan/atan_i32/fp16x16.cairo b/src/operators/tensor/math/atan/atan_i32/fp16x16.cairo deleted file mode 100644 index 600c9a57d..000000000 --- a/src/operators/tensor/math/atan/atan_i32/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item).mag, *item.sign).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_i32/fp8x23.cairo b/src/operators/tensor/math/atan/atan_i32/fp8x23.cairo deleted file mode 100644 index 49bb0b660..000000000 --- a/src/operators/tensor/math/atan/atan_i32/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item).mag, *item.sign).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_i8.cairo b/src/operators/tensor/math/atan/atan_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/atan/atan_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/atan/atan_i8/core.cairo b/src/operators/tensor/math/atan/atan_i8/core.cairo deleted file mode 100644 index e552560d1..000000000 --- a/src/operators/tensor/math/atan/atan_i8/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::atan::atan_i8::fp8x23; -use orion::operators::tensor::math::atan::atan_i8::fp16x16; - -fn atan_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::atan(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - } -} diff --git a/src/operators/tensor/math/atan/atan_i8/fp16x16.cairo b/src/operators/tensor/math/atan/atan_i8/fp16x16.cairo deleted file mode 100644 index 4b75090dd..000000000 --- a/src/operators/tensor/math/atan/atan_i8/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item).mag.into(), *item.sign).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_i8/fp8x23.cairo b/src/operators/tensor/math/atan/atan_i8/fp8x23.cairo deleted file mode 100644 index fcfd18a25..000000000 --- a/src/operators/tensor/math/atan/atan_i8/fp8x23.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item).mag.into(), *item.sign).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - diff --git a/src/operators/tensor/math/atan/atan_u32.cairo b/src/operators/tensor/math/atan/atan_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/atan/atan_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/atan/atan_u32/core.cairo b/src/operators/tensor/math/atan/atan_u32/core.cairo deleted file mode 100644 index 400b9fa07..000000000 --- a/src/operators/tensor/math/atan/atan_u32/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::atan::atan_u32::fp8x23; -use orion::operators::tensor::math::atan::atan_u32::fp16x16; - -fn atan_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::atan(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - }, - Option::None(_) => Option::Some(fp16x16::atan(*self)), - } -} diff --git a/src/operators/tensor/math/atan/atan_u32/fp16x16.cairo b/src/operators/tensor/math/atan/atan_u32/fp16x16.cairo deleted file mode 100644 index c3ea1677c..000000000 --- a/src/operators/tensor/math/atan/atan_u32/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/atan/atan_u32/fp8x23.cairo b/src/operators/tensor/math/atan/atan_u32/fp8x23.cairo deleted file mode 100644 index f523e3cdc..000000000 --- a/src/operators/tensor/math/atan/atan_u32/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn atan(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).atan()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From ffc4f0b53007e9cae7be986211fbc5c171867bb6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 14:07:18 +0300 Subject: [PATCH 040/179] add xor generic --- src/numbers.cairo | 58 ++++++++++++++++++ .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/xor.cairo | 61 +++++++++++++++++-- src/operators/tensor/math/xor/xor_fp.cairo | 3 - .../tensor/math/xor/xor_fp/core.cairo | 18 ------ .../tensor/math/xor/xor_fp/fp16x16.cairo | 53 ---------------- .../tensor/math/xor/xor_fp/fp8x23.cairo | 53 ---------------- src/operators/tensor/math/xor/xor_i32.cairo | 49 --------------- src/operators/tensor/math/xor/xor_i8.cairo | 49 --------------- src/operators/tensor/math/xor/xor_u32.cairo | 47 -------------- 14 files changed, 120 insertions(+), 285 deletions(-) delete mode 100644 src/operators/tensor/math/xor/xor_fp.cairo delete mode 100644 src/operators/tensor/math/xor/xor_fp/core.cairo delete mode 100644 src/operators/tensor/math/xor/xor_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/xor/xor_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/xor/xor_i32.cairo delete mode 100644 src/operators/tensor/math/xor/xor_i8.cairo delete mode 100644 src/operators/tensor/math/xor/xor_u32.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 8918d0cff..f5b7cf4aa 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -19,6 +19,8 @@ trait NumberTrait { fn mag(self: T) -> MAG; fn is_neg(self: T) -> bool; + + fn xor(lhs: T, rhs: T) -> bool; } use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23}; @@ -67,6 +69,10 @@ impl FP8x23Number of NumberTrait { fn is_neg(self: FP8x23) -> bool { self.sign } + + fn xor(lhs: FP8x23, rhs: FP8x23) -> bool { + comp_fp8x23::xor(lhs, rhs) + } } use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16}; @@ -115,6 +121,10 @@ impl FP16x16Number of NumberTrait { fn is_neg(self: FP16x16) -> bool { self.sign } + + fn xor(lhs: FP16x16, rhs: FP16x16) -> bool { + comp_fp16x16::xor(lhs, rhs) + } } use orion::numbers::signed_integer::i8 as i8_core; @@ -162,6 +172,14 @@ impl I8Number of NumberTrait { fn is_neg(self: i8) -> bool { self.sign } + + fn xor(lhs: i8, rhs: i8) -> bool { + if (lhs.mag == 0 || rhs.mag == 0) && lhs.mag != rhs.mag { + return true; + } else { + return false; + } + } } use orion::numbers::signed_integer::i16 as i16_core; @@ -209,6 +227,14 @@ impl i16Number of NumberTrait { fn is_neg(self: i16) -> bool { self.sign } + + fn xor(lhs: i16, rhs: i16) -> bool { + if (lhs.mag == 0 || rhs.mag == 0) && lhs.mag != rhs.mag { + return true; + } else { + return false; + } + } } use orion::numbers::signed_integer::i32 as i32_core; @@ -256,6 +282,14 @@ impl i32Number of NumberTrait { fn is_neg(self: i32) -> bool { self.sign } + + fn xor(lhs: i32, rhs: i32) -> bool { + if (lhs.mag == 0 || rhs.mag == 0) && lhs.mag != rhs.mag { + return true; + } else { + return false; + } + } } use orion::numbers::signed_integer::i64 as i64_core; @@ -303,6 +337,14 @@ impl i64Number of NumberTrait { fn is_neg(self: i64) -> bool { self.sign } + + fn xor(lhs: i64, rhs: i64) -> bool { + if (lhs.mag == 0 || rhs.mag == 0) && lhs.mag != rhs.mag { + return true; + } else { + return false; + } + } } use orion::numbers::signed_integer::i128 as i128_core; @@ -350,6 +392,14 @@ impl i128Number of NumberTrait { fn is_neg(self: i128) -> bool { self.sign } + + fn xor(lhs: i128, rhs: i128) -> bool { + if (lhs.mag == 0 || rhs.mag == 0) && lhs.mag != rhs.mag { + return true; + } else { + return false; + } + } } impl u32Number of NumberTrait { @@ -402,4 +452,12 @@ impl u32Number of NumberTrait { fn is_neg(self: u32) -> bool { false } + + fn xor(lhs: u32, rhs: u32) -> bool { + if (lhs == 0 || rhs == 0) && lhs != rhs { + return true; + } else { + return false; + } + } } diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 16c9af6a7..11107011a 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -156,8 +156,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - // xor(self, other) - panic(array![]) + math::xor::xor(self, other) } fn or(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 89895516c..207f15a5e 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -158,8 +158,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - // xor(self, other) - panic(array![]) + math::xor::xor(self, other) } fn or(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index e07a0d61e..cba80ca3c 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -160,8 +160,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - // xor(self, other) - panic(array![]) + math::xor::xor(self, other) } fn or(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index d5c7a5a94..dddcb0030 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -157,8 +157,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn xor(self: @Tensor, other: @Tensor) -> Tensor { - // xor(self, other) - panic(array![]) + math::xor::xor(self, other) } fn or(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 84640a424..8c8d427e6 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -24,7 +24,7 @@ mod cosh; mod acosh; mod asinh; mod atan; -// mod xor; +mod xor; // mod or; // mod acos; // mod onehot; diff --git a/src/operators/tensor/math/xor.cairo b/src/operators/tensor/math/xor.cairo index f3de7b256..bf71d9dc6 100644 --- a/src/operators/tensor/math/xor.cairo +++ b/src/operators/tensor/math/xor.cairo @@ -1,4 +1,57 @@ -mod xor_i8; -mod xor_u32; -mod xor_i32; -mod xor_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::xor docstring +fn xor< + T, + F, + MAG, + impl TNumber: NumberTrait, + impl UsizeFTensor: TensorTrait, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if NumberTrait::xor(y_value, z_value) { + data_result.append(1); + } else { + data_result.append(0); + } + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/xor/xor_fp.cairo b/src/operators/tensor/math/xor/xor_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/xor/xor_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/xor/xor_fp/core.cairo b/src/operators/tensor/math/xor/xor_fp/core.cairo deleted file mode 100644 index 09a92b57d..000000000 --- a/src/operators/tensor/math/xor/xor_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::xor::xor_fp::fp8x23; -use orion::operators::tensor::math::xor::xor_fp::fp16x16; - -/// Cf: TensorTrait::logical_or docstring -fn xor(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::xor(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::xor(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::xor(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::xor(y, z)), - } -} \ No newline at end of file diff --git a/src/operators/tensor/math/xor/xor_fp/fp16x16.cairo b/src/operators/tensor/math/xor/xor_fp/fp16x16.cairo deleted file mode 100644 index 4172db858..000000000 --- a/src/operators/tensor/math/xor/xor_fp/fp16x16.cairo +++ /dev/null @@ -1,53 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::math::comp::xor as xor_fp16x16; - -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::xor docstring -fn xor(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if xor_fp16x16(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/xor/xor_fp/fp8x23.cairo b/src/operators/tensor/math/xor/xor_fp/fp8x23.cairo deleted file mode 100644 index 685c9e7bb..000000000 --- a/src/operators/tensor/math/xor/xor_fp/fp8x23.cairo +++ /dev/null @@ -1,53 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::math::comp::xor as xor_fp8x23; - -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::xor docstring -fn xor(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if xor_fp8x23(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/xor/xor_i32.cairo b/src/operators/tensor/math/xor/xor_i32.cairo deleted file mode 100644 index 2844ff357..000000000 --- a/src/operators/tensor/math/xor/xor_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i32::i32_xor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::xor docstring -fn xor(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if i32_xor(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/xor/xor_i8.cairo b/src/operators/tensor/math/xor/xor_i8.cairo deleted file mode 100644 index a2d9f011e..000000000 --- a/src/operators/tensor/math/xor/xor_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::numbers::signed_integer::i8::i8_xor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::xor docstring -fn xor(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if i8_xor(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/xor/xor_u32.cairo b/src/operators/tensor/math/xor/xor_u32.cairo deleted file mode 100644 index fd93c6f0a..000000000 --- a/src/operators/tensor/math/xor/xor_u32.cairo +++ /dev/null @@ -1,47 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::xor docstring -fn xor(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if (y_value == 0 || z_value == 0) && y_value != z_value { - data_result.append(1); - } else { - data_result.append(0); - } - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From bb6478d67e5fb7e5632d1248c72337a5e917707d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 14:32:12 +0300 Subject: [PATCH 041/179] add generic or --- src/numbers.cairo | 58 +++++++++++++++++ .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/or.cairo | 62 +++++++++++++++++-- src/operators/tensor/math/or/or_fp.cairo | 3 - src/operators/tensor/math/or/or_fp/core.cairo | 18 ------ .../tensor/math/or/or_fp/fp16x16.cairo | 52 ---------------- .../tensor/math/or/or_fp/fp8x23.cairo | 52 ---------------- src/operators/tensor/math/or/or_i32.cairo | 49 --------------- src/operators/tensor/math/or/or_i8.cairo | 49 --------------- src/operators/tensor/math/or/or_u32.cairo | 48 -------------- 14 files changed, 121 insertions(+), 284 deletions(-) delete mode 100644 src/operators/tensor/math/or/or_fp.cairo delete mode 100644 src/operators/tensor/math/or/or_fp/core.cairo delete mode 100644 src/operators/tensor/math/or/or_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/or/or_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/or/or_i32.cairo delete mode 100644 src/operators/tensor/math/or/or_i8.cairo delete mode 100644 src/operators/tensor/math/or/or_u32.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index f5b7cf4aa..3727f6772 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -21,6 +21,8 @@ trait NumberTrait { fn is_neg(self: T) -> bool; fn xor(lhs: T, rhs: T) -> bool; + + fn or(lhs: T, rhs: T) -> bool; } use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23}; @@ -73,6 +75,10 @@ impl FP8x23Number of NumberTrait { fn xor(lhs: FP8x23, rhs: FP8x23) -> bool { comp_fp8x23::xor(lhs, rhs) } + + fn or(lhs: FP8x23, rhs: FP8x23) -> bool { + comp_fp8x23::or(lhs, rhs) + } } use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16}; @@ -125,6 +131,10 @@ impl FP16x16Number of NumberTrait { fn xor(lhs: FP16x16, rhs: FP16x16) -> bool { comp_fp16x16::xor(lhs, rhs) } + + fn or(lhs: FP16x16, rhs: FP16x16) -> bool { + comp_fp16x16::or(lhs, rhs) + } } use orion::numbers::signed_integer::i8 as i8_core; @@ -180,6 +190,14 @@ impl I8Number of NumberTrait { return false; } } + + fn or(lhs: i8, rhs: i8) -> bool { + if (lhs.mag == 0 && rhs.mag == 0) { + return false; + } else { + return true; + } + } } use orion::numbers::signed_integer::i16 as i16_core; @@ -235,6 +253,14 @@ impl i16Number of NumberTrait { return false; } } + + fn or(lhs: i16, rhs: i16) -> bool { + if (lhs.mag == 0 && rhs.mag == 0) { + return false; + } else { + return true; + } + } } use orion::numbers::signed_integer::i32 as i32_core; @@ -290,6 +316,14 @@ impl i32Number of NumberTrait { return false; } } + + fn or(lhs: i32, rhs: i32) -> bool { + if (lhs.mag == 0 && rhs.mag == 0) { + return false; + } else { + return true; + } + } } use orion::numbers::signed_integer::i64 as i64_core; @@ -345,6 +379,14 @@ impl i64Number of NumberTrait { return false; } } + + fn or(lhs: i64, rhs: i64) -> bool { + if (lhs.mag == 0 && rhs.mag == 0) { + return false; + } else { + return true; + } + } } use orion::numbers::signed_integer::i128 as i128_core; @@ -400,6 +442,14 @@ impl i128Number of NumberTrait { return false; } } + + fn or(lhs: i128, rhs: i128) -> bool { + if (lhs.mag == 0 && rhs.mag == 0) { + return false; + } else { + return true; + } + } } impl u32Number of NumberTrait { @@ -460,4 +510,12 @@ impl u32Number of NumberTrait { return false; } } + + fn or(lhs: u32, rhs: u32) -> bool { + if (lhs == 0 && rhs == 0) { + return false; + } else { + return true; + } + } } diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 11107011a..cd7c85d1f 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -160,8 +160,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn or(self: @Tensor, other: @Tensor) -> Tensor { - // or(self, other) - panic(array![]) + math::or::or(self, other) } fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with FP8x23']) diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 207f15a5e..5dcba7f86 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -162,8 +162,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn or(self: @Tensor, other: @Tensor) -> Tensor { - // or(self, other) - panic(array![]) + math::or::or(self, other) } fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with i32']) diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index cba80ca3c..e26f33335 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -164,8 +164,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn or(self: @Tensor, other: @Tensor) -> Tensor { - // or(self, other) - panic(array![]) + math::or::or(self, other) } fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with i8']) diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index dddcb0030..0a9772fce 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -161,8 +161,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn or(self: @Tensor, other: @Tensor) -> Tensor { - // or(self, other) - panic(array![]) + math::or::or(self, other) } fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with u32']) diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 8c8d427e6..ff58d4849 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -25,7 +25,7 @@ mod acosh; mod asinh; mod atan; mod xor; -// mod or; +mod or; // mod acos; // mod onehot; // mod sqrt; diff --git a/src/operators/tensor/math/or.cairo b/src/operators/tensor/math/or.cairo index 6317506f3..70f49394d 100644 --- a/src/operators/tensor/math/or.cairo +++ b/src/operators/tensor/math/or.cairo @@ -1,4 +1,58 @@ -mod or_i8; -mod or_u32; -mod or_i32; -mod or_fp; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; + +/// Cf: TensorTrait::or docstring +fn or< + T, + F, + MAG, + impl TNumber: NumberTrait, + impl UsizeFTensor: TensorTrait, + impl TCopy: Copy, + impl TDrop: Drop +>( + y: @Tensor, z: @Tensor +) -> Tensor { + check_compatibility(*y.shape, *z.shape); + + let mut data_result = ArrayTrait::::new(); + let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { + (y, z, true) + } else { + (z, y, false) + }; + + let mut bigger_data = *bigger.data; + let mut smaller_data = *smaller.data; + let mut smaller_index = 0; + + loop { + if bigger_data.len() == 0 { + break (); + }; + + let bigger_current_index = *bigger_data.pop_front().unwrap(); + let smaller_current_index = *smaller_data[smaller_index]; + + let (y_value, z_value) = if retains_input_order { + (smaller_current_index, bigger_current_index) + } else { + (bigger_current_index, smaller_current_index) + }; + + if NumberTrait::or(y_value, z_value) { + data_result.append(1); + } else { + data_result.append(0); + } + + smaller_index = (1 + smaller_index) % smaller_data.len(); + }; + + return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); +} diff --git a/src/operators/tensor/math/or/or_fp.cairo b/src/operators/tensor/math/or/or_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/or/or_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/or/or_fp/core.cairo b/src/operators/tensor/math/or/or_fp/core.cairo deleted file mode 100644 index 60ef043fb..000000000 --- a/src/operators/tensor/math/or/or_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::or::or_fp::fp8x23; -use orion::operators::tensor::math::or::or_fp::fp16x16; - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Option> { - match *y.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::or(y, z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::or(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::or(y, z)), - }, - Option::None(_) => Option::Some(fp16x16::or(y, z)), - } -} diff --git a/src/operators/tensor/math/or/or_fp/fp16x16.cairo b/src/operators/tensor/math/or/or_fp/fp16x16.cairo deleted file mode 100644 index 2440b2352..000000000 --- a/src/operators/tensor/math/or/or_fp/fp16x16.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; -use orion::numbers::fixed_point::implementations::fp16x16::math::comp::or as or_16x16; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if or_16x16(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/or/or_fp/fp8x23.cairo b/src/operators/tensor/math/or/or_fp/fp8x23.cairo deleted file mode 100644 index ffdb229dc..000000000 --- a/src/operators/tensor/math/or/or_fp/fp8x23.cairo +++ /dev/null @@ -1,52 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23PartialOrd, FP8x23Impl}; -use orion::numbers::fixed_point::implementations::fp8x23::math::comp::or as or_8x23; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; - - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if or_8x23(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/or/or_i32.cairo b/src/operators/tensor/math/or/or_i32.cairo deleted file mode 100644 index 2f442245f..000000000 --- a/src/operators/tensor/math/or/or_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::i32::{i32, i32_or}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if i32_or(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/or/or_i8.cairo b/src/operators/tensor/math/or/or_i8.cairo deleted file mode 100644 index 475fa4ee9..000000000 --- a/src/operators/tensor/math/or/or_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::i8::{i8, i8_or}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if i8_or(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} diff --git a/src/operators/tensor/math/or/or_u32.cairo b/src/operators/tensor/math/or/or_u32.cairo deleted file mode 100644 index ef05070ac..000000000 --- a/src/operators/tensor/math/or/or_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; - -/// Cf: TensorTrait::or docstring -fn or(y: @Tensor, z: @Tensor) -> Tensor { - check_compatibility(*y.shape, *z.shape); - - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; - - loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; - - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; - - if y_value == 0 && z_value == 0 { - data_result.append(0); - } else { - data_result.append(1); - } - - smaller_index = (1 + smaller_index) % smaller_data.len(); - }; - - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); -} From 657490db6f9f39b53c34f874c61946dfbe85eeb9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 14:33:56 +0300 Subject: [PATCH 042/179] add generic acos --- .../implementations/tensor_fp8x23.cairo | 2 +- .../implementations/tensor_u32_fp8x23.cairo | 1 + src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/acos.cairo | 34 ++++++++++++++++++- src/operators/tensor/math/acos/acos_fp.cairo | 3 -- .../tensor/math/acos/acos_fp/core.cairo | 18 ---------- .../tensor/math/acos/acos_fp/fp16x16.cairo | 25 -------------- .../tensor/math/acos/acos_fp/fp8x23.cairo | 26 -------------- 8 files changed, 36 insertions(+), 75 deletions(-) delete mode 100644 src/operators/tensor/math/acos/acos_fp.cairo delete mode 100644 src/operators/tensor/math/acos/acos_fp/core.cairo delete mode 100644 src/operators/tensor/math/acos/acos_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/acos/acos_fp/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index cd7c85d1f..b9343b4c4 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -163,7 +163,7 @@ impl Tensor_fp8x23 of TensorTrait { math::or::or(self, other) } fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with FP8x23']) + math::acos::acos(*self) } fn onehot( diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 0a9772fce..7f296a394 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -163,6 +163,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } + fn acos(self: @Tensor) -> Tensor { panic(array!['not supported with u32']) } diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index ff58d4849..0892e5ac0 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -26,7 +26,7 @@ mod asinh; mod atan; mod xor; mod or; -// mod acos; +mod acos; // mod onehot; // mod sqrt; // mod concat; diff --git a/src/operators/tensor/math/acos.cairo b/src/operators/tensor/math/acos.cairo index 8502fa315..dfe9899ae 100644 --- a/src/operators/tensor/math/acos.cairo +++ b/src/operators/tensor/math/acos.cairo @@ -1 +1,33 @@ -mod acos_fp; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: TensorTrait::acos docstring +fn acos< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).acos()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::::new(self.shape, result.span(), self.extra); +} + diff --git a/src/operators/tensor/math/acos/acos_fp.cairo b/src/operators/tensor/math/acos/acos_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/acos/acos_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/acos/acos_fp/core.cairo b/src/operators/tensor/math/acos/acos_fp/core.cairo deleted file mode 100644 index d991bffe2..000000000 --- a/src/operators/tensor/math/acos/acos_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::acos::acos_fp::fp8x23; -use orion::operators::tensor::math::acos::acos_fp::fp16x16; - -/// Cf: TensorTrait::acos docstring -fn acos(self: Tensor) -> Option> { - match self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::acos(self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::acos(self)), - }, - Option::None(_) => Option::Some(fp16x16::acos(self)), - }, - Option::None(_) => Option::Some(fp16x16::acos(self)), - } -} diff --git a/src/operators/tensor/math/acos/acos_fp/fp16x16.cairo b/src/operators/tensor/math/acos/acos_fp/fp16x16.cairo deleted file mode 100644 index c2a4afa68..000000000 --- a/src/operators/tensor/math/acos/acos_fp/fp16x16.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - -/// Cf: TensorTrait::acos docstring -fn acos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).acos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/acos/acos_fp/fp8x23.cairo b/src/operators/tensor/math/acos/acos_fp/fp8x23.cairo deleted file mode 100644 index 9a2c7ac84..000000000 --- a/src/operators/tensor/math/acos/acos_fp/fp8x23.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -/// Cf: TensorTrait::acos docstring -fn acos(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).acos()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} - From 9ee2c2569ffa3d28fae224215e28ba7b003d9434 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:08:07 +0300 Subject: [PATCH 043/179] add generic onehot --- src/numbers.cairo | 38 +++++ .../implementations/tensor_fp8x23.cairo | 11 +- .../implementations/tensor_i32_fp8x23.cairo | 9 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 9 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/onehot.cairo | 152 +++++++++++++++++- .../tensor/math/onehot/onehot_fp.cairo | 3 - .../tensor/math/onehot/onehot_fp/core.cairo | 22 --- .../math/onehot/onehot_fp/fp16x16.cairo | 136 ---------------- .../tensor/math/onehot/onehot_fp/fp8x23.cairo | 132 --------------- .../tensor/math/onehot/onehot_i32.cairo | 132 --------------- .../tensor/math/onehot/onehot_i8.cairo | 136 ---------------- .../tensor/math/onehot/onehot_u32.cairo | 124 -------------- 14 files changed, 210 insertions(+), 699 deletions(-) delete mode 100644 src/operators/tensor/math/onehot/onehot_fp.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_fp/core.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_i32.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_i8.cairo delete mode 100644 src/operators/tensor/math/onehot/onehot_u32.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 3727f6772..a4952ccd1 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -3,6 +3,8 @@ mod signed_integer; // Common methods from Fixed Point and Signed Integers. trait NumberTrait { + fn new(mag: MAG, sign: bool) -> T; + fn zero() -> T; fn is_zero(self: T) -> bool; @@ -30,6 +32,10 @@ use orion::numbers::fixed_point::implementations::fp8x23::math::core as core_fp8 use orion::numbers::fixed_point::implementations::fp8x23::math::comp as comp_fp8x23; impl FP8x23Number of NumberTrait { + fn new(mag: u32, sign: bool) -> FP8x23 { + FP8x23Impl::new(mag, sign) + } + fn zero() -> FP8x23 { FP8x23Impl::ZERO() } @@ -86,6 +92,10 @@ use orion::numbers::fixed_point::implementations::fp16x16::math::core as core_fp use orion::numbers::fixed_point::implementations::fp16x16::math::comp as comp_fp16x16; impl FP16x16Number of NumberTrait { + fn new(mag: u32, sign: bool) -> FP16x16 { + FP16x16Impl::new(mag, sign) + } + fn zero() -> FP16x16 { FP16x16Impl::ZERO() } @@ -141,6 +151,10 @@ use orion::numbers::signed_integer::i8 as i8_core; use orion::numbers::signed_integer::i8::i8; impl I8Number of NumberTrait { + fn new(mag: u8, sign: bool) -> i8 { + i8 { mag: mag, sign: false } + } + fn zero() -> i8 { i8 { mag: 0, sign: false } } @@ -204,6 +218,10 @@ use orion::numbers::signed_integer::i16 as i16_core; use orion::numbers::signed_integer::i16::i16; impl i16Number of NumberTrait { + fn new(mag: u16, sign: bool) -> i16 { + i16 { mag: mag, sign: false } + } + fn zero() -> i16 { i16 { mag: 0, sign: false } } @@ -267,6 +285,11 @@ use orion::numbers::signed_integer::i32 as i32_core; use orion::numbers::signed_integer::i32::i32; impl i32Number of NumberTrait { + fn new(mag: u32, sign: bool) -> i32 { + i32 { mag: mag, sign: false } + } + + fn zero() -> i32 { i32 { mag: 0, sign: false } } @@ -330,6 +353,11 @@ use orion::numbers::signed_integer::i64 as i64_core; use orion::numbers::signed_integer::i64::i64; impl i64Number of NumberTrait { + fn new(mag: u64, sign: bool) -> i64 { + i64 { mag: mag, sign: false } + } + + fn zero() -> i64 { i64 { mag: 0, sign: false } } @@ -393,6 +421,11 @@ use orion::numbers::signed_integer::i128 as i128_core; use orion::numbers::signed_integer::i128::i128; impl i128Number of NumberTrait { + fn new(mag: u128, sign: bool) -> i128 { + i128 { mag: mag, sign: false } + } + + fn zero() -> i128 { i128 { mag: 0, sign: false } } @@ -453,6 +486,11 @@ impl i128Number of NumberTrait { } impl u32Number of NumberTrait { + fn new(mag: u32, sign: bool) -> u32 { + mag + } + + fn zero() -> u32 { 0 } diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index b9343b4c4..873a8b084 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -3,7 +3,7 @@ use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::Into; +use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; @@ -169,8 +169,7 @@ impl Tensor_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - // onehot(self, depth, axis, values) - panic(array![]) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { @@ -254,3 +253,9 @@ impl FP8x23TensorPartialEq of PartialEq> { !tensor_eq(*lhs, *rhs) } } + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 5dcba7f86..b4c47a5c0 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -171,8 +171,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - // onehot(self, depth, axis, values) - panic(array![]) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { @@ -257,3 +256,9 @@ impl i32TensorPartialEq of PartialEq> { !tensor_eq(*lhs, *rhs) } } + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index e26f33335..f6cae05d6 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -173,8 +173,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - // onehot(self, depth, axis, values) - panic(array![]) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 7f296a394..42799dc43 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -171,8 +171,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - // onehot(self, depth, axis, values) - panic(array![]) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { @@ -280,3 +279,9 @@ impl u32TensorPartialEq of PartialEq> { !tensor_eq(*lhs, *rhs) } } + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 0892e5ac0..2f208e79a 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -27,6 +27,6 @@ mod atan; mod xor; mod or; mod acos; -// mod onehot; +mod onehot; // mod sqrt; // mod concat; diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index f547b02f2..2f170d1bc 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -1,4 +1,148 @@ -mod onehot_i8; -mod onehot_i32; -mod onehot_u32; -mod onehot_fp; +use array::ArrayTrait; +use array::SpanTrait; + +use core::traits::Into; +use debug::PrintTrait; +use core::traits::TryInto; +use core::serde::Serde; +use core::traits::Destruct; +use option::OptionTrait; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + +/// Cf: TensorTrait::onehot docstring +fn onehot_encode< + T, + F, + MAG, + impl TTensorTrait: TensorTrait, + impl TNumber: NumberTrait, + impl TTryInto: TryInto, + impl TPartialEq: PartialEq, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, depth: usize, axis: Option, values: Tensor +) -> Tensor { + let data = *self.data; + let shape = *self.shape; + let rank = shape.len(); + + // using 999 to denote -1, innermost dimension + let axis = match axis { + Option::Some(val) => val, + Option::None(_) => 999 + }; + + assert(((axis == 999) | (axis.into() <= rank)), 'axis out of dimensions'); + + let tensor_len: usize = data.len(); + + let mut output_data = ArrayTrait::new(); + let mut output_size = ArrayTrait::::new(); + let extra = Option::::None(()); + + // New shape for output data + let mut index: usize = 0; + loop { + if index == shape.len() { + break (); + }; + let size: usize = *shape.at(index); + output_size.append(size); + index += 1; + }; + output_size.append(depth.into()); + + // OneHot enocde loop + let mut outer_index: usize = 0; + loop { + if outer_index == tensor_len { + break (); + }; + + let mut inner_index = 0; + let mut fixed_number = *(*self.data).at(outer_index); + + if fixed_number.is_neg() { + fixed_number = NumberTrait::new(depth.try_into().unwrap(), false) + fixed_number + } + + loop { + if inner_index == depth { + break (); + }; + let ind = NumberTrait::new(inner_index.try_into().unwrap(), false); + + if fixed_number == ind { + output_data.append(*values.data.at(1)); + } else { + output_data.append(*values.data.at(0)); + }; + + inner_index += 1; + }; + + outer_index += 1; + }; + + let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), extra); + let mut tranpose_axes = ArrayTrait::new(); + // Get New shape is axis is not last dimension + if (axis != 999) & (axis.into() != rank) { + let mut index: usize = 0; + loop { + let max_dim = output_size.len() - 1; + if index.into() == max_dim { + break (); + }; + + if axis == index { + tranpose_axes.append(max_dim.into()) + } + tranpose_axes.append(index.into()); + index += 1; + }; + + let mut index: usize = 0; + + output_tensor = output_tensor.transpose(tranpose_axes.span()); + } + + return output_tensor; +} + + +fn onehot< + T, + F, + MAG, + impl TTensorTrait: TensorTrait, + impl TNumber: NumberTrait, + impl TInto: TryInto, + impl TPartialEq: PartialEq, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop, +>( + self: @Tensor, depth: usize, axis: Option, mut values: Span, +) -> Tensor { + assert(values.len() == 2, 'Wrong values dimensions'); + + let mut sizes = ArrayTrait::new(); + sizes.append(2); + + let mut first = *values.pop_front().unwrap(); + let mut second = *values.pop_front().unwrap(); + + let mut data = ArrayTrait::new(); + data.append(NumberTrait::new(first.try_into().unwrap(), false)); + data.append(NumberTrait::new(second.try_into().unwrap(), false)); + let extra = Option::::None(()); + + let values = TensorTrait::new(sizes.span(), data.span(), extra); + onehot_encode(self, depth, axis, values) +} diff --git a/src/operators/tensor/math/onehot/onehot_fp.cairo b/src/operators/tensor/math/onehot/onehot_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/onehot/onehot_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/onehot/onehot_fp/core.cairo b/src/operators/tensor/math/onehot/onehot_fp/core.cairo deleted file mode 100644 index 42a1f989e..000000000 --- a/src/operators/tensor/math/onehot/onehot_fp/core.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use core::option::OptionTrait; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::onehot::onehot_fp::fp8x23; -use orion::operators::tensor::math::onehot::onehot_fp::fp16x16; -use debug::PrintTrait; - -/// Cf: TensorTrait::cumsum docstring -fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span -) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::onehot(self, depth, axis, values)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::onehot(self, depth, axis, values)), - }, - Option::None(_) => Option::Some(fp16x16::onehot(self, depth, axis, values)), - }, - Option::None(_) => Option::Some(fp16x16::onehot(self, depth, axis, values)), - } -} diff --git a/src/operators/tensor/math/onehot/onehot_fp/fp16x16.cairo b/src/operators/tensor/math/onehot/onehot_fp/fp16x16.cairo deleted file mode 100644 index 08f0e9620..000000000 --- a/src/operators/tensor/math/onehot/onehot_fp/fp16x16.cairo +++ /dev/null @@ -1,136 +0,0 @@ -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use option::OptionTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq, FP16x16PartialEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use array::{ArrayTrait, SpanTrait}; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; -use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; - - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 999 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 999 - }; - - assert(((axis == 999) | (axis <= rank)), 'axis out of dimensions'); - - let mut tensor_data = self.data.clone(); - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index: usize = 0; - - let mut fixed_number = *tensor_data.at(outer_index); - if fixed_number.sign == true { - fixed_number = - FP16x16Add::add(FixedTrait::new_unscaled(depth.into(), false), fixed_number) - } - - loop { - if inner_index == depth { - break (); - }; - let ind = FixedTrait::new_unscaled(inner_index.into(), false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::::new( - output_size.span(), output_data.span(), extra - ); - let mut tranpose_axes = ArrayTrait::::new(); - // Get New shape is axis is not last dimension - if (axis != 999) & (axis != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim) - } - tranpose_axes.append(index); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - -/// Cf: TensorTrait::onehot docstring -fn onehot( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(first.into(), false)); - data.append(FixedTrait::new_unscaled(second.into(), false)); - let extra = Option::::None(()); - - let values = TensorTrait::::new(sizes.span(), data.span(), extra); - onehot_encode(self, depth, axis, values) -} diff --git a/src/operators/tensor/math/onehot/onehot_fp/fp8x23.cairo b/src/operators/tensor/math/onehot/onehot_fp/fp8x23.cairo deleted file mode 100644 index 89b07d9e3..000000000 --- a/src/operators/tensor/math/onehot/onehot_fp/fp8x23.cairo +++ /dev/null @@ -1,132 +0,0 @@ -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use option::OptionTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23Add, FP8x23Sub, FP8x23AddEq, FP8x23PartialEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use array::{ArrayTrait, SpanTrait}; - - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 999 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 999 - }; - - assert(((axis == 999) | (axis <= rank)), 'axis out of dimensions'); - - let mut tensor_data = self.data.clone(); - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index: usize = 0; - - let mut fixed_number = *tensor_data.at(outer_index); - if fixed_number.sign == true { - fixed_number = - FP8x23Add::add(FixedTrait::new_unscaled(depth.into(), false), fixed_number) - } - - loop { - if inner_index == depth { - break (); - }; - let ind = FixedTrait::new_unscaled(inner_index.into(), false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::::new( - output_size.span(), output_data.span(), extra - ); - let mut tranpose_axes = ArrayTrait::::new(); - // Get New shape is axis is not last dimension - if (axis != 999) & (axis != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim) - } - tranpose_axes.append(index); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - -/// Cf: TensorTrait::onehot docstring -fn onehot( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(first.into(), false)); - data.append(FixedTrait::new_unscaled(second.into(), false)); - let extra = Option::::None(()); - - let values = TensorTrait::::new(sizes.span(), data.span(), extra); - onehot_encode(self, depth, axis, values) -} diff --git a/src/operators/tensor/math/onehot/onehot_i32.cairo b/src/operators/tensor/math/onehot/onehot_i32.cairo deleted file mode 100644 index cfbaef8a9..000000000 --- a/src/operators/tensor/math/onehot/onehot_i32.cairo +++ /dev/null @@ -1,132 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use option::OptionTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::signed_integer::i32::{ - i32Add, i32AddEq, i32PartialEq, i32PartialOrd, i32_new, i32Into -}; - - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 255 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 255 - }; - - assert(((axis == 255) | (axis.into() <= rank)), 'axis out of dimensions'); - - let mut tensor_data = self.data.clone(); - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth.into()); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index = 0; - let mut fixed_number = *tensor_data.at(outer_index); - - if fixed_number.sign == true { - fixed_number = i32Add::add(i32_new(depth, false), fixed_number) - } - - loop { - if inner_index == depth { - break (); - }; - let ind = IntegerTrait::::new(inner_index, false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::::new(output_size.span(), output_data.span(), extra); - let mut tranpose_axes = ArrayTrait::new(); - // Get New shape is axis is not last dimension - if (axis != 255) & (axis.into() != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index.into() == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim.into()) - } - tranpose_axes.append(index.into()); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - - -fn onehot( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(IntegerTrait::::new(first, false)); - data.append(IntegerTrait::::new(second, false)); - let extra = Option::::None(()); - - let values = TensorTrait::::new(sizes.span(), data.span(), extra); - onehot_encode(self, depth, axis, values) -} diff --git a/src/operators/tensor/math/onehot/onehot_i8.cairo b/src/operators/tensor/math/onehot/onehot_i8.cairo deleted file mode 100644 index 668013242..000000000 --- a/src/operators/tensor/math/onehot/onehot_i8.cairo +++ /dev/null @@ -1,136 +0,0 @@ -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use option::OptionTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use array::{ArrayTrait, SpanTrait}; -use orion::numbers::signed_integer::i8::{ - i8Add, i8AddEq, i8PartialEq, i8PartialOrd, i8_new, i8Into, -}; - - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 255 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 255 - }; - - assert(((axis == 255) | (axis.into() <= rank)), 'axis out of dimensions'); - - let mut tensor_data = self.data.clone(); - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth.into()); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index: u8 = 0; - let mut fixed_number = *tensor_data.at(outer_index); - let depth: u8 = integer::u8_try_from_felt252(integer::u32_to_felt252(depth)).unwrap(); - - if fixed_number.sign == true { - fixed_number = i8Add::add(i8_new(depth, false), fixed_number) - } - - loop { - if inner_index == depth { - break (); - }; - let ind = IntegerTrait::::new(inner_index, false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::::new(output_size.span(), output_data.span(), extra); - let mut tranpose_axes = ArrayTrait::new(); - // Get New shape is axis is not last dimension - if (axis != 255) & (axis.into() != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index.into() == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim.into()) - } - tranpose_axes.append(index.into()); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - - -fn onehot( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let first = integer::u32_to_felt252(first); - let second = integer::u32_to_felt252(second); - let first: u8 = integer::u8_try_from_felt252(first).unwrap(); - let second: u8 = integer::u8_try_from_felt252(second).unwrap(); - - let mut data = ArrayTrait::new(); - data.append(IntegerTrait::::new(first, false)); - data.append(IntegerTrait::::new(second, false)); - let extra = Option::::None(()); - - let values = TensorTrait::::new(sizes.span(), data.span(), extra); - onehot_encode(self, depth, axis, values) -} diff --git a/src/operators/tensor/math/onehot/onehot_u32.cairo b/src/operators/tensor/math/onehot/onehot_u32.cairo deleted file mode 100644 index 7ec15c50a..000000000 --- a/src/operators/tensor/math/onehot/onehot_u32.cairo +++ /dev/null @@ -1,124 +0,0 @@ -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use option::OptionTrait; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use array::{ArrayTrait, SpanTrait}; - - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 999 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 999 - }; - - assert(((axis == 999) | (axis.into() <= rank)), 'axis out of dimensions'); - - let mut tensor_data = self.data.clone(); - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth.into()); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index: usize = 0; - let mut fixed_number = *tensor_data.at(outer_index); - loop { - if inner_index == depth { - break (); - }; - let ind = inner_index; - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::::new(output_size.span(), output_data.span(), extra); - let mut tranpose_axes = ArrayTrait::new(); - // Get New shape is axis is not last dimension - if (axis != 999) & (axis.into() != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index.into() == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim.into()) - } - tranpose_axes.append(index.into()); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - - -fn onehot( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first: u32 = *values.pop_front().unwrap(); - let mut second: u32 = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(first); - data.append(second); - - let extra = Option::::None(()); - - let values = TensorTrait::::new(sizes.span(), data.span(), extra); - - onehot_encode(self, depth, axis, values) -} From 8ec1dcc5a25e74e2dd240269213c201d741050f9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:12:42 +0300 Subject: [PATCH 044/179] add generic sqrt --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/sqrt.cairo | 75 ++++++++++++++++++- src/operators/tensor/math/sqrt/sqrt_fp.cairo | 3 - .../tensor/math/sqrt/sqrt_fp/core.cairo | 18 ----- .../tensor/math/sqrt/sqrt_fp/fp16x16.cairo | 26 ------- .../tensor/math/sqrt/sqrt_fp/fp8x23.cairo | 26 ------- src/operators/tensor/math/sqrt/sqrt_i32.cairo | 3 - .../tensor/math/sqrt/sqrt_i32/core.cairo | 18 ----- .../tensor/math/sqrt/sqrt_i32/fp16x16.cairo | 28 ------- .../tensor/math/sqrt/sqrt_i32/fp8x23.cairo | 28 ------- src/operators/tensor/math/sqrt/sqrt_i8.cairo | 3 - .../tensor/math/sqrt/sqrt_i8/core.cairo | 18 ----- .../tensor/math/sqrt/sqrt_i8/fp16x16.cairo | 28 ------- .../tensor/math/sqrt/sqrt_i8/fp8x23.cairo | 28 ------- src/operators/tensor/math/sqrt/sqrt_u32.cairo | 3 - .../tensor/math/sqrt/sqrt_u32/core.cairo | 18 ----- .../tensor/math/sqrt/sqrt_u32/fp16x16.cairo | 28 ------- .../tensor/math/sqrt/sqrt_u32/fp8x23.cairo | 28 ------- 22 files changed, 76 insertions(+), 317 deletions(-) delete mode 100644 src/operators/tensor/math/sqrt/sqrt_fp.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_fp/core.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i32.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i32/core.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i32/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i8.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i8/core.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i8/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_i8/fp8x23.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_u32.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_u32/core.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_u32/fp16x16.cairo delete mode 100644 src/operators/tensor/math/sqrt/sqrt_u32/fp8x23.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 873a8b084..d9a7f12d5 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -173,8 +173,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn sqrt(self: @Tensor) -> Tensor { - // sqrt_FP8x23(self).unwrap() - panic(array![]) + math::sqrt::sqrt_from_fp(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index b4c47a5c0..0ad988764 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -175,8 +175,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn sqrt(self: @Tensor) -> Tensor { - // sqrt_i32(self).unwrap() - panic(array![]) + math::sqrt::sqrt_from_int(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index f6cae05d6..9fa0184d0 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -177,8 +177,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn sqrt(self: @Tensor) -> Tensor { - // sqrt_i8(self).unwrap() - panic(array![]) + math::sqrt::sqrt_from_int(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 42799dc43..bd0ec90bd 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -175,8 +175,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn sqrt(self: @Tensor) -> Tensor { - // sqrt_u32(self).unwrap() - panic(array![]) + math::sqrt::sqrt_from_int(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 2f208e79a..11b8e88f0 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -28,5 +28,5 @@ mod xor; mod or; mod acos; mod onehot; -// mod sqrt; +mod sqrt; // mod concat; diff --git a/src/operators/tensor/math/sqrt.cairo b/src/operators/tensor/math/sqrt.cairo index a91eb385f..0b6e8bcb8 100644 --- a/src/operators/tensor/math/sqrt.cairo +++ b/src/operators/tensor/math/sqrt.cairo @@ -1,4 +1,71 @@ -mod sqrt_i8; -mod sqrt_i32; -mod sqrt_u32; -mod sqrt_fp; \ No newline at end of file +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::NumberTrait; +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +fn sqrt_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result + .append( + FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) + .sqrt() + ); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} + +fn sqrt_from_fp< + F, + MAG, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut self: Tensor +) -> Tensor { + let mut result = ArrayTrait::new(); + + loop { + match self.data.pop_front() { + Option::Some(item) => { + result.append((*item).sqrt()); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(self.shape, result.span(), self.extra); +} diff --git a/src/operators/tensor/math/sqrt/sqrt_fp.cairo b/src/operators/tensor/math/sqrt/sqrt_fp.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_fp/core.cairo b/src/operators/tensor/math/sqrt/sqrt_fp/core.cairo deleted file mode 100644 index 676d07a3a..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::operators::tensor::math::sqrt::sqrt_fp::fp8x23; -use orion::operators::tensor::math::sqrt::sqrt_fp::fp16x16; - -/// Cf: TensorTrait::sqrt docstring -fn sqrt(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sqrt(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - } -} diff --git a/src/operators/tensor/math/sqrt/sqrt_fp/fp16x16.cairo b/src/operators/tensor/math/sqrt/sqrt_fp/fp16x16.cairo deleted file mode 100644 index 136f4ddfa..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_fp/fp16x16.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sqrt/sqrt_fp/fp8x23.cairo b/src/operators/tensor/math/sqrt/sqrt_fp/fp8x23.cairo deleted file mode 100644 index 50125089f..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_fp/fp8x23.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append((*item).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i32.cairo b/src/operators/tensor/math/sqrt/sqrt_i32.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i32/core.cairo b/src/operators/tensor/math/sqrt/sqrt_i32/core.cairo deleted file mode 100644 index f13d02904..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i32/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sqrt::sqrt_i32::fp8x23; -use orion::operators::tensor::math::sqrt::sqrt_i32::fp16x16; - -fn sqrt_i32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sqrt(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - } -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i32/fp16x16.cairo b/src/operators/tensor/math/sqrt/sqrt_i32/fp16x16.cairo deleted file mode 100644 index 46c71dc8f..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i32/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i32/fp8x23.cairo b/src/operators/tensor/math/sqrt/sqrt_i32/fp8x23.cairo deleted file mode 100644 index ee47fe173..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i32/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item.mag, *item.sign).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i8.cairo b/src/operators/tensor/math/sqrt/sqrt_i8.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i8/core.cairo b/src/operators/tensor/math/sqrt/sqrt_i8/core.cairo deleted file mode 100644 index 55a7f4141..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i8/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::math::sqrt::sqrt_i8::fp8x23; -use orion::operators::tensor::math::sqrt::sqrt_i8::fp16x16; - -fn sqrt_i8(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sqrt(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - } -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i8/fp16x16.cairo b/src/operators/tensor/math/sqrt/sqrt_i8/fp16x16.cairo deleted file mode 100644 index 0d69b27b9..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i8/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_i8/fp8x23.cairo b/src/operators/tensor/math/sqrt/sqrt_i8/fp8x23.cairo deleted file mode 100644 index c37f548f9..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_i8/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled((*item.mag).into(), *item.sign).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sqrt/sqrt_u32.cairo b/src/operators/tensor/math/sqrt/sqrt_u32.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/tensor/math/sqrt/sqrt_u32/core.cairo b/src/operators/tensor/math/sqrt/sqrt_u32/core.cairo deleted file mode 100644 index 619ec3459..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_u32/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::math::sqrt::sqrt_u32::fp8x23; -use orion::operators::tensor::math::sqrt::sqrt_u32::fp16x16; - -fn sqrt_u32(self: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sqrt(*self)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - }, - Option::None(_) => Option::Some(fp16x16::sqrt(*self)), - } -} diff --git a/src/operators/tensor/math/sqrt/sqrt_u32/fp16x16.cairo b/src/operators/tensor/math/sqrt/sqrt_u32/fp16x16.cairo deleted file mode 100644 index 8ab07e5ad..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_u32/fp16x16.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} diff --git a/src/operators/tensor/math/sqrt/sqrt_u32/fp8x23.cairo b/src/operators/tensor/math/sqrt/sqrt_u32/fp8x23.cairo deleted file mode 100644 index f37773768..000000000 --- a/src/operators/tensor/math/sqrt/sqrt_u32/fp8x23.cairo +++ /dev/null @@ -1,28 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -fn sqrt(mut self: Tensor) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result.append(FixedTrait::new_unscaled(*item, false).sqrt()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span(), self.extra); -} From bb59aebab37425bc9279a0f0c286f9f90b8ce4ce Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:15:04 +0300 Subject: [PATCH 045/179] add generic concat --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/math.cairo | 2 +- src/operators/tensor/math/concat.cairo | 150 +++++++++++++++++- .../tensor/math/concat/concat_fp.cairo | 3 - .../tensor/math/concat/concat_fp/core.cairo | 40 ----- .../math/concat/concat_fp/fp16x16.cairo | 16 -- .../tensor/math/concat/concat_fp/fp8x23.cairo | 17 -- .../tensor/math/concat/concat_i32.cairo | 14 -- .../tensor/math/concat/concat_i8.cairo | 15 -- .../tensor/math/concat/concat_u32.cairo | 13 -- .../tensor/math/concat/helpers.cairo | 147 ----------------- 14 files changed, 150 insertions(+), 279 deletions(-) delete mode 100644 src/operators/tensor/math/concat/concat_fp.cairo delete mode 100644 src/operators/tensor/math/concat/concat_fp/core.cairo delete mode 100644 src/operators/tensor/math/concat/concat_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/math/concat/concat_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/math/concat/concat_i32.cairo delete mode 100644 src/operators/tensor/math/concat/concat_i8.cairo delete mode 100644 src/operators/tensor/math/concat/concat_u32.cairo delete mode 100644 src/operators/tensor/math/concat/helpers.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index d9a7f12d5..cba20fb11 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -177,8 +177,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn concat(tensors: Span>, axis: usize,) -> Tensor { - // concat_FP8x23(tensors, axis) - panic(array![]) + math::concat::concat(tensors, axis) } } diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 0ad988764..ab34f2088 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -179,8 +179,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn concat(tensors: Span>, axis: usize,) -> Tensor { - // concat_i32(tensors, axis) - panic(array![]) + math::concat::concat(tensors, axis) } } diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 9fa0184d0..d4a25b272 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -181,8 +181,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn concat(tensors: Span>, axis: usize,) -> Tensor { - // concat_i8(tensors, axis) - panic(array![]) + math::concat::concat(tensors, axis) } } diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index bd0ec90bd..133d15a88 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -179,8 +179,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn concat(tensors: Span>, axis: usize,) -> Tensor { - // concat_u32(tensors, axis) - panic(array![]) + math::concat::concat(tensors, axis) } } diff --git a/src/operators/tensor/math.cairo b/src/operators/tensor/math.cairo index 11b8e88f0..428c00880 100644 --- a/src/operators/tensor/math.cairo +++ b/src/operators/tensor/math.cairo @@ -29,4 +29,4 @@ mod or; mod acos; mod onehot; mod sqrt; -// mod concat; +mod concat; diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo index cd8b81c5c..43f1721e1 100644 --- a/src/operators/tensor/math/concat.cairo +++ b/src/operators/tensor/math/concat.cairo @@ -1,6 +1,146 @@ -mod concat_i8; -mod concat_i32; -mod concat_u32; -mod concat_fp; -mod helpers; +use core::clone::Clone; +use array::{ArrayTrait, SpanTrait}; +use option::OptionTrait; +use debug::PrintTrait; +use core::traits::Into; +use orion::operators::tensor::helpers::replace_index; +use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + + +fn concat, impl TCopy: Copy, impl TDrop: Drop,>( + mut tensors: Span>, axis: usize +) -> Tensor { + assert(tensors.len() >= 2, 'Input tensors must be > 1'); + let base_tensor = *tensors.at(0); + let base_shape = base_tensor.shape; + let dimension = base_shape.len(); + assert(dimension > axis, 'Out of bounds for dimension'); + + // Validate shapes of tensors + validate_shapes(tensors, base_shape, axis); + + // Calculate output size + let output_size = compute_output_size(base_shape, tensors, axis); + + // Concatenate tensor data + let output_data: Array = concatenate_data(tensors, axis, base_shape); + + TensorTrait::::new(output_size.span(), output_data.span(), base_tensor.extra) +} + +fn validate_shapes(mut tensors: Span>, mut base_shape: Span, axis: usize) { + loop { + match tensors.pop_front() { + Option::Some(tensor) => { + assert(base_shape.len() == (*tensor.shape).len(), 'Dimension not the same'); + + let mut axis_index = 0; + loop { + if axis_index == base_shape.len() { + break; + } + if axis_index != axis { + assert( + base_shape.at(axis_index) == (*tensor.shape).at(axis_index), + 'Shape is not the same' + ); + } + axis_index += 1; + }; + }, + Option::None(_) => { + break; + } + }; + }; +} + +fn compute_output_size( + mut base_shape: Span, mut tensors: Span>, axis: usize +) -> Array { + let mut output_size = ArrayTrait::::new(); + + let mut axis_size = 0; + loop { + match tensors.pop_front() { + Option::Some(tensor) => { + axis_size += *(*tensor.shape).at(axis); + }, + Option::None(_) => { + break; + } + }; + }; + + let mut shape_index = 0; + loop { + match base_shape.pop_front() { + Option::Some(item) => { + if shape_index == axis { + output_size.append(axis_size); + } else { + output_size.append(*item); + } + shape_index += 1; + }, + Option::None(_) => { + break; + } + }; + }; + + output_size +} + +fn concatenate_data, impl TDrop: Drop,>( + mut tensors: Span>, axis: usize, base_shape: Span +) -> Array { + let mut output_data = ArrayTrait::::new(); + + let total_loops = product_upto(base_shape, axis); + + let mut outer_loop_index = 0; + loop { + if outer_loop_index == total_loops { + break; + } + + let mut tensor_index = 0; + loop { + if tensor_index == tensors.len() { + break; + } + let tensor = tensors.at(tensor_index); + let slice_len = (*tensor.data).len() / total_loops; + + let mut inner_index = 0; + loop { + if inner_index == slice_len { + break; + } + + output_data.append(*(*tensor.data).at(slice_len * outer_loop_index + inner_index)); + inner_index += 1; + }; + tensor_index += 1; + }; + outer_loop_index += 1; + }; + + output_data +} + +fn product_upto(mut shape: Span, upto: usize) -> usize { + let mut total = 1; + let mut index = 0; + + loop { + if index == upto { + break; + } + total *= *shape.at(index); + index += 1; + }; + total +} diff --git a/src/operators/tensor/math/concat/concat_fp.cairo b/src/operators/tensor/math/concat/concat_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/math/concat/concat_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/math/concat/concat_fp/core.cairo b/src/operators/tensor/math/concat/concat_fp/core.cairo deleted file mode 100644 index 48648af2c..000000000 --- a/src/operators/tensor/math/concat/concat_fp/core.cairo +++ /dev/null @@ -1,40 +0,0 @@ -use core::option::OptionTrait; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::concat::concat_fp::fp8x23; -use orion::operators::tensor::math::concat::concat_fp::fp16x16; -use core::traits::Into; -use debug::PrintTrait; -use core::traits::TryInto; -use core::serde::Serde; -use core::traits::Destruct; -use core::clone::Clone; -use array::{ArrayTrait, SpanTrait}; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; -use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; - -/// Cf: TensorTrait::concat docstring -fn concat( - mut tensors: Span>, axis: usize, -) -> Option> { - assert(tensors.len() >= 2, 'Wrong values dimensions'); - - let mut first = *tensors.at(0); - - match first.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::concat(tensors, axis) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::concat(tensors, axis) - ), - }, - Option::None(_) => Option::Some(fp16x16::concat(tensors, axis)), - }, - Option::None(_) => Option::Some(fp16x16::concat(tensors, axis)), - } -} diff --git a/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo b/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo deleted file mode 100644 index ef12ab1a9..000000000 --- a/src/operators/tensor/math/concat/concat_fp/fp16x16.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::concat::helpers::{concat_helper}; - - -/// Cf: TensorTrait::cumsum docstring -fn concat( - tensors: Span>, axis: usize, -) -> Tensor { - - concat_helper(tensors, axis) -} diff --git a/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo b/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo deleted file mode 100644 index 961c5aa28..000000000 --- a/src/operators/tensor/math/concat/concat_fp/fp8x23.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Sub, FP16x16AddEq -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::concat::helpers::{ concat_helper}; - - -/// Cf: TensorTrait::cumsum docstring -/// Cf: TensorTrait::cumsum docstring -fn concat( - tensors: Span>, axis: usize, -) -> Tensor { - - concat_helper(tensors, axis) -} diff --git a/src/operators/tensor/math/concat/concat_i32.cairo b/src/operators/tensor/math/concat/concat_i32.cairo deleted file mode 100644 index abf1c8583..000000000 --- a/src/operators/tensor/math/concat/concat_i32.cairo +++ /dev/null @@ -1,14 +0,0 @@ -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::concat::helpers::{ concat_helper}; - - -/// Cf: TensorTrait::cumsum docstring -/// Cf: TensorTrait::cumsum docstring -fn concat_i32( - tensors: Span>, axis: usize, -) -> Tensor { - - concat_helper(tensors, axis) -} diff --git a/src/operators/tensor/math/concat/concat_i8.cairo b/src/operators/tensor/math/concat/concat_i8.cairo deleted file mode 100644 index bf2e20330..000000000 --- a/src/operators/tensor/math/concat/concat_i8.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::core::Tensor; - -use orion::operators::tensor::math::concat::helpers::{ concat_helper}; - - -/// Cf: TensorTrait::cumsum docstring -/// Cf: TensorTrait::cumsum docstring -fn concat_i8( - tensors: Span>, axis: usize, -) -> Tensor { - - concat_helper(tensors, axis) -} \ No newline at end of file diff --git a/src/operators/tensor/math/concat/concat_u32.cairo b/src/operators/tensor/math/concat/concat_u32.cairo deleted file mode 100644 index ea955d41c..000000000 --- a/src/operators/tensor/math/concat/concat_u32.cairo +++ /dev/null @@ -1,13 +0,0 @@ -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::math::cumsum::helpers::{cumsum_forward, cumsum_reverse}; -use orion::operators::tensor::math::concat::helpers::{concat_helper}; - - -/// Cf: TensorTrait::cumsum docstring -fn concat_u32( - tensors: Span>, axis: usize, -) -> Tensor { - - concat_helper(tensors, axis) -} \ No newline at end of file diff --git a/src/operators/tensor/math/concat/helpers.cairo b/src/operators/tensor/math/concat/helpers.cairo deleted file mode 100644 index a31972185..000000000 --- a/src/operators/tensor/math/concat/helpers.cairo +++ /dev/null @@ -1,147 +0,0 @@ -use core::clone::Clone; -use array::{ArrayTrait, SpanTrait}; -use option::OptionTrait; -use debug::PrintTrait; -use core::traits::Into; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::{impl_tensor_i32, impl_tensor_u32}; -use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - - -fn concat_helper, impl TCopy: Copy, impl TDrop: Drop, >( - mut tensors: Span>, axis: usize -) -> Tensor { - assert(tensors.len() >= 2, 'Input tensors must be > 1'); - let base_tensor = *tensors.at(0); - let base_shape = base_tensor.shape; - let dimension = base_shape.len(); - assert(dimension > axis, 'Out of bounds for dimension'); - - // Validate shapes of tensors - validate_shapes(tensors, base_shape, axis); - - // Calculate output size - let output_size = compute_output_size(base_shape, tensors, axis); - - // Concatenate tensor data - let output_data: Array = concatenate_data(tensors, axis, base_shape); - - TensorTrait::::new(output_size.span(), output_data.span(), base_tensor.extra) -} - -fn validate_shapes(mut tensors: Span>, mut base_shape: Span, axis: usize) { - loop { - match tensors.pop_front() { - Option::Some(tensor) => { - assert(base_shape.len() == (*tensor.shape).len(), 'Dimension not the same'); - - let mut axis_index = 0; - loop { - if axis_index == base_shape.len() { - break; - } - if axis_index != axis { - assert( - base_shape.at(axis_index) == (*tensor.shape).at(axis_index), - 'Shape is not the same' - ); - } - axis_index += 1; - }; - }, - Option::None(_) => { - break; - } - }; - }; -} - -fn compute_output_size( - mut base_shape: Span, mut tensors: Span>, axis: usize -) -> Array { - let mut output_size = ArrayTrait::::new(); - - let mut axis_size = 0; - loop { - match tensors.pop_front() { - Option::Some(tensor) => { - axis_size += *(*tensor.shape).at(axis); - }, - Option::None(_) => { - break; - } - }; - }; - - let mut shape_index = 0; - loop { - match base_shape.pop_front() { - Option::Some(item) => { - if shape_index == axis { - output_size.append(axis_size); - } else { - output_size.append(*item); - } - shape_index += 1; - }, - Option::None(_) => { - break; - } - }; - }; - - output_size -} - -fn concatenate_data, impl TDrop: Drop, >( - mut tensors: Span>, axis: usize, base_shape: Span -) -> Array { - let mut output_data = ArrayTrait::::new(); - - let total_loops = product_upto(base_shape, axis); - - let mut outer_loop_index = 0; - loop { - if outer_loop_index == total_loops { - break; - } - - let mut tensor_index = 0; - loop { - if tensor_index == tensors.len() { - break; - } - let tensor = tensors.at(tensor_index); - let slice_len = (*tensor.data).len() / total_loops; - - let mut inner_index = 0; - loop { - if inner_index == slice_len { - break; - } - - output_data.append(*(*tensor.data).at(slice_len * outer_loop_index + inner_index)); - inner_index += 1; - }; - tensor_index += 1; - }; - outer_loop_index += 1; - }; - - output_data -} - -fn product_upto(mut shape: Span, upto: usize) -> usize { - let mut total = 1; - let mut index = 0; - - loop { - if index == upto { - break; - } - total *= *shape.at(index); - index += 1; - }; - total -} From 7493b8d944560ae4c6d440b8f9f85efb6fde7c8c Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:25:28 +0300 Subject: [PATCH 046/179] add generic matmul --- src/operators/tensor.cairo | 2 +- .../implementations/tensor_fp8x23.cairo | 5 +- .../implementations/tensor_i32_fp8x23.cairo | 5 +- .../implementations/tensor_i8_fp8x23.cairo | 5 +- .../implementations/tensor_u32_fp8x23.cairo | 5 +- src/operators/tensor/linalg.cairo | 2 +- src/operators/tensor/linalg/matmul.cairo | 258 +++++++++++++++++- .../tensor/linalg/matmul/helpers.cairo | 95 ------- .../tensor/linalg/matmul/matmul_fp.cairo | 3 - .../tensor/linalg/matmul/matmul_fp/core.cairo | 18 -- .../linalg/matmul/matmul_fp/fp16x16.cairo | 138 ---------- .../linalg/matmul/matmul_fp/fp8x23.cairo | 138 ---------- .../tensor/linalg/matmul/matmul_i32.cairo | 135 --------- .../tensor/linalg/matmul/matmul_i8.cairo | 135 --------- .../tensor/linalg/matmul/matmul_u32.cairo | 134 --------- 15 files changed, 263 insertions(+), 815 deletions(-) delete mode 100644 src/operators/tensor/linalg/matmul/helpers.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_fp.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_fp/core.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_i32.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_i8.cairo delete mode 100644 src/operators/tensor/linalg/matmul/matmul_u32.cairo diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 358fd3464..3a2e5fc9b 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -1,5 +1,5 @@ mod core; mod helpers; mod math; -// mod linalg; +mod linalg; mod implementations; diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index cba20fb11..120bc0a28 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -11,7 +11,7 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::math; +use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; impl Tensor_fp8x23 of TensorTrait { @@ -69,8 +69,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - //matmul(self, other) - panic(array![]) + linalg::matmul::matmul(self, other) } fn exp(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index ab34f2088..a7bcd1b31 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -12,7 +12,7 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::math; +use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -71,8 +71,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - //matmul(self, other) - panic(array![]) + linalg::matmul::matmul(self, other) } fn exp(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index d4a25b272..9717888fe 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -13,7 +13,7 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::math; +use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -73,8 +73,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - //matmul(self, other) - panic(array![]) + linalg::matmul::matmul(self, other) } fn exp(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 133d15a88..1d309bf11 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -11,7 +11,7 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::math; +use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; @@ -70,8 +70,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - //matmul(self, other) - panic(array![]) + linalg::matmul::matmul(self, other) } fn exp(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/linalg.cairo b/src/operators/tensor/linalg.cairo index 6c2affb11..895af2569 100644 --- a/src/operators/tensor/linalg.cairo +++ b/src/operators/tensor/linalg.cairo @@ -1,2 +1,2 @@ mod matmul; -mod transpose; +// mod transpose; diff --git a/src/operators/tensor/linalg/matmul.cairo b/src/operators/tensor/linalg/matmul.cairo index 4905beeca..1fcc83c64 100644 --- a/src/operators/tensor/linalg/matmul.cairo +++ b/src/operators/tensor/linalg/matmul.cairo @@ -1,5 +1,253 @@ -mod matmul_i8; -mod matmul_i32; -mod matmul_u32; -mod matmul_fp; -mod helpers; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; + +/// Cf: TensorTrait::matmul docstring +fn matmul< + T, + F, + MAG, + impl TTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TMul: Mul, + impl TAddEq: AddEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, other: @Tensor +) -> Tensor { + let self_shape = *self.shape; + let other_shape = *other.shape; + let self_ndim = (self_shape).len(); + let other_ndim = (other_shape).len(); + + assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); + + //! Case: Both tensors are 1-dimensional + if self_ndim == 1 && other_ndim == 1 { + let dot = dot_product((*self).data, (*other).data); + let mut result_shape = ArrayTrait::new(); + let mut result_data = ArrayTrait::new(); + result_shape.append(1); + result_data.append(dot); + return TensorTrait::new(result_shape.span(), result_data.span(), *self.extra); + } + + let self_shape = prepare_shape_for_matmul(self_shape, true); + let other_shape = prepare_shape_for_matmul(other_shape, false); + + let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); + + let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); + + return TensorTrait::new(result_shape, result.data, *self.extra); +} + +/// Computes the dot product of two 1-dimensional i32 tensors. +/// +/// # Arguments +/// * `vec1` - A span containing the data elements of the first vector as i32 elements. +/// * `vec2` - A span containing the data elements of the second vector as i32 elements. +/// +/// # Panics +/// * Panics if the lengths of the vectors do not match. +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * An i32 representing the dot product of the two vectors. +fn dot_product< + T, + MAG, + impl TNumber: NumberTrait, + impl TMul: Mul, + impl TAddEq: AddEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut vec1: Span, mut vec2: Span +) -> T { + assert(vec1.len() == vec2.len(), 'vector lengths do not match'); + + let mut result: T = NumberTrait::zero(); + + loop { + match vec1.pop_front() { + Option::Some(vec1_item) => { + let element_product = *vec1_item * *vec2.pop_front().unwrap(); + result += element_product; + }, + Option::None(_) => { + break; + } + }; + }; + + return result; +} + + +/// Computes the matrix multiplication of two 2-dimensional i32 tensors. +/// +/// # Arguments +/// * `mat1` - A Span containing the data elements of the first matrix as i32 elements. +/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. +/// * `mat2` - A Span containing the data elements of the second matrix as i32 elements. +/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. +/// +/// # Panics +/// * Panics if the inner dimensions of the matrices do not match. +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * Returns the restulting i32 tensor. +fn matrix_multiply< + T, + F, + MAG, + impl TTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TMul: Mul, + impl TAddEq: AddEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span +) -> Tensor { + let m = *mat1_shape[0]; + let n = *mat1_shape[1]; + let p = *mat2_shape[1]; + + let mut result_data = ArrayTrait::new(); + let mut result_shape = ArrayTrait::new(); + result_shape.append(m); + result_shape.append(p); + + let mut i = 0_usize; + loop { + if i == m { + break (); + } + + let mut j = 0_usize; + loop { + if j == p { + break (); + } + + let mut sum: T = NumberTrait::zero(); + let mut k = 0_usize; + loop { + if k == n { + break (); + } + + let mat1_index = i * n + k; + let mat2_index = k * p + j; + sum += *mat1[mat1_index] * *mat2[mat2_index]; + + k += 1; + }; + + result_data.append(sum); + j += 1; + }; + + i += 1; + }; + + return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); +} + +/// Prepares the shape of a tensor for matrix multiplication. +/// +/// # Arguments +/// * `shape` - A mutable span representing the shape of the tensor. +/// * `is_first_tensor` - A boolean indicating whether the input tensor is the first (left) +/// tensor in the matrix multiplication operation. +/// +/// # Behavior +/// This function adjusts the shapes of the tensors based on their dimensionality: +/// * If the first tensor is 1-dimensional, a 1 is prepended to its shape. +/// * If the second tensor is 1-dimensional, a 1 is appended to its shape. +/// +/// # Panics +/// * Panics if gas limit is exceeded during execution. +/// +/// # Returns +/// * A span representing the adjusted shape of the tensor. +fn prepare_shape_for_matmul(mut shape: Span, is_first_tensor: bool) -> Span { + let ndim = shape.len(); + + if ndim == 1 && is_first_tensor { + // Prepend 1 to shape if it's 1-dimensional + let mut shape_adjusted = ArrayTrait::new(); + shape_adjusted.append(1); + + loop { + match shape.pop_front() { + Option::Some(item) => { + shape_adjusted.append(*item); + }, + Option::None(_) => { + break; + } + }; + }; + + return shape_adjusted.span(); + } else if ndim == 1 && !is_first_tensor { + // Append 1 to shape if it's 1-dimensional + let mut shape_adjusted = ArrayTrait::new(); + + loop { + match shape.pop_front() { + Option::Some(item) => { + shape_adjusted.append(*item); + }, + Option::None(_) => { + break; + } + }; + }; + + shape_adjusted.append(1); + + return shape_adjusted.span(); + } + + return shape; +} + +/// Adjusts the output shape of the matrix multiplication result based on the +/// original dimensionality of the input tensors. +/// +/// # Arguments +/// * `output_shape` - A mutable span representing the shape of the matrix multiplication result. +/// * `self_dim` - A usize representing the dimensionality of the first input tensor. +/// * `other_dim` - A usize representing the dimensionality of the second input tensor. +/// +/// # Behavior +/// This function adjusts the output shape based on the dimensionality of the input tensors: +/// * If the first input tensor was 1-dimensional, the prepended 1 is removed from the output shape. +/// * If the second input tensor was 1-dimensional, the appended 1 is removed from the output shape. +/// +/// # Returns +/// * A span representing the adjusted output shape of the matrix multiplication result. +fn adjust_output_shape_after_matmul( + mut output_shape: Span, self_dim: usize, other_dim: usize +) -> Span { + // If self_shape was 1-dimensional, remove the prepended 1 from the output_shape. + if self_dim == 1 { + let _ = output_shape.pop_front().unwrap(); + } + + // If other_shape was 1-dimensional, remove the appended 1 from the output_shape. + if other_dim == 1 { + let _ = output_shape.pop_back().unwrap(); + } + + return output_shape; +} diff --git a/src/operators/tensor/linalg/matmul/helpers.cairo b/src/operators/tensor/linalg/matmul/helpers.cairo deleted file mode 100644 index 60cf1167b..000000000 --- a/src/operators/tensor/linalg/matmul/helpers.cairo +++ /dev/null @@ -1,95 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -/// Prepares the shape of a tensor for matrix multiplication. -/// -/// # Arguments -/// * `shape` - A mutable span representing the shape of the tensor. -/// * `is_first_tensor` - A boolean indicating whether the input tensor is the first (left) -/// tensor in the matrix multiplication operation. -/// -/// # Behavior -/// This function adjusts the shapes of the tensors based on their dimensionality: -/// * If the first tensor is 1-dimensional, a 1 is prepended to its shape. -/// * If the second tensor is 1-dimensional, a 1 is appended to its shape. -/// -/// # Panics -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * A span representing the adjusted shape of the tensor. -fn prepare_shape_for_matmul(mut shape: Span, is_first_tensor: bool) -> Span { - let ndim = shape.len(); - - if ndim == 1 && is_first_tensor { - // Prepend 1 to shape if it's 1-dimensional - let mut shape_adjusted = ArrayTrait::new(); - shape_adjusted.append(1); - - loop { - match shape.pop_front() { - Option::Some(item) => { - shape_adjusted.append(*item); - }, - Option::None(_) => { - break; - } - }; - }; - - return shape_adjusted.span(); - } else if ndim == 1 && !is_first_tensor { - // Append 1 to shape if it's 1-dimensional - let mut shape_adjusted = ArrayTrait::new(); - - loop { - match shape.pop_front() { - Option::Some(item) => { - shape_adjusted.append(*item); - }, - Option::None(_) => { - break; - } - }; - }; - - shape_adjusted.append(1); - - return shape_adjusted.span(); - } - - return shape; -} - -/// Adjusts the output shape of the matrix multiplication result based on the -/// original dimensionality of the input tensors. -/// -/// # Arguments -/// * `output_shape` - A mutable span representing the shape of the matrix multiplication result. -/// * `self_dim` - A usize representing the dimensionality of the first input tensor. -/// * `other_dim` - A usize representing the dimensionality of the second input tensor. -/// -/// # Behavior -/// This function adjusts the output shape based on the dimensionality of the input tensors: -/// * If the first input tensor was 1-dimensional, the prepended 1 is removed from the output shape. -/// * If the second input tensor was 1-dimensional, the appended 1 is removed from the output shape. -/// -/// # Returns -/// * A span representing the adjusted output shape of the matrix multiplication result. -fn adjust_output_shape_after_matmul( - mut output_shape: Span, self_dim: usize, other_dim: usize -) -> Span { - // If self_shape was 1-dimensional, remove the prepended 1 from the output_shape. - if self_dim == 1 { - let _ = output_shape.pop_front().unwrap(); - } - - // If other_shape was 1-dimensional, remove the appended 1 from the output_shape. - if other_dim == 1 { - let _ = output_shape.pop_back().unwrap(); - } - - return output_shape; -} diff --git a/src/operators/tensor/linalg/matmul/matmul_fp.cairo b/src/operators/tensor/linalg/matmul/matmul_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/linalg/matmul/matmul_fp/core.cairo b/src/operators/tensor/linalg/matmul/matmul_fp/core.cairo deleted file mode 100644 index 4a1c3fa41..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::linalg::matmul::matmul_fp::fp8x23; -use orion::operators::tensor::linalg::matmul::matmul_fp::fp16x16; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::matmul(self, other)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::matmul(self, other)), - }, - Option::None(_) => Option::Some((fp16x16::matmul(self, other))), - }, - Option::None(_) => Option::Some((fp16x16::matmul(self, other))), - } -} diff --git a/src/operators/tensor/linalg/matmul/matmul_fp/fp16x16.cairo b/src/operators/tensor/linalg/matmul/matmul_fp/fp16x16.cairo deleted file mode 100644 index 84168b030..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_fp/fp16x16.cairo +++ /dev/null @@ -1,138 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Mul, FP16x16AddEq -}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; -use orion::operators::tensor::linalg::matmul::helpers::{ - prepare_shape_for_matmul, adjust_output_shape_after_matmul -}; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - let self_shape = *self.shape; - let other_shape = *other.shape; - let self_ndim = (self_shape).len(); - let other_ndim = (other_shape).len(); - - assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); - - //! Case: Both tensors are 1-dimensional - if self_ndim == 1 && other_ndim == 1 { - let dot = dot_product((*self).data, (*other).data); - let mut result_shape = ArrayTrait::new(); - let mut result_data = ArrayTrait::new(); - result_shape.append(1); - result_data.append(dot); - return TensorTrait::::new(result_shape.span(), result_data.span(), *self.extra); - } - - let self_shape = prepare_shape_for_matmul(self_shape, true); - let other_shape = prepare_shape_for_matmul(other_shape, false); - - let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); - - let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - - return TensorTrait::new(result_shape, result.data, *self.extra); -} - -/// Computes the dot product of two 1-dimensional FixedType tensors. -/// -/// # Arguments -/// * `vec1` - A span containing the data elements of the first vector as FixedType elements. -/// * `vec2` - A span containing the data elements of the second vector as FixedType elements. -/// -/// # Panics -/// * Panics if the lengths of the vectors do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An FixedType representing the dot product of the two vectors. -fn dot_product(mut vec1: Span, mut vec2: Span) -> FixedType { - assert(vec1.len() == vec2.len(), 'vector lengths do not match'); - - let mut result: FixedType = FixedTrait::new_unscaled(0, false); - - loop { - match vec1.pop_front() { - Option::Some(vec1_item) => { - let element_product = *vec1_item * *vec2.pop_front().unwrap(); - result += element_product; - }, - Option::None(_) => { - break; - } - }; - }; - - return result; -} - - -/// Computes the matrix multiplication of two 2-dimensional FixedType tensors. -/// -/// # Arguments -/// * `mat1` - A Span containing the data elements of the first matrix as FixedType elements. -/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. -/// * `mat2` - A Span containing the data elements of the second matrix as FixedType elements. -/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. -/// -/// # Panics -/// * Panics if the inner dimensions of the matrices do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * Returns the restulting FixedType tensor. -fn matrix_multiply( - mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span -) -> Tensor { - let m = *mat1_shape[0]; - let n = *mat1_shape[1]; - let p = *mat2_shape[1]; - - let mut result_data = ArrayTrait::new(); - let mut result_shape = ArrayTrait::new(); - result_shape.append(m); - result_shape.append(p); - - let mut i = 0_usize; - loop { - if i == m { - break (); - } - - let mut j = 0_usize; - loop { - if j == p { - break (); - } - - let mut sum: FixedType = FixedTrait::new_unscaled(0, false); - let mut k = 0_usize; - loop { - if k == n { - break (); - } - - let mat1_index = i * n + k; - let mat2_index = k * p + j; - sum += *mat1[mat1_index] * *mat2[mat2_index]; - - k += 1; - }; - - result_data.append(sum); - j += 1; - }; - - i += 1; - }; - - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); -} diff --git a/src/operators/tensor/linalg/matmul/matmul_fp/fp8x23.cairo b/src/operators/tensor/linalg/matmul/matmul_fp/fp8x23.cairo deleted file mode 100644 index 6588aebad..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_fp/fp8x23.cairo +++ /dev/null @@ -1,138 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23Mul, FP8x23AddEq -}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; -use orion::operators::tensor::linalg::matmul::helpers::{ - prepare_shape_for_matmul, adjust_output_shape_after_matmul -}; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - let self_shape = *self.shape; - let other_shape = *other.shape; - let self_ndim = (self_shape).len(); - let other_ndim = (other_shape).len(); - - assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); - - //! Case: Both tensors are 1-dimensional - if self_ndim == 1 && other_ndim == 1 { - let dot = dot_product((*self).data, (*other).data); - let mut result_shape = ArrayTrait::new(); - let mut result_data = ArrayTrait::new(); - result_shape.append(1); - result_data.append(dot); - return TensorTrait::::new(result_shape.span(), result_data.span(), *self.extra); - } - - let self_shape = prepare_shape_for_matmul(self_shape, true); - let other_shape = prepare_shape_for_matmul(other_shape, false); - - let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); - - let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - - return TensorTrait::new(result_shape, result.data, *self.extra); -} - -/// Computes the dot product of two 1-dimensional FixedType tensors. -/// -/// # Arguments -/// * `vec1` - A span containing the data elements of the first vector as FixedType elements. -/// * `vec2` - A span containing the data elements of the second vector as FixedType elements. -/// -/// # Panics -/// * Panics if the lengths of the vectors do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An FixedType representing the dot product of the two vectors. -fn dot_product(mut vec1: Span, mut vec2: Span) -> FixedType { - assert(vec1.len() == vec2.len(), 'vector lengths do not match'); - - let mut result: FixedType = FixedTrait::new_unscaled(0, false); - - loop { - match vec1.pop_front() { - Option::Some(vec1_item) => { - let element_product = *vec1_item * *vec2.pop_front().unwrap(); - result += element_product; - }, - Option::None(_) => { - break; - } - }; - }; - - return result; -} - - -/// Computes the matrix multiplication of two 2-dimensional FixedType tensors. -/// -/// # Arguments -/// * `mat1` - A Span containing the data elements of the first matrix as FixedType elements. -/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. -/// * `mat2` - A Span containing the data elements of the second matrix as FixedType elements. -/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. -/// -/// # Panics -/// * Panics if the inner dimensions of the matrices do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * Returns the restulting FixedType tensor. -fn matrix_multiply( - mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span -) -> Tensor { - let m = *mat1_shape[0]; - let n = *mat1_shape[1]; - let p = *mat2_shape[1]; - - let mut result_data = ArrayTrait::new(); - let mut result_shape = ArrayTrait::new(); - result_shape.append(m); - result_shape.append(p); - - let mut i = 0_usize; - loop { - if i == m { - break (); - } - - let mut j = 0_usize; - loop { - if j == p { - break (); - } - - let mut sum: FixedType = FixedTrait::new_unscaled(0, false); - let mut k = 0_usize; - loop { - if k == n { - break (); - } - - let mat1_index = i * n + k; - let mat2_index = k * p + j; - sum += *mat1[mat1_index] * *mat2[mat2_index]; - - k += 1; - }; - - result_data.append(sum); - j += 1; - }; - - i += 1; - }; - - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); -} diff --git a/src/operators/tensor/linalg/matmul/matmul_i32.cairo b/src/operators/tensor/linalg/matmul/matmul_i32.cairo deleted file mode 100644 index f8a222f23..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_i32.cairo +++ /dev/null @@ -1,135 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; -use orion::operators::tensor::linalg::matmul::helpers::{ - prepare_shape_for_matmul, adjust_output_shape_after_matmul -}; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - let self_shape = *self.shape; - let other_shape = *other.shape; - let self_ndim = (self_shape).len(); - let other_ndim = (other_shape).len(); - - assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); - - //! Case: Both tensors are 1-dimensional - if self_ndim == 1 && other_ndim == 1 { - let dot = dot_product((*self).data, (*other).data); - let mut result_shape = ArrayTrait::new(); - let mut result_data = ArrayTrait::new(); - result_shape.append(1); - result_data.append(dot); - return TensorTrait::new(result_shape.span(), result_data.span(), *self.extra); - } - - let self_shape = prepare_shape_for_matmul(self_shape, true); - let other_shape = prepare_shape_for_matmul(other_shape, false); - - let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); - - let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - - return TensorTrait::::new(result_shape, result.data, *self.extra); -} - -/// Computes the dot product of two 1-dimensional i32 tensors. -/// -/// # Arguments -/// * `vec1` - A span containing the data elements of the first vector as i32 elements. -/// * `vec2` - A span containing the data elements of the second vector as i32 elements. -/// -/// # Panics -/// * Panics if the lengths of the vectors do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An i32 representing the dot product of the two vectors. -fn dot_product(mut vec1: Span, mut vec2: Span) -> i32 { - assert(vec1.len() == vec2.len(), 'vector lengths do not match'); - - let mut result: i32 = IntegerTrait::new(0, false); - - loop { - match vec1.pop_front() { - Option::Some(vec1_item) => { - let element_product = *vec1_item * *vec2.pop_front().unwrap(); - result += element_product; - }, - Option::None(_) => { - break; - } - }; - }; - - return result; -} - - -/// Computes the matrix multiplication of two 2-dimensional i32 tensors. -/// -/// # Arguments -/// * `mat1` - A Span containing the data elements of the first matrix as i32 elements. -/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. -/// * `mat2` - A Span containing the data elements of the second matrix as i32 elements. -/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. -/// -/// # Panics -/// * Panics if the inner dimensions of the matrices do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * Returns the restulting i32 tensor. -fn matrix_multiply( - mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span -) -> Tensor { - let m = *mat1_shape[0]; - let n = *mat1_shape[1]; - let p = *mat2_shape[1]; - - let mut result_data = ArrayTrait::new(); - let mut result_shape = ArrayTrait::new(); - result_shape.append(m); - result_shape.append(p); - - let mut i = 0_usize; - loop { - if i == m { - break (); - } - - let mut j = 0_usize; - loop { - if j == p { - break (); - } - - let mut sum: i32 = IntegerTrait::new(0, false); - let mut k = 0_usize; - loop { - if k == n { - break (); - } - - let mat1_index = i * n + k; - let mat2_index = k * p + j; - sum += *mat1[mat1_index] * *mat2[mat2_index]; - - k += 1; - }; - - result_data.append(sum); - j += 1; - }; - - i += 1; - }; - - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); -} diff --git a/src/operators/tensor/linalg/matmul/matmul_i8.cairo b/src/operators/tensor/linalg/matmul/matmul_i8.cairo deleted file mode 100644 index 7a5ff68b1..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_i8.cairo +++ /dev/null @@ -1,135 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; -use orion::operators::tensor::linalg::matmul::helpers::{ - prepare_shape_for_matmul, adjust_output_shape_after_matmul -}; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - let self_shape = *self.shape; - let other_shape = *other.shape; - let self_ndim = (self_shape).len(); - let other_ndim = (other_shape).len(); - - assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); - - //! Case: Both tensors are 1-dimensional - if self_ndim == 1 && other_ndim == 1 { - let dot = dot_product((*self).data, (*other).data); - let mut result_shape = ArrayTrait::new(); - let mut result_data = ArrayTrait::new(); - result_shape.append(1); - result_data.append(dot); - return TensorTrait::new(result_shape.span(), result_data.span(), *self.extra); - } - - let self_shape = prepare_shape_for_matmul(self_shape, true); - let other_shape = prepare_shape_for_matmul(other_shape, false); - - let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); - - let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - - return TensorTrait::::new(result_shape, result.data, *self.extra); -} - -/// Computes the dot product of two 1-dimensional i8 tensors. -/// -/// # Arguments -/// * `vec1` - A span containing the data elements of the first vector as i8 elements. -/// * `vec2` - A span containing the data elements of the second vector as i8 elements. -/// -/// # Panics -/// * Panics if the lengths of the vectors do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An i8 representing the dot product of the two vectors. -fn dot_product(mut vec1: Span, mut vec2: Span) -> i8 { - assert(vec1.len() == vec2.len(), 'vector lengths do not match'); - - let mut result: i8 = IntegerTrait::new(0, false); - - loop { - match vec1.pop_front() { - Option::Some(vec1_item) => { - let element_product = *vec1_item * *vec2.pop_front().unwrap(); - result += element_product; - }, - Option::None(_) => { - break; - } - }; - }; - - return result; -} - - -/// Computes the matrix multiplication of two 2-dimensional i8 tensors. -/// -/// # Arguments -/// * `mat1` - A Span containing the data elements of the first matrix as i8 elements. -/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. -/// * `mat2` - A Span containing the data elements of the second matrix as i8 elements. -/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. -/// -/// # Panics -/// * Panics if the inner dimensions of the matrices do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * Returns the restulting i8 tensor. -fn matrix_multiply( - mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span -) -> Tensor { - let m = *mat1_shape[0]; - let n = *mat1_shape[1]; - let p = *mat2_shape[1]; - - let mut result_data = ArrayTrait::new(); - let mut result_shape = ArrayTrait::new(); - result_shape.append(m); - result_shape.append(p); - - let mut i = 0_usize; - loop { - if i == m { - break (); - } - - let mut j = 0_usize; - loop { - if j == p { - break (); - } - - let mut sum: i8 = IntegerTrait::new(0, false); - let mut k = 0_usize; - loop { - if k == n { - break (); - } - - let mat1_index = i * n + k; - let mat2_index = k * p + j; - sum += *mat1[mat1_index] * *mat2[mat2_index]; - - k += 1; - }; - - result_data.append(sum); - j += 1; - }; - - i += 1; - }; - - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); -} diff --git a/src/operators/tensor/linalg/matmul/matmul_u32.cairo b/src/operators/tensor/linalg/matmul/matmul_u32.cairo deleted file mode 100644 index 2b230e91b..000000000 --- a/src/operators/tensor/linalg/matmul/matmul_u32.cairo +++ /dev/null @@ -1,134 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - - -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait, }; -use orion::operators::tensor::linalg::matmul::helpers::{ - prepare_shape_for_matmul, adjust_output_shape_after_matmul -}; - -/// Cf: TensorTrait::matmul docstring -fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - let self_shape = *self.shape; - let other_shape = *other.shape; - let self_ndim = (self_shape).len(); - let other_ndim = (other_shape).len(); - - assert(self_ndim <= 2 || other_ndim <= 2, 'supports only 1D and 2D matmul'); - - //! Case: Both tensors are 1-dimensional - if self_ndim == 1 && other_ndim == 1 { - let dot = dot_product((*self).data, (*other).data); - let mut result_shape = ArrayTrait::new(); - let mut result_data = ArrayTrait::new(); - result_shape.append(1); - result_data.append(dot); - return TensorTrait::new(result_shape.span(), result_data.span(), *self.extra); - } - - let self_shape = prepare_shape_for_matmul(self_shape, true); - let other_shape = prepare_shape_for_matmul(other_shape, false); - - let result = matrix_multiply(*self.data, self_shape, *other.data, other_shape); - - let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - - return TensorTrait::::new(result_shape, result.data, *self.extra); -} - -/// Computes the dot product of two 1-dimensional u32 tensors. -/// -/// # Arguments -/// * `vec1` - A span containing the data elements of the first vector as u32 elements. -/// * `vec2` - A span containing the data elements of the second vector as u32 elements. -/// -/// # Panics -/// * Panics if the lengths of the vectors do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * An u32 representing the dot product of the two vectors. -fn dot_product(mut vec1: Span, mut vec2: Span) -> u32 { - assert(vec1.len() == vec2.len(), 'vector lengths do not match'); - - let mut result: u32 = 0; - - loop { - match vec1.pop_front() { - Option::Some(vec1_item) => { - let element_product = *vec1_item * *vec2.pop_front().unwrap(); - result += element_product; - }, - Option::None(_) => { - break; - } - }; - }; - - return result; -} - - -/// Computes the matrix multiplication of two 2-dimensional u32 tensors. -/// -/// # Arguments -/// * `mat1` - A Span containing the data elements of the first matrix as u32 elements. -/// * `mat1_shape` - A Span containing the shape of the first matrix as usize elements. -/// * `mat2` - A Span containing the data elements of the second matrix as u32 elements. -/// * `mat2_shape` - A Span containing the shape of the second matrix as usize elements. -/// -/// # Panics -/// * Panics if the inner dimensions of the matrices do not match. -/// * Panics if gas limit is exceeded during execution. -/// -/// # Returns -/// * Returns the restulting u32 tensor. -fn matrix_multiply( - mat1: Span, mat1_shape: Span, mat2: Span, mat2_shape: Span -) -> Tensor { - let m = *mat1_shape[0]; - let n = *mat1_shape[1]; - let p = *mat2_shape[1]; - - let mut result_data = ArrayTrait::new(); - let mut result_shape = ArrayTrait::new(); - result_shape.append(m); - result_shape.append(p); - - let mut i = 0_usize; - loop { - if i == m { - break (); - } - - let mut j = 0_usize; - loop { - if j == p { - break (); - } - - let mut sum: u32 = 0; - let mut k = 0_usize; - loop { - if k == n { - break (); - } - - let mat1_index = i * n + k; - let mat2_index = k * p + j; - sum += *mat1[mat1_index] * *mat2[mat2_index]; - - k += 1; - }; - - result_data.append(sum); - j += 1; - }; - - i += 1; - }; - - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); -} From c8ef535bf6a81e30f0f5845d45e91cf8ee223fa3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:28:21 +0300 Subject: [PATCH 047/179] add generic transpose --- .../implementations/tensor_fp8x23.cairo | 3 +- .../implementations/tensor_i32_fp8x23.cairo | 3 +- .../implementations/tensor_i8_fp8x23.cairo | 3 +- .../implementations/tensor_u32_fp8x23.cairo | 3 +- src/operators/tensor/linalg.cairo | 2 +- src/operators/tensor/linalg/transpose.cairo | 59 +++++++++++++++++-- .../linalg/transpose/transpose_fp.cairo | 3 - .../linalg/transpose/transpose_fp/core.cairo | 20 ------- .../transpose/transpose_fp/fp16x16.cairo | 50 ---------------- .../transpose/transpose_fp/fp8x23.cairo | 50 ---------------- .../linalg/transpose/transpose_i32.cairo | 49 --------------- .../linalg/transpose/transpose_i8.cairo | 49 --------------- .../linalg/transpose/transpose_u32.cairo | 48 --------------- 13 files changed, 60 insertions(+), 282 deletions(-) delete mode 100644 src/operators/tensor/linalg/transpose/transpose_fp.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_fp/core.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_fp/fp16x16.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_fp/fp8x23.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_i32.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_i8.cairo delete mode 100644 src/operators/tensor/linalg/transpose/transpose_u32.cairo diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 120bc0a28..6986022a9 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -64,8 +64,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn transpose(self: @Tensor, axes: Span) -> Tensor { - //transpose(self, axes) - panic(array![]) + linalg::transpose::transpose(self, axes) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index a7bcd1b31..9b3ae5b49 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -66,8 +66,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn transpose(self: @Tensor, axes: Span) -> Tensor { - //transpose(self, axes) - panic(array![]) + linalg::transpose::transpose(self, axes) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 9717888fe..72725f597 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -68,8 +68,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn transpose(self: @Tensor, axes: Span) -> Tensor { - //transpose(self, axes) - panic(array![]) + linalg::transpose::transpose(self, axes) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 1d309bf11..f1bf29b8e 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -65,8 +65,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn transpose(self: @Tensor, axes: Span) -> Tensor { - //transpose(self, axes) - panic(array![]) + linalg::transpose::transpose(self, axes) } fn matmul(self: @Tensor, other: @Tensor) -> Tensor { diff --git a/src/operators/tensor/linalg.cairo b/src/operators/tensor/linalg.cairo index 895af2569..6c2affb11 100644 --- a/src/operators/tensor/linalg.cairo +++ b/src/operators/tensor/linalg.cairo @@ -1,2 +1,2 @@ mod matmul; -// mod transpose; +mod transpose; diff --git a/src/operators/tensor/linalg/transpose.cairo b/src/operators/tensor/linalg/transpose.cairo index 15de619dc..80efecd6f 100644 --- a/src/operators/tensor/linalg/transpose.cairo +++ b/src/operators/tensor/linalg/transpose.cairo @@ -1,4 +1,55 @@ -mod transpose_i8; -mod transpose_fp; -mod transpose_i32; -mod transpose_u32; +use array::ArrayTrait; +use array::SpanTrait; + +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape +}; +use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; +use orion::numbers::NumberTrait; + +/// Cf: TensorTrait::transpose docstring +fn transpose< + T, + F, + impl TTensor: TensorTrait, + impl TCopy: Copy, + impl TDrop: Drop +>( + self: @Tensor, axes: Span +) -> Tensor { + assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); + assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); + + let output_shape = permutation_output_shape(*self.shape, axes); + let output_data_len = len_from_shape(output_shape); + + let mut output_data = ArrayTrait::new(); + + let mut output_index: usize = 0; + loop { + if output_index == output_data_len { + break (); + } + + let output_indices = unravel_index(output_index, output_shape); + let mut input_indices = ArrayTrait::new(); + + let mut output_axis: usize = 0; + loop { + if output_axis == axes.len() { + break (); + } + + let input_axis = find_axis(axes, output_axis); + input_indices.append(*output_indices[input_axis]); + output_axis += 1; + }; + + let input_index = ravel_index(*self.shape, input_indices.span()); + output_data.append(*(*self.data)[input_index]); + + output_index += 1; + }; + + return TensorTrait::new(output_shape, output_data.span(), *self.extra); +} diff --git a/src/operators/tensor/linalg/transpose/transpose_fp.cairo b/src/operators/tensor/linalg/transpose/transpose_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/tensor/linalg/transpose/transpose_fp/core.cairo b/src/operators/tensor/linalg/transpose/transpose_fp/core.cairo deleted file mode 100644 index 044624247..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_fp/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::Tensor; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::linalg::transpose::transpose_fp::fp8x23; -use orion::operators::tensor::linalg::transpose::transpose_fp::fp16x16; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Option> { - match *self.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::transpose(self, axes)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::transpose(self, axes)), - }, - Option::None(_) => Option::Some(fp16x16::transpose(self, axes)), - }, - Option::None(_) => Option::Some(fp16x16::transpose(self, axes)), - } -} diff --git a/src/operators/tensor/linalg/transpose/transpose_fp/fp16x16.cairo b/src/operators/tensor/linalg/transpose/transpose_fp/fp16x16.cairo deleted file mode 100644 index 0358ce198..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_fp/fp16x16.cairo +++ /dev/null @@ -1,50 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape -}; -use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Tensor { - assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); - assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); - - let output_shape = permutation_output_shape(*self.shape, axes); - let output_data_len = len_from_shape(output_shape); - - let mut output_data = ArrayTrait::new(); - - let mut output_index: usize = 0; - loop { - if output_index == output_data_len { - break (); - } - - let output_indices = unravel_index(output_index, output_shape); - let mut input_indices = ArrayTrait::new(); - - let mut output_axis: usize = 0; - loop { - if output_axis == axes.len() { - break (); - } - - let input_axis = find_axis(axes, output_axis); - input_indices.append(*output_indices[input_axis]); - output_axis += 1; - }; - - let input_index = ravel_index(*self.shape, input_indices.span()); - output_data.append(*(*self.data)[input_index]); - - output_index += 1; - }; - - return TensorTrait::new(output_shape, output_data.span(), *self.extra); -} diff --git a/src/operators/tensor/linalg/transpose/transpose_fp/fp8x23.cairo b/src/operators/tensor/linalg/transpose/transpose_fp/fp8x23.cairo deleted file mode 100644 index c84836f5c..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_fp/fp8x23.cairo +++ /dev/null @@ -1,50 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::FixedType; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape -}; -use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Tensor { - assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); - assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); - - let output_shape = permutation_output_shape(*self.shape, axes); - let output_data_len = len_from_shape(output_shape); - - let mut output_data = ArrayTrait::new(); - - let mut output_index: usize = 0; - loop { - if output_index == output_data_len { - break (); - } - - let output_indices = unravel_index(output_index, output_shape); - let mut input_indices = ArrayTrait::new(); - - let mut output_axis: usize = 0; - loop { - if output_axis == axes.len() { - break (); - } - - let input_axis = find_axis(axes, output_axis); - input_indices.append(*output_indices[input_axis]); - output_axis += 1; - }; - - let input_index = ravel_index(*self.shape, input_indices.span()); - output_data.append(*(*self.data)[input_index]); - - output_index += 1; - }; - - return TensorTrait::new(output_shape, output_data.span(), *self.extra); -} diff --git a/src/operators/tensor/linalg/transpose/transpose_i32.cairo b/src/operators/tensor/linalg/transpose/transpose_i32.cairo deleted file mode 100644 index 127f29a3a..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_i32.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape -}; -use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Tensor { - assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); - assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); - - let output_shape = permutation_output_shape(*self.shape, axes); - let output_data_len = len_from_shape(output_shape); - - let mut output_data = ArrayTrait::new(); - - let mut output_index: usize = 0; - loop { - if output_index == output_data_len { - break (); - } - - let output_indices = unravel_index(output_index, output_shape); - let mut input_indices = ArrayTrait::new(); - - let mut output_axis: usize = 0; - loop { - if output_axis == axes.len() { - break (); - } - - let input_axis = find_axis(axes, output_axis); - input_indices.append(*output_indices[input_axis]); - output_axis += 1; - }; - - let input_index = ravel_index(*self.shape, input_indices.span()); - output_data.append(*(*self.data)[input_index]); - - output_index += 1; - }; - - return TensorTrait::new(output_shape, output_data.span(), *self.extra); -} diff --git a/src/operators/tensor/linalg/transpose/transpose_i8.cairo b/src/operators/tensor/linalg/transpose/transpose_i8.cairo deleted file mode 100644 index 36b332c6a..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_i8.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape -}; -use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Tensor { - assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); - assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); - - let output_shape = permutation_output_shape(*self.shape, axes); - let output_data_len = len_from_shape(output_shape); - - let mut output_data = ArrayTrait::new(); - - let mut output_index: usize = 0; - loop { - if output_index == output_data_len { - break (); - } - - let output_indices = unravel_index(output_index, output_shape); - let mut input_indices = ArrayTrait::new(); - - let mut output_axis: usize = 0; - loop { - if output_axis == axes.len() { - break (); - } - - let input_axis = find_axis(axes, output_axis); - input_indices.append(*output_indices[input_axis]); - output_axis += 1; - }; - - let input_index = ravel_index(*self.shape, input_indices.span()); - output_data.append(*(*self.data)[input_index]); - - output_index += 1; - }; - - return TensorTrait::new(output_shape, output_data.span(), *self.extra); -} diff --git a/src/operators/tensor/linalg/transpose/transpose_u32.cairo b/src/operators/tensor/linalg/transpose/transpose_u32.cairo deleted file mode 100644 index 180a1b296..000000000 --- a/src/operators/tensor/linalg/transpose/transpose_u32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; - -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape -}; -use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_output_shape}; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; - - -/// Cf: TensorTrait::transpose docstring -fn transpose(self: @Tensor, axes: Span) -> Tensor { - assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); - assert(axes.len() == (*self.shape).len(), 'shape and axes length unequal'); - - let output_shape = permutation_output_shape(*self.shape, axes); - let output_data_len = len_from_shape(output_shape); - - let mut output_data = ArrayTrait::new(); - - let mut output_index: usize = 0; - loop { - if output_index == output_data_len { - break (); - } - - let output_indices = unravel_index(output_index, output_shape); - let mut input_indices = ArrayTrait::new(); - - let mut output_axis: usize = 0; - loop { - if output_axis == axes.len() { - break (); - } - - let input_axis = find_axis(axes, output_axis); - input_indices.append(*output_indices[input_axis]); - output_axis += 1; - }; - - let input_index = ravel_index(*self.shape, input_indices.span()); - output_data.append(*(*self.data)[input_index]); - - output_index += 1; - }; - - return TensorTrait::new(output_shape, output_data.span(), *self.extra); -} From 71d9f543e2fceca11cbb07bab32cc49a99d1c96b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:41:28 +0300 Subject: [PATCH 048/179] fix NN implementations --- src/operators.cairo | 2 +- src/operators/nn/core.cairo | 15 +++--- src/operators/nn/functional.cairo | 16 +++--- src/operators/nn/implementations.cairo | 8 +-- .../nn/implementations/impl_nn_fp.cairo | 49 ------------------ .../nn/implementations/impl_nn_i32.cairo | 48 ----------------- .../nn/implementations/impl_nn_i8.cairo | 48 ----------------- .../nn/implementations/impl_nn_u32.cairo | 45 ---------------- .../nn/implementations/nn_fp8x23.cairo | 51 +++++++++++++++++++ .../nn/implementations/nn_i32_fp8x23.cairo | 48 +++++++++++++++++ .../nn/implementations/nn_i8_fp8x23.cairo | 48 +++++++++++++++++ .../nn/implementations/nn_u32_fp8x23.cairo | 47 +++++++++++++++++ 12 files changed, 214 insertions(+), 211 deletions(-) delete mode 100644 src/operators/nn/implementations/impl_nn_fp.cairo delete mode 100644 src/operators/nn/implementations/impl_nn_i32.cairo delete mode 100644 src/operators/nn/implementations/impl_nn_i8.cairo delete mode 100644 src/operators/nn/implementations/impl_nn_u32.cairo create mode 100644 src/operators/nn/implementations/nn_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_i32_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_i8_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_u32_fp8x23.cairo diff --git a/src/operators.cairo b/src/operators.cairo index d1bf082ac..989bc1209 100644 --- a/src/operators.cairo +++ b/src/operators.cairo @@ -1,3 +1,3 @@ mod tensor; -// mod nn; +mod nn; diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index 8006d65d7..aee233592 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -1,5 +1,4 @@ use orion::operators::tensor::core::Tensor; -use orion::numbers::fixed_point::core::{FixedType}; /// Trait /// @@ -11,7 +10,7 @@ use orion::numbers::fixed_point::core::{FixedType}; /// softsign - Applies the Softsign function element-wise. /// softplus - Applies the Softplus function element-wise. /// linear - Performs a linear transformation of the input tensor using the provided weights and bias. -trait NNTrait { +trait NNTrait { /// # NNTrait::relu /// /// ```rust @@ -114,7 +113,7 @@ trait NNTrait { /// // [[0.2689, 0.7311],[0.2689, 0.7311]] /// ``` /// - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::logsoftmax /// /// ```rust @@ -174,7 +173,7 @@ trait NNTrait { /// // [[-1.3134, -0.3132],[-1.3134, -0.3132]] /// ``` /// - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::sigmoid /// /// ```rust @@ -228,7 +227,7 @@ trait NNTrait { /// // [[0.5, 0.7310586],[0.88079703, 0.95257413]] /// ``` /// - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; /// # NNTrait::softsign /// /// ```rust @@ -282,7 +281,7 @@ trait NNTrait { /// // [[0, 0.5],[0.67, 0.75]] /// ``` /// - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; /// # NNTrait::softplus /// /// ```rust @@ -336,7 +335,7 @@ trait NNTrait { /// // [[0.6931452, 1.31326096],[2.12692796, 3.04858728]] /// ``` /// - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; /// # NNTrait::linear /// /// ```rust @@ -468,5 +467,5 @@ trait NNTrait { /// [[1, 2, 0.1], [0.2, 0, 0]] /// ``` /// - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor; + fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor; } diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 272475c30..80b6aff6a 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -1,8 +1,8 @@ -mod relu; -mod leaky_relu; -mod sigmoid; -mod softmax; -mod softsign; -mod softplus; -mod linear; -mod logsoftmax; +// mod relu; +// mod leaky_relu; +// mod sigmoid; +// mod softmax; +// mod softsign; +// mod softplus; +// mod linear; +// mod logsoftmax; diff --git a/src/operators/nn/implementations.cairo b/src/operators/nn/implementations.cairo index 09360b762..f1aee9233 100644 --- a/src/operators/nn/implementations.cairo +++ b/src/operators/nn/implementations.cairo @@ -1,4 +1,4 @@ -mod impl_nn_i8; -mod impl_nn_i32; -mod impl_nn_u32; -mod impl_nn_fp; \ No newline at end of file +mod nn_i8_fp8x23; +mod nn_i32_fp8x23; +mod nn_u32_fp8x23; +mod nn_fp8x23; diff --git a/src/operators/nn/implementations/impl_nn_fp.cairo b/src/operators/nn/implementations/impl_nn_fp.cairo deleted file mode 100644 index 2f8cbb7ee..000000000 --- a/src/operators/nn/implementations/impl_nn_fp.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use core::option::OptionTrait; -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional::relu::relu_fp::core::relu_fp; -use orion::operators::nn::functional::sigmoid::sigmoid_fp::core::sigmoid_fp; -use orion::operators::nn::functional::softmax::softmax_fp::softmax_fp; -use orion::operators::nn::functional::logsoftmax::logsoftmax_fp::logsoftmax_fp; -use orion::operators::nn::functional::softsign::softsign_fp::core::softsign_fp; -use orion::operators::nn::functional::softplus::softplus_fp::core::softplus_fp; -use orion::operators::nn::functional::linear::linear_fp::linear_fp; -use orion::operators::nn::functional::leaky_relu::leaky_relu_fp::core::leaky_relu_fp; -use orion::numbers::fixed_point::core::FixedType; - - -impl NN_fp of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - relu_fp(tensor).unwrap() - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - sigmoid_fp(tensor).unwrap() - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - softmax_fp(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - logsoftmax_fp(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - softsign_fp(tensor).unwrap() - } - - fn softplus(tensor: @Tensor) -> Tensor { - softplus_fp(tensor).unwrap() - } - - fn linear( - inputs: Tensor, weights: Tensor, bias: Tensor - ) -> Tensor { - linear_fp(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor { - leaky_relu_fp(inputs, alpha).unwrap() - } -} diff --git a/src/operators/nn/implementations/impl_nn_i32.cairo b/src/operators/nn/implementations/impl_nn_i32.cairo deleted file mode 100644 index e1e046592..000000000 --- a/src/operators/nn/implementations/impl_nn_i32.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use core::option::OptionTrait; -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::{NNTrait}; -use orion::operators::nn::functional::relu::relu_i32::relu_i32; -use orion::operators::nn::functional::sigmoid::sigmoid_i32::core::sigmoid_i32; -use orion::operators::nn::functional::softmax::softmax_i32::softmax_i32; -use orion::operators::nn::functional::logsoftmax::logsoftmax_i32::logsoftmax_i32; -use orion::operators::nn::functional::softsign::softsign_i32::core::softsign_i32; -use orion::operators::nn::functional::softplus::softplus_i32::core::softplus_i32; -use orion::operators::nn::functional::linear::linear_i32::linear_i32; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i32::core::leaky_relu_i32; -use orion::numbers::fixed_point::core::{FixedType}; - - -impl NN_i32 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - relu_i32(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - sigmoid_i32(tensor).unwrap() - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - softmax_i32(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - logsoftmax_i32(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - softsign_i32(tensor).unwrap() - } - - fn softplus(tensor: @Tensor) -> Tensor { - softplus_i32(tensor).unwrap() - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - linear_i32(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor { - leaky_relu_i32(inputs, alpha).unwrap() - } -} diff --git a/src/operators/nn/implementations/impl_nn_i8.cairo b/src/operators/nn/implementations/impl_nn_i8.cairo deleted file mode 100644 index 3c9deaa8d..000000000 --- a/src/operators/nn/implementations/impl_nn_i8.cairo +++ /dev/null @@ -1,48 +0,0 @@ -use core::option::OptionTrait; -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::{NNTrait}; -use orion::operators::nn::functional::relu::relu_i8::relu_i8; -use orion::operators::nn::functional::sigmoid::sigmoid_i8::core::sigmoid_i8; -use orion::operators::nn::functional::softmax::softmax_i8::softmax_i8; -use orion::operators::nn::functional::logsoftmax::logsoftmax_i8::logsoftmax_i8; -use orion::operators::nn::functional::softsign::softsign_i8::core::softsign_i8; -use orion::operators::nn::functional::softplus::softplus_i8::core::softplus_i8; -use orion::operators::nn::functional::linear::linear_i8::linear_i8; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i8::core::leaky_relu_i8; -use orion::numbers::fixed_point::core::{FixedType}; - - -impl NN_i8 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - relu_i8(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - sigmoid_i8(tensor).unwrap() - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - softmax_i8(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - logsoftmax_i8(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - softsign_i8(tensor).unwrap() - } - - fn softplus(tensor: @Tensor) -> Tensor { - softplus_i8(tensor).unwrap() - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - linear_i8(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor { - leaky_relu_i8(inputs, alpha).unwrap() - } -} diff --git a/src/operators/nn/implementations/impl_nn_u32.cairo b/src/operators/nn/implementations/impl_nn_u32.cairo deleted file mode 100644 index decd930cd..000000000 --- a/src/operators/nn/implementations/impl_nn_u32.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use core::option::OptionTrait; -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::{NNTrait}; -use orion::operators::nn::functional::sigmoid::sigmoid_u32::core::sigmoid_u32; -use orion::operators::nn::functional::softmax::softmax_u32::softmax_u32; -use orion::operators::nn::functional::logsoftmax::logsoftmax_u32::logsoftmax_u32; -use orion::operators::nn::functional::softsign::softsign_u32::core::softsign_u32; -use orion::operators::nn::functional::softplus::softplus_u32::core::softplus_u32; -use orion::operators::nn::functional::linear::linear_u32::linear_u32; -use orion::numbers::fixed_point::core::{FixedType}; - - -impl NN_u32 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - panic(array!['not supported with this dtype']) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - sigmoid_u32(tensor).unwrap() - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - softmax_u32(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - logsoftmax_u32(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - softsign_u32(tensor).unwrap() - } - - fn softplus(tensor: @Tensor) -> Tensor { - softplus_u32(tensor).unwrap() - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - linear_u32(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor { - panic(array!['not supported with this dtype']) - } -} diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo new file mode 100644 index 000000000..99bacf9db --- /dev/null +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -0,0 +1,51 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; + + +impl NN_fp8x23 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + //relu_fp(tensor).unwrap() + panic(array![]) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + //sigmoid_fp(tensor).unwrap() + panic(array![]) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + //softmax_fp(tensor, axis) + panic(array![]) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + //logsoftmax_fp(tensor, axis) + panic(array![]) + } + + fn softsign(tensor: @Tensor) -> Tensor { + // softsign_fp(tensor).unwrap() + panic(array![]) + } + + fn softplus(tensor: @Tensor) -> Tensor { + // softplus_fp(tensor).unwrap() + panic(array![]) + } + + fn linear( + inputs: Tensor, weights: Tensor, bias: Tensor + ) -> Tensor { + // linear_fp(inputs, weights, bias) + panic(array![]) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { + // leaky_relu_fp(inputs, alpha).unwrap() + panic(array![]) + } +} diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo new file mode 100644 index 000000000..8efe48fc2 --- /dev/null +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -0,0 +1,48 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i32::i32; +use orion::operators::nn::core::{NNTrait}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; + +impl NN_i32_fp8x23 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + //relu_i32(*tensor) + panic(array![]) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + // sigmoid_i32(tensor).unwrap() + panic(array![]) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + // softmax_i32(tensor, axis) + panic(array![]) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + // logsoftmax_i32(tensor, axis) + panic(array![]) + } + + fn softsign(tensor: @Tensor) -> Tensor { + // softsign_i32(tensor).unwrap() + panic(array![]) + } + + fn softplus(tensor: @Tensor) -> Tensor { + // softplus_i32(tensor).unwrap() + panic(array![]) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + // linear_i32(inputs, weights, bias) + panic(array![]) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { + // leaky_relu_i32(inputs, alpha).unwrap() + panic(array![]) + } +} diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo new file mode 100644 index 000000000..9733a207e --- /dev/null +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -0,0 +1,48 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i8::i8; +use orion::operators::nn::core::{NNTrait}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; + +impl NN_i8_fp8x23 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + //relu_i8(*tensor) + panic(array![]) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + // sigmoid_i8(tensor).unwrap() + panic(array![]) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + // softmax_i8(tensor, axis) + panic(array![]) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + // logsoftmax_i8(tensor, axis) + panic(array![]) + } + + fn softsign(tensor: @Tensor) -> Tensor { + // softsign_i8(tensor).unwrap() + panic(array![]) + } + + fn softplus(tensor: @Tensor) -> Tensor { + // softplus_i8(tensor).unwrap() + panic(array![]) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + // linear_i8(inputs, weights, bias) + panic(array![]) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { + // leaky_relu_i8(inputs, alpha).unwrap() + panic(array![]) + } +} diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo new file mode 100644 index 000000000..3993c2bc8 --- /dev/null +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -0,0 +1,47 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::{NNTrait}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; + +impl NN_u32_fp8x23 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + //relu_u32(*tensor) + panic(array![]) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + // sigmoid_u32(tensor).unwrap() + panic(array![]) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + // softmax_u32(tensor, axis) + panic(array![]) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + // logsoftmax_u32(tensor, axis) + panic(array![]) + } + + fn softsign(tensor: @Tensor) -> Tensor { + // softsign_u32(tensor).unwrap() + panic(array![]) + } + + fn softplus(tensor: @Tensor) -> Tensor { + // softplus_u32(tensor).unwrap() + panic(array![]) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + // linear_u32(inputs, weights, bias) + panic(array![]) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { + // leaky_relu_u32(inputs, alpha).unwrap() + panic(array![]) + } +} From 073d2d82d994167ea673f60407aba0c26bcec725 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 15:52:05 +0300 Subject: [PATCH 049/179] add generic relu --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/relu.cairo | 42 +++++++++++++++++-- .../nn/functional/relu/relu_fp.cairo | 3 -- .../nn/functional/relu/relu_fp/core.cairo | 18 -------- .../nn/functional/relu/relu_fp/fp16x16.cairo | 31 -------------- .../nn/functional/relu/relu_fp/fp8x23.cairo | 30 ------------- .../nn/functional/relu/relu_i32.cairo | 30 ------------- .../nn/functional/relu/relu_i8.cairo | 31 -------------- .../nn/implementations/nn_fp8x23.cairo | 5 +-- .../nn/implementations/nn_i32_fp8x23.cairo | 7 ++-- .../nn/implementations/nn_i8_fp8x23.cairo | 7 ++-- .../nn/implementations/nn_u32_fp8x23.cairo | 7 ++-- 12 files changed, 54 insertions(+), 159 deletions(-) delete mode 100644 src/operators/nn/functional/relu/relu_fp.cairo delete mode 100644 src/operators/nn/functional/relu/relu_fp/core.cairo delete mode 100644 src/operators/nn/functional/relu/relu_fp/fp16x16.cairo delete mode 100644 src/operators/nn/functional/relu/relu_fp/fp8x23.cairo delete mode 100644 src/operators/nn/functional/relu/relu_i32.cairo delete mode 100644 src/operators/nn/functional/relu/relu_i8.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 80b6aff6a..46cb9f1c1 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -1,4 +1,4 @@ -// mod relu; +mod relu; // mod leaky_relu; // mod sigmoid; // mod softmax; diff --git a/src/operators/nn/functional/relu.cairo b/src/operators/nn/functional/relu.cairo index f78f0796f..e8a53b66b 100644 --- a/src/operators/nn/functional/relu.cairo +++ b/src/operators/nn/functional/relu.cairo @@ -1,3 +1,39 @@ -mod relu_i32; -mod relu_i8; -mod relu_fp; \ No newline at end of file +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: NNTrait::relu docstring +fn relu< + T, + F, + MAG, + impl TTensor: TensorTrait, + impl TNumber: NumberTrait, + impl TPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + if (*item) < NumberTrait::zero() { + data_result.append(NumberTrait::zero()); + } else { + data_result.append(*item); + }; + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} diff --git a/src/operators/nn/functional/relu/relu_fp.cairo b/src/operators/nn/functional/relu/relu_fp.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/nn/functional/relu/relu_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/nn/functional/relu/relu_fp/core.cairo b/src/operators/nn/functional/relu/relu_fp/core.cairo deleted file mode 100644 index 7dc3b9577..000000000 --- a/src/operators/nn/functional/relu/relu_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::relu::relu_fp::{fp16x16, fp8x23}; - -/// Cf: NNTrait::relu docstring -fn relu_fp(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::relu(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::relu(*z)), - }, - Option::None(_) => Option::Some((fp16x16::relu(*z))), - }, - Option::None(_) => Option::Some((fp16x16::relu(*z))), - } -} - diff --git a/src/operators/nn/functional/relu/relu_fp/fp16x16.cairo b/src/operators/nn/functional/relu/relu_fp/fp16x16.cairo deleted file mode 100644 index b07d10af7..000000000 --- a/src/operators/nn/functional/relu/relu_fp/fp16x16.cairo +++ /dev/null @@ -1,31 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16PartialOrd; - -/// Cf: NNTrait::relu docstring -fn relu(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item < FixedType { mag: 0, sign: false }) { - data_result.append(FixedType { mag: 0, sign: false }); - } else { - data_result.append(*item); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/relu/relu_fp/fp8x23.cairo b/src/operators/nn/functional/relu/relu_fp/fp8x23.cairo deleted file mode 100644 index 83158c661..000000000 --- a/src/operators/nn/functional/relu/relu_fp/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::FixedType; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23PartialOrd; - -/// Cf: NNTrait::relu docstring -fn relu(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item < FixedType { mag: 0, sign: false }) { - data_result.append(FixedType { mag: 0, sign: false }); - } else { - data_result.append(*item); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/relu/relu_i32.cairo b/src/operators/nn/functional/relu/relu_i32.cairo deleted file mode 100644 index c0bfefc3f..000000000 --- a/src/operators/nn/functional/relu/relu_i32.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - - -/// Cf: NNTrait::relu docstring -fn relu_i32(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item) < IntegerTrait::new(0, false) { - data_result.append(IntegerTrait::new(0, false)); - } else { - data_result.append(*item); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/relu/relu_i8.cairo b/src/operators/nn/functional/relu/relu_i8.cairo deleted file mode 100644 index c4de1a447..000000000 --- a/src/operators/nn/functional/relu/relu_i8.cairo +++ /dev/null @@ -1,31 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - - -/// Cf: NNTrait::relu docstring -fn relu_i8(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item) < IntegerTrait::new(0, false) { - data_result.append(IntegerTrait::new(0, false)); - } else { - data_result.append(*item); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 99bacf9db..0a8fcf13e 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -4,12 +4,11 @@ use orion::operators::tensor::core::Tensor; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; - +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; impl NN_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { - //relu_fp(tensor).unwrap() - panic(array![]) + functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index 8efe48fc2..e30c5534c 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -2,13 +2,14 @@ use core::option::OptionTrait; use orion::operators::tensor::core::Tensor; use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::{NNTrait}; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; impl NN_i32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { - //relu_i32(*tensor) - panic(array![]) + functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index 9733a207e..ef411ff50 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -2,13 +2,14 @@ use core::option::OptionTrait; use orion::operators::tensor::core::Tensor; use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::{NNTrait}; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; impl NN_i8_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { - //relu_i8(*tensor) - panic(array![]) + functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index 3993c2bc8..447c645f4 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -1,13 +1,14 @@ use core::option::OptionTrait; use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::{NNTrait}; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; impl NN_u32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { - //relu_u32(*tensor) - panic(array![]) + functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { From b796f6057930d17cb9d4ee358fbab93564cee4d7 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 16:14:18 +0300 Subject: [PATCH 050/179] implement generic leaky_relu --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/leaky_relu.cairo | 92 ++++++++++++++++++- .../functional/leaky_relu/leaky_relu_fp.cairo | 3 - .../leaky_relu/leaky_relu_fp/core.cairo | 18 ---- .../leaky_relu/leaky_relu_fp/fp16x16.cairo | 36 -------- .../leaky_relu/leaky_relu_fp/fp8x23.cairo | 36 -------- .../leaky_relu/leaky_relu_i32.cairo | 3 - .../leaky_relu/leaky_relu_i32/core.cairo | 20 ---- .../leaky_relu/leaky_relu_i32/fp16x16.cairo | 38 -------- .../leaky_relu/leaky_relu_i32/fp8x23.cairo | 37 -------- .../functional/leaky_relu/leaky_relu_i8.cairo | 3 - .../leaky_relu/leaky_relu_i8/core.cairo | 20 ---- .../leaky_relu/leaky_relu_i8/fp16x16.cairo | 38 -------- .../leaky_relu/leaky_relu_i8/fp8x23.cairo | 37 -------- .../nn/implementations/nn_fp8x23.cairo | 3 +- .../nn/implementations/nn_i32_fp8x23.cairo | 4 +- .../nn/implementations/nn_i8_fp8x23.cairo | 4 +- .../nn/implementations/nn_u32_fp8x23.cairo | 4 +- 18 files changed, 97 insertions(+), 301 deletions(-) delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_fp.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_fp/core.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp16x16.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp8x23.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i32.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i32/core.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp8x23.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i8.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i8/core.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp16x16.cairo delete mode 100644 src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp8x23.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 46cb9f1c1..e2782bd53 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -1,5 +1,5 @@ mod relu; -// mod leaky_relu; +mod leaky_relu; // mod sigmoid; // mod softmax; // mod softsign; diff --git a/src/operators/nn/functional/leaky_relu.cairo b/src/operators/nn/functional/leaky_relu.cairo index ad2ea3655..06b24e468 100644 --- a/src/operators/nn/functional/leaky_relu.cairo +++ b/src/operators/nn/functional/leaky_relu.cairo @@ -1,3 +1,89 @@ -mod leaky_relu_i8; -mod leaky_relu_i32; -mod leaky_relu_fp; \ No newline at end of file +use core::traits::Into; +use array::ArrayTrait; +use option::OptionTrait; +use array::SpanTrait; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::numbers::NumberTrait; + +/// Cf: NNTrait::leaky_relu docstring +fn leaky_relu_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl FMul: Mul, + impl TPartialOrd: PartialOrd, + impl FPartialOrd: PartialOrd, + impl TCopy: Copy, + impl TDrop: Drop, + impl FCopy: Copy, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut z: Tensor, alpha: @F +) -> Tensor { + assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); + + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); + if (*item >= NumberTrait::zero()) { + data_result.append(fp_current_index); + } else { + data_result.append(fp_current_index * *alpha); + }; + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + +/// Cf: NNTrait::leaky_relu docstring +fn leaky_relu_from_fp< + F, + MAG, + impl FNumber: NumberTrait, + impl FTensor: TensorTrait, + impl FPartialOrd: PartialOrd, + impl FMul: Mul, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut z: Tensor, alpha: @F +) -> Tensor { + assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); + + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + if (*item >= NumberTrait::zero()) { + data_result.append(*item); + } else { + data_result.append(*item * *alpha); + }; + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_fp.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_fp.cairo deleted file mode 100644 index 1a2b31adf..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; \ No newline at end of file diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/core.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_fp/core.cairo deleted file mode 100644 index 70b3b1dfb..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/core.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::leaky_relu::leaky_relu_fp::{fp16x16, fp8x23}; - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_fp(z: @Tensor, alpha: @FixedType, ) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::leaky_relu(*z, alpha)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::leaky_relu(*z, alpha)), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - } -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp16x16.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp16x16.cairo deleted file mode 100644 index 4fa4941a8..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp16x16.cairo +++ /dev/null @@ -1,36 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, ONE, FP16x16Mul, FP16x16PartialOrd -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item >= FixedType { mag: 0, sign: false }) { - data_result.append(*item); - } else { - data_result.append(*item * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp8x23.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp8x23.cairo deleted file mode 100644 index 8bc99f415..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_fp/fp8x23.cairo +++ /dev/null @@ -1,36 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, ONE, FP8x23Mul, FP8x23PartialOrd -}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - if (*item >= FixedType { mag: 0, sign: false }) { - data_result.append(*item); - } else { - data_result.append(*item * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i32.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/core.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i32/core.cairo deleted file mode 100644 index 8b0148183..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i32::fp16x16; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i32::fp8x23; - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_i32(z: @Tensor, alpha: @FixedType, ) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::leaky_relu(*z, alpha)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::leaky_relu(*z, alpha)), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - } -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp16x16.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp16x16.cairo deleted file mode 100644 index d467a0d66..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp16x16.cairo +++ /dev/null @@ -1,38 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, ONE, FP16x16Mul}; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::new_unscaled((*item.mag).into(), (*item).sign); - if (*item >= i32 { mag: 0, sign: false }) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp8x23.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp8x23.cairo deleted file mode 100644 index 97ac7ad82..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i32/fp8x23.cairo +++ /dev/null @@ -1,37 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, ONE, FP8x23Mul}; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::new_unscaled((*item.mag).into(), (*item).sign); - if (*item >= i32 { mag: 0, sign: false }) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i8.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/core.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i8/core.cairo deleted file mode 100644 index 55a8b5ea9..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i8::fp16x16; -use orion::operators::nn::functional::leaky_relu::leaky_relu_i8::fp8x23; - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_i8(z: @Tensor, alpha: @FixedType) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::leaky_relu(*z, alpha)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::leaky_relu(*z, alpha)), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - }, - Option::None(_) => Option::Some((fp16x16::leaky_relu(*z, alpha))), - } -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp16x16.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp16x16.cairo deleted file mode 100644 index dd81d8af8..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp16x16.cairo +++ /dev/null @@ -1,38 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, ONE, FP16x16Mul}; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::new_unscaled((*item.mag).into(), (*item).sign); - if (*item >= i8 { mag: 0, sign: false }) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp8x23.cairo b/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp8x23.cairo deleted file mode 100644 index f36b68542..000000000 --- a/src/operators/nn/functional/leaky_relu/leaky_relu_i8/fp8x23.cairo +++ /dev/null @@ -1,37 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use option::OptionTrait; -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, ONE, FP8x23Mul}; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::core::{Tensor, TensorTrait}; - - -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu(mut z: Tensor, alpha: @FixedType) -> Tensor { - assert(*alpha.mag < ONE, 'alpha must be less than 1_fp'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::new_unscaled((*item.mag).into(), (*item).sign); - if (*item >= i8 { mag: 0, sign: false }) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 0a8fcf13e..939ecc6de 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -44,7 +44,6 @@ impl NN_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - // leaky_relu_fp(inputs, alpha).unwrap() - panic(array![]) + functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index e30c5534c..18daf8f90 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -6,6 +6,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; impl NN_i32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -43,7 +44,6 @@ impl NN_i32_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - // leaky_relu_i32(inputs, alpha).unwrap() - panic(array![]) + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index ef411ff50..658d2a59e 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -6,6 +6,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; impl NN_i8_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -43,7 +44,6 @@ impl NN_i8_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - // leaky_relu_i8(inputs, alpha).unwrap() - panic(array![]) + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index 447c645f4..7ab198e13 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -5,6 +5,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; impl NN_u32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -42,7 +43,6 @@ impl NN_u32_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - // leaky_relu_u32(inputs, alpha).unwrap() - panic(array![]) + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) } } From f85ec60207da439a952a44ecdeb2e7d41ba9cc6b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 16:49:27 +0300 Subject: [PATCH 051/179] add generic sigmoid --- src/numbers.cairo | 42 +++++++++ src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/sigmoid.cairo | 87 ++++++++++++++++++- .../nn/functional/sigmoid/core.cairo | 1 - .../nn/functional/sigmoid/sigmoid_fp.cairo | 3 - .../functional/sigmoid/sigmoid_fp/core.cairo | 19 ---- .../sigmoid/sigmoid_fp/fp16x16.cairo | 33 ------- .../sigmoid/sigmoid_fp/fp8x23.cairo | 33 ------- .../nn/functional/sigmoid/sigmoid_i32.cairo | 3 - .../functional/sigmoid/sigmoid_i32/core.cairo | 20 ----- .../sigmoid/sigmoid_i32/fp16x16.cairo | 38 -------- .../sigmoid/sigmoid_i32/fp8x23.cairo | 34 -------- .../nn/functional/sigmoid/sigmoid_i8.cairo | 3 - .../functional/sigmoid/sigmoid_i8/core.cairo | 20 ----- .../sigmoid/sigmoid_i8/fp16x16.cairo | 36 -------- .../sigmoid/sigmoid_i8/fp8x23.cairo | 34 -------- .../nn/functional/sigmoid/sigmoid_u32.cairo | 3 - .../functional/sigmoid/sigmoid_u32/core.cairo | 19 ---- .../sigmoid/sigmoid_u32/fp16x16.cairo | 37 -------- .../sigmoid/sigmoid_u32/fp8x23.cairo | 35 -------- .../nn/implementations/nn_fp8x23.cairo | 3 +- .../nn/implementations/nn_i32_fp8x23.cairo | 3 +- .../nn/implementations/nn_i8_fp8x23.cairo | 3 +- .../nn/implementations/nn_u32_fp8x23.cairo | 3 +- 24 files changed, 130 insertions(+), 384 deletions(-) delete mode 100644 src/operators/nn/functional/sigmoid/core.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_fp.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_fp/core.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_fp/fp16x16.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_fp/fp8x23.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i32.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i32/core.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i32/fp8x23.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i8.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i8/core.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i8/fp16x16.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_i8/fp8x23.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_u32.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_u32/core.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_u32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/sigmoid/sigmoid_u32/fp8x23.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index a4952ccd1..1bc61336d 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -11,6 +11,8 @@ trait NumberTrait { fn one() -> T; fn is_one(self: T) -> bool; + fn neg_one() -> T; + fn abs(self: T) -> T; fn min_value() -> T; @@ -46,6 +48,11 @@ impl FP8x23Number of NumberTrait { fn one() -> FP8x23 { FP8x23Impl::ONE() } + + fn neg_one() -> FP8x23 { + FP8x23 { mag: core_fp8x23::ONE, sign: true } + } + fn is_one(self: FP8x23) -> bool { core_fp8x23::eq(@self, @FP8x23Impl::ONE()) } @@ -106,6 +113,11 @@ impl FP16x16Number of NumberTrait { fn one() -> FP16x16 { FP16x16Impl::ONE() } + + fn neg_one() -> FP16x16 { + FP16x16 { mag: core_fp16x16::ONE, sign: true } + } + fn is_one(self: FP16x16) -> bool { core_fp16x16::eq(@self, @FP16x16Impl::ONE()) } @@ -165,6 +177,11 @@ impl I8Number of NumberTrait { fn one() -> i8 { i8 { mag: 1, sign: false } } + + fn neg_one() -> i8 { + i8 { mag: 1, sign: true } + } + fn is_one(self: i8) -> bool { i8_core::i8_eq(self, i8 { mag: 1, sign: false }) } @@ -232,6 +249,11 @@ impl i16Number of NumberTrait { fn one() -> i16 { i16 { mag: 1, sign: false } } + + fn neg_one() -> i16 { + i16 { mag: 1, sign: true } + } + fn is_one(self: i16) -> bool { i16_core::i16_eq(self, i16 { mag: 1, sign: false }) } @@ -300,6 +322,11 @@ impl i32Number of NumberTrait { fn one() -> i32 { i32 { mag: 1, sign: false } } + + fn neg_one() -> i32 { + i32 { mag: 1, sign: true } + } + fn is_one(self: i32) -> bool { i32_core::i32_eq(self, i32 { mag: 1, sign: false }) } @@ -368,6 +395,11 @@ impl i64Number of NumberTrait { fn one() -> i64 { i64 { mag: 1, sign: false } } + + fn neg_one() -> i64 { + i64 { mag: 1, sign: true } + } + fn is_one(self: i64) -> bool { i64_core::i64_eq(self, i64 { mag: 1, sign: false }) } @@ -436,6 +468,11 @@ impl i128Number of NumberTrait { fn one() -> i128 { i128 { mag: 1, sign: false } } + + fn neg_one() -> i128 { + i128 { mag: 1, sign: true } + } + fn is_one(self: i128) -> bool { i128_core::i128_eq(self, i128 { mag: 1, sign: false }) } @@ -501,6 +538,11 @@ impl u32Number of NumberTrait { fn one() -> u32 { 1 } + + fn neg_one() -> u32 { + panic(array!['not supported']) + } + fn is_one(self: u32) -> bool { self == 1 } diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index e2782bd53..0fe7170f9 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -1,6 +1,6 @@ mod relu; mod leaky_relu; -// mod sigmoid; +mod sigmoid; // mod softmax; // mod softsign; // mod softplus; diff --git a/src/operators/nn/functional/sigmoid.cairo b/src/operators/nn/functional/sigmoid.cairo index 8d9cdcadc..9371d87aa 100644 --- a/src/operators/nn/functional/sigmoid.cairo +++ b/src/operators/nn/functional/sigmoid.cairo @@ -1,4 +1,83 @@ -mod sigmoid_u32; -mod sigmoid_i32; -mod sigmoid_i8; -mod sigmoid_fp; \ No newline at end of file +use core::traits::Into; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::numbers::NumberTrait; + +/// Cf: NNTrait::sigmoid docstring +fn sigmoid_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl FAdd: Add, + impl FMul: Mul, + impl FDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), !(*item).is_neg()); + let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + +/// Cf: NNTrait::sigmoid docstring +fn sigmoid_from_fp< + F, + MAG, + impl FNumber: NumberTrait, + impl FTensor: TensorTrait, + impl FFixed: FixedTrait, + impl FPartialOrd: PartialOrd, + impl FAdd: Add, + impl FMul: Mul, + impl FDiv: Div, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let result = NumberTrait::one() + / (NumberTrait::one() + (*item * NumberTrait::neg_one()).exp()); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + diff --git a/src/operators/nn/functional/sigmoid/core.cairo b/src/operators/nn/functional/sigmoid/core.cairo deleted file mode 100644 index 8b1378917..000000000 --- a/src/operators/nn/functional/sigmoid/core.cairo +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_fp.cairo b/src/operators/nn/functional/sigmoid/sigmoid_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/sigmoid/sigmoid_fp/core.cairo b/src/operators/nn/functional/sigmoid/sigmoid_fp/core.cairo deleted file mode 100644 index 1a354bdc4..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_fp/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::sigmoid::sigmoid_fp::fp8x23; -use orion::operators::nn::functional::sigmoid::sigmoid_fp::fp16x16; - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_fp(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sigmoid_fp(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sigmoid_fp(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_fp(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_fp(*z)), - } -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_fp/fp16x16.cairo b/src/operators/nn/functional/sigmoid/sigmoid_fp/fp16x16.cairo deleted file mode 100644 index a2d67638d..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_fp/fp16x16.cairo +++ /dev/null @@ -1,33 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Mul, FP16x16Div -}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_fp(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = FixedTrait::ONE() - / (FixedTrait::ONE() + (*item * FixedType { mag: 65536, sign: true }).exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_fp/fp8x23.cairo b/src/operators/nn/functional/sigmoid/sigmoid_fp/fp8x23.cairo deleted file mode 100644 index 2c73eeec7..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_fp/fp8x23.cairo +++ /dev/null @@ -1,33 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23Add, FP8x23Mul, FP8x23Div -}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_fp(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = FixedTrait::ONE() - / (FixedTrait::ONE() + (*item * FixedType { mag: 8388608, sign: true }).exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i32.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i32/core.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i32/core.cairo deleted file mode 100644 index 8c5cb405c..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i32/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::{i32::i32}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::sigmoid::sigmoid_i32::fp8x23; -use orion::operators::nn::functional::sigmoid::sigmoid_i32::fp16x16; - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i32(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sigmoid_i32(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sigmoid_i32(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_i32(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_i32(*z)), - } -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i32/fp16x16.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i32/fp16x16.cairo deleted file mode 100644 index fdc720686..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i32/fp16x16.cairo +++ /dev/null @@ -1,38 +0,0 @@ -use core::debug::PrintTrait; -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i32(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let current_item = *item * IntegerTrait::new(1, true); - let fp_current_index = FixedTrait::new_unscaled( - current_item.mag.into(), current_item.sign - ); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i32/fp8x23.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i32/fp8x23.cairo deleted file mode 100644 index 01aa8d1f0..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i32/fp8x23.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i32(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let current_item = *item * IntegerTrait::new(1, true); - let fp_current_index = FixedTrait::new_unscaled( - current_item.mag.into(), current_item.sign - ); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i8.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i8/core.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i8/core.cairo deleted file mode 100644 index 6120b1095..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i8/core.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use orion::numbers::signed_integer::{i8::i8}; -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::sigmoid::sigmoid_i8::fp8x23; -use orion::operators::nn::functional::sigmoid::sigmoid_i8::fp16x16; - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i8(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sigmoid_i8(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sigmoid_i8(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_i8(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_i8(*z)), - } -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i8/fp16x16.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i8/fp16x16.cairo deleted file mode 100644 index b3a5dbc06..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i8/fp16x16.cairo +++ /dev/null @@ -1,36 +0,0 @@ -use core::debug::PrintTrait; -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16Add, FP16x16Div}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i8(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let current_item = *item * IntegerTrait::new(1, true); - let fp_current_index = FixedTrait::new_unscaled( - current_item.mag.into(), current_item.sign - ); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_i8/fp8x23.cairo b/src/operators/nn/functional/sigmoid/sigmoid_i8/fp8x23.cairo deleted file mode 100644 index 5e0f1e3d6..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_i8/fp8x23.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_i8(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let current_item = *item * IntegerTrait::new(1, true); - let fp_current_index = FixedTrait::new_unscaled( - current_item.mag.into(), current_item.sign - ); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/sigmoid/sigmoid_u32.cairo b/src/operators/nn/functional/sigmoid/sigmoid_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/sigmoid/sigmoid_u32/core.cairo b/src/operators/nn/functional/sigmoid/sigmoid_u32/core.cairo deleted file mode 100644 index f02791963..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_u32/core.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use orion::operators::tensor::core::{Tensor}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::sigmoid::sigmoid_u32::fp8x23; -use orion::operators::nn::functional::sigmoid::sigmoid_u32::fp16x16; - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_u32(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::sigmoid_u32(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::sigmoid_u32(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_u32(*z)), - }, - Option::None(_) => Option::Some(fp16x16::sigmoid_u32(*z)), - } -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_u32/fp16x16.cairo b/src/operators/nn/functional/sigmoid/sigmoid_u32/fp16x16.cairo deleted file mode 100644 index 256d37458..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_u32/fp16x16.cairo +++ /dev/null @@ -1,37 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_u32(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let neg_fp_current_item = if *item == 0 { - FixedTrait::new(0, false) - } else { - FixedTrait::new_unscaled((*item).into(), true) - }; - let result = FixedTrait::ONE() / (FixedTrait::ONE() + neg_fp_current_item.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/sigmoid/sigmoid_u32/fp8x23.cairo b/src/operators/nn/functional/sigmoid/sigmoid_u32/fp8x23.cairo deleted file mode 100644 index fae2e3d6e..000000000 --- a/src/operators/nn/functional/sigmoid/sigmoid_u32/fp8x23.cairo +++ /dev/null @@ -1,35 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_u32(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let neg_fp_current_item = if *item == 0 { - FixedTrait::new(0, false) - } else { - FixedTrait::new_unscaled((*item).into(), true) - }; - let result = FixedTrait::ONE() / (FixedTrait::ONE() + neg_fp_current_item.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 939ecc6de..6b2b39f6f 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -12,8 +12,7 @@ impl NN_fp8x23 of NNTrait { } fn sigmoid(tensor: @Tensor) -> Tensor { - //sigmoid_fp(tensor).unwrap() - panic(array![]) + functional::sigmoid::sigmoid_from_fp(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index 18daf8f90..f54cafa89 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -14,8 +14,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn sigmoid(tensor: @Tensor) -> Tensor { - // sigmoid_i32(tensor).unwrap() - panic(array![]) + functional::sigmoid::sigmoid_from_int(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index 658d2a59e..6c39ca9a6 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -14,8 +14,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn sigmoid(tensor: @Tensor) -> Tensor { - // sigmoid_i8(tensor).unwrap() - panic(array![]) + functional::sigmoid::sigmoid_from_int(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index 7ab198e13..85bcbf272 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -13,8 +13,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn sigmoid(tensor: @Tensor) -> Tensor { - // sigmoid_u32(tensor).unwrap() - panic(array![]) + functional::sigmoid::sigmoid_from_int(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { From 97d7a10cf5ca4d3cca0597718a434bc69650621f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 16:56:22 +0300 Subject: [PATCH 052/179] add generic softmax --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/softmax.cairo | 26 ++++++++++++++++--- .../nn/functional/softmax/softmax_fp.cairo | 15 ----------- .../nn/functional/softmax/softmax_i32.cairo | 16 ------------ .../nn/functional/softmax/softmax_i8.cairo | 16 ------------ .../nn/functional/softmax/softmax_u32.cairo | 15 ----------- .../nn/implementations/nn_fp8x23.cairo | 5 ++-- .../nn/implementations/nn_i32_fp8x23.cairo | 5 ++-- .../nn/implementations/nn_i8_fp8x23.cairo | 5 ++-- .../nn/implementations/nn_u32_fp8x23.cairo | 5 ++-- 10 files changed, 31 insertions(+), 79 deletions(-) delete mode 100644 src/operators/nn/functional/softmax/softmax_fp.cairo delete mode 100644 src/operators/nn/functional/softmax/softmax_i32.cairo delete mode 100644 src/operators/nn/functional/softmax/softmax_i8.cairo delete mode 100644 src/operators/nn/functional/softmax/softmax_u32.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 0fe7170f9..fc3ffc7fb 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -1,7 +1,7 @@ mod relu; mod leaky_relu; mod sigmoid; -// mod softmax; +mod softmax; // mod softsign; // mod softplus; // mod linear; diff --git a/src/operators/nn/functional/softmax.cairo b/src/operators/nn/functional/softmax.cairo index 2127b4cce..e07969e8b 100644 --- a/src/operators/nn/functional/softmax.cairo +++ b/src/operators/nn/functional/softmax.cairo @@ -1,4 +1,22 @@ -mod softmax_u32; -mod softmax_i32; -mod softmax_i8; -mod softmax_fp; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + + +/// Cf: NNTrait::softmax docstring +fn softmax< + T, + F, + impl TTensor: TensorTrait, + impl FTensor: TensorTrait, + impl FTensorDiv: Div>, + impl FCopy: Copy, + impl FDrop: Drop, +>( + z: @Tensor, axis: usize +) -> Tensor { + let exp_tensor = z.exp(); + let sum = exp_tensor.reduce_sum(axis, true); + let softmax = exp_tensor / sum; + + return softmax; +} + diff --git a/src/operators/nn/functional/softmax/softmax_fp.cairo b/src/operators/nn/functional/softmax/softmax_fp.cairo deleted file mode 100644 index dbba51611..000000000 --- a/src/operators/nn/functional/softmax/softmax_fp.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_i8::Tensor_i8, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::softmax docstring -fn softmax_fp(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - - return softmax; -} - diff --git a/src/operators/nn/functional/softmax/softmax_i32.cairo b/src/operators/nn/functional/softmax/softmax_i32.cairo deleted file mode 100644 index 074f65f30..000000000 --- a/src/operators/nn/functional/softmax/softmax_i32.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_i32::Tensor_i32, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::softmax docstring -fn softmax_i32(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - - return softmax; -} - diff --git a/src/operators/nn/functional/softmax/softmax_i8.cairo b/src/operators/nn/functional/softmax/softmax_i8.cairo deleted file mode 100644 index 7c14ef98f..000000000 --- a/src/operators/nn/functional/softmax/softmax_i8.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_i8::Tensor_i8, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::softmax docstring -fn softmax_i8(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - - return softmax; -} - diff --git a/src/operators/nn/functional/softmax/softmax_u32.cairo b/src/operators/nn/functional/softmax/softmax_u32.cairo deleted file mode 100644 index 1339308dd..000000000 --- a/src/operators/nn/functional/softmax/softmax_u32.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_u32::Tensor_u32, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - - -/// Cf: NNTrait::softmax docstring -fn softmax_u32(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - - return softmax; -} diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 6b2b39f6f..3f276413e 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -4,7 +4,7 @@ use orion::operators::tensor::core::Tensor; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -16,8 +16,7 @@ impl NN_fp8x23 of NNTrait { } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - //softmax_fp(tensor, axis) - panic(array![]) + functional::softmax::softmax(tensor, axis) } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index f54cafa89..15ecc2e47 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -6,7 +6,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_i32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -18,8 +18,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - // softmax_i32(tensor, axis) - panic(array![]) + functional::softmax::softmax(tensor, axis) } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index 6c39ca9a6..d9b3d9668 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -6,7 +6,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_i8_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -18,8 +18,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - // softmax_i8(tensor, axis) - panic(array![]) + functional::softmax::softmax(tensor, axis) } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index 85bcbf272..d0d5f585d 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -5,7 +5,7 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_u32_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -17,8 +17,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - // softmax_u32(tensor, axis) - panic(array![]) + functional::softmax::softmax(tensor, axis) } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { From 912267a5f3df562271eb70ab55107e7c0b833030 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 17:03:37 +0300 Subject: [PATCH 053/179] add generic softsign --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/softsign.cairo | 83 ++++++++++++++++++- .../nn/functional/softsign/softsign_fp.cairo | 3 - .../softsign/softsign_fp/core.cairo | 21 ----- .../softsign/softsign_fp/fp16x16.cairo | 31 ------- .../softsign/softsign_fp/fp8x23.cairo | 30 ------- .../nn/functional/softsign/softsign_i32.cairo | 3 - .../softsign/softsign_i32/core.cairo | 22 ----- .../softsign/softsign_i32/fp16x16.cairo | 34 -------- .../softsign/softsign_i32/fp8x23.cairo | 32 ------- .../nn/functional/softsign/softsign_i8.cairo | 3 - .../softsign/softsign_i8/core.cairo | 22 ----- .../softsign/softsign_i8/fp16x16.cairo | 34 -------- .../softsign/softsign_i8/fp8x23.cairo | 32 ------- .../nn/functional/softsign/softsign_u32.cairo | 3 - .../softsign/softsign_u32/core.cairo | 21 ----- .../softsign/softsign_u32/fp16x16.cairo | 32 ------- .../softsign/softsign_u32/fp8x23.cairo | 30 ------- .../nn/implementations/nn_fp8x23.cairo | 3 +- .../nn/implementations/nn_i32_fp8x23.cairo | 3 +- .../nn/implementations/nn_i8_fp8x23.cairo | 3 +- .../nn/implementations/nn_u32_fp8x23.cairo | 3 +- 22 files changed, 84 insertions(+), 366 deletions(-) delete mode 100644 src/operators/nn/functional/softsign/softsign_fp.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_fp/core.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_fp/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_fp/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i32.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i32/core.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i32/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i8.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i8/core.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i8/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_i8/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_u32.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_u32/core.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_u32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softsign/softsign_u32/fp8x23.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index fc3ffc7fb..e60fa1742 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -2,7 +2,7 @@ mod relu; mod leaky_relu; mod sigmoid; mod softmax; -// mod softsign; +mod softsign; // mod softplus; // mod linear; // mod logsoftmax; diff --git a/src/operators/nn/functional/softsign.cairo b/src/operators/nn/functional/softsign.cairo index 0029311e6..6aee1935d 100644 --- a/src/operators/nn/functional/softsign.cairo +++ b/src/operators/nn/functional/softsign.cairo @@ -1,4 +1,79 @@ -mod softsign_u32; -mod softsign_i32; -mod softsign_i8; -mod softsign_fp; \ No newline at end of file +use core::traits::Into; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::numbers::NumberTrait; + +/// Cf: NNTrait::softsign docstring +fn softsign_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl FAdd: Add, + impl FDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop, + impl FCopy: Copy, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); + let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + +/// Cf: NNTrait::softsign docstring +fn softsign_from_fp< + F, + MAG, + impl FTensor: TensorTrait, + impl FFixed: FixedTrait, + impl FPartialOrd: PartialOrd, + impl FAdd: Add, + impl FDiv: Div, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let result = *item / (FixedTrait::ONE() + (*item).abs()); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} diff --git a/src/operators/nn/functional/softsign/softsign_fp.cairo b/src/operators/nn/functional/softsign/softsign_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softsign/softsign_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softsign/softsign_fp/core.cairo b/src/operators/nn/functional/softsign/softsign_fp/core.cairo deleted file mode 100644 index 5a4b33428..000000000 --- a/src/operators/nn/functional/softsign/softsign_fp/core.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use core::debug::PrintTrait; - -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softsign::softsign_fp::fp16x16; -use orion::operators::nn::functional::softsign::softsign_fp::fp8x23; - -/// Cf: NNTrait::softsign docstring -fn softsign_fp(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softsign(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - } -} - diff --git a/src/operators/nn/functional/softsign/softsign_fp/fp16x16.cairo b/src/operators/nn/functional/softsign/softsign_fp/fp16x16.cairo deleted file mode 100644 index d19e16ebf..000000000 --- a/src/operators/nn/functional/softsign/softsign_fp/fp16x16.cairo +++ /dev/null @@ -1,31 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = *item / (FixedTrait::ONE() + (*item).abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/softsign/softsign_fp/fp8x23.cairo b/src/operators/nn/functional/softsign/softsign_fp/fp8x23.cairo deleted file mode 100644 index 03845f022..000000000 --- a/src/operators/nn/functional/softsign/softsign_fp/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = *item / (FixedTrait::ONE() + (*item).abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softsign/softsign_i32.cairo b/src/operators/nn/functional/softsign/softsign_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softsign/softsign_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softsign/softsign_i32/core.cairo b/src/operators/nn/functional/softsign/softsign_i32/core.cairo deleted file mode 100644 index 458a29977..000000000 --- a/src/operators/nn/functional/softsign/softsign_i32/core.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use core::debug::PrintTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softsign::softsign_i32::fp16x16; -use orion::operators::nn::functional::softsign::softsign_i32::fp8x23; - -/// Cf: NNTrait::softsign docstring -fn softsign_i32(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softsign(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - } -} - diff --git a/src/operators/nn/functional/softsign/softsign_i32/fp16x16.cairo b/src/operators/nn/functional/softsign/softsign_i32/fp16x16.cairo deleted file mode 100644 index afa00ba2e..000000000 --- a/src/operators/nn/functional/softsign/softsign_i32/fp16x16.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item.mag, *item.sign); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softsign/softsign_i32/fp8x23.cairo b/src/operators/nn/functional/softsign/softsign_i32/fp8x23.cairo deleted file mode 100644 index 409c664db..000000000 --- a/src/operators/nn/functional/softsign/softsign_i32/fp8x23.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item.mag, *item.sign); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softsign/softsign_i8.cairo b/src/operators/nn/functional/softsign/softsign_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softsign/softsign_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softsign/softsign_i8/core.cairo b/src/operators/nn/functional/softsign/softsign_i8/core.cairo deleted file mode 100644 index 09d7ef6e6..000000000 --- a/src/operators/nn/functional/softsign/softsign_i8/core.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use core::debug::PrintTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softsign::softsign_i8::fp16x16; -use orion::operators::nn::functional::softsign::softsign_i8::fp8x23; - -/// Cf: NNTrait::softsign docstring -fn softsign_i8(z: @Tensor) -> Option> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softsign(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - } -} - diff --git a/src/operators/nn/functional/softsign/softsign_i8/fp16x16.cairo b/src/operators/nn/functional/softsign/softsign_i8/fp16x16.cairo deleted file mode 100644 index de90a9903..000000000 --- a/src/operators/nn/functional/softsign/softsign_i8/fp16x16.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item.mag).into(), *item.sign); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softsign/softsign_i8/fp8x23.cairo b/src/operators/nn/functional/softsign/softsign_i8/fp8x23.cairo deleted file mode 100644 index 64642f6fa..000000000 --- a/src/operators/nn/functional/softsign/softsign_i8/fp8x23.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item.mag).into(), *item.sign); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softsign/softsign_u32.cairo b/src/operators/nn/functional/softsign/softsign_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softsign/softsign_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softsign/softsign_u32/core.cairo b/src/operators/nn/functional/softsign/softsign_u32/core.cairo deleted file mode 100644 index b5531ed5b..000000000 --- a/src/operators/nn/functional/softsign/softsign_u32/core.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use core::debug::PrintTrait; - -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softsign::softsign_u32::fp16x16; -use orion::operators::nn::functional::softsign::softsign_u32::fp8x23; - -/// Cf: NNTrait::softsign docstring -fn softsign_u32(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softsign(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softsign(*z)), - } -} - diff --git a/src/operators/nn/functional/softsign/softsign_u32/fp16x16.cairo b/src/operators/nn/functional/softsign/softsign_u32/fp16x16.cairo deleted file mode 100644 index bdb36d514..000000000 --- a/src/operators/nn/functional/softsign/softsign_u32/fp16x16.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item, false); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/softsign/softsign_u32/fp8x23.cairo b/src/operators/nn/functional/softsign/softsign_u32/fp8x23.cairo deleted file mode 100644 index e4fdb7033..000000000 --- a/src/operators/nn/functional/softsign/softsign_u32/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softsign docstring -fn softsign(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item, false); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 3f276413e..f2973adf5 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -25,8 +25,7 @@ impl NN_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - // softsign_fp(tensor).unwrap() - panic(array![]) + functional::softsign::softsign_from_fp(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index 15ecc2e47..f73755b30 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -27,8 +27,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - // softsign_i32(tensor).unwrap() - panic(array![]) + functional::softsign::softsign_from_int(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index d9b3d9668..d6c58ae8f 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -27,8 +27,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - // softsign_i8(tensor).unwrap() - panic(array![]) + functional::softsign::softsign_from_int(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index d0d5f585d..fb8c22a7a 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -26,8 +26,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - // softsign_u32(tensor).unwrap() - panic(array![]) + functional::softsign::softsign_from_int(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { From 8ffa6af5e7b76780c99097ef6303b6236062e4e0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 17:09:31 +0300 Subject: [PATCH 054/179] add generic softplus --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/softplus.cairo | 81 ++++++++++++++++++- .../nn/functional/softplus/softplus_fp.cairo | 3 - .../softplus/softplus_fp/core.cairo | 21 ----- .../softplus/softplus_fp/fp16x16.cairo | 32 -------- .../softplus/softplus_fp/fp8x23.cairo | 30 ------- .../nn/functional/softplus/softplus_i32.cairo | 3 - .../softplus/softplus_i32/core.cairo | 22 ----- .../softplus/softplus_i32/fp16x16.cairo | 34 -------- .../softplus/softplus_i32/fp8x23.cairo | 32 -------- .../nn/functional/softplus/softplus_i8.cairo | 3 - .../softplus/softplus_i8/core.cairo | 22 ----- .../softplus/softplus_i8/fp16x16.cairo | 32 -------- .../softplus/softplus_i8/fp8x23.cairo | 32 -------- .../nn/functional/softplus/softplus_u32.cairo | 3 - .../softplus/softplus_u32/core.cairo | 21 ----- .../softplus/softplus_u32/fp16x16.cairo | 34 -------- .../softplus/softplus_u32/fp8x23.cairo | 31 ------- src/operators/nn/functional/softsign.cairo | 1 - .../nn/implementations/nn_fp8x23.cairo | 3 +- .../nn/implementations/nn_i32_fp8x23.cairo | 3 +- .../nn/implementations/nn_i8_fp8x23.cairo | 3 +- .../nn/implementations/nn_u32_fp8x23.cairo | 3 +- 23 files changed, 82 insertions(+), 369 deletions(-) delete mode 100644 src/operators/nn/functional/softplus/softplus_fp.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_fp/core.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_fp/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_fp/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i32.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i32/core.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i32/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i8.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i8/core.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i8/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_i8/fp8x23.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_u32.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_u32/core.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_u32/fp16x16.cairo delete mode 100644 src/operators/nn/functional/softplus/softplus_u32/fp8x23.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index e60fa1742..27d6ba499 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -3,6 +3,6 @@ mod leaky_relu; mod sigmoid; mod softmax; mod softsign; -// mod softplus; +mod softplus; // mod linear; // mod logsoftmax; diff --git a/src/operators/nn/functional/softplus.cairo b/src/operators/nn/functional/softplus.cairo index 99f7ba457..78c621704 100644 --- a/src/operators/nn/functional/softplus.cairo +++ b/src/operators/nn/functional/softplus.cairo @@ -1,4 +1,77 @@ -mod softplus_u32; -mod softplus_i32; -mod softplus_i8; -mod softplus_fp; \ No newline at end of file +use core::traits::Into; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::numbers::NumberTrait; + +/// Cf: NNTrait::softplus docstring +fn softplus_from_int< + T, + F, + INTMAG, + FPMAG, + impl TNumber: NumberTrait, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl MAGInto: Into, + impl FAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop, + impl FDrop: Drop, + impl FPMAGDrop: Drop +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); + let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} + + +/// Cf: NNTrait::softplus docstring +fn softplus_from_fp< + F, + MAG, + impl FTensor: TensorTrait, + impl FFixed: FixedTrait, + impl FPartialOrd: PartialOrd, + impl FAdd: Add, + impl FDiv: Div, + impl FCopy: Copy, + impl FDrop: Drop, +>( + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); + + loop { + match z.data.pop_front() { + Option::Some(item) => { + let result = (FixedTrait::ONE() + (*item).exp()).ln(); + data_result.append(result); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(z.shape, data_result.span(), z.extra); +} diff --git a/src/operators/nn/functional/softplus/softplus_fp.cairo b/src/operators/nn/functional/softplus/softplus_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softplus/softplus_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softplus/softplus_fp/core.cairo b/src/operators/nn/functional/softplus/softplus_fp/core.cairo deleted file mode 100644 index 5bcf692d4..000000000 --- a/src/operators/nn/functional/softplus/softplus_fp/core.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use core::debug::PrintTrait; - -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softplus::softplus_fp::fp16x16; -use orion::operators::nn::functional::softplus::softplus_fp::fp8x23; - -/// Cf: NNTrait::softplus docstring -fn softplus_fp(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softplus(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus((*z))) - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - } -} - diff --git a/src/operators/nn/functional/softplus/softplus_fp/fp16x16.cairo b/src/operators/nn/functional/softplus/softplus_fp/fp16x16.cairo deleted file mode 100644 index 786d95e4c..000000000 --- a/src/operators/nn/functional/softplus/softplus_fp/fp16x16.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = (FixedTrait::ONE() + (*item).exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_fp/fp8x23.cairo b/src/operators/nn/functional/softplus/softplus_fp/fp8x23.cairo deleted file mode 100644 index 230deeecc..000000000 --- a/src/operators/nn/functional/softplus/softplus_fp/fp8x23.cairo +++ /dev/null @@ -1,30 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let result = (FixedTrait::ONE() + (*item).exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_i32.cairo b/src/operators/nn/functional/softplus/softplus_i32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softplus/softplus_i32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softplus/softplus_i32/core.cairo b/src/operators/nn/functional/softplus/softplus_i32/core.cairo deleted file mode 100644 index cd852b8f7..000000000 --- a/src/operators/nn/functional/softplus/softplus_i32/core.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use core::debug::PrintTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softplus::softplus_i32::fp16x16; -use orion::operators::nn::functional::softplus::softplus_i32::fp8x23; - -/// Cf: NNTrait::softplus docstring -fn softplus_i32(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softplus(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - } -} - diff --git a/src/operators/nn/functional/softplus/softplus_i32/fp16x16.cairo b/src/operators/nn/functional/softplus/softplus_i32/fp16x16.cairo deleted file mode 100644 index 827d090b8..000000000 --- a/src/operators/nn/functional/softplus/softplus_i32/fp16x16.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item.mag, *item.sign); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_i32/fp8x23.cairo b/src/operators/nn/functional/softplus/softplus_i32/fp8x23.cairo deleted file mode 100644 index ecdbbbebc..000000000 --- a/src/operators/nn/functional/softplus/softplus_i32/fp8x23.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled(*item.mag, *item.sign); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_i8.cairo b/src/operators/nn/functional/softplus/softplus_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softplus/softplus_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softplus/softplus_i8/core.cairo b/src/operators/nn/functional/softplus/softplus_i8/core.cairo deleted file mode 100644 index 428df1100..000000000 --- a/src/operators/nn/functional/softplus/softplus_i8/core.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use core::debug::PrintTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softplus::softplus_i8::fp16x16; -use orion::operators::nn::functional::softplus::softplus_i8::fp8x23; - -/// Cf: NNTrait::softplus docstring -fn softplus_i8(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softplus(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - } -} - diff --git a/src/operators/nn/functional/softplus/softplus_i8/fp16x16.cairo b/src/operators/nn/functional/softplus/softplus_i8/fp16x16.cairo deleted file mode 100644 index d91b2ac22..000000000 --- a/src/operators/nn/functional/softplus/softplus_i8/fp16x16.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16Add, FP16x16Div}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item.mag).into(), *item.sign); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_i8/fp8x23.cairo b/src/operators/nn/functional/softplus/softplus_i8/fp8x23.cairo deleted file mode 100644 index 006fb90d9..000000000 --- a/src/operators/nn/functional/softplus/softplus_i8/fp8x23.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item.mag).into(), *item.sign); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_u32.cairo b/src/operators/nn/functional/softplus/softplus_u32.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/operators/nn/functional/softplus/softplus_u32.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/operators/nn/functional/softplus/softplus_u32/core.cairo b/src/operators/nn/functional/softplus/softplus_u32/core.cairo deleted file mode 100644 index c79d5bb3b..000000000 --- a/src/operators/nn/functional/softplus/softplus_u32/core.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use core::debug::PrintTrait; - -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::nn::functional::softplus::softplus_u32::fp16x16; -use orion::operators::nn::functional::softplus::softplus_u32::fp8x23; - -/// Cf: NNTrait::softplus docstring -fn softplus_u32(z: @Tensor) -> Option::> { - match *z.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some(fp8x23::softplus(*z)), - FixedImpl::FP16x16(()) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - }, - Option::None(_) => Option::Some(fp16x16::softplus(*z)), - } -} - diff --git a/src/operators/nn/functional/softplus/softplus_u32/fp16x16.cairo b/src/operators/nn/functional/softplus/softplus_u32/fp16x16.cairo deleted file mode 100644 index 68bb7e3a7..000000000 --- a/src/operators/nn/functional/softplus/softplus_u32/fp16x16.cairo +++ /dev/null @@ -1,34 +0,0 @@ -use core::debug::PrintTrait; -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16Add, FP16x16Div -}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item).into(), false); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} - diff --git a/src/operators/nn/functional/softplus/softplus_u32/fp8x23.cairo b/src/operators/nn/functional/softplus/softplus_u32/fp8x23.cairo deleted file mode 100644 index 526e89ad7..000000000 --- a/src/operators/nn/functional/softplus/softplus_u32/fp8x23.cairo +++ /dev/null @@ -1,31 +0,0 @@ -use core::debug::PrintTrait; -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23Add, FP8x23Div}; - - -/// Cf: NNTrait::softplus docstring -fn softplus(mut z: Tensor) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::new_unscaled((*item).into(), false); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span(), z.extra); -} diff --git a/src/operators/nn/functional/softsign.cairo b/src/operators/nn/functional/softsign.cairo index 6aee1935d..789a1ad0c 100644 --- a/src/operators/nn/functional/softsign.cairo +++ b/src/operators/nn/functional/softsign.cairo @@ -3,7 +3,6 @@ use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; - use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index f2973adf5..e02952c1b 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -29,8 +29,7 @@ impl NN_fp8x23 of NNTrait { } fn softplus(tensor: @Tensor) -> Tensor { - // softplus_fp(tensor).unwrap() - panic(array![]) + functional::softplus::softplus_from_fp(*tensor) } fn linear( diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index f73755b30..7bbd019b7 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -31,8 +31,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn softplus(tensor: @Tensor) -> Tensor { - // softplus_i32(tensor).unwrap() - panic(array![]) + functional::softplus::softplus_from_int(*tensor) } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index d6c58ae8f..a55990d3f 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -31,8 +31,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn softplus(tensor: @Tensor) -> Tensor { - // softplus_i8(tensor).unwrap() - panic(array![]) + functional::softplus::softplus_from_int(*tensor) } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index fb8c22a7a..af3766970 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -30,8 +30,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn softplus(tensor: @Tensor) -> Tensor { - // softplus_u32(tensor).unwrap() - panic(array![]) + functional::softplus::softplus_from_int(*tensor) } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { From 3e1b862a5b5e093ed13daadc904752e5284448b9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 17:14:14 +0300 Subject: [PATCH 055/179] add generic linear --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/linear.cairo | 29 ++++++++++++++++--- .../nn/functional/linear/linear_fp.cairo | 20 ------------- .../nn/functional/linear/linear_i32.cairo | 18 ------------ .../nn/functional/linear/linear_i8.cairo | 18 ------------ .../nn/functional/linear/linear_u32.cairo | 17 ----------- .../nn/implementations/nn_fp8x23.cairo | 7 +++-- .../nn/implementations/nn_i32_fp8x23.cairo | 5 ++-- .../nn/implementations/nn_i8_fp8x23.cairo | 5 ++-- .../nn/implementations/nn_u32_fp8x23.cairo | 5 ++-- 10 files changed, 36 insertions(+), 90 deletions(-) delete mode 100644 src/operators/nn/functional/linear/linear_fp.cairo delete mode 100644 src/operators/nn/functional/linear/linear_i32.cairo delete mode 100644 src/operators/nn/functional/linear/linear_i8.cairo delete mode 100644 src/operators/nn/functional/linear/linear_u32.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 27d6ba499..30515ce21 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -4,5 +4,5 @@ mod sigmoid; mod softmax; mod softsign; mod softplus; -// mod linear; +mod linear; // mod logsoftmax; diff --git a/src/operators/nn/functional/linear.cairo b/src/operators/nn/functional/linear.cairo index e57948580..e08cb3b99 100644 --- a/src/operators/nn/functional/linear.cairo +++ b/src/operators/nn/functional/linear.cairo @@ -1,4 +1,25 @@ -mod linear_i8; -mod linear_i32; -mod linear_u32; -mod linear_fp; \ No newline at end of file +use array::SpanTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: NNTrait::linear docstring +fn linear< + T, + F, + impl TTensor: TensorTrait, + impl TAddTensor: Add>, + impl TCopy: Copy, + impl TDrop: Drop +>( + z: Tensor, weights: Tensor, bias: Tensor +) -> Tensor { + assert(z.shape.len() == 1, 'input tensor must be 1D'); + assert(weights.shape.len() == 2, 'weights tensor must be 2D'); + assert(bias.shape.len() == 1, 'bias tensor must be 1D'); + + let dot = weights.matmul(@z); + let sum = dot + bias; + + return sum; +} diff --git a/src/operators/nn/functional/linear/linear_fp.cairo b/src/operators/nn/functional/linear/linear_fp.cairo deleted file mode 100644 index 04c3d1dfa..000000000 --- a/src/operators/nn/functional/linear/linear_fp.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::SpanTrait; - -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorAdd}; -use orion::performance::core::PerfomanceTrait; - -/// Cf: NNTrait::linear docstring -fn linear_fp( - z: Tensor, weights: Tensor, bias: Tensor -) -> Tensor { - assert(z.shape.len() == 1, 'input tensor must be 1D'); - assert(weights.shape.len() == 2, 'weights tensor must be 2D'); - assert(bias.shape.len() == 1, 'bias tensor must be 1D'); - - let dot = weights.matmul(@z); - let sum = dot + bias; - - return sum; -} diff --git a/src/operators/nn/functional/linear/linear_i32.cairo b/src/operators/nn/functional/linear/linear_i32.cairo deleted file mode 100644 index a7620abb2..000000000 --- a/src/operators/nn/functional/linear/linear_i32.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::SpanTrait; - -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorAdd}; -use orion::performance::core::PerfomanceTrait; - -/// Cf: NNTrait::linear docstring -fn linear_i32(z: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - assert(z.shape.len() == 1, 'input tensor must be 1D'); - assert(weights.shape.len() == 2, 'weights tensor must be 2D'); - assert(bias.shape.len() == 1, 'bias tensor must be 1D'); - - let dot = weights.matmul(@z); - let sum = dot + bias; - - return sum; -} diff --git a/src/operators/nn/functional/linear/linear_i8.cairo b/src/operators/nn/functional/linear/linear_i8.cairo deleted file mode 100644 index 23f2f4065..000000000 --- a/src/operators/nn/functional/linear/linear_i8.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::SpanTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorAdd}; -use orion::performance::core::PerfomanceTrait; - -/// Cf: NNTrait::linear docstring -fn linear_i8(z: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - assert(z.shape.len() == 1, 'input tensor must be 1D'); - assert(weights.shape.len() == 2, 'weights tensor must be 2D'); - assert(bias.shape.len() == 1, 'bias tensor must be 1D'); - - let dot = weights.matmul(@z); - let sum = dot + bias; - - return sum; -} diff --git a/src/operators/nn/functional/linear/linear_u32.cairo b/src/operators/nn/functional/linear/linear_u32.cairo deleted file mode 100644 index 9a0d005f6..000000000 --- a/src/operators/nn/functional/linear/linear_u32.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::SpanTrait; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorAdd}; -use orion::performance::core::PerfomanceTrait; - -/// Cf: NNTrait::linear docstring -fn linear_u32(z: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - assert(z.shape.len() == 1, 'input tensor must be 1D'); - assert(weights.shape.len() == 2, 'weights tensor must be 2D'); - assert(bias.shape.len() == 1, 'bias tensor must be 1D'); - - let dot = weights.matmul(@z); - let sum = dot + bias; - - return sum; -} diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index e02952c1b..37f7e89a4 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -4,7 +4,9 @@ use orion::operators::tensor::core::Tensor; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorDiv, FP8x23TensorAdd +}; impl NN_fp8x23 of NNTrait { fn relu(tensor: @Tensor) -> Tensor { @@ -35,8 +37,7 @@ impl NN_fp8x23 of NNTrait { fn linear( inputs: Tensor, weights: Tensor, bias: Tensor ) -> Tensor { - // linear_fp(inputs, weights, bias) - panic(array![]) + functional::linear::linear(inputs, weights, bias) } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index 7bbd019b7..eb0511395 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -5,7 +5,7 @@ use orion::numbers::signed_integer::i32::i32; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::{Tensor_i32_fp8x23, i32TensorAdd}; use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_i32_fp8x23 of NNTrait { @@ -35,8 +35,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - // linear_i32(inputs, weights, bias) - panic(array![]) + functional::linear::linear(inputs, weights, bias) } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index a55990d3f..c0f0e673b 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -5,7 +5,7 @@ use orion::numbers::signed_integer::i8::i8; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::{Tensor_i8_fp8x23, i8TensorAdd}; use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_i8_fp8x23 of NNTrait { @@ -35,8 +35,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - // linear_i8(inputs, weights, bias) - panic(array![]) + functional::linear::linear(inputs, weights, bias) } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index af3766970..17e860a81 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -4,7 +4,7 @@ use orion::operators::tensor::core::Tensor; use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{Tensor_u32_fp8x23, u32TensorAdd}; use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; impl NN_u32_fp8x23 of NNTrait { @@ -34,8 +34,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - // linear_u32(inputs, weights, bias) - panic(array![]) + functional::linear::linear(inputs, weights, bias) } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { From 036caa3abb1b8159d1163efc4c5f5ad09ad4510b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 17:17:39 +0300 Subject: [PATCH 056/179] add generic logsoftmax --- src/operators/nn/functional.cairo | 2 +- src/operators/nn/functional/logsoftmax.cairo | 27 ++++++++++++++++--- .../functional/logsoftmax/logsoftmax_fp.cairo | 13 --------- .../logsoftmax/logsoftmax_i32.cairo | 16 ----------- .../functional/logsoftmax/logsoftmax_i8.cairo | 16 ----------- .../logsoftmax/logsoftmax_u32.cairo | 15 ----------- .../nn/implementations/nn_fp8x23.cairo | 3 +-- .../nn/implementations/nn_i32_fp8x23.cairo | 3 +-- .../nn/implementations/nn_i8_fp8x23.cairo | 3 +-- .../nn/implementations/nn_u32_fp8x23.cairo | 3 +-- 10 files changed, 28 insertions(+), 73 deletions(-) delete mode 100644 src/operators/nn/functional/logsoftmax/logsoftmax_fp.cairo delete mode 100644 src/operators/nn/functional/logsoftmax/logsoftmax_i32.cairo delete mode 100644 src/operators/nn/functional/logsoftmax/logsoftmax_i8.cairo delete mode 100644 src/operators/nn/functional/logsoftmax/logsoftmax_u32.cairo diff --git a/src/operators/nn/functional.cairo b/src/operators/nn/functional.cairo index 30515ce21..272475c30 100644 --- a/src/operators/nn/functional.cairo +++ b/src/operators/nn/functional.cairo @@ -5,4 +5,4 @@ mod softmax; mod softsign; mod softplus; mod linear; -// mod logsoftmax; +mod logsoftmax; diff --git a/src/operators/nn/functional/logsoftmax.cairo b/src/operators/nn/functional/logsoftmax.cairo index 546f91976..892f16d60 100644 --- a/src/operators/nn/functional/logsoftmax.cairo +++ b/src/operators/nn/functional/logsoftmax.cairo @@ -1,4 +1,23 @@ -mod logsoftmax_u32; -mod logsoftmax_i32; -mod logsoftmax_i8; -mod logsoftmax_fp; \ No newline at end of file +use array::SpanTrait; + +use orion::numbers::NumberTrait; +use orion::operators::tensor::core::{Tensor, TensorTrait}; + +/// Cf: NNTrait::logsoftmax docstring +fn logsoftmax< + T, + F, + impl TTensor: TensorTrait, + impl FTensor: TensorTrait, + impl FDivTensor: Div>, + impl FDrop: Drop +>( + z: @Tensor, axis: usize +) -> Tensor { + let exp_tensor = z.exp(); + let sum = exp_tensor.reduce_sum(axis, true); + let softmax = exp_tensor / sum; + let logsoftmax = softmax.log(); + + return logsoftmax; +} diff --git a/src/operators/nn/functional/logsoftmax/logsoftmax_fp.cairo b/src/operators/nn/functional/logsoftmax/logsoftmax_fp.cairo deleted file mode 100644 index 99141dfb0..000000000 --- a/src/operators/nn/functional/logsoftmax/logsoftmax_fp.cairo +++ /dev/null @@ -1,13 +0,0 @@ -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::logsoftmax docstring -fn logsoftmax_fp(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - let logsoftmax = softmax.log(); - - return logsoftmax; -} diff --git a/src/operators/nn/functional/logsoftmax/logsoftmax_i32.cairo b/src/operators/nn/functional/logsoftmax/logsoftmax_i32.cairo deleted file mode 100644 index ac5631fba..000000000 --- a/src/operators/nn/functional/logsoftmax/logsoftmax_i32.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use orion::numbers::signed_integer::i32::i32; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_i32::Tensor_i32, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::logsoftmax docstring -fn logsoftmax_i32(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - let logsoftmax = softmax.log(); - - return logsoftmax; -} diff --git a/src/operators/nn/functional/logsoftmax/logsoftmax_i8.cairo b/src/operators/nn/functional/logsoftmax/logsoftmax_i8.cairo deleted file mode 100644 index c8ae1387b..000000000 --- a/src/operators/nn/functional/logsoftmax/logsoftmax_i8.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use orion::numbers::signed_integer::i8::i8; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_i8::Tensor_i8, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::logsoftmax docstring -fn logsoftmax_i8(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - let logsoftmax = softmax.log(); - - return logsoftmax; -} diff --git a/src/operators/nn/functional/logsoftmax/logsoftmax_u32.cairo b/src/operators/nn/functional/logsoftmax/logsoftmax_u32.cairo deleted file mode 100644 index d750b9f21..000000000 --- a/src/operators/nn/functional/logsoftmax/logsoftmax_u32.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::{ - impl_tensor_u32::Tensor_u32, impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv} -}; -use orion::numbers::fixed_point::core::FixedType; - -/// Cf: NNTrait::logsoftmax docstring -fn logsoftmax_u32(z: @Tensor, axis: usize) -> Tensor { - let exp_tensor = z.exp(); - let sum = exp_tensor.reduce_sum(axis, true); - let softmax = exp_tensor / sum; - let logsoftmax = softmax.log(); - - return logsoftmax; -} diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index 37f7e89a4..aa93229f8 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -22,8 +22,7 @@ impl NN_fp8x23 of NNTrait { } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - //logsoftmax_fp(tensor, axis) - panic(array![]) + functional::logsoftmax::logsoftmax(tensor, axis) } fn softsign(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo index eb0511395..bf8781ca5 100644 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i32_fp8x23.cairo @@ -22,8 +22,7 @@ impl NN_i32_fp8x23 of NNTrait { } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - // logsoftmax_i32(tensor, axis) - panic(array![]) + functional::logsoftmax::logsoftmax(tensor, axis) } fn softsign(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo index c0f0e673b..433761a3e 100644 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_i8_fp8x23.cairo @@ -22,8 +22,7 @@ impl NN_i8_fp8x23 of NNTrait { } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - // logsoftmax_i8(tensor, axis) - panic(array![]) + functional::logsoftmax::logsoftmax(tensor, axis) } fn softsign(tensor: @Tensor) -> Tensor { diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo index 17e860a81..a31a9daf6 100644 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_u32_fp8x23.cairo @@ -21,8 +21,7 @@ impl NN_u32_fp8x23 of NNTrait { } fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - // logsoftmax_u32(tensor, axis) - panic(array![]) + functional::logsoftmax::logsoftmax(tensor, axis) } fn softsign(tensor: @Tensor) -> Tensor { From 9744f72fe689f77376baf04065b55e7bd939ace6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 17:22:00 +0300 Subject: [PATCH 057/179] fix performance impl --- src/lib.cairo | 2 +- src/performance/core.cairo | 1 - src/performance/functional.cairo | 4 ++-- src/performance/implementations.cairo | 4 ++-- .../implementations/impl_performance_fp.cairo | 24 ------------------- .../impl_performance_fp8x23_i8.cairo | 24 +++++++++++++++++++ ...32.cairo => impl_performance_i32_i8.cairo} | 12 +++++----- 7 files changed, 35 insertions(+), 36 deletions(-) delete mode 100644 src/performance/implementations/impl_performance_fp.cairo create mode 100644 src/performance/implementations/impl_performance_fp8x23_i8.cairo rename src/performance/implementations/{impl_performance_i32.cairo => impl_performance_i32_i8.cairo} (56%) diff --git a/src/lib.cairo b/src/lib.cairo index b5e8d7e19..b928b20dd 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,4 +1,4 @@ -// mod performance; +mod performance; mod operators; mod numbers; // mod tests; diff --git a/src/performance/core.cairo b/src/performance/core.cairo index 29273b1d0..54ba66584 100644 --- a/src/performance/core.cairo +++ b/src/performance/core.cairo @@ -1,5 +1,4 @@ use orion::operators::tensor::core::Tensor; -use orion::numbers::fixed_point::core::FixedType; /// Trait /// diff --git a/src/performance/functional.cairo b/src/performance/functional.cairo index 0ed0c12d8..5e5aea7e9 100644 --- a/src/performance/functional.cairo +++ b/src/performance/functional.cairo @@ -1,2 +1,2 @@ -mod quantize_linear; -mod dequantize_linear; +// mod quantize_linear; +// mod dequantize_linear; diff --git a/src/performance/implementations.cairo b/src/performance/implementations.cairo index aa3f889d8..70eb62aa8 100644 --- a/src/performance/implementations.cairo +++ b/src/performance/implementations.cairo @@ -1,2 +1,2 @@ -mod impl_performance_i32; -mod impl_performance_fp; +mod impl_performance_i32_i8; +mod impl_performance_fp8x23_i8; diff --git a/src/performance/implementations/impl_performance_fp.cairo b/src/performance/implementations/impl_performance_fp.cairo deleted file mode 100644 index 7b653d4f4..000000000 --- a/src/performance/implementations/impl_performance_fp.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use core::option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::FixedType; -use orion::operators::tensor::core::Tensor; -use orion::performance::core::PerfomanceTrait; -use orion::performance::functional::quantize_linear::quantize_linear_fp::fp_i8::core::quantize_linear; -use orion::performance::functional::dequantize_linear::dequantize_linear_fp::core::dequantize_linear; - - -impl Performance_fp_i8 of PerfomanceTrait { - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor { - quantize_linear(self, y_scale, y_zero_point).unwrap() - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor { - dequantize_linear(self, x_scale, x_zero_point).unwrap() - } -} diff --git a/src/performance/implementations/impl_performance_fp8x23_i8.cairo b/src/performance/implementations/impl_performance_fp8x23_i8.cairo new file mode 100644 index 000000000..ec60cb3f5 --- /dev/null +++ b/src/performance/implementations/impl_performance_fp8x23_i8.cairo @@ -0,0 +1,24 @@ +use array::ArrayTrait; +use core::option::OptionTrait; + +use orion::numbers::signed_integer::i8::i8; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; + +use orion::operators::tensor::core::Tensor; +use orion::performance::core::PerfomanceTrait; + +impl Performance_fp_i8 of PerfomanceTrait { + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor { + //quantize_linear(self, y_scale, y_zero_point).unwrap() + panic(array![]) + } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor { + //dequantize_linear(self, x_scale, x_zero_point).unwrap() + panic(array![]) + } +} diff --git a/src/performance/implementations/impl_performance_i32.cairo b/src/performance/implementations/impl_performance_i32_i8.cairo similarity index 56% rename from src/performance/implementations/impl_performance_i32.cairo rename to src/performance/implementations/impl_performance_i32_i8.cairo index a04f56a07..bc73d25e4 100644 --- a/src/performance/implementations/impl_performance_i32.cairo +++ b/src/performance/implementations/impl_performance_i32_i8.cairo @@ -1,22 +1,22 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::FixedType; use orion::operators::tensor::core::Tensor; use orion::performance::core::PerfomanceTrait; -use orion::performance::functional::quantize_linear::quantize_linear_i32::quantize_linear; -use orion::performance::functional::dequantize_linear::dequantize_linear_i32::dequantize_linear; - +// use orion::performance::functional::quantize_linear::quantize_linear_i32::quantize_linear; +// use orion::performance::functional::dequantize_linear::dequantize_linear_i32::dequantize_linear; impl Performance_i32_i8 of PerfomanceTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor { - quantize_linear(self, y_scale, y_zero_point) + //quantize_linear(self, y_scale, y_zero_point) + panic(array![]) } fn dequantize_linear( self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor ) -> Tensor { - dequantize_linear(self, x_scale, x_zero_point) + //dequantize_linear(self, x_scale, x_zero_point) + panic(array![]) } } From 11aa6e88050aa38572b94dd8747018e55f007b76 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 18:07:22 +0300 Subject: [PATCH 058/179] add generic quantize --- src/performance/functional.cairo | 2 +- .../functional/quantize_linear.cairo | 109 +++++++++++++++++- src/performance/implementations.cairo | 4 +- .../impl_performance_i32_i8.cairo | 12 +- 4 files changed, 118 insertions(+), 9 deletions(-) diff --git a/src/performance/functional.cairo b/src/performance/functional.cairo index 5e5aea7e9..cbe446621 100644 --- a/src/performance/functional.cairo +++ b/src/performance/functional.cairo @@ -1,2 +1,2 @@ -// mod quantize_linear; +mod quantize_linear; // mod dequantize_linear; diff --git a/src/performance/functional/quantize_linear.cairo b/src/performance/functional/quantize_linear.cairo index 6bb995ec9..5082be697 100644 --- a/src/performance/functional/quantize_linear.cairo +++ b/src/performance/functional/quantize_linear.cairo @@ -1,2 +1,107 @@ -mod quantize_linear_i32; -mod quantize_linear_fp; +use core::debug::PrintTrait; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::TryInto; + +use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::math::arithmetic::saturated_add; +use orion::operators::tensor::helpers::check_compatibility; +use orion::utils::saturate; + +/// Cf: PerfomanceTrait::quantize_linear docstring +fn quantize_linear< + T, + Q, + F, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TTensorAdd: Add>, + impl TTensorDiv: Div>, + impl TAdd: Add, + impl TDiv: Div, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop +>( + x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T +) -> Tensor:: { + if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { + quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0], min, max) + } else { + check_compatibility(*x.shape, *y_scale.shape); + check_compatibility(*x.shape, *y_zero_point.shape); + check_compatibility(*y_scale.shape, *y_zero_point.shape); + quantize_per_axis(x, y_scale, y_zero_point, min, max) + } +} + +fn quantize_per_axis< + T, + Q, + F, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TTensorAdd: Add>, + impl TTensorDiv: Div>, + impl TAdd: Add, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop +>( + x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T +) -> Tensor:: { + saturated_add(@(*x / *y_scale), y_zero_point, min, max) +} + +fn quantize_element_wise< + T, + Q, + F, + impl QTensor: TensorTrait, + impl TAdd: Add, + impl TDiv: Div, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop +>( + mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T +) -> Tensor:: { + let mut result_data = ArrayTrait::::new(); + + loop { + match x.data.pop_front() { + Option::Some(item) => { + let quantized = quantize(*item, y_scale, y_zero_point, min, max); + result_data.append(quantized); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(x.shape, result_data.span(), x.extra); +} + +fn quantize< + T, + Q, + impl TAdd: Add, + impl TDiv: Div, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop +>( + x: T, y_scale: T, y_zero_point: T, min: T, max: T +) -> Q { + saturate(min, max, ((x / y_scale) + y_zero_point)).try_into().unwrap() +} diff --git a/src/performance/implementations.cairo b/src/performance/implementations.cairo index 70eb62aa8..0f0a1d230 100644 --- a/src/performance/implementations.cairo +++ b/src/performance/implementations.cairo @@ -1,2 +1,2 @@ -mod impl_performance_i32_i8; -mod impl_performance_fp8x23_i8; +// mod impl_performance_i32_i8; +// mod impl_performance_fp8x23_i8; diff --git a/src/performance/implementations/impl_performance_i32_i8.cairo b/src/performance/implementations/impl_performance_i32_i8.cairo index bc73d25e4..70a759f16 100644 --- a/src/performance/implementations/impl_performance_i32_i8.cairo +++ b/src/performance/implementations/impl_performance_i32_i8.cairo @@ -1,16 +1,20 @@ use orion::numbers::signed_integer::{i32::i32, i8::i8}; use orion::operators::tensor::core::Tensor; +use orion::operators::tensor::implementations::tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_i32_fp8x23; + use orion::performance::core::PerfomanceTrait; -// use orion::performance::functional::quantize_linear::quantize_linear_i32::quantize_linear; -// use orion::performance::functional::dequantize_linear::dequantize_linear_i32::dequantize_linear; +use orion::performance::functional; + impl Performance_i32_i8 of PerfomanceTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor { - //quantize_linear(self, y_scale, y_zero_point) - panic(array![]) + functional::quantize_linear::quantize_linear( + self, y_scale, y_zero_point, i32 { mag: 128, sign: true }, i32 { mag: 127, sign: false } + ) } fn dequantize_linear( From c66af80268925516a6c00e4c345cb9ac804e1666 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 18:16:10 +0300 Subject: [PATCH 059/179] add fp16x16 implementations --- src/lib.cairo | 2 +- src/operators/nn/implementations.cairo | 6 + .../nn/implementations/nn_fp16x16.cairo | 45 +++ .../nn/implementations/nn_i32_fp16x16.cairo | 43 +++ .../nn/implementations/nn_i8_fp16x16.cairo | 43 +++ .../nn/implementations/nn_u32_fp16x16.cairo | 42 +++ src/operators/tensor/implementations.cairo | 5 + .../implementations/tensor_fp16x16.cairo | 257 +++++++++++++++ .../implementations/tensor_i32_fp16x16.cairo | 260 +++++++++++++++ .../implementations/tensor_i8_fp16x16.cairo | 300 ++++++++++++++++++ .../implementations/tensor_i8_fp8x23.cairo | 2 +- .../implementations/tensor_u32_fp16x16.cairo | 283 +++++++++++++++++ src/tests.cairo | 8 +- .../helpers/tensor/fixed_point/fp16x16.cairo | 6 +- .../helpers/tensor/fixed_point/fp8x23.cairo | 228 ++++++------- 15 files changed, 1407 insertions(+), 123 deletions(-) create mode 100644 src/operators/nn/implementations/nn_fp16x16.cairo create mode 100644 src/operators/nn/implementations/nn_i32_fp16x16.cairo create mode 100644 src/operators/nn/implementations/nn_i8_fp16x16.cairo create mode 100644 src/operators/nn/implementations/nn_u32_fp16x16.cairo create mode 100644 src/operators/tensor/implementations/tensor_fp16x16.cairo create mode 100644 src/operators/tensor/implementations/tensor_i32_fp16x16.cairo create mode 100644 src/operators/tensor/implementations/tensor_i8_fp16x16.cairo create mode 100644 src/operators/tensor/implementations/tensor_u32_fp16x16.cairo diff --git a/src/lib.cairo b/src/lib.cairo index b928b20dd..4b62df94d 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,6 +1,6 @@ mod performance; mod operators; mod numbers; -// mod tests; +mod tests; mod utils; diff --git a/src/operators/nn/implementations.cairo b/src/operators/nn/implementations.cairo index f1aee9233..50a1cde62 100644 --- a/src/operators/nn/implementations.cairo +++ b/src/operators/nn/implementations.cairo @@ -2,3 +2,9 @@ mod nn_i8_fp8x23; mod nn_i32_fp8x23; mod nn_u32_fp8x23; mod nn_fp8x23; + +mod nn_i8_fp16x16; +mod nn_i32_fp16x16; +mod nn_u32_fp16x16; +mod nn_fp16x16; + diff --git a/src/operators/nn/implementations/nn_fp16x16.cairo b/src/operators/nn/implementations/nn_fp16x16.cairo new file mode 100644 index 000000000..271b1d321 --- /dev/null +++ b/src/operators/nn/implementations/nn_fp16x16.cairo @@ -0,0 +1,45 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorDiv, FP16x16TensorAdd +}; + +impl NN_fp16x16 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid_from_fp(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign_from_fp(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus_from_fp(*tensor) + } + + fn linear( + inputs: Tensor, weights: Tensor, bias: Tensor + ) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { + functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) + } +} diff --git a/src/operators/nn/implementations/nn_i32_fp16x16.cairo b/src/operators/nn/implementations/nn_i32_fp16x16.cairo new file mode 100644 index 000000000..270587c14 --- /dev/null +++ b/src/operators/nn/implementations/nn_i32_fp16x16.cairo @@ -0,0 +1,43 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i32::i32; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; + +impl NN_i32_fp16x16 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid_from_int(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign_from_int(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus_from_int(*tensor) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) + } +} diff --git a/src/operators/nn/implementations/nn_i8_fp16x16.cairo b/src/operators/nn/implementations/nn_i8_fp16x16.cairo new file mode 100644 index 000000000..e0e29d515 --- /dev/null +++ b/src/operators/nn/implementations/nn_i8_fp16x16.cairo @@ -0,0 +1,43 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i8::i8; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; + +impl NN_i8_fp16x16 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid_from_int(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign_from_int(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus_from_int(*tensor) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) + } +} diff --git a/src/operators/nn/implementations/nn_u32_fp16x16.cairo b/src/operators/nn/implementations/nn_u32_fp16x16.cairo new file mode 100644 index 000000000..02088a5d8 --- /dev/null +++ b/src/operators/nn/implementations/nn_u32_fp16x16.cairo @@ -0,0 +1,42 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; + +impl NN_u32_fp16x16 of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid_from_int(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign_from_int(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus_from_int(*tensor) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { + functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) + } +} diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index 3b8c16b1f..ea84e8aba 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -2,3 +2,8 @@ mod tensor_fp8x23; mod tensor_i32_fp8x23; mod tensor_u32_fp8x23; mod tensor_i8_fp8x23; + +mod tensor_fp16x16; +mod tensor_i32_fp16x16; +mod tensor_u32_fp16x16; +mod tensor_i8_fp16x16; diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo new file mode 100644 index 000000000..88617a16f --- /dev/null +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -0,0 +1,257 @@ +//! This module defines and implement a Tensor for FP16x16 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::{TryInto, Into}; + +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + +impl Tensor_fp16x16 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> FP16x16 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> FP16x16 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> FP16x16 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_fp::(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log_from_fp::(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + math::ceil::ceil(*self) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin_from_fp(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos_from_fp(*self) + } + + fn asin(self: @Tensor) -> Tensor { + math::asin::asin(*self) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sin::sin_from_fp(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh_from_fp(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh_from_fp(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh_from_fp(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh_from_fp(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan_from_fp(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + fn acos(self: @Tensor) -> Tensor { + math::acos::acos(*self) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt_from_fp(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl FP16x16TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl FP16x16TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl FP16x16TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl FP16x16TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl FP16x16TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo new file mode 100644 index 000000000..e85aafe66 --- /dev/null +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -0,0 +1,260 @@ +//! This module defines and implement a Tensor for i32 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::{Into, TryInto}; + +use orion::numbers::signed_integer::i32::i32; +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + +impl Tensor_i32_fp16x16 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> i32 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> i32 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> i32 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log_from_int::(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with i32']) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos_from_int(*self) + } + + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported with i32']) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh_from_int(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh_from_int(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh_from_int(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh_from_int(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan_from_int(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with i32']) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt_from_int(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl i32TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl i32TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl i32TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl i32TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl i32TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo new file mode 100644 index 000000000..2a81c6272 --- /dev/null +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -0,0 +1,300 @@ +//! This module defines and implement a Tensor for i8 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::{Into, TryInto}; + +use orion::numbers::signed_integer::{i8::i8, i32::i32}; +use orion::numbers::signed_integer::i8::{i8_to_fp16x16}; +use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + +impl Tensor_i8_fp16x16 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> i8 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> i8 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> i8 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log_from_int::(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with i8']) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos_from_int(*self) + } + + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported with i8']) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh_from_int(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh_from_int(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh_from_int(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh_from_int(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan_from_int(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with i8']) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt_from_int(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl i8TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl i8TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl i8TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl i8TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + +// Implements the Into trait for i8 tensor to i32 tensor. +impl TensorI8IntoTensorI32 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_i32(@self) + } +} + +// Implements the Into trait for i8 tensor to fp tensor. +impl TensorI8IntoTensorFP16x16 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_fp16x16(@self) + } +} + +fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span(), *x.extra); +} + + +fn tensor_i8_to_fp16x16(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append(i8_to_fp16x16(*data.pop_front().unwrap())); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span(), *x.extra); +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl i8TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 72725f597..67909dd83 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -6,7 +6,7 @@ use option::OptionTrait; use traits::{Into, TryInto}; use orion::numbers::signed_integer::{i8::i8, i32::i32}; -use orion::numbers::signed_integer::i8::{i8_to_fp8x23, i8_to_fp16x16}; +use orion::numbers::signed_integer::i8::{i8_to_fp8x23}; use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo new file mode 100644 index 000000000..3e7b9d73c --- /dev/null +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -0,0 +1,283 @@ +//! This module defines and implement a Tensor for u32 values. + +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::Into; + +use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + at_tensor, tensor_eq +}; +use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + +impl Tensor_u32_fp16x16 of TensorTrait { + fn new(shape: Span, data: Span, extra: Option) -> Tensor { + new_tensor(shape, data, extra) + } + + fn at(self: @Tensor, indices: Span) -> u32 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> u32 { + math::min::min_in_tensor(*self.data) + } + + fn max(self: @Tensor) -> u32 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax::(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin::(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp_from_int::(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log_from_int::(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos_from_int(*self) + } + + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sin::sin_from_int(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh_from_int(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh_from_int(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh_from_int(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh_from_int(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan_from_int(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported with u32']) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt_from_int(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl u32TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl u32TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl u32TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl u32TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + + +// Implements the Into trait for u32 tensor to fp tensor. +impl Tensoru32IntoTensorFP16x16 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_u32_to_fp16x16(@self) + } +} + + +fn tensor_u32_to_fp16x16(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::::new(*x.shape, result_data.span(), *x.extra); +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl u32TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + +impl U32TryIntoU32 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self) + } +} diff --git a/src/tests.cairo b/src/tests.cairo index 8463adb0a..fcaff79b0 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ mod numbers; -mod performance; -mod tensor_core; -mod nodes; -mod helpers; +// mod performance; +// mod tensor_core; +// mod nodes; +// mod helpers; diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index b6cd6a1d6..cdc10cbd8 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; // 1D diff --git a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo index 5f5c3fddd..58415ba7f 100644 --- a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo @@ -1,12 +1,12 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; // 1D -fn fp_tensor_1x3_helper() -> Tensor { +fn fp_tensor_1x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); @@ -16,12 +16,12 @@ fn fp_tensor_1x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(2, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_1x3_neg_helper() -> Tensor { +fn fp_tensor_1x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); @@ -31,14 +31,14 @@ fn fp_tensor_1x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(2, true)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } // 2D -fn fp_tensor_2x2_helper() -> Tensor { +fn fp_tensor_2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -50,12 +50,12 @@ fn fp_tensor_2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(3, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_2x2_neg_helper() -> Tensor { +fn fp_tensor_2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -67,12 +67,12 @@ fn fp_tensor_2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(3, true)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x3_helper() -> Tensor { +fn fp_tensor_3x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(3); @@ -90,12 +90,12 @@ fn fp_tensor_3x3_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x3_neg_helper() -> Tensor { +fn fp_tensor_3x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(3); @@ -113,12 +113,12 @@ fn fp_tensor_3x3_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x2_helper() -> Tensor { +fn fp_tensor_3x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -133,12 +133,12 @@ fn fp_tensor_3x2_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x2_neg_helper() -> Tensor { +fn fp_tensor_3x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -153,12 +153,12 @@ fn fp_tensor_3x2_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x1_helper() -> Tensor { +fn fp_tensor_3x1_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(1); @@ -170,12 +170,12 @@ fn fp_tensor_3x1_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x1_neg_helper() -> Tensor { +fn fp_tensor_3x1_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(1); @@ -187,12 +187,12 @@ fn fp_tensor_3x1_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_2x3_helper() -> Tensor { +fn fp_tensor_2x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(3); @@ -207,12 +207,12 @@ fn fp_tensor_2x3_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_2x3_neg_helper() -> Tensor { +fn fp_tensor_2x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(3); @@ -227,14 +227,14 @@ fn fp_tensor_2x3_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } // 3D -fn fp_tensor_2x2x2_helper() -> Tensor { +fn fp_tensor_2x2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -252,12 +252,12 @@ fn fp_tensor_2x2x2_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_2x2x2_neg_helper() -> Tensor { +fn fp_tensor_2x2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -275,12 +275,12 @@ fn fp_tensor_2x2x2_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x2x2_helper() -> Tensor { +fn fp_tensor_3x2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -302,12 +302,12 @@ fn fp_tensor_3x2x2_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x2x2_neg_helper() -> Tensor { +fn fp_tensor_3x2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -329,93 +329,93 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } -fn fp_tensor_3x3x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, false)); - data.append(FixedTrait::new_unscaled(2, false)); - data.append(FixedTrait::new_unscaled(3, false)); - data.append(FixedTrait::new_unscaled(4, false)); - data.append(FixedTrait::new_unscaled(5, false)); - data.append(FixedTrait::new_unscaled(6, false)); - data.append(FixedTrait::new_unscaled(7, false)); - data.append(FixedTrait::new_unscaled(8, false)); - data.append(FixedTrait::new_unscaled(9, false)); - data.append(FixedTrait::new_unscaled(10, false)); - data.append(FixedTrait::new_unscaled(11, false)); - data.append(FixedTrait::new_unscaled(12, false)); - data.append(FixedTrait::new_unscaled(13, false)); - data.append(FixedTrait::new_unscaled(14, false)); - data.append(FixedTrait::new_unscaled(15, false)); - data.append(FixedTrait::new_unscaled(16, false)); - data.append(FixedTrait::new_unscaled(17, false)); - data.append(FixedTrait::new_unscaled(18, false)); - data.append(FixedTrait::new_unscaled(19, false)); - data.append(FixedTrait::new_unscaled(20, false)); - data.append(FixedTrait::new_unscaled(21, false)); - data.append(FixedTrait::new_unscaled(22, false)); - data.append(FixedTrait::new_unscaled(23, false)); - data.append(FixedTrait::new_unscaled(24, false)); - data.append(FixedTrait::new_unscaled(25, false)); - data.append(FixedTrait::new_unscaled(26, false)); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +fn fp_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + data.append(FixedTrait::new_unscaled(6, false)); + data.append(FixedTrait::new_unscaled(7, false)); + data.append(FixedTrait::new_unscaled(8, false)); + data.append(FixedTrait::new_unscaled(9, false)); + data.append(FixedTrait::new_unscaled(10, false)); + data.append(FixedTrait::new_unscaled(11, false)); + data.append(FixedTrait::new_unscaled(12, false)); + data.append(FixedTrait::new_unscaled(13, false)); + data.append(FixedTrait::new_unscaled(14, false)); + data.append(FixedTrait::new_unscaled(15, false)); + data.append(FixedTrait::new_unscaled(16, false)); + data.append(FixedTrait::new_unscaled(17, false)); + data.append(FixedTrait::new_unscaled(18, false)); + data.append(FixedTrait::new_unscaled(19, false)); + data.append(FixedTrait::new_unscaled(20, false)); + data.append(FixedTrait::new_unscaled(21, false)); + data.append(FixedTrait::new_unscaled(22, false)); + data.append(FixedTrait::new_unscaled(23, false)); + data.append(FixedTrait::new_unscaled(24, false)); + data.append(FixedTrait::new_unscaled(25, false)); + data.append(FixedTrait::new_unscaled(26, false)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } - - fn fp_tensor_3x3x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, true)); - data.append(FixedTrait::new_unscaled(2, true)); - data.append(FixedTrait::new_unscaled(3, true)); - data.append(FixedTrait::new_unscaled(4, true)); - data.append(FixedTrait::new_unscaled(5, true)); - data.append(FixedTrait::new_unscaled(6, true)); - data.append(FixedTrait::new_unscaled(7, true)); - data.append(FixedTrait::new_unscaled(8, true)); - data.append(FixedTrait::new_unscaled(9, true)); - data.append(FixedTrait::new_unscaled(10, true)); - data.append(FixedTrait::new_unscaled(11, true)); - data.append(FixedTrait::new_unscaled(12, true)); - data.append(FixedTrait::new_unscaled(13, true)); - data.append(FixedTrait::new_unscaled(14, true)); - data.append(FixedTrait::new_unscaled(15, true)); - data.append(FixedTrait::new_unscaled(16, true)); - data.append(FixedTrait::new_unscaled(17, true)); - data.append(FixedTrait::new_unscaled(18, true)); - data.append(FixedTrait::new_unscaled(19, true)); - data.append(FixedTrait::new_unscaled(20, true)); - data.append(FixedTrait::new_unscaled(21, true)); - data.append(FixedTrait::new_unscaled(22, true)); - data.append(FixedTrait::new_unscaled(23, true)); - data.append(FixedTrait::new_unscaled(24, true)); - data.append(FixedTrait::new_unscaled(25, true)); - data.append(FixedTrait::new_unscaled(26, true)); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +} + +fn fp_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, true)); + data.append(FixedTrait::new_unscaled(2, true)); + data.append(FixedTrait::new_unscaled(3, true)); + data.append(FixedTrait::new_unscaled(4, true)); + data.append(FixedTrait::new_unscaled(5, true)); + data.append(FixedTrait::new_unscaled(6, true)); + data.append(FixedTrait::new_unscaled(7, true)); + data.append(FixedTrait::new_unscaled(8, true)); + data.append(FixedTrait::new_unscaled(9, true)); + data.append(FixedTrait::new_unscaled(10, true)); + data.append(FixedTrait::new_unscaled(11, true)); + data.append(FixedTrait::new_unscaled(12, true)); + data.append(FixedTrait::new_unscaled(13, true)); + data.append(FixedTrait::new_unscaled(14, true)); + data.append(FixedTrait::new_unscaled(15, true)); + data.append(FixedTrait::new_unscaled(16, true)); + data.append(FixedTrait::new_unscaled(17, true)); + data.append(FixedTrait::new_unscaled(18, true)); + data.append(FixedTrait::new_unscaled(19, true)); + data.append(FixedTrait::new_unscaled(20, true)); + data.append(FixedTrait::new_unscaled(21, true)); + data.append(FixedTrait::new_unscaled(22, true)); + data.append(FixedTrait::new_unscaled(23, true)); + data.append(FixedTrait::new_unscaled(24, true)); + data.append(FixedTrait::new_unscaled(25, true)); + data.append(FixedTrait::new_unscaled(26, true)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } +} From 223d38878ff73f867ab46df58c0be286d306cbf8 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Wed, 30 Aug 2023 18:36:04 +0300 Subject: [PATCH 060/179] udpated test "at" --- src/tests.cairo | 4 +- .../helpers/tensor/fixed_point/fp16x16.cairo | 222 +++++++++--------- src/tests/helpers/tensor/i32.cairo | 158 ++++++------- src/tests/helpers/tensor/i8.cairo | 191 +++++++-------- src/tests/helpers/tensor/u32.cairo | 78 +++--- src/tests/tensor_core.cairo | 10 +- .../at/at_fp_test/at_fp16x16_test.cairo | 6 +- .../at/at_fp_test/at_fp8x23_test.cairo | 6 +- src/tests/tensor_core/at/at_i32_test.cairo | 6 +- src/tests/tensor_core/at/at_u32_test.cairo | 6 +- 10 files changed, 344 insertions(+), 343 deletions(-) diff --git a/src/tests.cairo b/src/tests.cairo index fcaff79b0..1c0b5659d 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ mod numbers; // mod performance; -// mod tensor_core; +mod tensor_core; // mod nodes; -// mod helpers; +mod helpers; diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index cdc10cbd8..800b70cf3 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -6,7 +6,7 @@ use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; // 1D -fn fp_tensor_1x3_helper() -> Tensor { +fn fp_tensor_1x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); @@ -16,12 +16,12 @@ fn fp_tensor_1x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(2, false)); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_1x3_neg_helper() -> Tensor { +fn fp_tensor_1x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); @@ -31,14 +31,14 @@ fn fp_tensor_1x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(2, true)); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } // 2D -fn fp_tensor_2x2_helper() -> Tensor { +fn fp_tensor_2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -50,12 +50,12 @@ fn fp_tensor_2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(3, false)); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_2x2_neg_helper() -> Tensor { +fn fp_tensor_2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -67,12 +67,12 @@ fn fp_tensor_2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(3, true)); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x3_helper() -> Tensor { +fn fp_tensor_3x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(3); @@ -90,12 +90,12 @@ fn fp_tensor_3x3_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x3_neg_helper() -> Tensor { +fn fp_tensor_3x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(3); @@ -113,12 +113,12 @@ fn fp_tensor_3x3_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x2_helper() -> Tensor { +fn fp_tensor_3x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -133,12 +133,12 @@ fn fp_tensor_3x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x2_neg_helper() -> Tensor { +fn fp_tensor_3x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -153,12 +153,12 @@ fn fp_tensor_3x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x1_helper() -> Tensor { +fn fp_tensor_3x1_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(1); @@ -170,12 +170,12 @@ fn fp_tensor_3x1_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x1_neg_helper() -> Tensor { +fn fp_tensor_3x1_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(1); @@ -187,12 +187,12 @@ fn fp_tensor_3x1_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_2x3_helper() -> Tensor { +fn fp_tensor_2x3_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(3); @@ -207,12 +207,12 @@ fn fp_tensor_2x3_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_2x3_neg_helper() -> Tensor { +fn fp_tensor_2x3_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(3); @@ -227,14 +227,14 @@ fn fp_tensor_2x3_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } // 3D -fn fp_tensor_2x2x2_helper() -> Tensor { +fn fp_tensor_2x2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -252,12 +252,12 @@ fn fp_tensor_2x2x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_2x2x2_neg_helper() -> Tensor { +fn fp_tensor_2x2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -275,12 +275,12 @@ fn fp_tensor_2x2x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x2x2_helper() -> Tensor { +fn fp_tensor_3x2x2_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -302,12 +302,12 @@ fn fp_tensor_3x2x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x2x2_neg_helper() -> Tensor { +fn fp_tensor_3x2x2_neg_helper() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -329,91 +329,91 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } -fn fp_tensor_3x3x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, false)); - data.append(FixedTrait::new_unscaled(2, false)); - data.append(FixedTrait::new_unscaled(3, false)); - data.append(FixedTrait::new_unscaled(4, false)); - data.append(FixedTrait::new_unscaled(5, false)); - data.append(FixedTrait::new_unscaled(6, false)); - data.append(FixedTrait::new_unscaled(7, false)); - data.append(FixedTrait::new_unscaled(8, false)); - data.append(FixedTrait::new_unscaled(9, false)); - data.append(FixedTrait::new_unscaled(10, false)); - data.append(FixedTrait::new_unscaled(11, false)); - data.append(FixedTrait::new_unscaled(12, false)); - data.append(FixedTrait::new_unscaled(13, false)); - data.append(FixedTrait::new_unscaled(14, false)); - data.append(FixedTrait::new_unscaled(15, false)); - data.append(FixedTrait::new_unscaled(16, false)); - data.append(FixedTrait::new_unscaled(17, false)); - data.append(FixedTrait::new_unscaled(18, false)); - data.append(FixedTrait::new_unscaled(19, false)); - data.append(FixedTrait::new_unscaled(20, false)); - data.append(FixedTrait::new_unscaled(21, false)); - data.append(FixedTrait::new_unscaled(22, false)); - data.append(FixedTrait::new_unscaled(23, false)); - data.append(FixedTrait::new_unscaled(24, false)); - data.append(FixedTrait::new_unscaled(25, false)); - data.append(FixedTrait::new_unscaled(26, false)); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +fn fp_tensor_3x3x3_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, false)); + data.append(FixedTrait::new_unscaled(2, false)); + data.append(FixedTrait::new_unscaled(3, false)); + data.append(FixedTrait::new_unscaled(4, false)); + data.append(FixedTrait::new_unscaled(5, false)); + data.append(FixedTrait::new_unscaled(6, false)); + data.append(FixedTrait::new_unscaled(7, false)); + data.append(FixedTrait::new_unscaled(8, false)); + data.append(FixedTrait::new_unscaled(9, false)); + data.append(FixedTrait::new_unscaled(10, false)); + data.append(FixedTrait::new_unscaled(11, false)); + data.append(FixedTrait::new_unscaled(12, false)); + data.append(FixedTrait::new_unscaled(13, false)); + data.append(FixedTrait::new_unscaled(14, false)); + data.append(FixedTrait::new_unscaled(15, false)); + data.append(FixedTrait::new_unscaled(16, false)); + data.append(FixedTrait::new_unscaled(17, false)); + data.append(FixedTrait::new_unscaled(18, false)); + data.append(FixedTrait::new_unscaled(19, false)); + data.append(FixedTrait::new_unscaled(20, false)); + data.append(FixedTrait::new_unscaled(21, false)); + data.append(FixedTrait::new_unscaled(22, false)); + data.append(FixedTrait::new_unscaled(23, false)); + data.append(FixedTrait::new_unscaled(24, false)); + data.append(FixedTrait::new_unscaled(25, false)); + data.append(FixedTrait::new_unscaled(26, false)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } - - fn fp_tensor_3x3x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::new_unscaled(0, false)); - data.append(FixedTrait::new_unscaled(1, true)); - data.append(FixedTrait::new_unscaled(2, true)); - data.append(FixedTrait::new_unscaled(3, true)); - data.append(FixedTrait::new_unscaled(4, true)); - data.append(FixedTrait::new_unscaled(5, true)); - data.append(FixedTrait::new_unscaled(6, true)); - data.append(FixedTrait::new_unscaled(7, true)); - data.append(FixedTrait::new_unscaled(8, true)); - data.append(FixedTrait::new_unscaled(9, true)); - data.append(FixedTrait::new_unscaled(10, true)); - data.append(FixedTrait::new_unscaled(11, true)); - data.append(FixedTrait::new_unscaled(12, true)); - data.append(FixedTrait::new_unscaled(13, true)); - data.append(FixedTrait::new_unscaled(14, true)); - data.append(FixedTrait::new_unscaled(15, true)); - data.append(FixedTrait::new_unscaled(16, true)); - data.append(FixedTrait::new_unscaled(17, true)); - data.append(FixedTrait::new_unscaled(18, true)); - data.append(FixedTrait::new_unscaled(19, true)); - data.append(FixedTrait::new_unscaled(20, true)); - data.append(FixedTrait::new_unscaled(21, true)); - data.append(FixedTrait::new_unscaled(22, true)); - data.append(FixedTrait::new_unscaled(23, true)); - data.append(FixedTrait::new_unscaled(24, true)); - data.append(FixedTrait::new_unscaled(25, true)); - data.append(FixedTrait::new_unscaled(26, true)); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +} + +fn fp_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::new_unscaled(0, false)); + data.append(FixedTrait::new_unscaled(1, true)); + data.append(FixedTrait::new_unscaled(2, true)); + data.append(FixedTrait::new_unscaled(3, true)); + data.append(FixedTrait::new_unscaled(4, true)); + data.append(FixedTrait::new_unscaled(5, true)); + data.append(FixedTrait::new_unscaled(6, true)); + data.append(FixedTrait::new_unscaled(7, true)); + data.append(FixedTrait::new_unscaled(8, true)); + data.append(FixedTrait::new_unscaled(9, true)); + data.append(FixedTrait::new_unscaled(10, true)); + data.append(FixedTrait::new_unscaled(11, true)); + data.append(FixedTrait::new_unscaled(12, true)); + data.append(FixedTrait::new_unscaled(13, true)); + data.append(FixedTrait::new_unscaled(14, true)); + data.append(FixedTrait::new_unscaled(15, true)); + data.append(FixedTrait::new_unscaled(16, true)); + data.append(FixedTrait::new_unscaled(17, true)); + data.append(FixedTrait::new_unscaled(18, true)); + data.append(FixedTrait::new_unscaled(19, true)); + data.append(FixedTrait::new_unscaled(20, true)); + data.append(FixedTrait::new_unscaled(21, true)); + data.append(FixedTrait::new_unscaled(22, true)); + data.append(FixedTrait::new_unscaled(23, true)); + data.append(FixedTrait::new_unscaled(24, true)); + data.append(FixedTrait::new_unscaled(25, true)); + data.append(FixedTrait::new_unscaled(26, true)); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } \ No newline at end of file +} diff --git a/src/tests/helpers/tensor/i32.cairo b/src/tests/helpers/tensor/i32.cairo index e08141319..4506e66ee 100644 --- a/src/tests/helpers/tensor/i32.cairo +++ b/src/tests/helpers/tensor/i32.cairo @@ -3,7 +3,7 @@ use array::SpanTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; // 1D @@ -336,85 +336,85 @@ fn i32_tensor_3x2x2_neg_helper() -> Tensor { } fn i32_tensor_3x3x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 {mag: 0, sign:false}); - data.append(i32 {mag: 1, sign:false}); - data.append(i32 {mag: 2, sign:false}); - data.append(i32 {mag: 3, sign:false}); - data.append(i32 {mag: 4, sign:false}); - data.append(i32 {mag: 5, sign:false}); - data.append(i32 {mag: 6, sign:false}); - data.append(i32 {mag: 7, sign:false}); - data.append(i32 {mag: 8, sign:false}); - data.append(i32 {mag: 9, sign:false}); - data.append(i32 {mag: 10, sign: false}); - data.append(i32 {mag: 11, sign: false}); - data.append(i32 {mag: 12, sign: false}); - data.append(i32 {mag: 13, sign: false}); - data.append(i32 {mag: 14, sign: false}); - data.append(i32 {mag: 15, sign: false}); - data.append(i32 {mag: 16, sign: false}); - data.append(i32 {mag: 17, sign: false}); - data.append(i32 {mag: 18, sign: false}); - data.append(i32 {mag: 19, sign: false}); - data.append(i32 {mag: 20, sign: false}); - data.append(i32 {mag: 21, sign: false}); - data.append(i32 {mag: 22, sign: false}); - data.append(i32 {mag: 23, sign: false}); - data.append(i32 {mag: 24, sign: false}); - data.append(i32 {mag: 25, sign: false}); - data.append(i32 {mag: 26, sign: false}); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } - - fn i32_tensor_3x3x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 {mag: 0, sign: false}); - data.append(i32 {mag: 1, sign: true}); - data.append(i32 {mag: 2, sign: true}); - data.append(i32 {mag: 3, sign: true}); - data.append(i32 {mag: 4, sign: true}); - data.append(i32 {mag: 5, sign: true}); - data.append(i32 {mag: 6, sign: true}); - data.append(i32 {mag: 7, sign: true}); - data.append(i32 {mag: 8, sign: true}); - data.append(i32 {mag: 9, sign: true}); - data.append(i32 {mag: 10, sign: true}); - data.append(i32 {mag: 11, sign: true}); - data.append(i32 {mag: 12, sign: true}); - data.append(i32 {mag: 13, sign: true}); - data.append(i32 {mag: 14, sign: true}); - data.append(i32 {mag: 15, sign: true}); - data.append(i32 {mag: 16, sign: true}); - data.append(i32 {mag: 17, sign: true}); - data.append(i32 {mag: 18, sign: true}); - data.append(i32 {mag: 19, sign: true}); - data.append(i32 {mag: 20, sign: true}); - data.append(i32 {mag: 21, sign: true}); - data.append(i32 {mag: 22, sign: true}); - data.append(i32 {mag: 23, sign: true}); - data.append(i32 {mag: 24, sign: true}); - data.append(i32 {mag: 25, sign: true}); - data.append(i32 {mag: 26, sign: true}); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +} + +fn i32_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 8, sign: true }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 22, sign: true }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 26, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } +} diff --git a/src/tests/helpers/tensor/i8.cairo b/src/tests/helpers/tensor/i8.cairo index f62419523..c06f37732 100644 --- a/src/tests/helpers/tensor/i8.cairo +++ b/src/tests/helpers/tensor/i8.cairo @@ -3,7 +3,8 @@ use array::SpanTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -16,7 +17,7 @@ fn i8_tensor_1x3_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -28,7 +29,7 @@ fn i8_tensor_1x3_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -46,7 +47,7 @@ fn i8_tensor_2x2_helper() -> Tensor { data.append(i8 { mag: 3, sign: false }); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -63,7 +64,7 @@ fn i8_tensor_2x2_neg_helper() -> Tensor { data.append(i8 { mag: 3, sign: true }); let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -86,7 +87,7 @@ fn i8_tensor_3x3_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -109,7 +110,7 @@ fn i8_tensor_3x3_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -129,7 +130,7 @@ fn i8_tensor_3x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -149,7 +150,7 @@ fn i8_tensor_3x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -166,7 +167,7 @@ fn i8_tensor_3x1_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -183,7 +184,7 @@ fn i8_tensor_3x1_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -203,7 +204,7 @@ fn i8_tensor_2x3_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -223,7 +224,7 @@ fn i8_tensor_2x3_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -248,7 +249,7 @@ fn i8_tensor_2x2x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -271,7 +272,7 @@ fn i8_tensor_2x2x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -298,7 +299,7 @@ fn i8_tensor_3x2x2_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } @@ -325,91 +326,91 @@ fn i8_tensor_3x2x2_neg_helper() -> Tensor { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; } fn i8_tensor_3x3x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 {mag: 0, sign:false}); - data.append(i8 {mag: 1, sign:false}); - data.append(i8 {mag: 2, sign:false}); - data.append(i8 {mag: 3, sign:false}); - data.append(i8 {mag: 4, sign:false}); - data.append(i8 {mag: 5, sign:false}); - data.append(i8 {mag: 6, sign:false}); - data.append(i8 {mag: 7, sign:false}); - data.append(i8 {mag: 8, sign:false}); - data.append(i8 {mag: 9, sign:false}); - data.append(i8 {mag: 10, sign: false}); - data.append(i8 {mag: 11, sign: false}); - data.append(i8 {mag: 12, sign: false}); - data.append(i8 {mag: 13, sign: false}); - data.append(i8 {mag: 14, sign: false}); - data.append(i8 {mag: 15, sign: false}); - data.append(i8 {mag: 16, sign: false}); - data.append(i8 {mag: 17, sign: false}); - data.append(i8 {mag: 18, sign: false}); - data.append(i8 {mag: 19, sign: false}); - data.append(i8 {mag: 20, sign: false}); - data.append(i8 {mag: 21, sign: false}); - data.append(i8 {mag: 22, sign: false}); - data.append(i8 {mag: 23, sign: false}); - data.append(i8 {mag: 24, sign: false}); - data.append(i8 {mag: 25, sign: false}); - data.append(i8 {mag: 26, sign: false}); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 13, sign: false }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 22, sign: false }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 26, sign: false }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; - } - - fn i8_tensor_3x3x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 {mag: 0, sign: false}); - data.append(i8 {mag: 1, sign: true}); - data.append(i8 {mag: 2, sign: true}); - data.append(i8 {mag: 3, sign: true}); - data.append(i8 {mag: 4, sign: true}); - data.append(i8 {mag: 5, sign: true}); - data.append(i8 {mag: 6, sign: true}); - data.append(i8 {mag: 7, sign: true}); - data.append(i8 {mag: 8, sign: true}); - data.append(i8 {mag: 9, sign: true}); - data.append(i8 {mag: 10, sign: true}); - data.append(i8 {mag: 11, sign: true}); - data.append(i8 {mag: 12, sign: true}); - data.append(i8 {mag: 13, sign: true}); - data.append(i8 {mag: 14, sign: true}); - data.append(i8 {mag: 15, sign: true}); - data.append(i8 {mag: 16, sign: true}); - data.append(i8 {mag: 17, sign: true}); - data.append(i8 {mag: 18, sign: true}); - data.append(i8 {mag: 19, sign: true}); - data.append(i8 {mag: 20, sign: true}); - data.append(i8 {mag: 21, sign: true}); - data.append(i8 {mag: 22, sign: true}); - data.append(i8 {mag: 23, sign: true}); - data.append(i8 {mag: 24, sign: true}); - data.append(i8 {mag: 25, sign: true}); - data.append(i8 {mag: 26, sign: true}); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); +} + +fn i8_tensor_3x3x3_neg_helper() -> Tensor { + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 13, sign: true }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 26, sign: true }); + + let extra = Option::::None(()); + + let tensor = TensorTrait::new(sizes.span(), data.span(), extra); return tensor; - } \ No newline at end of file +} diff --git a/src/tests/helpers/tensor/u32.cairo b/src/tests/helpers/tensor/u32.cairo index 207980a0a..50e9b093d 100644 --- a/src/tests/helpers/tensor/u32.cairo +++ b/src/tests/helpers/tensor/u32.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; // 1D @@ -171,44 +171,44 @@ fn u32_tensor_3x2x2_helper() -> Tensor { } fn u32_tensor_3x3x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(3); - sizes.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - let extra = Option::::None(()); - - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let mut sizes = ArrayTrait::new(); + sizes.append(3); + sizes.append(3); + sizes.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + + let extra = Option::::None(()); + + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; - } +} diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 0362c7aaa..5e0e8a19e 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,6 +1,6 @@ mod at; -mod flatten; -mod max; -mod min; -mod stride; -mod onehot; \ No newline at end of file +// mod flatten; +// mod max; +// mod min; +// mod stride; +// mod onehot; \ No newline at end of file diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo index 01e67d9d2..82813db49 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo index be3afd991..7aac4c105 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_i32_test.cairo b/src/tests/tensor_core/at/at_i32_test.cairo index 2dd2d51ee..050358154 100644 --- a/src/tests/tensor_core/at/at_i32_test.cairo +++ b/src/tests/tensor_core/at/at_i32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/at/at_u32_test.cairo b/src/tests/tensor_core/at/at_u32_test.cairo index 175fe1c63..97002062e 100644 --- a/src/tests/tensor_core/at/at_u32_test.cairo +++ b/src/tests/tensor_core/at/at_u32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From c2d6d1f37014401da4a02df1efee44684702b43a Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 08:14:33 +0300 Subject: [PATCH 061/179] fix flatten test --- src/tests/tensor_core.cairo | 2 +- .../flatten/flatten_fp_test/flatten_fp16x16_test.cairo | 6 +++--- .../flatten/flatten_fp_test/flatten_fp8x23_test.cairo | 6 +++--- src/tests/tensor_core/flatten/flatten_i32_test.cairo | 6 +++--- src/tests/tensor_core/flatten/flatten_u32_test.cairo | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 5e0e8a19e..7b9b09830 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,5 +1,5 @@ mod at; -// mod flatten; +mod flatten; // mod max; // mod min; // mod stride; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo index f6d73b288..a5530bd25 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo index b15bf7f87..531d524b5 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_i32_test.cairo b/src/tests/tensor_core/flatten/flatten_i32_test.cairo index 74dae1a40..3277e7060 100644 --- a/src/tests/tensor_core/flatten/flatten_i32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_u32_test.cairo b/src/tests/tensor_core/flatten/flatten_u32_test.cairo index 13de720ee..86a423830 100644 --- a/src/tests/tensor_core/flatten/flatten_u32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From da308980950ced6e076ea2fa28d1b48e32f68b64 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 08:20:34 +0300 Subject: [PATCH 062/179] fix max tests --- src/tests/tensor_core.cairo | 2 +- .../max/max_fp_test/max_fp16x16_test.cairo | 18 +++++++++--------- .../max/max_fp_test/max_fp8x23_test.cairo | 18 +++++++++--------- src/tests/tensor_core/max/max_i32_test.cairo | 6 +++--- src/tests/tensor_core/max/max_u32_test.cairo | 6 +++--- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 7b9b09830..3841936e5 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,6 +1,6 @@ mod at; mod flatten; -// mod max; +mod max; // mod min; // mod stride; // mod onehot; \ No newline at end of file diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo index 2e8567968..8337556d1 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo @@ -2,10 +2,10 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; - use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::numbers::fixed_point::core::{FixedTrait}; #[test] @@ -14,7 +14,7 @@ mod tensor_1D { let tensor = fp_tensor_1x3_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(2, false).mag, 'tensor.max = 2'); + assert(result == FixedTrait::::new_unscaled(2, false).mag, 'tensor.max = 2'); } } @@ -22,10 +22,10 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; - use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::numbers::fixed_point::core::{FixedTrait}; @@ -35,7 +35,7 @@ mod tensor_2D { let tensor = fp_tensor_2x2_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(3, false).mag, 'tensor.max = 3'); + assert(result == FixedTrait::::new_unscaled(3, false).mag, 'tensor.max = 3'); } } @@ -43,10 +43,10 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; - use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::numbers::fixed_point::core::{FixedTrait}; @@ -56,7 +56,7 @@ mod tensor_3D { let tensor = fp_tensor_2x2x2_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(7, false).mag, 'tensor.max = 7'); + assert(result == FixedTrait::::new_unscaled(7, false).mag, 'tensor.max = 7'); } } diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo index a111fda94..c4e8d5923 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo @@ -2,10 +2,10 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; - use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::numbers::fixed_point::core::{FixedTrait}; #[test] @@ -14,7 +14,7 @@ mod tensor_1D { let tensor = fp_tensor_1x3_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(2, false).mag, 'tensor.max = 2'); + assert(result == FixedTrait::::new_unscaled(2, false).mag, 'tensor.max = 2'); } } @@ -22,10 +22,10 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; - use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::numbers::fixed_point::core::{FixedTrait}; @@ -35,7 +35,7 @@ mod tensor_2D { let tensor = fp_tensor_2x2_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(3, false).mag, 'tensor.max = 3'); + assert(result == FixedTrait::::new_unscaled(3, false).mag, 'tensor.max = 3'); } } @@ -43,10 +43,10 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; - use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::numbers::fixed_point::core::{FixedTrait}; @@ -56,7 +56,7 @@ mod tensor_3D { let tensor = fp_tensor_2x2x2_helper(); let result = tensor.max().mag; - assert(result == FixedTrait::new_unscaled(7, false).mag, 'tensor.max = 7'); + assert(result == FixedTrait::::new_unscaled(7, false).mag, 'tensor.max = 7'); } } diff --git a/src/tests/tensor_core/max/max_i32_test.cairo b/src/tests/tensor_core/max/max_i32_test.cairo index 9d714d4c4..a35fb3b11 100644 --- a/src/tests/tensor_core/max/max_i32_test.cairo +++ b/src/tests/tensor_core/max/max_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/max/max_u32_test.cairo b/src/tests/tensor_core/max/max_u32_test.cairo index 292b0773e..7b2fc41f1 100644 --- a/src/tests/tensor_core/max/max_u32_test.cairo +++ b/src/tests/tensor_core/max/max_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From 3d7fd0922fe15b01a257d9ba3a7f418b2123e1a3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 09:50:29 +0300 Subject: [PATCH 063/179] fix min test --- src/tests/tensor_core.cairo | 2 +- .../tensor_core/min/min_fp_test/min_fp16x16_test.cairo | 6 +++--- src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo | 6 +++--- src/tests/tensor_core/min/min_i32_test.cairo | 6 +++--- src/tests/tensor_core/min/min_u32_test.cairo | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 3841936e5..a415b6464 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,6 +1,6 @@ mod at; mod flatten; mod max; -// mod min; +mod min; // mod stride; // mod onehot; \ No newline at end of file diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo index b89a3d4f8..da4e50b83 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo index 9cda89e72..bdb408d83 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; diff --git a/src/tests/tensor_core/min/min_i32_test.cairo b/src/tests/tensor_core/min/min_i32_test.cairo index 59cefae7c..a6c3a6b5d 100644 --- a/src/tests/tensor_core/min/min_i32_test.cairo +++ b/src/tests/tensor_core/min/min_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/min/min_u32_test.cairo b/src/tests/tensor_core/min/min_u32_test.cairo index e7155a943..93cd2b904 100644 --- a/src/tests/tensor_core/min/min_u32_test.cairo +++ b/src/tests/tensor_core/min/min_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From 2ddb39dd167cc982f8510daf3fc7d2102d327016 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 09:54:24 +0300 Subject: [PATCH 064/179] fix stride tests --- src/operators/tensor.cairo | 1 + src/tests/tensor_core.cairo | 2 +- .../stride/stride_fp_test/stride_fp16x16_test.cairo | 6 +++--- .../stride/stride_fp_test/stride_fp8x23_test.cairo | 6 +++--- src/tests/tensor_core/stride/stride_i32_test.cairo | 6 +++--- src/tests/tensor_core/stride/stride_u32_test.cairo | 6 +++--- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 3a2e5fc9b..ac9ea1a18 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -3,3 +3,4 @@ mod helpers; mod math; mod linalg; mod implementations; + \ No newline at end of file diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index a415b6464..5c04e7bc0 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -2,5 +2,5 @@ mod at; mod flatten; mod max; mod min; -// mod stride; +mod stride; // mod onehot; \ No newline at end of file diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo index e66691132..536740aa2 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo index ad3a1fe44..03732751c 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_i32_test.cairo b/src/tests/tensor_core/stride/stride_i32_test.cairo index 62c923ebd..d8319f5ce 100644 --- a/src/tests/tensor_core/stride/stride_i32_test.cairo +++ b/src/tests/tensor_core/stride/stride_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_u32_test.cairo b/src/tests/tensor_core/stride/stride_u32_test.cairo index 7dffbc763..b941084ee 100644 --- a/src/tests/tensor_core/stride/stride_u32_test.cairo +++ b/src/tests/tensor_core/stride/stride_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From 49b73932afac26ac73970920ff6db5ffed18ad6e Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 10:23:30 +0300 Subject: [PATCH 065/179] fix onehot --- .../implementations/tensor_fp16x16.cairo | 2 +- .../implementations/tensor_fp8x23.cairo | 2 +- .../implementations/tensor_i32_fp16x16.cairo | 2 +- .../implementations/tensor_i32_fp8x23.cairo | 2 +- .../implementations/tensor_i8_fp16x16.cairo | 2 +- .../implementations/tensor_i8_fp8x23.cairo | 2 +- .../implementations/tensor_u32_fp16x16.cairo | 2 +- .../implementations/tensor_u32_fp8x23.cairo | 2 +- src/operators/tensor/math/onehot.cairo | 146 +++++++++++++++++- src/tests/tensor_core.cairo | 12 +- .../onehot_fp_test/onehot_fp16x16_test.cairo | 16 +- .../onehot_fp_test/onehot_fp8x23_test.cairo | 16 +- .../tensor_core/onehot/onehot_i32_test.cairo | 8 +- .../tensor_core/onehot/onehot_i8_test.cairo | 8 +- .../tensor_core/onehot/onehot_u32_test.cairo | 73 ++++----- 15 files changed, 206 insertions(+), 89 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 88617a16f..904e5f480 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -167,7 +167,7 @@ impl Tensor_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_fp(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 6986022a9..3ae3049f8 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -167,7 +167,7 @@ impl Tensor_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_fp(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index e85aafe66..66f021a78 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -169,7 +169,7 @@ impl Tensor_i32_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 9b3ae5b49..6317fb733 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -169,7 +169,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo index 2a81c6272..fe5681fcc 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -171,7 +171,7 @@ impl Tensor_i8_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 67909dd83..a716e062b 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -171,7 +171,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo index 3e7b9d73c..3e1c8dc57 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -169,7 +169,7 @@ impl Tensor_u32_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index f1bf29b8e..1ff1a6ff1 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -169,7 +169,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot(self, depth, axis, values) + math::onehot::onehot_from_int(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index 2f170d1bc..dff03b81e 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -13,7 +13,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; /// Cf: TensorTrait::onehot docstring -fn onehot_encode< +fn onehot_encode_from_int< T, F, MAG, @@ -43,7 +43,6 @@ fn onehot_encode< let mut output_data = ArrayTrait::new(); let mut output_size = ArrayTrait::::new(); - let extra = Option::::None(()); // New shape for output data let mut index: usize = 0; @@ -89,7 +88,7 @@ fn onehot_encode< outer_index += 1; }; - let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), extra); + let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), *self.extra); let mut tranpose_axes = ArrayTrait::new(); // Get New shape is axis is not last dimension if (axis != 999) & (axis.into() != rank) { @@ -115,8 +114,7 @@ fn onehot_encode< return output_tensor; } - -fn onehot< +fn onehot_from_int< T, F, MAG, @@ -141,8 +139,140 @@ fn onehot< let mut data = ArrayTrait::new(); data.append(NumberTrait::new(first.try_into().unwrap(), false)); data.append(NumberTrait::new(second.try_into().unwrap(), false)); - let extra = Option::::None(()); - let values = TensorTrait::new(sizes.span(), data.span(), extra); - onehot_encode(self, depth, axis, values) + let values = TensorTrait::new(sizes.span(), data.span(), *self.extra); + onehot_encode_from_int(self, depth, axis, values) +} + +/// Cf: TensorTrait::onehot docstring +fn onehot_encode_from_fp< + F, + MAG, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, +>( + self: @Tensor, depth: usize, axis: Option, values: Tensor +) -> Tensor { + let data = *self.data; + let shape = *self.shape; + let rank = shape.len(); + + // using 999 to denote -1, innermost dimension + let axis = match axis { + Option::Some(val) => val, + Option::None(_) => 999 + }; + + assert(((axis == 999) | (axis.into() <= rank)), 'axis out of dimensions'); + + let tensor_len: usize = data.len(); + + let mut output_data = ArrayTrait::new(); + let mut output_size = ArrayTrait::::new(); + + // New shape for output data + let mut index: usize = 0; + loop { + if index == shape.len() { + break (); + }; + let size: usize = *shape.at(index); + output_size.append(size); + index += 1; + }; + output_size.append(depth.into()); + + // OneHot enocde loop + let mut outer_index: usize = 0; + loop { + if outer_index == tensor_len { + break (); + }; + + let mut inner_index = 0; + let mut fixed_number = *(*self.data).at(outer_index); + + if fixed_number.is_neg() { + fixed_number = FixedTrait::::new_unscaled(depth.try_into().unwrap(), false) + + fixed_number + } + + loop { + if inner_index == depth { + break (); + }; + let ind = FixedTrait::::new_unscaled(inner_index.try_into().unwrap(), false); + + if fixed_number == ind { + output_data.append(*values.data.at(1)); + } else { + output_data.append(*values.data.at(0)); + }; + + inner_index += 1; + }; + + outer_index += 1; + }; + + let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), *self.extra); + let mut tranpose_axes = ArrayTrait::new(); + // Get New shape is axis is not last dimension + if (axis != 999) & (axis.into() != rank) { + let mut index: usize = 0; + loop { + let max_dim = output_size.len() - 1; + if index.into() == max_dim { + break (); + }; + + if axis == index { + tranpose_axes.append(max_dim.into()) + } + tranpose_axes.append(index.into()); + index += 1; + }; + + let mut index: usize = 0; + + output_tensor = output_tensor.transpose(tranpose_axes.span()); + } + + return output_tensor; +} + +fn onehot_from_fp< + F, + MAG, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, +>( + self: @Tensor, depth: usize, axis: Option, mut values: Span, +) -> Tensor { + assert(values.len() == 2, 'Wrong values dimensions'); + + let mut sizes = ArrayTrait::new(); + sizes.append(2); + + let mut first = *values.pop_front().unwrap(); + let mut second = *values.pop_front().unwrap(); + + let mut data = ArrayTrait::new(); + data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); + data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); + + let values = TensorTrait::new(sizes.span(), data.span(), *self.extra); + onehot_encode_from_fp(self, depth, axis, values) } diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 5c04e7bc0..3c8ee57de 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,6 +1,6 @@ -mod at; -mod flatten; -mod max; -mod min; -mod stride; -// mod onehot; \ No newline at end of file +// mod at; +// mod flatten; +// mod max; +// mod min; +// mod stride; +mod onehot; \ No newline at end of file diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo index f1ba53809..cd8176782 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo @@ -2,17 +2,17 @@ use core::serde::Serde; use core::option::OptionTrait; use core::clone::Clone; // ===== 1D ===== // -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::core::FixedTrait; #[cfg(test)] mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialEq + FP16x16, FP16x16PartialEq }; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::tests::helpers::tensor::fixed_point::fp16x16::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper @@ -27,7 +27,7 @@ mod tensor_1D { // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; use orion::operators::tensor::core::{Tensor, ExtraParams}; - fn fp_tensor_3x2x2_new() -> Tensor { + fn fp_tensor_3x2x2_new() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -49,12 +49,12 @@ mod tensor_1D { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } - fn fp_tensor_2x2_pos_neg_new() -> Tensor { + fn fp_tensor_2x2_pos_neg_new() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -67,7 +67,7 @@ mod tensor_1D { let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo index 2bd120e79..b5d16905c 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo @@ -2,15 +2,15 @@ use core::serde::Serde; use core::option::OptionTrait; use core::clone::Clone; // ===== 1D ===== // -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::core::FixedTrait; #[cfg(test)] mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; - use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23, FP8x23PartialEq}; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, @@ -23,7 +23,7 @@ mod tensor_1D { use orion::operators::tensor::core::{Tensor, ExtraParams}; - fn fp_tensor_3x2x2_new() -> Tensor { + fn fp_tensor_3x2x2_new() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -44,12 +44,12 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(3, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } - fn fp_tensor_2x2_pos_neg_new() -> Tensor { + fn fp_tensor_2x2_pos_neg_new() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(2); sizes.append(2); @@ -61,7 +61,7 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(1, true)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_i32_test.cairo b/src/tests/tensor_core/onehot/onehot_i32_test.cairo index 6974012de..22cf8a7f2 100644 --- a/src/tests/tensor_core/onehot/onehot_i32_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_i32_test.cairo @@ -7,16 +7,10 @@ use core::clone::Clone; mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; - use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialEq - }; - use debug::PrintTrait; - use core::clone::Clone; use core::option::OptionTrait; use serde::Serde; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::tests::helpers::tensor::i32::{ diff --git a/src/tests/tensor_core/onehot/onehot_i8_test.cairo b/src/tests/tensor_core/onehot/onehot_i8_test.cairo index 1a2094343..502e958d4 100644 --- a/src/tests/tensor_core/onehot/onehot_i8_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_i8_test.cairo @@ -2,17 +2,17 @@ use core::serde::Serde; use core::option::OptionTrait; use core::clone::Clone; // ===== 1D ===== // -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; +use orion::numbers::fixed_point::core::FixedTrait; #[cfg(test)] mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::tests::helpers::tensor::fixed_point::fp16x16::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper @@ -24,7 +24,7 @@ mod tensor_1D { use serde::Serde; - use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; // use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; diff --git a/src/tests/tensor_core/onehot/onehot_u32_test.cairo b/src/tests/tensor_core/onehot/onehot_u32_test.cairo index c64945633..f719f3a5c 100644 --- a/src/tests/tensor_core/onehot/onehot_u32_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_u32_test.cairo @@ -2,19 +2,18 @@ use core::serde::Serde; use core::option::OptionTrait; use core::clone::Clone; // ===== 1D ===== // -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; #[cfg(test)] mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x2_helper}; - fn u32_tensor_3x2x2_new() -> Tensor { + fn u32_tensor_3x2x2_new() -> Tensor { let mut sizes = ArrayTrait::new(); sizes.append(3); sizes.append(2); @@ -39,9 +38,8 @@ mod tensor_1D { let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); return tensor; -} + } - #[test] #[available_gas(20000000)] @@ -54,7 +52,7 @@ mod tensor_1D { let depth = 3; let axis: Option = Option::None(()); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -65,11 +63,9 @@ mod tensor_1D { assert((*result.data[6]) == 0, 'result[6] = 0'); assert((*result.data[7]) == 0, 'result[7] = 0'); assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - + } + #[test] #[test] #[should_panic] #[available_gas(20000000)] @@ -82,9 +78,9 @@ mod tensor_1D { let depth = 3; let axis: Option = Option::Some(3); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); } - + #[test] #[available_gas(20000000)] fn tensor_onehot_1x3_Zero_axis() { @@ -96,7 +92,7 @@ mod tensor_1D { let depth = 3; let axis: Option = Option::Some(0); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -107,7 +103,7 @@ mod tensor_1D { assert((*result.data[6]) == 0, 'result[6] = 0'); assert((*result.data[7]) == 0, 'result[7] = 0'); assert((*result.data[8]) == 1, 'result[8] = 1'); - } + } #[test] #[available_gas(20000000)] @@ -120,7 +116,7 @@ mod tensor_1D { let depth = 3; let axis: Option = Option::Some(1); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -131,7 +127,7 @@ mod tensor_1D { assert((*result.data[6]) == 0, 'result[6] = 0'); assert((*result.data[7]) == 0, 'result[7] = 0'); assert((*result.data[8]) == 1, 'result[8] = 1'); - } + } #[test] #[available_gas(20000000)] @@ -144,7 +140,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::None(()); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -166,10 +162,9 @@ mod tensor_1D { assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); assert((*result.shape.at(2)) == 4, 'shape[0] = 4'); + } - } - - #[test] + #[test] #[should_panic] #[available_gas(20000000)] fn tensor_onehot_tensor_2x2_fail() { @@ -181,7 +176,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(3); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); } #[test] @@ -195,7 +190,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(0); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -217,8 +212,7 @@ mod tensor_1D { assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - - } + } #[test] #[available_gas(20000000)] @@ -231,7 +225,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(1); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -253,10 +247,9 @@ mod tensor_1D { assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); + } - } - - #[test] + #[test] #[available_gas(20000000)] fn fp_tensor_onehot_3x2x2_new_last_axis() { let tensor = u32_tensor_3x2x2_new(); @@ -268,7 +261,7 @@ mod tensor_1D { let axis: Option = Option::None(()); // let axis: Option = Option::Some(3); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -300,7 +293,7 @@ mod tensor_1D { assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); assert((*result.shape.at(2)) == 2, 'shape[2] = 2'); assert((*result.shape.at(3)) == 4, 'shape[0] = 4'); - } + } #[test] #[should_panic] @@ -314,10 +307,10 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(4); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); } - #[test] + #[test] #[available_gas(20000000)] fn fp_tensor_onehot_3x2x2_new_first_axis() { let tensor = u32_tensor_3x2x2_new(); @@ -328,7 +321,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(0); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 5, 'result[0] = 5'); assert((*result.data[1]) == 2, 'result[1] = 2'); @@ -359,9 +352,9 @@ mod tensor_1D { assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } + } - #[test] + #[test] #[available_gas(20000000)] fn fp_tensor_onehot_3x2x2_new_second_axis() { let tensor = u32_tensor_3x2x2_new(); @@ -372,7 +365,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(1); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -404,7 +397,7 @@ mod tensor_1D { assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } + } #[test] #[available_gas(20000000)] @@ -417,7 +410,7 @@ mod tensor_1D { let depth = 4; let axis: Option = Option::Some(2); - let result = tensor.onehot(depth:depth, axis:axis, values:values.span()); + let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); assert((*result.data[0]) == 1, 'result[0] = 1'); assert((*result.data[1]) == 0, 'result[1] = 0'); @@ -447,5 +440,5 @@ mod tensor_1D { assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); assert((*result.shape.at(2)) == 4, 'shape[2] = 4'); assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } -} \ No newline at end of file + } +} From f2615c6e63ffe4293b2444c29ef8c5029883a416 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 10:24:00 +0300 Subject: [PATCH 066/179] Update tensor_core.cairo --- src/tests/tensor_core.cairo | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/tensor_core.cairo b/src/tests/tensor_core.cairo index 3c8ee57de..0362c7aaa 100644 --- a/src/tests/tensor_core.cairo +++ b/src/tests/tensor_core.cairo @@ -1,6 +1,6 @@ -// mod at; -// mod flatten; -// mod max; -// mod min; -// mod stride; +mod at; +mod flatten; +mod max; +mod min; +mod stride; mod onehot; \ No newline at end of file From 3708cd6a2b7b12169b4d6298980b6bdecd72a860 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 11:00:20 +0300 Subject: [PATCH 067/179] fix abs --- src/tests.cairo | 8 +- src/tests/nodes.cairo | 904 +++++++++--------- src/tests/nodes/abs_fp16x16.cairo | 11 +- src/tests/nodes/abs_fp16x16/input_0.cairo | 17 +- src/tests/nodes/abs_fp16x16/output_0.cairo | 17 +- src/tests/nodes/abs_fp8x23.cairo | 12 +- src/tests/nodes/abs_fp8x23/input_0.cairo | 15 +- src/tests/nodes/abs_fp8x23/output_0.cairo | 15 +- src/tests/nodes/abs_i32.cairo | 5 +- src/tests/nodes/abs_i32/input_0.cairo | 6 +- src/tests/nodes/abs_i32/output_0.cairo | 6 +- src/tests/nodes/abs_i8.cairo | 11 +- src/tests/nodes/abs_i8/input_0.cairo | 2 +- src/tests/nodes/abs_i8/output_0.cairo | 2 +- src/tests/nodes/acos_fp8x23.cairo | 5 +- src/tests/nodes/acos_fp8x23/input_0.cairo | 15 +- src/tests/nodes/acos_fp8x23/output_0.cairo | 15 +- src/tests/nodes/acosh_fp8x23.cairo | 5 +- src/tests/nodes/acosh_fp8x23/input_0.cairo | 15 +- src/tests/nodes/acosh_fp8x23/output_0.cairo | 15 +- .../nodes/acosh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/acosh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/acosh_i32_fp8x23/output_0.cairo | 15 +- .../nodes/acosh_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/acosh_i8_fp8x23/input_0.cairo | 2 +- .../nodes/acosh_i8_fp8x23/output_0.cairo | 15 +- .../nodes/acosh_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/add_fp8x23/input_0.cairo | 61 +- src/tests/nodes/add_fp8x23/input_1.cairo | 61 +- src/tests/nodes/add_fp8x23/output_0.cairo | 61 +- src/tests/nodes/add_i32/input_0.cairo | 4 +- src/tests/nodes/add_i32/input_1.cairo | 4 +- src/tests/nodes/add_i32/output_0.cairo | 4 +- .../nodes/add_i32_broadcast/input_0.cairo | 4 +- .../nodes/add_i32_broadcast/input_1.cairo | 4 +- .../nodes/add_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/add_i8/input_0.cairo | 2 +- src/tests/nodes/add_i8/input_1.cairo | 2 +- src/tests/nodes/add_i8/output_0.cairo | 2 +- .../nodes/add_i8_broadcast/input_0.cairo | 2 +- .../nodes/add_i8_broadcast/input_1.cairo | 2 +- .../nodes/add_i8_broadcast/output_0.cairo | 2 +- .../nodes/argmax_i32_1D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmax_i32_1D_last_index/input_0.cairo | 4 +- .../nodes/argmax_i32_2D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmax_i32_2D_last_index/input_0.cairo | 4 +- .../nodes/argmax_i32_3D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmax_i32_3D_last_index/input_0.cairo | 4 +- .../nodes/argmax_i8_1D_default/input_0.cairo | 2 +- .../argmax_i8_1D_keepdims_false/input_0.cairo | 2 +- .../argmax_i8_1D_last_index/input_0.cairo | 2 +- .../nodes/argmax_i8_2D_default/input_0.cairo | 2 +- .../argmax_i8_2D_keepdims_false/input_0.cairo | 2 +- .../argmax_i8_2D_last_index/input_0.cairo | 2 +- .../nodes/argmax_i8_3D_default/input_0.cairo | 2 +- .../argmax_i8_3D_keepdims_false/input_0.cairo | 2 +- .../argmax_i8_3D_last_index/input_0.cairo | 2 +- .../nodes/argmin_i32_1D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmin_i32_1D_last_index/input_0.cairo | 4 +- .../nodes/argmin_i32_2D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmin_i32_2D_last_index/input_0.cairo | 4 +- .../nodes/argmin_i32_3D_default/input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../argmin_i32_3D_last_index/input_0.cairo | 4 +- .../nodes/argmin_i8_1D_default/input_0.cairo | 2 +- .../argmin_i8_1D_keepdims_false/input_0.cairo | 2 +- .../argmin_i8_1D_last_index/input_0.cairo | 2 +- .../nodes/argmin_i8_2D_default/input_0.cairo | 2 +- .../argmin_i8_2D_keepdims_false/input_0.cairo | 2 +- .../argmin_i8_2D_last_index/input_0.cairo | 2 +- .../nodes/argmin_i8_3D_default/input_0.cairo | 2 +- .../argmin_i8_3D_keepdims_false/input_0.cairo | 2 +- .../argmin_i8_3D_last_index/input_0.cairo | 2 +- src/tests/nodes/asin_fp8x23.cairo | 5 +- src/tests/nodes/asin_fp8x23/input_0.cairo | 15 +- src/tests/nodes/asin_fp8x23/output_0.cairo | 15 +- src/tests/nodes/asinh_fp8x23.cairo | 5 +- src/tests/nodes/asinh_fp8x23/input_0.cairo | 15 +- src/tests/nodes/asinh_fp8x23/output_0.cairo | 15 +- .../nodes/asinh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/asinh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/asinh_i32_fp8x23/output_0.cairo | 15 +- .../nodes/asinh_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/asinh_i8_fp8x23/input_0.cairo | 2 +- .../nodes/asinh_i8_fp8x23/output_0.cairo | 15 +- .../nodes/asinh_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/atan_fp8x23.cairo | 5 +- src/tests/nodes/atan_fp8x23/input_0.cairo | 15 +- src/tests/nodes/atan_fp8x23/output_0.cairo | 15 +- .../nodes/atan_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/atan_i32_fp8x23/input_0.cairo | 4 +- .../nodes/atan_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/atan_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/atan_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/atan_i8_fp8x23/output_0.cairo | 15 +- .../nodes/atan_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/ceil_fp8x23.cairo | 5 +- src/tests/nodes/ceil_fp8x23/input_0.cairo | 15 +- src/tests/nodes/ceil_fp8x23/output_0.cairo | 15 +- src/tests/nodes/concat_i32_1d.cairo | 5 +- src/tests/nodes/concat_i32_1d/input_0.cairo | 4 +- src/tests/nodes/concat_i32_1d/input_1.cairo | 4 +- src/tests/nodes/concat_i32_1d/output_0.cairo | 4 +- src/tests/nodes/concat_i32_2d.cairo | 5 +- src/tests/nodes/concat_i32_2d/input_0.cairo | 4 +- src/tests/nodes/concat_i32_2d/input_1.cairo | 4 +- src/tests/nodes/concat_i32_2d/output_0.cairo | 4 +- src/tests/nodes/concat_i32_3d_axis_1.cairo | 5 +- .../nodes/concat_i32_3d_axis_1/input_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_1/input_1.cairo | 4 +- .../nodes/concat_i32_3d_axis_1/output_0.cairo | 4 +- src/tests/nodes/concat_i32_3d_axis_2.cairo | 5 +- .../nodes/concat_i32_3d_axis_2/input_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_2/input_1.cairo | 4 +- .../nodes/concat_i32_3d_axis_2/output_0.cairo | 4 +- src/tests/nodes/concat_i32_3d_default.cairo | 5 +- .../nodes/concat_i32_3d_default/input_0.cairo | 4 +- .../nodes/concat_i32_3d_default/input_1.cairo | 4 +- .../concat_i32_3d_default/output_0.cairo | 4 +- .../concat_i32_3d_three_tensors_axis_1.cairo | 5 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- .../concat_i32_3d_three_tensors_axis_2.cairo | 5 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/cos_fp8x23.cairo | 5 +- src/tests/nodes/cos_fp8x23/input_0.cairo | 15 +- src/tests/nodes/cos_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cos_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/cos_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cos_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cos_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/cos_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/cos_i8_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cos_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cosh_fp8x23.cairo | 5 +- src/tests/nodes/cosh_fp8x23/input_0.cairo | 15 +- src/tests/nodes/cosh_fp8x23/output_0.cairo | 15 +- .../nodes/cosh_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/cosh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/cosh_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cosh_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/cosh_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/cosh_i8_fp8x23/output_0.cairo | 15 +- .../nodes/cosh_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/cumsum_i32_1d_default.cairo | 5 +- .../nodes/cumsum_i32_1d_default/input_0.cairo | 4 +- .../cumsum_i32_1d_default/output_0.cairo | 4 +- src/tests/nodes/cumsum_i32_1d_exclusive.cairo | 5 +- .../cumsum_i32_1d_exclusive/input_0.cairo | 4 +- .../cumsum_i32_1d_exclusive/output_0.cairo | 4 +- src/tests/nodes/cumsum_i32_1d_reverse.cairo | 5 +- .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 4 +- .../cumsum_i32_1d_reverse/output_0.cairo | 4 +- .../cumsum_i32_1d_reverse_exclusive.cairo | 5 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/cumsum_i32_2d_axis_0.cairo | 5 +- .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 4 +- src/tests/nodes/cumsum_i32_2d_axis_1.cairo | 5 +- .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 4 +- src/tests/nodes/cumsum_i8_1d_default.cairo | 5 +- .../nodes/cumsum_i8_1d_default/input_0.cairo | 2 +- .../nodes/cumsum_i8_1d_default/output_0.cairo | 2 +- src/tests/nodes/cumsum_i8_1d_exclusive.cairo | 5 +- .../cumsum_i8_1d_exclusive/input_0.cairo | 2 +- .../cumsum_i8_1d_exclusive/output_0.cairo | 2 +- src/tests/nodes/cumsum_i8_1d_reverse.cairo | 5 +- .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 2 +- .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 2 +- .../cumsum_i8_1d_reverse_exclusive.cairo | 5 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- src/tests/nodes/cumsum_i8_2d_axis_0.cairo | 5 +- .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 2 +- .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 2 +- src/tests/nodes/cumsum_i8_2d_axis_1.cairo | 5 +- .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 2 +- .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 2 +- src/tests/nodes/div_fp8x23/input_0.cairo | 61 +- src/tests/nodes/div_fp8x23/input_1.cairo | 61 +- src/tests/nodes/div_fp8x23/output_0.cairo | 61 +- src/tests/nodes/div_i32/input_0.cairo | 4 +- src/tests/nodes/div_i32/input_1.cairo | 4 +- src/tests/nodes/div_i32/output_0.cairo | 4 +- .../nodes/div_i32_broadcast/input_0.cairo | 4 +- .../nodes/div_i32_broadcast/input_1.cairo | 4 +- .../nodes/div_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/div_i8/input_0.cairo | 2 +- src/tests/nodes/div_i8/input_1.cairo | 2 +- src/tests/nodes/div_i8/output_0.cairo | 2 +- .../nodes/div_i8_broadcast/input_0.cairo | 2 +- .../nodes/div_i8_broadcast/input_1.cairo | 2 +- .../nodes/div_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_fp8x23/input_0.cairo | 61 +- src/tests/nodes/equal_fp8x23/input_1.cairo | 61 +- src/tests/nodes/equal_i32/input_0.cairo | 4 +- src/tests/nodes/equal_i32/input_1.cairo | 4 +- .../nodes/equal_i32_broadcast/input_0.cairo | 4 +- .../nodes/equal_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/equal_i8/input_0.cairo | 2 +- src/tests/nodes/equal_i8/input_1.cairo | 2 +- .../nodes/equal_i8_broadcast/input_0.cairo | 2 +- .../nodes/equal_i8_broadcast/input_1.cairo | 2 +- src/tests/nodes/exp_fp8x23.cairo | 5 +- src/tests/nodes/exp_fp8x23/input_0.cairo | 15 +- src/tests/nodes/exp_fp8x23/output_0.cairo | 15 +- src/tests/nodes/exp_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/exp_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/exp_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/exp_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/exp_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/exp_i8_fp8x23/output_0.cairo | 15 +- src/tests/nodes/exp_u32_fp8x23/output_0.cairo | 15 +- .../nodes/greater_equal_fp8x23/input_0.cairo | 61 +- .../nodes/greater_equal_fp8x23/input_1.cairo | 61 +- .../nodes/greater_equal_i32/input_0.cairo | 4 +- .../nodes/greater_equal_i32/input_1.cairo | 4 +- .../greater_equal_i32_broadcast/input_0.cairo | 4 +- .../greater_equal_i32_broadcast/input_1.cairo | 4 +- .../nodes/greater_equal_i8/input_0.cairo | 2 +- .../nodes/greater_equal_i8/input_1.cairo | 2 +- .../greater_equal_i8_broadcast/input_0.cairo | 2 +- .../greater_equal_i8_broadcast/input_1.cairo | 2 +- src/tests/nodes/greater_fp8x23/input_0.cairo | 61 +- src/tests/nodes/greater_fp8x23/input_1.cairo | 61 +- src/tests/nodes/greater_i32/input_0.cairo | 4 +- src/tests/nodes/greater_i32/input_1.cairo | 4 +- .../nodes/greater_i32_broadcast/input_0.cairo | 4 +- .../nodes/greater_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/greater_i8/input_0.cairo | 2 +- src/tests/nodes/greater_i8/input_1.cairo | 2 +- .../nodes/greater_i8_broadcast/input_0.cairo | 2 +- .../nodes/greater_i8_broadcast/input_1.cairo | 2 +- .../nodes/leaky_relu_fp8x23/input_0.cairo | 15 +- .../nodes/leaky_relu_fp8x23/output_0.cairo | 15 +- .../leaky_relu_i32_fp16x16/input_0.cairo | 4 +- .../nodes/leaky_relu_i32_fp8x23/input_0.cairo | 4 +- .../leaky_relu_i32_fp8x23/output_0.cairo | 15 +- .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 4 +- .../nodes/leaky_relu_i8_fp8x23/input_0.cairo | 2 +- .../nodes/leaky_relu_i8_fp8x23/output_0.cairo | 15 +- .../nodes/less_equal_fp8x23/input_0.cairo | 15 +- .../nodes/less_equal_fp8x23/input_1.cairo | 15 +- src/tests/nodes/less_equal_i32/input_0.cairo | 4 +- src/tests/nodes/less_equal_i32/input_1.cairo | 4 +- .../less_equal_i32_broadcast/input_0.cairo | 4 +- .../less_equal_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/less_equal_i8/input_0.cairo | 2 +- src/tests/nodes/less_equal_i8/input_1.cairo | 2 +- .../less_equal_i8_broadcast/input_0.cairo | 2 +- .../less_equal_i8_broadcast/input_1.cairo | 2 +- src/tests/nodes/less_fp8x23/input_0.cairo | 61 +- src/tests/nodes/less_fp8x23/input_1.cairo | 61 +- src/tests/nodes/less_i32/input_0.cairo | 4 +- src/tests/nodes/less_i32/input_1.cairo | 4 +- .../nodes/less_i32_broadcast/input_0.cairo | 4 +- .../nodes/less_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/less_i8/input_0.cairo | 2 +- src/tests/nodes/less_i8/input_1.cairo | 2 +- .../nodes/less_i8_broadcast/input_0.cairo | 2 +- .../nodes/less_i8_broadcast/input_1.cairo | 2 +- src/tests/nodes/linear_fp8x23/input_0.cairo | 13 +- src/tests/nodes/linear_fp8x23/input_1.cairo | 19 +- src/tests/nodes/linear_fp8x23/input_2.cairo | 11 +- src/tests/nodes/linear_fp8x23/output_0.cairo | 11 +- src/tests/nodes/linear_i32/input_0.cairo | 4 +- src/tests/nodes/linear_i32/input_1.cairo | 4 +- src/tests/nodes/linear_i32/input_2.cairo | 4 +- src/tests/nodes/linear_i32/output_0.cairo | 4 +- src/tests/nodes/linear_i8/input_0.cairo | 2 +- src/tests/nodes/linear_i8/input_1.cairo | 2 +- src/tests/nodes/linear_i8/input_2.cairo | 2 +- src/tests/nodes/linear_i8/output_0.cairo | 2 +- src/tests/nodes/log_fp8x23.cairo | 5 +- src/tests/nodes/log_fp8x23/input_0.cairo | 15 +- src/tests/nodes/log_fp8x23/output_0.cairo | 15 +- src/tests/nodes/log_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/log_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/log_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/log_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/log_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/log_i8_fp8x23/output_0.cairo | 15 +- src/tests/nodes/log_u32_fp8x23/output_0.cairo | 15 +- .../input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../input_0.cairo | 4 +- .../input_0.cairo | 2 +- .../input_0.cairo | 2 +- .../logsoftmax_i8_fp8x23_axis_0/input_0.cairo | 2 +- .../logsoftmax_i8_fp8x23_axis_1/input_0.cairo | 2 +- src/tests/nodes/matmul_i32_1d.cairo | 5 +- src/tests/nodes/matmul_i32_1d/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_1d/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_1x2.cairo | 5 +- src/tests/nodes/matmul_i32_1x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_1x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x1.cairo | 5 +- src/tests/nodes/matmul_i32_2x1/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x1/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x2.cairo | 5 +- src/tests/nodes/matmul_i32_2x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_2x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i8_1d.cairo | 5 +- src/tests/nodes/matmul_i8_1d/input_0.cairo | 2 +- src/tests/nodes/matmul_i8_1d/input_1.cairo | 2 +- src/tests/nodes/matmul_i8_1d/output_0.cairo | 2 +- src/tests/nodes/matmul_i8_1x2.cairo | 5 +- src/tests/nodes/matmul_i8_1x2/input_0.cairo | 2 +- src/tests/nodes/matmul_i8_1x2/input_1.cairo | 2 +- src/tests/nodes/matmul_i8_1x2/output_0.cairo | 2 +- src/tests/nodes/matmul_i8_2x1.cairo | 5 +- src/tests/nodes/matmul_i8_2x1/input_0.cairo | 2 +- src/tests/nodes/matmul_i8_2x1/input_1.cairo | 2 +- src/tests/nodes/matmul_i8_2x1/output_0.cairo | 2 +- src/tests/nodes/matmul_i8_2x2.cairo | 5 +- src/tests/nodes/matmul_i8_2x2/input_0.cairo | 2 +- src/tests/nodes/matmul_i8_2x2/input_1.cairo | 2 +- src/tests/nodes/matmul_i8_2x2/output_0.cairo | 2 +- src/tests/nodes/mul_fp8x23/input_0.cairo | 61 +- src/tests/nodes/mul_fp8x23/input_1.cairo | 61 +- src/tests/nodes/mul_fp8x23/output_0.cairo | 61 +- src/tests/nodes/mul_i32/input_0.cairo | 4 +- src/tests/nodes/mul_i32/input_1.cairo | 4 +- src/tests/nodes/mul_i32/output_0.cairo | 4 +- .../nodes/mul_i32_broadcast/input_0.cairo | 4 +- .../nodes/mul_i32_broadcast/input_1.cairo | 4 +- .../nodes/mul_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/mul_i8/input_0.cairo | 2 +- src/tests/nodes/mul_i8/input_1.cairo | 2 +- src/tests/nodes/mul_i8/output_0.cairo | 2 +- .../nodes/mul_i8_broadcast/input_0.cairo | 2 +- .../nodes/mul_i8_broadcast/input_1.cairo | 2 +- .../nodes/mul_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_fp8x23/input_0.cairo | 61 +- src/tests/nodes/or_fp8x23/input_1.cairo | 61 +- src/tests/nodes/or_i32/input_0.cairo | 4 +- src/tests/nodes/or_i32/input_1.cairo | 4 +- .../nodes/or_i32_broadcast/input_0.cairo | 4 +- .../nodes/or_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/or_i8/input_0.cairo | 2 +- src/tests/nodes/or_i8/input_1.cairo | 2 +- src/tests/nodes/or_i8_broadcast/input_0.cairo | 2 +- src/tests/nodes/or_i8_broadcast/input_1.cairo | 2 +- src/tests/nodes/reduce_sum_i32_1D.cairo | 5 +- .../nodes/reduce_sum_i32_1D/input_0.cairo | 4 +- .../nodes/reduce_sum_i32_1D/output_0.cairo | 4 +- .../nodes/reduce_sum_i32_2D_axis_1.cairo | 5 +- .../reduce_sum_i32_2D_axis_1/input_0.cairo | 4 +- .../reduce_sum_i32_2D_axis_1/output_0.cairo | 4 +- .../nodes/reduce_sum_i32_2D_default.cairo | 5 +- .../reduce_sum_i32_2D_default/input_0.cairo | 4 +- .../reduce_sum_i32_2D_default/output_0.cairo | 4 +- .../nodes/reduce_sum_i32_2D_keepdims.cairo | 5 +- .../reduce_sum_i32_2D_keepdims/input_0.cairo | 4 +- .../reduce_sum_i32_2D_keepdims/output_0.cairo | 4 +- src/tests/nodes/relu_fp8x23/input_0.cairo | 15 +- src/tests/nodes/relu_fp8x23/output_0.cairo | 15 +- src/tests/nodes/relu_i32/input_0.cairo | 4 +- src/tests/nodes/relu_i32/output_0.cairo | 4 +- src/tests/nodes/relu_i8/input_0.cairo | 2 +- src/tests/nodes/relu_i8/output_0.cairo | 2 +- src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 15 +- src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 15 +- .../nodes/sigmoid_i32_fp16x16/input_0.cairo | 4 +- .../nodes/sigmoid_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sigmoid_i32_fp8x23/output_0.cairo | 15 +- .../nodes/sigmoid_i8_fp16x16/input_0.cairo | 2 +- .../nodes/sigmoid_i8_fp8x23/input_0.cairo | 2 +- .../nodes/sigmoid_i8_fp8x23/output_0.cairo | 15 +- .../nodes/sigmoid_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sin_fp8x23.cairo | 5 +- src/tests/nodes/sin_fp8x23/input_0.cairo | 15 +- src/tests/nodes/sin_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sin_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sin_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sin_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sin_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/sin_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sin_i8_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sin_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sinh_fp8x23.cairo | 5 +- src/tests/nodes/sinh_fp8x23/input_0.cairo | 15 +- src/tests/nodes/sinh_fp8x23/output_0.cairo | 15 +- .../nodes/sinh_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sinh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sinh_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sinh_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/sinh_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sinh_i8_fp8x23/output_0.cairo | 15 +- .../nodes/sinh_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/softmax_fp8x23/input_0.cairo | 15 +- src/tests/nodes/softmax_fp8x23/output_0.cairo | 15 +- .../nodes/softmax_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softmax_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softmax_i32_fp8x23/output_0.cairo | 15 +- .../nodes/softmax_i8_fp16x16/input_0.cairo | 2 +- .../nodes/softmax_i8_fp8x23/input_0.cairo | 2 +- .../nodes/softmax_i8_fp8x23/output_0.cairo | 15 +- .../nodes/softmax_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/softplus_fp8x23/input_0.cairo | 15 +- .../nodes/softplus_fp8x23/output_0.cairo | 15 +- .../nodes/softplus_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softplus_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softplus_i32_fp8x23/output_0.cairo | 15 +- .../nodes/softplus_i8_fp16x16/input_0.cairo | 2 +- .../nodes/softplus_i8_fp8x23/input_0.cairo | 2 +- .../nodes/softplus_i8_fp8x23/output_0.cairo | 15 +- .../nodes/softplus_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/softsign_fp8x23/input_0.cairo | 15 +- .../nodes/softsign_fp8x23/output_0.cairo | 15 +- .../nodes/softsign_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softsign_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softsign_i32_fp8x23/output_0.cairo | 15 +- .../nodes/softsign_i8_fp16x16/input_0.cairo | 2 +- .../nodes/softsign_i8_fp8x23/input_0.cairo | 2 +- .../nodes/softsign_i8_fp8x23/output_0.cairo | 15 +- .../nodes/softsign_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sqrt_fp8x23.cairo | 5 +- src/tests/nodes/sqrt_fp8x23/input_0.cairo | 15 +- src/tests/nodes/sqrt_fp8x23/output_0.cairo | 15 +- .../nodes/sqrt_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sqrt_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo | 15 +- .../nodes/sqrt_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/sub_fp8x23/input_0.cairo | 61 +- src/tests/nodes/sub_fp8x23/input_1.cairo | 61 +- src/tests/nodes/sub_fp8x23/output_0.cairo | 61 +- src/tests/nodes/sub_i32/input_0.cairo | 4 +- src/tests/nodes/sub_i32/input_1.cairo | 4 +- src/tests/nodes/sub_i32/output_0.cairo | 4 +- .../nodes/sub_i32_broadcast/input_0.cairo | 4 +- .../nodes/sub_i32_broadcast/input_1.cairo | 4 +- .../nodes/sub_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/sub_i8/input_0.cairo | 2 +- src/tests/nodes/sub_i8/input_1.cairo | 2 +- src/tests/nodes/sub_i8/output_0.cairo | 2 +- .../nodes/sub_i8_broadcast/input_0.cairo | 2 +- .../nodes/sub_i8_broadcast/input_1.cairo | 2 +- .../nodes/sub_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/tanh_fp8x23.cairo | 5 +- src/tests/nodes/tanh_fp8x23/input_0.cairo | 15 +- src/tests/nodes/tanh_fp8x23/output_0.cairo | 15 +- .../nodes/tanh_i32_fp16x16/input_0.cairo | 4 +- src/tests/nodes/tanh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/tanh_i32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/tanh_i8_fp16x16/input_0.cairo | 2 +- src/tests/nodes/tanh_i8_fp8x23/input_0.cairo | 2 +- src/tests/nodes/tanh_i8_fp8x23/output_0.cairo | 15 +- .../nodes/tanh_u32_fp8x23/output_0.cairo | 15 +- src/tests/nodes/transpose_i32_2d.cairo | 5 +- .../nodes/transpose_i32_2d/input_0.cairo | 4 +- .../nodes/transpose_i32_2d/output_0.cairo | 4 +- src/tests/nodes/transpose_i32_3d.cairo | 5 +- .../nodes/transpose_i32_3d/input_0.cairo | 4 +- .../nodes/transpose_i32_3d/output_0.cairo | 4 +- src/tests/nodes/transpose_i8_2d.cairo | 5 +- src/tests/nodes/transpose_i8_2d/input_0.cairo | 2 +- .../nodes/transpose_i8_2d/output_0.cairo | 2 +- src/tests/nodes/transpose_i8_3d.cairo | 5 +- src/tests/nodes/transpose_i8_3d/input_0.cairo | 2 +- .../nodes/transpose_i8_3d/output_0.cairo | 2 +- src/tests/nodes/xor_fp8x23/input_0.cairo | 61 +- src/tests/nodes/xor_fp8x23/input_1.cairo | 61 +- src/tests/nodes/xor_i32/input_0.cairo | 4 +- src/tests/nodes/xor_i32/input_1.cairo | 4 +- .../nodes/xor_i32_broadcast/input_0.cairo | 4 +- .../nodes/xor_i32_broadcast/input_1.cairo | 4 +- src/tests/nodes/xor_i8/input_0.cairo | 2 +- src/tests/nodes/xor_i8/input_1.cairo | 2 +- .../nodes/xor_i8_broadcast/input_0.cairo | 2 +- .../nodes/xor_i8_broadcast/input_1.cairo | 2 +- 491 files changed, 2634 insertions(+), 2461 deletions(-) diff --git a/src/tests.cairo b/src/tests.cairo index 1c0b5659d..ad175c9d2 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ -mod numbers; +// mod numbers; // mod performance; -mod tensor_core; -// mod nodes; -mod helpers; +// mod tensor_core; +mod nodes; +// mod helpers; diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index bf615b910..bec1f7ce6 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -2,455 +2,455 @@ mod abs_fp16x16; mod abs_fp8x23; mod abs_i32; mod abs_i8; -mod acos_fp8x23; -mod acos_fp16x16; -mod argmax_fp16x16_1D_default; -mod argmax_fp16x16_1D_keepdims_false; -mod argmax_fp16x16_1D_last_index; -mod argmax_fp16x16_2D_default; -mod argmax_fp16x16_2D_keepdims_false; -mod argmax_fp16x16_2D_last_index; -mod argmax_fp16x16_3D_default; -mod argmax_fp16x16_3D_keepdims_false; -mod argmax_fp16x16_3D_last_index; -mod argmax_fp8x23_1D_default; -mod argmax_fp8x23_1D_keepdims_false; -mod argmax_fp8x23_1D_last_index; -mod argmax_fp8x23_2D_default; -mod argmax_fp8x23_2D_keepdims_false; -mod argmax_fp8x23_2D_last_index; -mod argmax_fp8x23_3D_default; -mod argmax_fp8x23_3D_keepdims_false; -mod argmax_fp8x23_3D_last_index; -mod argmax_i32_1D_default; -mod argmax_i32_1D_keepdims_false; -mod argmax_i32_1D_last_index; -mod argmax_i32_2D_default; -mod argmax_i32_2D_keepdims_false; -mod argmax_i32_2D_last_index; -mod argmax_i32_3D_default; -mod argmax_i32_3D_keepdims_false; -mod argmax_i32_3D_last_index; -mod argmax_i8_1D_default; -mod argmax_i8_1D_keepdims_false; -mod argmax_i8_1D_last_index; -mod argmax_i8_2D_default; -mod argmax_i8_2D_keepdims_false; -mod argmax_i8_2D_last_index; -mod argmax_i8_3D_default; -mod argmax_i8_3D_keepdims_false; -mod argmax_i8_3D_last_index; -mod argmax_u32_1D_default; -mod argmax_u32_1D_keepdims_false; -mod argmax_u32_1D_last_index; -mod argmax_u32_2D_default; -mod argmax_u32_2D_keepdims_false; -mod argmax_u32_2D_last_index; -mod argmax_u32_3D_default; -mod argmax_u32_3D_keepdims_false; -mod argmax_u32_3D_last_index; -mod argmin_fp16x16_1D_default; -mod argmin_fp16x16_1D_keepdims_false; -mod argmin_fp16x16_1D_last_index; -mod argmin_fp16x16_2D_default; -mod argmin_fp16x16_2D_keepdims_false; -mod argmin_fp16x16_2D_last_index; -mod argmin_fp16x16_3D_default; -mod argmin_fp16x16_3D_keepdims_false; -mod argmin_fp16x16_3D_last_index; -mod argmin_fp8x23_1D_default; -mod argmin_fp8x23_1D_keepdims_false; -mod argmin_fp8x23_1D_last_index; -mod argmin_fp8x23_2D_default; -mod argmin_fp8x23_2D_keepdims_false; -mod argmin_fp8x23_2D_last_index; -mod argmin_fp8x23_3D_default; -mod argmin_fp8x23_3D_keepdims_false; -mod argmin_fp8x23_3D_last_index; -mod argmin_i32_1D_default; -mod argmin_i32_1D_keepdims_false; -mod argmin_i32_1D_last_index; -mod argmin_i32_2D_default; -mod argmin_i32_2D_keepdims_false; -mod argmin_i32_2D_last_index; -mod argmin_i32_3D_default; -mod argmin_i32_3D_keepdims_false; -mod argmin_i32_3D_last_index; -mod argmin_i8_1D_default; -mod argmin_i8_1D_keepdims_false; -mod argmin_i8_1D_last_index; -mod argmin_i8_2D_default; -mod argmin_i8_2D_keepdims_false; -mod argmin_i8_2D_last_index; -mod argmin_i8_3D_default; -mod argmin_i8_3D_keepdims_false; -mod argmin_i8_3D_last_index; -mod argmin_u32_1D_default; -mod argmin_u32_1D_keepdims_false; -mod argmin_u32_1D_last_index; -mod argmin_u32_2D_default; -mod argmin_u32_2D_keepdims_false; -mod argmin_u32_2D_last_index; -mod argmin_u32_3D_default; -mod argmin_u32_3D_keepdims_false; -mod argmin_u32_3D_last_index; -mod transpose_fp16x16_2d; -mod transpose_fp16x16_3d; -mod transpose_fp8x23_2d; -mod transpose_fp8x23_3d; -mod transpose_i32_2d; -mod transpose_i32_3d; -mod transpose_i8_2d; -mod transpose_i8_3d; -mod transpose_u32_2d; -mod transpose_u32_3d; -mod asin_fp16x16; -mod asin_fp8x23; -mod atan_fp16x16; -mod atan_fp8x23; -mod atan_i32_fp8x23; -mod atan_i32_fp16x16; -mod atan_i8_fp8x23; -mod atan_i8_fp16x16; -mod atan_u32_fp8x23; -mod atan_u32_fp16x16; -mod ceil_fp16x16; -mod ceil_fp8x23; -mod cos_fp16x16; -mod cos_fp8x23; -mod cos_i32_fp8x23; -mod cos_i32_fp16x16; -mod cos_i8_fp8x23; -mod cos_i8_fp16x16; -mod cos_u32_fp8x23; -mod cos_u32_fp16x16; -mod cumsum_fp16x16_1d_default; -mod cumsum_fp16x16_1d_exclusive; -mod cumsum_fp16x16_1d_reverse; -mod cumsum_fp16x16_1d_reverse_exclusive; -mod cumsum_fp16x16_2d_axis_0; -mod cumsum_fp16x16_2d_axis_1; -mod cumsum_fp8x23_1d_default; -mod cumsum_fp8x23_1d_exclusive; -mod cumsum_fp8x23_1d_reverse; -mod cumsum_fp8x23_1d_reverse_exclusive; -mod cumsum_fp8x23_2d_axis_0; -mod cumsum_fp8x23_2d_axis_1; -mod cumsum_i32_1d_default; -mod cumsum_i32_1d_exclusive; -mod cumsum_i32_1d_reverse; -mod cumsum_i32_1d_reverse_exclusive; -mod cumsum_i32_2d_axis_0; -mod cumsum_i32_2d_axis_1; -mod cumsum_i8_1d_default; -mod cumsum_i8_1d_exclusive; -mod cumsum_i8_1d_reverse; -mod cumsum_i8_1d_reverse_exclusive; -mod cumsum_i8_2d_axis_0; -mod cumsum_i8_2d_axis_1; -mod cumsum_u32_1d_default; -mod cumsum_u32_1d_exclusive; -mod cumsum_u32_1d_reverse; -mod cumsum_u32_1d_reverse_exclusive; -mod cumsum_u32_2d_axis_0; -mod cumsum_u32_2d_axis_1; -mod cosh_fp16x16; -mod cosh_fp8x23; -mod cosh_i32_fp8x23; -mod cosh_i32_fp16x16; -mod cosh_i8_fp8x23; -mod cosh_i8_fp16x16; -mod cosh_u32_fp8x23; -mod cosh_u32_fp16x16; -mod sinh_fp16x16; -mod sinh_fp8x23; -mod sinh_i32_fp8x23; -mod sinh_i32_fp16x16; -mod sinh_i8_fp8x23; -mod sinh_i8_fp16x16; -mod sinh_u32_fp8x23; -mod sinh_u32_fp16x16; -mod tanh_fp16x16; -mod tanh_fp8x23; -mod tanh_i32_fp8x23; -mod tanh_i32_fp16x16; -mod tanh_i8_fp8x23; -mod tanh_i8_fp16x16; -mod tanh_u32_fp8x23; -mod tanh_u32_fp16x16; -mod log_fp16x16; -mod log_fp8x23; -mod log_i32_fp8x23; -mod log_i32_fp16x16; -mod log_i8_fp8x23; -mod log_i8_fp16x16; -mod log_u32_fp8x23; -mod log_u32_fp16x16; -mod reduce_sum_fp16x16_1D; -mod reduce_sum_fp16x16_2D_default; -mod reduce_sum_fp16x16_2D_keepdims; -mod reduce_sum_fp16x16_2D_axis_1; -mod reduce_sum_fp8x23_1D; -mod reduce_sum_fp8x23_2D_default; -mod reduce_sum_fp8x23_2D_keepdims; -mod reduce_sum_fp8x23_2D_axis_1; -mod reduce_sum_i32_1D; -mod reduce_sum_i32_2D_default; -mod reduce_sum_i32_2D_keepdims; -mod reduce_sum_i32_2D_axis_1; -mod reduce_sum_i8_1D; -mod reduce_sum_i8_2D_default; -mod reduce_sum_i8_2D_keepdims; -mod reduce_sum_i8_2D_axis_1; -mod reduce_sum_u32_1D; -mod reduce_sum_u32_2D_default; -mod reduce_sum_u32_2D_keepdims; -mod reduce_sum_u32_2D_axis_1; -mod exp_fp16x16; -mod exp_fp8x23; -mod exp_i32_fp8x23; -mod exp_i32_fp16x16; -mod exp_i8_fp8x23; -mod exp_i8_fp16x16; -mod exp_u32_fp8x23; -mod exp_u32_fp16x16; -mod equal_fp16x16; -mod equal_fp16x16_broadcast; -mod equal_fp8x23; -mod equal_fp8x23_broadcast; -mod equal_i32; -mod equal_i32_broadcast; -mod equal_i8; -mod equal_i8_broadcast; -mod equal_u32; -mod equal_u32_broadcast; -mod greater_fp16x16; -mod greater_fp16x16_broadcast; -mod greater_fp8x23; -mod greater_fp8x23_broadcast; -mod greater_i32; -mod greater_i32_broadcast; -mod greater_i8; -mod greater_i8_broadcast; -mod greater_u32; -mod greater_u32_broadcast; -mod less_equal_fp16x16; -mod less_equal_fp16x16_broadcast; -mod less_equal_fp8x23; -mod less_equal_fp8x23_broadcast; -mod less_equal_i32; -mod less_equal_i32_broadcast; -mod less_equal_i8; -mod less_equal_i8_broadcast; -mod less_equal_u32; -mod less_equal_u32_broadcast; -mod sqrt_fp16x16; -mod sqrt_fp8x23; -mod sqrt_i32_fp8x23; -mod sqrt_i32_fp16x16; -mod sqrt_i8_fp8x23; -mod sqrt_i8_fp16x16; -mod sqrt_u32_fp8x23; -mod sqrt_u32_fp16x16; -mod or_fp16x16; -mod or_fp16x16_broadcast; -mod or_fp8x23; -mod or_fp8x23_broadcast; -mod or_i32; -mod or_i32_broadcast; -mod or_i8; -mod or_i8_broadcast; -mod or_u32; -mod or_u32_broadcast; -mod xor_fp16x16; -mod xor_fp16x16_broadcast; -mod xor_fp8x23; -mod xor_fp8x23_broadcast; -mod xor_i32; -mod xor_i32_broadcast; -mod xor_i8; -mod xor_i8_broadcast; -mod xor_u32; -mod xor_u32_broadcast; -mod matmul_fp16x16_1d; -mod matmul_fp16x16_2x2; -mod matmul_fp16x16_2x1; -mod matmul_fp16x16_1x2; -mod matmul_fp8x23_1d; -mod matmul_fp8x23_2x2; -mod matmul_fp8x23_2x1; -mod matmul_fp8x23_1x2; -mod matmul_i32_1d; -mod matmul_i32_2x2; -mod matmul_i32_2x1; -mod matmul_i32_1x2; -mod matmul_i8_1d; -mod matmul_i8_2x2; -mod matmul_i8_2x1; -mod matmul_i8_1x2; -mod matmul_u32_1d; -mod matmul_u32_2x2; -mod matmul_u32_2x1; -mod matmul_u32_1x2; -mod acosh_fp16x16; -mod acosh_fp8x23; -mod acosh_i32_fp8x23; -mod acosh_i32_fp16x16; -mod acosh_i8_fp8x23; -mod acosh_i8_fp16x16; -mod acosh_u32_fp8x23; -mod acosh_u32_fp16x16; -mod asinh_fp16x16; -mod asinh_fp8x23; -mod asinh_i32_fp8x23; -mod asinh_i32_fp16x16; -mod asinh_i8_fp8x23; -mod asinh_i8_fp16x16; -mod asinh_u32_fp8x23; -mod asinh_u32_fp16x16; -mod add_fp16x16; -mod add_fp16x16_broadcast; -mod add_fp8x23; -mod add_fp8x23_broadcast; -mod add_i32; -mod add_i32_broadcast; -mod add_i8; -mod add_i8_broadcast; -mod add_u32; -mod add_u32_broadcast; -mod sub_fp16x16; -mod sub_fp16x16_broadcast; -mod sub_fp8x23; -mod sub_fp8x23_broadcast; -mod sub_i32; -mod sub_i32_broadcast; -mod sub_i8; -mod sub_i8_broadcast; -mod sub_u32; -mod sub_u32_broadcast; -mod mul_fp16x16; -mod mul_fp16x16_broadcast; -mod mul_fp8x23; -mod mul_fp8x23_broadcast; -mod mul_i32; -mod mul_i32_broadcast; -mod mul_i8; -mod mul_i8_broadcast; -mod mul_u32; -mod mul_u32_broadcast; -mod div_fp16x16; -mod div_fp16x16_broadcast; -mod div_fp8x23; -mod div_fp8x23_broadcast; -mod div_i32; -mod div_i32_broadcast; -mod div_i8; -mod div_i8_broadcast; -mod div_u32; -mod div_u32_broadcast; -mod leaky_relu_fp16x16; -mod leaky_relu_fp8x23; -mod leaky_relu_i32_fp8x23; -mod leaky_relu_i32_fp16x16; -mod leaky_relu_i8_fp8x23; -mod leaky_relu_i8_fp16x16; -mod linear_fp16x16; -mod linear_fp8x23; -mod linear_i32; -mod linear_i8; -mod linear_u32; -mod logsoftmax_fp16x16_axis_0; -mod logsoftmax_fp16x16_axis_1; -mod logsoftmax_fp8x23_axis_0; -mod logsoftmax_fp8x23_axis_1; -mod logsoftmax_i32_fp8x23_axis_0; -mod logsoftmax_i32_fp8x23_axis_1; -mod logsoftmax_i32_fp16x16_axis_0; -mod logsoftmax_i32_fp16x16_axis_1; -mod logsoftmax_i8_fp8x23_axis_0; -mod logsoftmax_i8_fp8x23_axis_1; -mod logsoftmax_i8_fp16x16_axis_0; -mod logsoftmax_i8_fp16x16_axis_1; -mod logsoftmax_u32_fp8x23_axis_0; -mod logsoftmax_u32_fp8x23_axis_1; -mod logsoftmax_u32_fp16x16_axis_0; -mod logsoftmax_u32_fp16x16_axis_1; -mod relu_fp16x16; -mod relu_fp8x23; -mod relu_i32; -mod relu_i8; -mod sigmoid_fp8x23; -mod sigmoid_fp16x16; -mod sigmoid_i32_fp8x23; -mod sigmoid_i32_fp16x16; -mod sigmoid_i8_fp8x23; -mod sigmoid_i8_fp16x16; -mod sigmoid_u32_fp8x23; -mod sigmoid_u32_fp16x16; -mod softmax_fp8x23; -mod softmax_fp16x16; -mod softmax_i32_fp8x23; -mod softmax_i32_fp16x16; -mod softmax_i8_fp8x23; -mod softmax_i8_fp16x16; -mod softmax_u32_fp8x23; -mod softmax_u32_fp16x16; -mod softplus_fp8x23; -mod softplus_fp16x16; -mod softplus_i32_fp8x23; -mod softplus_i32_fp16x16; -mod softplus_i8_fp8x23; -mod softplus_i8_fp16x16; -mod softplus_u32_fp8x23; -mod softplus_u32_fp16x16; -mod softsign_fp8x23; -mod softsign_fp16x16; -mod softsign_i32_fp8x23; -mod softsign_i32_fp16x16; -mod softsign_i8_fp8x23; -mod softsign_i8_fp16x16; -mod softsign_u32_fp8x23; -mod softsign_u32_fp16x16; -mod sin_fp16x16; -mod sin_fp8x23; -mod sin_i32_fp8x23; -mod sin_i32_fp16x16; -mod sin_i8_fp8x23; -mod sin_i8_fp16x16; -mod sin_u32_fp8x23; -mod sin_u32_fp16x16; -mod concat_fp16x16_1d; -mod concat_fp16x16_2d; -mod concat_fp16x16_3d_default; -mod concat_fp16x16_3d_axis_1; -mod concat_fp16x16_3d_axis_2; -mod concat_fp16x16_3d_three_tensors_axis_1; -mod concat_fp16x16_3d_three_tensors_axis_2; -mod concat_fp8x23_1d; -mod concat_fp8x23_2d; -mod concat_fp8x23_3d_default; -mod concat_fp8x23_3d_axis_1; -mod concat_fp8x23_3d_axis_2; -mod concat_fp8x23_3d_three_tensors_axis_1; -mod concat_fp8x23_3d_three_tensors_axis_2; -mod concat_i32_1d; -mod concat_i32_2d; -mod concat_i32_3d_default; -mod concat_i32_3d_axis_1; -mod concat_i32_3d_axis_2; -mod concat_i32_3d_three_tensors_axis_1; -mod concat_i32_3d_three_tensors_axis_2; -mod concat_i8_1d; -mod concat_i8_2d; -mod concat_i8_3d_default; -mod concat_i8_3d_axis_1; -mod concat_i8_3d_axis_2; -mod concat_i8_3d_three_tensors_axis_1; -mod concat_i8_3d_three_tensors_axis_2; -mod concat_u32_1d; -mod concat_u32_2d; -mod concat_u32_3d_default; -mod concat_u32_3d_axis_1; -mod concat_u32_3d_axis_2; -mod concat_u32_3d_three_tensors_axis_1; -mod concat_u32_3d_three_tensors_axis_2; +// mod acos_fp8x23; +// mod acos_fp16x16; +// mod argmax_fp16x16_1D_default; +// mod argmax_fp16x16_1D_keepdims_false; +// mod argmax_fp16x16_1D_last_index; +// mod argmax_fp16x16_2D_default; +// mod argmax_fp16x16_2D_keepdims_false; +// mod argmax_fp16x16_2D_last_index; +// mod argmax_fp16x16_3D_default; +// mod argmax_fp16x16_3D_keepdims_false; +// mod argmax_fp16x16_3D_last_index; +// mod argmax_fp8x23_1D_default; +// mod argmax_fp8x23_1D_keepdims_false; +// mod argmax_fp8x23_1D_last_index; +// mod argmax_fp8x23_2D_default; +// mod argmax_fp8x23_2D_keepdims_false; +// mod argmax_fp8x23_2D_last_index; +// mod argmax_fp8x23_3D_default; +// mod argmax_fp8x23_3D_keepdims_false; +// mod argmax_fp8x23_3D_last_index; +// mod argmax_i32_1D_default; +// mod argmax_i32_1D_keepdims_false; +// mod argmax_i32_1D_last_index; +// mod argmax_i32_2D_default; +// mod argmax_i32_2D_keepdims_false; +// mod argmax_i32_2D_last_index; +// mod argmax_i32_3D_default; +// mod argmax_i32_3D_keepdims_false; +// mod argmax_i32_3D_last_index; +// mod argmax_i8_1D_default; +// mod argmax_i8_1D_keepdims_false; +// mod argmax_i8_1D_last_index; +// mod argmax_i8_2D_default; +// mod argmax_i8_2D_keepdims_false; +// mod argmax_i8_2D_last_index; +// mod argmax_i8_3D_default; +// mod argmax_i8_3D_keepdims_false; +// mod argmax_i8_3D_last_index; +// mod argmax_u32_1D_default; +// mod argmax_u32_1D_keepdims_false; +// mod argmax_u32_1D_last_index; +// mod argmax_u32_2D_default; +// mod argmax_u32_2D_keepdims_false; +// mod argmax_u32_2D_last_index; +// mod argmax_u32_3D_default; +// mod argmax_u32_3D_keepdims_false; +// mod argmax_u32_3D_last_index; +// mod argmin_fp16x16_1D_default; +// mod argmin_fp16x16_1D_keepdims_false; +// mod argmin_fp16x16_1D_last_index; +// mod argmin_fp16x16_2D_default; +// mod argmin_fp16x16_2D_keepdims_false; +// mod argmin_fp16x16_2D_last_index; +// mod argmin_fp16x16_3D_default; +// mod argmin_fp16x16_3D_keepdims_false; +// mod argmin_fp16x16_3D_last_index; +// mod argmin_fp8x23_1D_default; +// mod argmin_fp8x23_1D_keepdims_false; +// mod argmin_fp8x23_1D_last_index; +// mod argmin_fp8x23_2D_default; +// mod argmin_fp8x23_2D_keepdims_false; +// mod argmin_fp8x23_2D_last_index; +// mod argmin_fp8x23_3D_default; +// mod argmin_fp8x23_3D_keepdims_false; +// mod argmin_fp8x23_3D_last_index; +// mod argmin_i32_1D_default; +// mod argmin_i32_1D_keepdims_false; +// mod argmin_i32_1D_last_index; +// mod argmin_i32_2D_default; +// mod argmin_i32_2D_keepdims_false; +// mod argmin_i32_2D_last_index; +// mod argmin_i32_3D_default; +// mod argmin_i32_3D_keepdims_false; +// mod argmin_i32_3D_last_index; +// mod argmin_i8_1D_default; +// mod argmin_i8_1D_keepdims_false; +// mod argmin_i8_1D_last_index; +// mod argmin_i8_2D_default; +// mod argmin_i8_2D_keepdims_false; +// mod argmin_i8_2D_last_index; +// mod argmin_i8_3D_default; +// mod argmin_i8_3D_keepdims_false; +// mod argmin_i8_3D_last_index; +// mod argmin_u32_1D_default; +// mod argmin_u32_1D_keepdims_false; +// mod argmin_u32_1D_last_index; +// mod argmin_u32_2D_default; +// mod argmin_u32_2D_keepdims_false; +// mod argmin_u32_2D_last_index; +// mod argmin_u32_3D_default; +// mod argmin_u32_3D_keepdims_false; +// mod argmin_u32_3D_last_index; +// mod transpose_fp16x16_2d; +// mod transpose_fp16x16_3d; +// mod transpose_fp8x23_2d; +// mod transpose_fp8x23_3d; +// mod transpose_i32_2d; +// mod transpose_i32_3d; +// mod transpose_i8_2d; +// mod transpose_i8_3d; +// mod transpose_u32_2d; +// mod transpose_u32_3d; +// mod asin_fp16x16; +// mod asin_fp8x23; +// mod atan_fp16x16; +// mod atan_fp8x23; +// mod atan_i32_fp8x23; +// mod atan_i32_fp16x16; +// mod atan_i8_fp8x23; +// mod atan_i8_fp16x16; +// mod atan_u32_fp8x23; +// mod atan_u32_fp16x16; +// mod ceil_fp16x16; +// mod ceil_fp8x23; +// mod cos_fp16x16; +// mod cos_fp8x23; +// mod cos_i32_fp8x23; +// mod cos_i32_fp16x16; +// mod cos_i8_fp8x23; +// mod cos_i8_fp16x16; +// mod cos_u32_fp8x23; +// mod cos_u32_fp16x16; +// mod cumsum_fp16x16_1d_default; +// mod cumsum_fp16x16_1d_exclusive; +// mod cumsum_fp16x16_1d_reverse; +// mod cumsum_fp16x16_1d_reverse_exclusive; +// mod cumsum_fp16x16_2d_axis_0; +// mod cumsum_fp16x16_2d_axis_1; +// mod cumsum_fp8x23_1d_default; +// mod cumsum_fp8x23_1d_exclusive; +// mod cumsum_fp8x23_1d_reverse; +// mod cumsum_fp8x23_1d_reverse_exclusive; +// mod cumsum_fp8x23_2d_axis_0; +// mod cumsum_fp8x23_2d_axis_1; +// mod cumsum_i32_1d_default; +// mod cumsum_i32_1d_exclusive; +// mod cumsum_i32_1d_reverse; +// mod cumsum_i32_1d_reverse_exclusive; +// mod cumsum_i32_2d_axis_0; +// mod cumsum_i32_2d_axis_1; +// mod cumsum_i8_1d_default; +// mod cumsum_i8_1d_exclusive; +// mod cumsum_i8_1d_reverse; +// mod cumsum_i8_1d_reverse_exclusive; +// mod cumsum_i8_2d_axis_0; +// mod cumsum_i8_2d_axis_1; +// mod cumsum_u32_1d_default; +// mod cumsum_u32_1d_exclusive; +// mod cumsum_u32_1d_reverse; +// mod cumsum_u32_1d_reverse_exclusive; +// mod cumsum_u32_2d_axis_0; +// mod cumsum_u32_2d_axis_1; +// mod cosh_fp16x16; +// mod cosh_fp8x23; +// mod cosh_i32_fp8x23; +// mod cosh_i32_fp16x16; +// mod cosh_i8_fp8x23; +// mod cosh_i8_fp16x16; +// mod cosh_u32_fp8x23; +// mod cosh_u32_fp16x16; +// mod sinh_fp16x16; +// mod sinh_fp8x23; +// mod sinh_i32_fp8x23; +// mod sinh_i32_fp16x16; +// mod sinh_i8_fp8x23; +// mod sinh_i8_fp16x16; +// mod sinh_u32_fp8x23; +// mod sinh_u32_fp16x16; +// mod tanh_fp16x16; +// mod tanh_fp8x23; +// mod tanh_i32_fp8x23; +// mod tanh_i32_fp16x16; +// mod tanh_i8_fp8x23; +// mod tanh_i8_fp16x16; +// mod tanh_u32_fp8x23; +// mod tanh_u32_fp16x16; +// mod log_fp16x16; +// mod log_fp8x23; +// mod log_i32_fp8x23; +// mod log_i32_fp16x16; +// mod log_i8_fp8x23; +// mod log_i8_fp16x16; +// mod log_u32_fp8x23; +// mod log_u32_fp16x16; +// mod reduce_sum_fp16x16_1D; +// mod reduce_sum_fp16x16_2D_default; +// mod reduce_sum_fp16x16_2D_keepdims; +// mod reduce_sum_fp16x16_2D_axis_1; +// mod reduce_sum_fp8x23_1D; +// mod reduce_sum_fp8x23_2D_default; +// mod reduce_sum_fp8x23_2D_keepdims; +// mod reduce_sum_fp8x23_2D_axis_1; +// mod reduce_sum_i32_1D; +// mod reduce_sum_i32_2D_default; +// mod reduce_sum_i32_2D_keepdims; +// mod reduce_sum_i32_2D_axis_1; +// mod reduce_sum_i8_1D; +// mod reduce_sum_i8_2D_default; +// mod reduce_sum_i8_2D_keepdims; +// mod reduce_sum_i8_2D_axis_1; +// mod reduce_sum_u32_1D; +// mod reduce_sum_u32_2D_default; +// mod reduce_sum_u32_2D_keepdims; +// mod reduce_sum_u32_2D_axis_1; +// mod exp_fp16x16; +// mod exp_fp8x23; +// mod exp_i32_fp8x23; +// mod exp_i32_fp16x16; +// mod exp_i8_fp8x23; +// mod exp_i8_fp16x16; +// mod exp_u32_fp8x23; +// mod exp_u32_fp16x16; +// mod equal_fp16x16; +// mod equal_fp16x16_broadcast; +// mod equal_fp8x23; +// mod equal_fp8x23_broadcast; +// mod equal_i32; +// mod equal_i32_broadcast; +// mod equal_i8; +// mod equal_i8_broadcast; +// mod equal_u32; +// mod equal_u32_broadcast; +// mod greater_fp16x16; +// mod greater_fp16x16_broadcast; +// mod greater_fp8x23; +// mod greater_fp8x23_broadcast; +// mod greater_i32; +// mod greater_i32_broadcast; +// mod greater_i8; +// mod greater_i8_broadcast; +// mod greater_u32; +// mod greater_u32_broadcast; +// mod less_equal_fp16x16; +// mod less_equal_fp16x16_broadcast; +// mod less_equal_fp8x23; +// mod less_equal_fp8x23_broadcast; +// mod less_equal_i32; +// mod less_equal_i32_broadcast; +// mod less_equal_i8; +// mod less_equal_i8_broadcast; +// mod less_equal_u32; +// mod less_equal_u32_broadcast; +// mod sqrt_fp16x16; +// mod sqrt_fp8x23; +// mod sqrt_i32_fp8x23; +// mod sqrt_i32_fp16x16; +// mod sqrt_i8_fp8x23; +// mod sqrt_i8_fp16x16; +// mod sqrt_u32_fp8x23; +// mod sqrt_u32_fp16x16; +// mod or_fp16x16; +// mod or_fp16x16_broadcast; +// mod or_fp8x23; +// mod or_fp8x23_broadcast; +// mod or_i32; +// mod or_i32_broadcast; +// mod or_i8; +// mod or_i8_broadcast; +// mod or_u32; +// mod or_u32_broadcast; +// mod xor_fp16x16; +// mod xor_fp16x16_broadcast; +// mod xor_fp8x23; +// mod xor_fp8x23_broadcast; +// mod xor_i32; +// mod xor_i32_broadcast; +// mod xor_i8; +// mod xor_i8_broadcast; +// mod xor_u32; +// mod xor_u32_broadcast; +// mod matmul_fp16x16_1d; +// mod matmul_fp16x16_2x2; +// mod matmul_fp16x16_2x1; +// mod matmul_fp16x16_1x2; +// mod matmul_fp8x23_1d; +// mod matmul_fp8x23_2x2; +// mod matmul_fp8x23_2x1; +// mod matmul_fp8x23_1x2; +// mod matmul_i32_1d; +// mod matmul_i32_2x2; +// mod matmul_i32_2x1; +// mod matmul_i32_1x2; +// mod matmul_i8_1d; +// mod matmul_i8_2x2; +// mod matmul_i8_2x1; +// mod matmul_i8_1x2; +// mod matmul_u32_1d; +// mod matmul_u32_2x2; +// mod matmul_u32_2x1; +// mod matmul_u32_1x2; +// mod acosh_fp16x16; +// mod acosh_fp8x23; +// mod acosh_i32_fp8x23; +// mod acosh_i32_fp16x16; +// mod acosh_i8_fp8x23; +// mod acosh_i8_fp16x16; +// mod acosh_u32_fp8x23; +// mod acosh_u32_fp16x16; +// mod asinh_fp16x16; +// mod asinh_fp8x23; +// mod asinh_i32_fp8x23; +// mod asinh_i32_fp16x16; +// mod asinh_i8_fp8x23; +// mod asinh_i8_fp16x16; +// mod asinh_u32_fp8x23; +// mod asinh_u32_fp16x16; +// mod add_fp16x16; +// mod add_fp16x16_broadcast; +// mod add_fp8x23; +// mod add_fp8x23_broadcast; +// mod add_i32; +// mod add_i32_broadcast; +// mod add_i8; +// mod add_i8_broadcast; +// mod add_u32; +// mod add_u32_broadcast; +// mod sub_fp16x16; +// mod sub_fp16x16_broadcast; +// mod sub_fp8x23; +// mod sub_fp8x23_broadcast; +// mod sub_i32; +// mod sub_i32_broadcast; +// mod sub_i8; +// mod sub_i8_broadcast; +// mod sub_u32; +// mod sub_u32_broadcast; +// mod mul_fp16x16; +// mod mul_fp16x16_broadcast; +// mod mul_fp8x23; +// mod mul_fp8x23_broadcast; +// mod mul_i32; +// mod mul_i32_broadcast; +// mod mul_i8; +// mod mul_i8_broadcast; +// mod mul_u32; +// mod mul_u32_broadcast; +// mod div_fp16x16; +// mod div_fp16x16_broadcast; +// mod div_fp8x23; +// mod div_fp8x23_broadcast; +// mod div_i32; +// mod div_i32_broadcast; +// mod div_i8; +// mod div_i8_broadcast; +// mod div_u32; +// mod div_u32_broadcast; +// mod leaky_relu_fp16x16; +// mod leaky_relu_fp8x23; +// mod leaky_relu_i32_fp8x23; +// mod leaky_relu_i32_fp16x16; +// mod leaky_relu_i8_fp8x23; +// mod leaky_relu_i8_fp16x16; +// mod linear_fp16x16; +// mod linear_fp8x23; +// mod linear_i32; +// mod linear_i8; +// mod linear_u32; +// mod logsoftmax_fp16x16_axis_0; +// mod logsoftmax_fp16x16_axis_1; +// mod logsoftmax_fp8x23_axis_0; +// mod logsoftmax_fp8x23_axis_1; +// mod logsoftmax_i32_fp8x23_axis_0; +// mod logsoftmax_i32_fp8x23_axis_1; +// mod logsoftmax_i32_fp16x16_axis_0; +// mod logsoftmax_i32_fp16x16_axis_1; +// mod logsoftmax_i8_fp8x23_axis_0; +// mod logsoftmax_i8_fp8x23_axis_1; +// mod logsoftmax_i8_fp16x16_axis_0; +// mod logsoftmax_i8_fp16x16_axis_1; +// mod logsoftmax_u32_fp8x23_axis_0; +// mod logsoftmax_u32_fp8x23_axis_1; +// mod logsoftmax_u32_fp16x16_axis_0; +// mod logsoftmax_u32_fp16x16_axis_1; +// mod relu_fp16x16; +// mod relu_fp8x23; +// mod relu_i32; +// mod relu_i8; +// mod sigmoid_fp8x23; +// mod sigmoid_fp16x16; +// mod sigmoid_i32_fp8x23; +// mod sigmoid_i32_fp16x16; +// mod sigmoid_i8_fp8x23; +// mod sigmoid_i8_fp16x16; +// mod sigmoid_u32_fp8x23; +// mod sigmoid_u32_fp16x16; +// mod softmax_fp8x23; +// mod softmax_fp16x16; +// mod softmax_i32_fp8x23; +// mod softmax_i32_fp16x16; +// mod softmax_i8_fp8x23; +// mod softmax_i8_fp16x16; +// mod softmax_u32_fp8x23; +// mod softmax_u32_fp16x16; +// mod softplus_fp8x23; +// mod softplus_fp16x16; +// mod softplus_i32_fp8x23; +// mod softplus_i32_fp16x16; +// mod softplus_i8_fp8x23; +// mod softplus_i8_fp16x16; +// mod softplus_u32_fp8x23; +// mod softplus_u32_fp16x16; +// mod softsign_fp8x23; +// mod softsign_fp16x16; +// mod softsign_i32_fp8x23; +// mod softsign_i32_fp16x16; +// mod softsign_i8_fp8x23; +// mod softsign_i8_fp16x16; +// mod softsign_u32_fp8x23; +// mod softsign_u32_fp16x16; +// mod sin_fp16x16; +// mod sin_fp8x23; +// mod sin_i32_fp8x23; +// mod sin_i32_fp16x16; +// mod sin_i8_fp8x23; +// mod sin_i8_fp16x16; +// mod sin_u32_fp8x23; +// mod sin_u32_fp16x16; +// mod concat_fp16x16_1d; +// mod concat_fp16x16_2d; +// mod concat_fp16x16_3d_default; +// mod concat_fp16x16_3d_axis_1; +// mod concat_fp16x16_3d_axis_2; +// mod concat_fp16x16_3d_three_tensors_axis_1; +// mod concat_fp16x16_3d_three_tensors_axis_2; +// mod concat_fp8x23_1d; +// mod concat_fp8x23_2d; +// mod concat_fp8x23_3d_default; +// mod concat_fp8x23_3d_axis_1; +// mod concat_fp8x23_3d_axis_2; +// mod concat_fp8x23_3d_three_tensors_axis_1; +// mod concat_fp8x23_3d_three_tensors_axis_2; +// mod concat_i32_1d; +// mod concat_i32_2d; +// mod concat_i32_3d_default; +// mod concat_i32_3d_axis_1; +// mod concat_i32_3d_axis_2; +// mod concat_i32_3d_three_tensors_axis_1; +// mod concat_i32_3d_three_tensors_axis_2; +// mod concat_i8_1d; +// mod concat_i8_2d; +// mod concat_i8_3d_default; +// mod concat_i8_3d_axis_1; +// mod concat_i8_3d_axis_2; +// mod concat_i8_3d_three_tensors_axis_1; +// mod concat_i8_3d_three_tensors_axis_2; +// mod concat_u32_1d; +// mod concat_u32_2d; +// mod concat_u32_3d_default; +// mod concat_u32_3d_axis_1; +// mod concat_u32_3d_axis_2; +// mod concat_u32_3d_three_tensors_axis_1; +// mod concat_u32_3d_three_tensors_axis_2; diff --git a/src/tests/nodes/abs_fp16x16.cairo b/src/tests/nodes/abs_fp16x16.cairo index 8af5dcee5..7a20b16d9 100644 --- a/src/tests/nodes/abs_fp16x16.cairo +++ b/src/tests/nodes/abs_fp16x16.cairo @@ -1,11 +1,12 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] @@ -17,4 +18,4 @@ fn test_abs_fp16x16() { let y = input_0.abs(); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo index 786dd3d68..c82f75cce 100644 --- a/src/tests/nodes/abs_fp16x16/input_0.cairo +++ b/src/tests/nodes/abs_fp16x16/input_0.cairo @@ -1,19 +1,20 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 7536640, sign: true }); - data.append(FixedType { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: true }); + data.append(FP16x16 { mag: 7929856, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo index 957f60884..985f06031 100644 --- a/src/tests/nodes/abs_fp16x16/output_0.cairo +++ b/src/tests/nodes/abs_fp16x16/output_0.cairo @@ -1,19 +1,20 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 7536640, sign: false }); - data.append(FixedType { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 7929856, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_fp8x23.cairo b/src/tests/nodes/abs_fp8x23.cairo index bea33535f..53987cac7 100644 --- a/src/tests/nodes/abs_fp8x23.cairo +++ b/src/tests/nodes/abs_fp8x23.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; - +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_abs_fp8x23() { let y = input_0.abs(); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo index 3a0c86191..4a633b7a4 100644 --- a/src/tests/nodes/abs_fp8x23/input_0.cairo +++ b/src/tests/nodes/abs_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 788529152, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo index 97f823a8c..d872b3ac7 100644 --- a/src/tests/nodes/abs_fp8x23/output_0.cairo +++ b/src/tests/nodes/abs_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 788529152, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/abs_i32.cairo b/src/tests/nodes/abs_i32.cairo index bd358e4ed..3b3660668 100644 --- a/src/tests/nodes/abs_i32.cairo +++ b/src/tests/nodes/abs_i32.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ + Tensor_i32_fp8x23, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo index 69a5c106b..135f23528 100644 --- a/src/tests/nodes/abs_i32/input_0.cairo +++ b/src/tests/nodes/abs_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,4 +17,4 @@ fn input_0() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo index 677e44037..16e0cc92b 100644 --- a/src/tests/nodes/abs_i32/output_0.cairo +++ b/src/tests/nodes/abs_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,4 +17,4 @@ fn output_0() -> Tensor { let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_i8.cairo b/src/tests/nodes/abs_i8.cairo index 52ab8f4e3..411d404ac 100644 --- a/src/tests/nodes/abs_i8.cairo +++ b/src/tests/nodes/abs_i8.cairo @@ -1,11 +1,12 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] @@ -17,4 +18,4 @@ fn test_abs_i8() { let y = input_0.abs(); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo index 3f06252c1..1d796713e 100644 --- a/src/tests/nodes/abs_i8/input_0.cairo +++ b/src/tests/nodes/abs_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo index 60b03dafb..1542c9bf0 100644 --- a/src/tests/nodes/abs_i8/output_0.cairo +++ b/src/tests/nodes/abs_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/acos_fp8x23.cairo b/src/tests/nodes/acos_fp8x23.cairo index b15d2a59d..4b0c9d965 100644 --- a/src/tests/nodes/acos_fp8x23.cairo +++ b/src/tests/nodes/acos_fp8x23.cairo @@ -7,8 +7,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo index af2939887..6f4eab036 100644 --- a/src/tests/nodes/acos_fp8x23/input_0.cairo +++ b/src/tests/nodes/acos_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3385979, sign: true }); - data.append(FixedType { mag: 6224397, sign: false }); - data.append(FixedType { mag: 190013, sign: true }); - data.append(FixedType { mag: 8257919, sign: true }); + data.append(FP8x23 { mag: 3385979, sign: true }); + data.append(FP8x23 { mag: 6224397, sign: false }); + data.append(FP8x23 { mag: 190013, sign: true }); + data.append(FP8x23 { mag: 8257919, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo index bcbfe60ca..0d4601181 100644 --- a/src/tests/nodes/acos_fp8x23/output_0.cairo +++ b/src/tests/nodes/acos_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16662195, sign: false }); - data.append(FixedType { mag: 6163433, sign: false }); - data.append(FixedType { mag: 13366824, sign: false }); - data.append(FixedType { mag: 24870922, sign: false }); + data.append(FP8x23 { mag: 16662195, sign: false }); + data.append(FP8x23 { mag: 6163433, sign: false }); + data.append(FP8x23 { mag: 13366824, sign: false }); + data.append(FP8x23 { mag: 24870922, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_fp8x23.cairo b/src/tests/nodes/acosh_fp8x23.cairo index 111a9b881..91f99ab6f 100644 --- a/src/tests/nodes/acosh_fp8x23.cairo +++ b/src/tests/nodes/acosh_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo index bbf740ee2..151db66a7 100644 --- a/src/tests/nodes/acosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 9774601, sign: false }); - data.append(FixedType { mag: 29725534, sign: false }); - data.append(FixedType { mag: 20607627, sign: false }); - data.append(FixedType { mag: 39982645, sign: false }); + data.append(FP8x23 { mag: 9774601, sign: false }); + data.append(FP8x23 { mag: 29725534, sign: false }); + data.append(FP8x23 { mag: 20607627, sign: false }); + data.append(FP8x23 { mag: 39982645, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo index f51b83b01..778ce925a 100644 --- a/src/tests/nodes/acosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4758107, sign: false }); - data.append(FixedType { mag: 16255001, sign: false }); - data.append(FixedType { mag: 12982783, sign: false }); - data.append(FixedType { mag: 18820070, sign: false }); + data.append(FP8x23 { mag: 4758107, sign: false }); + data.append(FP8x23 { mag: 16255001, sign: false }); + data.append(FP8x23 { mag: 12982783, sign: false }); + data.append(FP8x23 { mag: 18820070, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo index 8ed65eca9..f327fcebd 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo index 5404b904b..d8eaeef3f 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo index 17f2815ee..b3c1b2680 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 14786995, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 14786995, sign: false }); - data.append(FixedType { mag: 14786995, sign: false }); + data.append(FP8x23 { mag: 14786995, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 14786995, sign: false }); + data.append(FP8x23 { mag: 14786995, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo index 33483a44f..ed0d81aca 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo index 51b510820..b51f40cc1 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo index b3ad39dff..8716954f5 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 14786560, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 17301504, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 14786560, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 17301504, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo index df0a869ae..080eecccc 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 14786995, sign: false }); - data.append(FixedType { mag: 11047443, sign: false }); - data.append(FixedType { mag: 11047443, sign: false }); - data.append(FixedType { mag: 11047443, sign: false }); + data.append(FP8x23 { mag: 14786995, sign: false }); + data.append(FP8x23 { mag: 11047443, sign: false }); + data.append(FP8x23 { mag: 11047443, sign: false }); + data.append(FP8x23 { mag: 11047443, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo index 7c4ea71a3..0af93b756 100644 --- a/src/tests/nodes/add_fp8x23/input_0.cairo +++ b/src/tests/nodes/add_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo index 41684e408..5dc71a528 100644 --- a/src/tests/nodes/add_fp8x23/input_1.cairo +++ b/src/tests/nodes/add_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo index e2d119dd6..bbcaa34fe 100644 --- a/src/tests/nodes/add_fp8x23/output_0.cairo +++ b/src/tests/nodes/add_fp8x23/output_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo index 602a76c22..5c9fff738 100644 --- a/src/tests/nodes/add_i32/input_0.cairo +++ b/src/tests/nodes/add_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo index b5000b71c..f785cc7c9 100644 --- a/src/tests/nodes/add_i32/input_1.cairo +++ b/src/tests/nodes/add_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo index cb1687973..c4dbf3b78 100644 --- a/src/tests/nodes/add_i32/output_0.cairo +++ b/src/tests/nodes/add_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo index f08c83abe..9c981df62 100644 --- a/src/tests/nodes/add_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo index 35b6df79f..5661e125f 100644 --- a/src/tests/nodes/add_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo index 4956e9e2e..552c28cbd 100644 --- a/src/tests/nodes/add_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo index 8ad7f880f..973832901 100644 --- a/src/tests/nodes/add_i8/input_0.cairo +++ b/src/tests/nodes/add_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo index e34106166..9911019b8 100644 --- a/src/tests/nodes/add_i8/input_1.cairo +++ b/src/tests/nodes/add_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo index d7c2df80a..e54ae979a 100644 --- a/src/tests/nodes/add_i8/output_0.cairo +++ b/src/tests/nodes/add_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo index f1e87bcf2..a7394039c 100644 --- a/src/tests/nodes/add_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo index c8ee6cf0a..0c106143b 100644 --- a/src/tests/nodes/add_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo index d9daef08a..21bff3737 100644 --- a/src/tests/nodes/add_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo index 2402b0a39..da1d3d6e7 100644 --- a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo index 69022ff99..f68f70ac1 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo index b2b90e702..9c3e6cea0 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo index c99652544..deec7ab8a 100644 --- a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo index a787ab134..5e88177eb 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo index bc9b7f9f2..821010d26 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo index 4c9828375..09d45d216 100644 --- a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo index 201e925e4..6b1436272 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo index 4d6cb014f..a94190f64 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo index fd95f8346..4d552b0a4 100644 --- a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo index a22c12e1e..3abdd29be 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo index ddf1843cf..b96dddedb 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo index eb3452d72..6f0ce2f79 100644 --- a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo index eb713cb7d..cf4c469df 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo index bb8f95c61..6494d111e 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo index 479527fba..cac25e668 100644 --- a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo index dfddd4b2e..ffa6faa7c 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo index 8c776495d..bebeac449 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo index d87c5929c..e01edd8a8 100644 --- a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo index 9478b4cac..c06bbd1ab 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo index c4ba13458..d342bb780 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo index 23e0373e6..8f1ced1f6 100644 --- a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo index 427592d1d..cb88599c2 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo index 43965073c..1934901e0 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo index f5474387f..9c2553e98 100644 --- a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo index 00876660e..7c29f220d 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo index cfbdbc568..b19257f50 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo index 886edfec2..f3f312d20 100644 --- a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo index a10fb808f..baf2de45d 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo index 215a3a75d..fcf74c49c 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo index 7f0363fa5..f2e89bb9f 100644 --- a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo index 46a466f3b..6f4b0a75b 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo index 0faad52eb..8ab9fd899 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo index 394f511ac..3c5542c75 100644 --- a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo index e0c7dfa07..fb69edd37 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo index df951c7e2..8399bd339 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asin_fp8x23.cairo b/src/tests/nodes/asin_fp8x23.cairo index e4ffa5738..f986b0794 100644 --- a/src/tests/nodes/asin_fp8x23.cairo +++ b/src/tests/nodes/asin_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo index a553ac63f..f49fd866d 100644 --- a/src/tests/nodes/asin_fp8x23/input_0.cairo +++ b/src/tests/nodes/asin_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2340803, sign: true }); - data.append(FixedType { mag: 1785691, sign: false }); - data.append(FixedType { mag: 1184830, sign: true }); - data.append(FixedType { mag: 2276088, sign: true }); + data.append(FP8x23 { mag: 2340803, sign: true }); + data.append(FP8x23 { mag: 1785691, sign: false }); + data.append(FP8x23 { mag: 1184830, sign: true }); + data.append(FP8x23 { mag: 2276088, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo index 6b7d301be..8f71678e8 100644 --- a/src/tests/nodes/asin_fp8x23/output_0.cairo +++ b/src/tests/nodes/asin_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2372298, sign: true }); - data.append(FixedType { mag: 1799460, sign: false }); - data.append(FixedType { mag: 1188806, sign: true }); - data.append(FixedType { mag: 2304984, sign: true }); + data.append(FP8x23 { mag: 2372298, sign: true }); + data.append(FP8x23 { mag: 1799460, sign: false }); + data.append(FP8x23 { mag: 1188806, sign: true }); + data.append(FP8x23 { mag: 2304984, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_fp8x23.cairo b/src/tests/nodes/asinh_fp8x23.cairo index c9248937f..243c8bdc2 100644 --- a/src/tests/nodes/asinh_fp8x23.cairo +++ b/src/tests/nodes/asinh_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo index 9d359bb62..1ec957967 100644 --- a/src/tests/nodes/asinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 33826578, sign: false }); - data.append(FixedType { mag: 11114336, sign: false }); - data.append(FixedType { mag: 28274183, sign: false }); - data.append(FixedType { mag: 11950034, sign: false }); + data.append(FP8x23 { mag: 33826578, sign: false }); + data.append(FP8x23 { mag: 11114336, sign: false }); + data.append(FP8x23 { mag: 28274183, sign: false }); + data.append(FP8x23 { mag: 11950034, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo index 255f254a7..b6bcad295 100644 --- a/src/tests/nodes/asinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 17637476, sign: false }); - data.append(FixedType { mag: 9173457, sign: false }); - data.append(FixedType { mag: 16186111, sign: false }); - data.append(FixedType { mag: 9665119, sign: false }); + data.append(FP8x23 { mag: 17637476, sign: false }); + data.append(FP8x23 { mag: 9173457, sign: false }); + data.append(FP8x23 { mag: 16186111, sign: false }); + data.append(FP8x23 { mag: 9665119, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo index 24c93e422..c032790a7 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo index a0f547c1a..bbc4520bb 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo index d0809859d..136288999 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 12110092, sign: false }); - data.append(FixedType { mag: 7393497, sign: false }); - data.append(FixedType { mag: 17571722, sign: false }); - data.append(FixedType { mag: 15254234, sign: false }); + data.append(FP8x23 { mag: 12110092, sign: false }); + data.append(FP8x23 { mag: 7393497, sign: false }); + data.append(FP8x23 { mag: 17571722, sign: false }); + data.append(FP8x23 { mag: 15254234, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo index f4d349949..6b0a171be 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo index 3b34a63e0..00a01774f 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo index 62a250542..e990be626 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7393280, sign: false }); - data.append(FixedType { mag: 17563648, sign: false }); - data.append(FixedType { mag: 12107776, sign: false }); - data.append(FixedType { mag: 17563648, sign: false }); + data.append(FP8x23 { mag: 7393280, sign: false }); + data.append(FP8x23 { mag: 17563648, sign: false }); + data.append(FP8x23 { mag: 12107776, sign: false }); + data.append(FP8x23 { mag: 17563648, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo index f1f456003..103c09a6f 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 15254234, sign: false }); - data.append(FixedType { mag: 17571722, sign: false }); - data.append(FixedType { mag: 7393497, sign: false }); - data.append(FixedType { mag: 17571722, sign: false }); + data.append(FP8x23 { mag: 15254234, sign: false }); + data.append(FP8x23 { mag: 17571722, sign: false }); + data.append(FP8x23 { mag: 7393497, sign: false }); + data.append(FP8x23 { mag: 17571722, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_fp8x23.cairo b/src/tests/nodes/atan_fp8x23.cairo index 7871b372a..dc743bd29 100644 --- a/src/tests/nodes/atan_fp8x23.cairo +++ b/src/tests/nodes/atan_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo index fa1915f96..abab3421e 100644 --- a/src/tests/nodes/atan_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 912484668, sign: false }); - data.append(FixedType { mag: 261874397, sign: false }); - data.append(FixedType { mag: 35394242, sign: true }); - data.append(FixedType { mag: 977878458, sign: false }); + data.append(FP8x23 { mag: 912484668, sign: false }); + data.append(FP8x23 { mag: 261874397, sign: false }); + data.append(FP8x23 { mag: 35394242, sign: true }); + data.append(FP8x23 { mag: 977878458, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo index 0146efc5b..cf87a7ff6 100644 --- a/src/tests/nodes/atan_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 13099679, sign: false }); - data.append(FixedType { mag: 12908174, sign: false }); - data.append(FixedType { mag: 11224672, sign: true }); - data.append(FixedType { mag: 13104835, sign: false }); + data.append(FP8x23 { mag: 13099679, sign: false }); + data.append(FP8x23 { mag: 12908174, sign: false }); + data.append(FP8x23 { mag: 11224672, sign: true }); + data.append(FP8x23 { mag: 13104835, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo index 930078c81..1fccaf112 100644 --- a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo index 845088b4f..3555f56d3 100644 --- a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo index 3be7be31c..d7f078fd0 100644 --- a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11121764, sign: false }); - data.append(FixedType { mag: 13099124, sign: false }); - data.append(FixedType { mag: 13081473, sign: false }); - data.append(FixedType { mag: 13106891, sign: false }); + data.append(FP8x23 { mag: 11121764, sign: false }); + data.append(FP8x23 { mag: 13099124, sign: false }); + data.append(FP8x23 { mag: 13081473, sign: false }); + data.append(FP8x23 { mag: 13106891, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo index f6c8657ee..11d94991e 100644 --- a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo index e19326dae..cf2a80623 100644 --- a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo index badb38bf1..aaa29617b 100644 --- a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 12247040, sign: true }); - data.append(FixedType { mag: 12337152, sign: true }); - data.append(FixedType { mag: 12247040, sign: true }); - data.append(FixedType { mag: 10477568, sign: true }); + data.append(FP8x23 { mag: 12247040, sign: true }); + data.append(FP8x23 { mag: 12337152, sign: true }); + data.append(FP8x23 { mag: 12247040, sign: true }); + data.append(FP8x23 { mag: 10477568, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo index 0c4e1eddd..02ecc9281 100644 --- a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 13094556, sign: false }); - data.append(FixedType { mag: 13103212, sign: false }); - data.append(FixedType { mag: 13106303, sign: false }); - data.append(FixedType { mag: 13086598, sign: false }); + data.append(FP8x23 { mag: 13094556, sign: false }); + data.append(FP8x23 { mag: 13103212, sign: false }); + data.append(FP8x23 { mag: 13106303, sign: false }); + data.append(FP8x23 { mag: 13086598, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/ceil_fp8x23.cairo b/src/tests/nodes/ceil_fp8x23.cairo index 9f44e7063..73d90864a 100644 --- a/src/tests/nodes/ceil_fp8x23.cairo +++ b/src/tests/nodes/ceil_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo index bff612cc6..a66dd51c5 100644 --- a/src/tests/nodes/ceil_fp8x23/input_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4332983, sign: true }); - data.append(FixedType { mag: 5907229, sign: true }); - data.append(FixedType { mag: 7324851, sign: false }); - data.append(FixedType { mag: 1964182, sign: false }); + data.append(FP8x23 { mag: 4332983, sign: true }); + data.append(FP8x23 { mag: 5907229, sign: true }); + data.append(FP8x23 { mag: 7324851, sign: false }); + data.append(FP8x23 { mag: 1964182, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo index 38c5d9e4a..d512906e4 100644 --- a/src/tests/nodes/ceil_fp8x23/output_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i32_1d.cairo b/src/tests/nodes/concat_i32_1d.cairo index aa07ffa53..2f8367b0d 100644 --- a/src/tests/nodes/concat_i32_1d.cairo +++ b/src/tests/nodes/concat_i32_1d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo index 839d248fb..c4d5d09d6 100644 --- a/src/tests/nodes/concat_i32_1d/input_0.cairo +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo index 4c5f2f235..854f38626 100644 --- a/src/tests/nodes/concat_i32_1d/input_1.cairo +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo index dd049749a..7f7d8cfd5 100644 --- a/src/tests/nodes/concat_i32_1d/output_0.cairo +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_2d.cairo b/src/tests/nodes/concat_i32_2d.cairo index 2dd7a154a..2543ec4cc 100644 --- a/src/tests/nodes/concat_i32_2d.cairo +++ b/src/tests/nodes/concat_i32_2d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo index a58073bdf..4efbd7b9f 100644 --- a/src/tests/nodes/concat_i32_2d/input_0.cairo +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo index 64f7e66f8..cd4373041 100644 --- a/src/tests/nodes/concat_i32_2d/input_1.cairo +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo index 0ad7bfd63..659c42a3d 100644 --- a/src/tests/nodes/concat_i32_2d/output_0.cairo +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1.cairo index f84261a18..d5abf611a 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo index 10311fced..bfffa0607 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo index ba8cae9d6..0dc0e6bae 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo index cefc31de6..76f7a1f94 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_2.cairo b/src/tests/nodes/concat_i32_3d_axis_2.cairo index ea4484d65..1656922ed 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo index 10311fced..bfffa0607 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo index ba8cae9d6..0dc0e6bae 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo index 0bd230421..ca81a8391 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_default.cairo b/src/tests/nodes/concat_i32_3d_default.cairo index 3e9b832cb..a6c651e3a 100644 --- a/src/tests/nodes/concat_i32_3d_default.cairo +++ b/src/tests/nodes/concat_i32_3d_default.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo index 10311fced..bfffa0607 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo index ba8cae9d6..0dc0e6bae 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo index 1c11ae1dd..800cab510 100644 --- a/src/tests/nodes/concat_i32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo index 7a676e6ea..c7a42ba21 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo @@ -6,8 +6,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo index 10311fced..bfffa0607 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo index ba8cae9d6..0dc0e6bae 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo index 074b739fa..6ca90c0d9 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo index d001780b5..1c591df1b 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo index 01019a670..7293314c3 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo @@ -6,8 +6,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo index 10311fced..bfffa0607 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo index ba8cae9d6..0dc0e6bae 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo index 074b739fa..6ca90c0d9 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo index 8b472aebe..60e452271 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_fp8x23.cairo b/src/tests/nodes/cos_fp8x23.cairo index 1736fa9dd..16b8ab8e1 100644 --- a/src/tests/nodes/cos_fp8x23.cairo +++ b/src/tests/nodes/cos_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo index 323d59fb3..08acf3723 100644 --- a/src/tests/nodes/cos_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 659237788, sign: false }); - data.append(FixedType { mag: 648364998, sign: false }); - data.append(FixedType { mag: 215345765, sign: false }); - data.append(FixedType { mag: 592758692, sign: false }); + data.append(FP8x23 { mag: 659237788, sign: false }); + data.append(FP8x23 { mag: 648364998, sign: false }); + data.append(FP8x23 { mag: 215345765, sign: false }); + data.append(FP8x23 { mag: 592758692, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo index baf2e319a..6954cc5f5 100644 --- a/src/tests/nodes/cos_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8379165, sign: true }); - data.append(FixedType { mag: 2655577, sign: true }); - data.append(FixedType { mag: 7201553, sign: false }); - data.append(FixedType { mag: 197048, sign: false }); + data.append(FP8x23 { mag: 8379165, sign: true }); + data.append(FP8x23 { mag: 2655577, sign: true }); + data.append(FP8x23 { mag: 7201553, sign: false }); + data.append(FP8x23 { mag: 197048, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo index 2b076617c..10e972fb8 100644 --- a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo index fe791e2a6..c082497b0 100644 --- a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo index ed32888f7..04db8766a 100644 --- a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8380393, sign: true }); - data.append(FixedType { mag: 2165113, sign: true }); - data.append(FixedType { mag: 778263, sign: true }); - data.append(FixedType { mag: 6125139, sign: false }); + data.append(FP8x23 { mag: 8380393, sign: true }); + data.append(FP8x23 { mag: 2165113, sign: true }); + data.append(FP8x23 { mag: 778263, sign: true }); + data.append(FP8x23 { mag: 6125139, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo index 576e335a8..b6ffb4d97 100644 --- a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo index c9c7ea432..714579c9c 100644 --- a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo index f2319934f..55497998e 100644 --- a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8306688, sign: true }); - data.append(FixedType { mag: 2379776, sign: false }); - data.append(FixedType { mag: 5484544, sign: true }); - data.append(FixedType { mag: 5484544, sign: true }); + data.append(FP8x23 { mag: 8306688, sign: true }); + data.append(FP8x23 { mag: 2379776, sign: false }); + data.append(FP8x23 { mag: 5484544, sign: true }); + data.append(FP8x23 { mag: 5484544, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo index a6d8e8d21..edd0c9bbc 100644 --- a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7580719, sign: true }); - data.append(FixedType { mag: 7515949, sign: true }); - data.append(FixedType { mag: 2165113, sign: true }); - data.append(FixedType { mag: 5196915, sign: false }); + data.append(FP8x23 { mag: 7580719, sign: true }); + data.append(FP8x23 { mag: 7515949, sign: true }); + data.append(FP8x23 { mag: 2165113, sign: true }); + data.append(FP8x23 { mag: 5196915, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_fp8x23.cairo b/src/tests/nodes/cosh_fp8x23.cairo index 888c49561..0e3d5e4dd 100644 --- a/src/tests/nodes/cosh_fp8x23.cairo +++ b/src/tests/nodes/cosh_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo index dc491b7fd..953eb145e 100644 --- a/src/tests/nodes/cosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1254371, sign: false }); - data.append(FixedType { mag: 21304437, sign: false }); - data.append(FixedType { mag: 12450493, sign: true }); - data.append(FixedType { mag: 6511071, sign: true }); + data.append(FP8x23 { mag: 1254371, sign: false }); + data.append(FP8x23 { mag: 21304437, sign: false }); + data.append(FP8x23 { mag: 12450493, sign: true }); + data.append(FP8x23 { mag: 6511071, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo index e59958899..bd1678ae7 100644 --- a/src/tests/nodes/cosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8482567, sign: false }); - data.append(FixedType { mag: 53496638, sign: false }); - data.append(FixedType { mag: 19453932, sign: false }); - data.append(FixedType { mag: 11044927, sign: false }); + data.append(FP8x23 { mag: 8482567, sign: false }); + data.append(FP8x23 { mag: 53496638, sign: false }); + data.append(FP8x23 { mag: 19453932, sign: false }); + data.append(FP8x23 { mag: 11044927, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo index b2df0dfd9..b4e104980 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo index 263e64c52..8cc3d6832 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo index f8eb15e22..4c731b36a 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 84453669, sign: false }); - data.append(FixedType { mag: 84453669, sign: false }); - data.append(FixedType { mag: 12944298, sign: false }); - data.append(FixedType { mag: 12944298, sign: false }); + data.append(FP8x23 { mag: 84453669, sign: false }); + data.append(FP8x23 { mag: 84453669, sign: false }); + data.append(FP8x23 { mag: 12944298, sign: false }); + data.append(FP8x23 { mag: 12944298, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo index 25d95d873..b4b653e0c 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo index 90c297b15..86cd6975f 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo index 9fc2ff00f..f7b36788e 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 31555584, sign: false }); - data.append(FixedType { mag: 31555584, sign: false }); - data.append(FixedType { mag: 31555584, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 31555584, sign: false }); + data.append(FP8x23 { mag: 31555584, sign: false }); + data.append(FP8x23 { mag: 31555584, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo index 6105cd097..6dae4ec6b 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 229078060, sign: false }); - data.append(FixedType { mag: 229078060, sign: false }); - data.append(FixedType { mag: 12944298, sign: false }); - data.append(FixedType { mag: 84453669, sign: false }); + data.append(FP8x23 { mag: 229078060, sign: false }); + data.append(FP8x23 { mag: 229078060, sign: false }); + data.append(FP8x23 { mag: 12944298, sign: false }); + data.append(FP8x23 { mag: 84453669, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_i32_1d_default.cairo b/src/tests/nodes/cumsum_i32_1d_default.cairo index 86846ccbf..23f599828 100644 --- a/src/tests/nodes/cumsum_i32_1d_default.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo index 390c70006..059d2f71e 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo index a68b8ac1c..a421bc5a5 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo index 259a427d3..51d2e8156 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo index 390c70006..059d2f71e 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo index 666d84df3..ce921a7ac 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_reverse.cairo b/src/tests/nodes/cumsum_i32_1d_reverse.cairo index bc0de66e6..cb24b0908 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo index 390c70006..059d2f71e 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo index b49d1eb8c..2122f05c5 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo index 6dc74511d..21b7c46dc 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo index 390c70006..059d2f71e 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo index 38282b7bb..cfba5ea0a 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo index 0d7cbad82..5fd81dc0f 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo index 5f49d52d4..7cdc9b110 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo index 303877fe4..59af3dd09 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo index a33764a4a..16773fdf2 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo index 5f49d52d4..7cdc9b110 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo index 7dacd5740..1047edc62 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_i8_1d_default.cairo b/src/tests/nodes/cumsum_i8_1d_default.cairo index a1a09ba95..2129d5af4 100644 --- a/src/tests/nodes/cumsum_i8_1d_default.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo index 5dea728e3..ba947893b 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo index 0020a682b..032f55e6a 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo index d460ee27c..91285852c 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo index 5dea728e3..ba947893b 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo index e8a2677f7..6ce6d46d8 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse.cairo b/src/tests/nodes/cumsum_i8_1d_reverse.cairo index 8c9ab4e50..8ba0b8f8d 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo index 5dea728e3..ba947893b 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo index c5ba0ed5c..69fad8719 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo index d1bea9d7b..d8938e077 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo index 5dea728e3..ba947893b 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo index 7f0009207..7723f2b2b 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo index 0ecd56f8a..f5ad22550 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo index 76e0a7ee5..4e738a854 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo index ef2cf4fe1..9d00dbf25 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo index 58d00eb00..79d7117db 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo index 76e0a7ee5..4e738a854 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo index 6d9af8387..953143823 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo index 27e734b92..e9d395d58 100644 --- a/src/tests/nodes/div_fp8x23/input_0.cairo +++ b/src/tests/nodes/div_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo index 75120ea60..136ad340b 100644 --- a/src/tests/nodes/div_fp8x23/input_1.cairo +++ b/src/tests/nodes/div_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo index 3a3fa43e2..f6e3a7a4c 100644 --- a/src/tests/nodes/div_fp8x23/output_0.cairo +++ b/src/tests/nodes/div_fp8x23/output_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo index da372e35c..8ffb9d99f 100644 --- a/src/tests/nodes/div_i32/input_0.cairo +++ b/src/tests/nodes/div_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo index d94921270..d62d13f23 100644 --- a/src/tests/nodes/div_i32/input_1.cairo +++ b/src/tests/nodes/div_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo index c40b28c01..216867b65 100644 --- a/src/tests/nodes/div_i32/output_0.cairo +++ b/src/tests/nodes/div_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo index 42ef70667..3af6f52fd 100644 --- a/src/tests/nodes/div_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo index 5c245f8bf..c616bc783 100644 --- a/src/tests/nodes/div_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo index 0854c96ae..fe56ec3c9 100644 --- a/src/tests/nodes/div_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo index ae295d942..16b961104 100644 --- a/src/tests/nodes/div_i8/input_0.cairo +++ b/src/tests/nodes/div_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo index a46ee6563..b3f055063 100644 --- a/src/tests/nodes/div_i8/input_1.cairo +++ b/src/tests/nodes/div_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo index 28f31d38c..19e02c41e 100644 --- a/src/tests/nodes/div_i8/output_0.cairo +++ b/src/tests/nodes/div_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo index 8df73bfba..1759ddebb 100644 --- a/src/tests/nodes/div_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo index 7c39646e2..9574970a3 100644 --- a/src/tests/nodes/div_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo index c7efc133a..e1d9d16da 100644 --- a/src/tests/nodes/div_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo index 52ebf010f..a1e5d37e8 100644 --- a/src/tests/nodes/equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo index 946791c68..8908792fb 100644 --- a/src/tests/nodes/equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo index 7d447e13b..6d32ad9e0 100644 --- a/src/tests/nodes/equal_i32/input_0.cairo +++ b/src/tests/nodes/equal_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo index 2e262f58c..11308fbe0 100644 --- a/src/tests/nodes/equal_i32/input_1.cairo +++ b/src/tests/nodes/equal_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo index f0397c72d..03090f5cf 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo index c03f71e92..21b181f11 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo index 3b8debc1f..2a836708b 100644 --- a/src/tests/nodes/equal_i8/input_0.cairo +++ b/src/tests/nodes/equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo index 0542d4105..c0754b018 100644 --- a/src/tests/nodes/equal_i8/input_1.cairo +++ b/src/tests/nodes/equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo index 9d996d1f8..6b967e8de 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo index 518b780b5..4dd5ab43a 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/exp_fp8x23.cairo b/src/tests/nodes/exp_fp8x23.cairo index 46cc4ee8a..775275f37 100644 --- a/src/tests/nodes/exp_fp8x23.cairo +++ b/src/tests/nodes/exp_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo index ad32cb8e7..713776298 100644 --- a/src/tests/nodes/exp_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 22965160, sign: true }); - data.append(FixedType { mag: 15758081, sign: false }); - data.append(FixedType { mag: 23575455, sign: true }); - data.append(FixedType { mag: 2203079, sign: false }); + data.append(FP8x23 { mag: 22965160, sign: true }); + data.append(FP8x23 { mag: 15758081, sign: false }); + data.append(FP8x23 { mag: 23575455, sign: true }); + data.append(FP8x23 { mag: 2203079, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo index 2cb3822dd..ebe70457b 100644 --- a/src/tests/nodes/exp_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 542924, sign: false }); - data.append(FixedType { mag: 54892916, sign: false }); - data.append(FixedType { mag: 504827, sign: false }); - data.append(FixedType { mag: 10908061, sign: false }); + data.append(FP8x23 { mag: 542924, sign: false }); + data.append(FP8x23 { mag: 54892916, sign: false }); + data.append(FP8x23 { mag: 504827, sign: false }); + data.append(FP8x23 { mag: 10908061, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo index 2a1785f40..a80766579 100644 --- a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo index 38d352e0e..ddb587b4f 100644 --- a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo index c27ff7254..80d213b46 100644 --- a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 61983895, sign: false }); - data.append(FixedType { mag: 3085996, sign: false }); - data.append(FixedType { mag: 22802600, sign: false }); - data.append(FixedType { mag: 61983895, sign: false }); + data.append(FP8x23 { mag: 61983895, sign: false }); + data.append(FP8x23 { mag: 3085996, sign: false }); + data.append(FP8x23 { mag: 22802600, sign: false }); + data.append(FP8x23 { mag: 61983895, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo index dc9db41fa..b2c890307 100644 --- a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo index e884d3d52..0b646e740 100644 --- a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo index d961f99d3..60e8a4085 100644 --- a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 22806528, sign: false }); - data.append(FixedType { mag: 1135616, sign: false }); - data.append(FixedType { mag: 22806528, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 22806528, sign: false }); + data.append(FP8x23 { mag: 1135616, sign: false }); + data.append(FP8x23 { mag: 22806528, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo index f824f5e97..d39129a32 100644 --- a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1244979813, sign: false }); - data.append(FixedType { mag: 168489695, sign: false }); - data.append(FixedType { mag: 61983895, sign: false }); - data.append(FixedType { mag: 458002478, sign: false }); + data.append(FP8x23 { mag: 1244979813, sign: false }); + data.append(FP8x23 { mag: 168489695, sign: false }); + data.append(FP8x23 { mag: 61983895, sign: false }); + data.append(FP8x23 { mag: 458002478, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo index b5f1b3366..80387ee95 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo index b53f4eced..933a5b548 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo index f23e15a94..d819ac07c 100644 --- a/src/tests/nodes/greater_equal_i32/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo index c1d9fe60e..dec6c51df 100644 --- a/src/tests/nodes/greater_equal_i32/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo index c4497df2c..cffa3097e 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo index 419b62e58..6310fdb08 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo index 79d69a00c..8b00d0377 100644 --- a/src/tests/nodes/greater_equal_i8/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo index 0a3a0b6f5..029e0a06a 100644 --- a/src/tests/nodes/greater_equal_i8/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo index 0f899f1bb..96de7cd5e 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo index 0f63b5bd3..bbd53d77e 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo index 2d43a22ef..725b60408 100644 --- a/src/tests/nodes/greater_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo index b272de937..5c337650e 100644 --- a/src/tests/nodes/greater_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo index d186b7c0b..829e41a1a 100644 --- a/src/tests/nodes/greater_i32/input_0.cairo +++ b/src/tests/nodes/greater_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo index 9d2777df5..a9d9a2ce1 100644 --- a/src/tests/nodes/greater_i32/input_1.cairo +++ b/src/tests/nodes/greater_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo index b3a10714d..5edad3e99 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo index b734e30ee..b54c18931 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo index 4d7a9840c..52dff264e 100644 --- a/src/tests/nodes/greater_i8/input_0.cairo +++ b/src/tests/nodes/greater_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo index aed826310..0fe087b98 100644 --- a/src/tests/nodes/greater_i8/input_1.cairo +++ b/src/tests/nodes/greater_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo index 121cdfab1..2724db76a 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo index bfa6eed4a..3546c5d14 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo index 948a06bd9..afc75957d 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 10631720, sign: false }); - data.append(FixedType { mag: 50119017, sign: false }); - data.append(FixedType { mag: 13888927, sign: false }); - data.append(FixedType { mag: 6576321, sign: true }); + data.append(FP8x23 { mag: 10631720, sign: false }); + data.append(FP8x23 { mag: 50119017, sign: false }); + data.append(FP8x23 { mag: 13888927, sign: false }); + data.append(FP8x23 { mag: 6576321, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo index f04a7961c..1efd1ac94 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 10631721, sign: false }); - data.append(FixedType { mag: 50119016, sign: false }); - data.append(FixedType { mag: 13888927, sign: false }); - data.append(FixedType { mag: 657632, sign: true }); + data.append(FP8x23 { mag: 10631721, sign: false }); + data.append(FP8x23 { mag: 50119016, sign: false }); + data.append(FP8x23 { mag: 13888927, sign: false }); + data.append(FP8x23 { mag: 657632, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo index 538668cef..95e32be68 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo index 006d212aa..f4bab4e4f 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo index d8a41747c..176e3161c 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2516582, sign: true }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 2516582, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo index 01061a4c3..03aa6f872 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo index 207cf60cd..fff6b9424 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo index e6d6698fb..0bee17901 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4194304, sign: true }); - data.append(FixedType { mag: 2516582, sign: true }); - data.append(FixedType { mag: 2516582, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: true }); + data.append(FP8x23 { mag: 2516582, sign: true }); + data.append(FP8x23 { mag: 2516582, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo index 37af04feb..beb3e5c00 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo index 227cbadbc..eeaf60706 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_1.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo index faa213d06..495c61d75 100644 --- a/src/tests/nodes/less_equal_i32/input_0.cairo +++ b/src/tests/nodes/less_equal_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo index d3da2e0ce..cb0872f59 100644 --- a/src/tests/nodes/less_equal_i32/input_1.cairo +++ b/src/tests/nodes/less_equal_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo index a0be9aa75..cd982b5f4 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo index 56ec9b835..54fcf41bd 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo index 0ac0f1b53..e925fe88c 100644 --- a/src/tests/nodes/less_equal_i8/input_0.cairo +++ b/src/tests/nodes/less_equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo index c7fe91fb7..d2e2b6393 100644 --- a/src/tests/nodes/less_equal_i8/input_1.cairo +++ b/src/tests/nodes/less_equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo index 7f92fccdf..f1354ce2d 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo index bfa6eed4a..3546c5d14 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo index ba76ff7e0..4c2559510 100644 --- a/src/tests/nodes/less_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo index d2bdc8739..e63fee09c 100644 --- a/src/tests/nodes/less_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo index 60ded4474..fa7ed5b21 100644 --- a/src/tests/nodes/less_i32/input_0.cairo +++ b/src/tests/nodes/less_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo index da168e186..de0c9fd8f 100644 --- a/src/tests/nodes/less_i32/input_1.cairo +++ b/src/tests/nodes/less_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo index b6d9cdc38..e68279114 100644 --- a/src/tests/nodes/less_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo index c0e7c7553..7dc657e23 100644 --- a/src/tests/nodes/less_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo index bdd3d6ebc..1a9617ac8 100644 --- a/src/tests/nodes/less_i8/input_0.cairo +++ b/src/tests/nodes/less_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo index d156b14c9..717dbdd50 100644 --- a/src/tests/nodes/less_i8/input_1.cairo +++ b/src/tests/nodes/less_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo index 25bb5bb5a..3f95cc3af 100644 --- a/src/tests/nodes/less_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo index 27578b470..0c108af1b 100644 --- a/src/tests/nodes/less_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo index b7711dbbd..402bee9ba 100644 --- a/src/tests/nodes/linear_fp8x23/input_0.cairo +++ b/src/tests/nodes/linear_fp8x23/input_0.cairo @@ -1,16 +1,17 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16576692, sign: false }); - data.append(FixedType { mag: 41797636, sign: false }); - data.append(FixedType { mag: 10487655, sign: true }); + data.append(FP8x23 { mag: 16576692, sign: false }); + data.append(FP8x23 { mag: 41797636, sign: false }); + data.append(FP8x23 { mag: 10487655, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo index b09fdd3da..2c8843b63 100644 --- a/src/tests/nodes/linear_fp8x23/input_1.cairo +++ b/src/tests/nodes/linear_fp8x23/input_1.cairo @@ -1,20 +1,21 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1236715, sign: false }); - data.append(FixedType { mag: 4771319, sign: false }); - data.append(FixedType { mag: 8392691, sign: false }); - data.append(FixedType { mag: 36629024, sign: true }); - data.append(FixedType { mag: 34768195, sign: false }); - data.append(FixedType { mag: 2858178, sign: false }); + data.append(FP8x23 { mag: 1236715, sign: false }); + data.append(FP8x23 { mag: 4771319, sign: false }); + data.append(FP8x23 { mag: 8392691, sign: false }); + data.append(FP8x23 { mag: 36629024, sign: true }); + data.append(FP8x23 { mag: 34768195, sign: false }); + data.append(FP8x23 { mag: 2858178, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo index 198c14455..809bcdee8 100644 --- a/src/tests/nodes/linear_fp8x23/input_2.cairo +++ b/src/tests/nodes/linear_fp8x23/input_2.cairo @@ -1,15 +1,16 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 34671437, sign: true }); - data.append(FixedType { mag: 27817938, sign: false }); + data.append(FP8x23 { mag: 34671437, sign: true }); + data.append(FP8x23 { mag: 27817938, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo index 7dccc53bb..1ab90af2c 100644 --- a/src/tests/nodes/linear_fp8x23/output_0.cairo +++ b/src/tests/nodes/linear_fp8x23/output_0.cairo @@ -1,15 +1,16 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 18946433, sign: true }); - data.append(FixedType { mag: 125100432, sign: false }); + data.append(FP8x23 { mag: 18946433, sign: true }); + data.append(FP8x23 { mag: 125100432, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo index 8662d4ca0..3163bf0fd 100644 --- a/src/tests/nodes/linear_i32/input_0.cairo +++ b/src/tests/nodes/linear_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo index 777f600cb..37b56e612 100644 --- a/src/tests/nodes/linear_i32/input_1.cairo +++ b/src/tests/nodes/linear_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo index f0580c1ef..a7c88121e 100644 --- a/src/tests/nodes/linear_i32/input_2.cairo +++ b/src/tests/nodes/linear_i32/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo index d65df270e..9fdbc8764 100644 --- a/src/tests/nodes/linear_i32/output_0.cairo +++ b/src/tests/nodes/linear_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo index b384db765..397f8f06b 100644 --- a/src/tests/nodes/linear_i8/input_0.cairo +++ b/src/tests/nodes/linear_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo index 235be773b..ef3ff4b98 100644 --- a/src/tests/nodes/linear_i8/input_1.cairo +++ b/src/tests/nodes/linear_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo index 855176afc..8eefe1645 100644 --- a/src/tests/nodes/linear_i8/input_2.cairo +++ b/src/tests/nodes/linear_i8/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_2() -> Tensor { diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo index 1617613e7..074f2e650 100644 --- a/src/tests/nodes/linear_i8/output_0.cairo +++ b/src/tests/nodes/linear_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/log_fp8x23.cairo b/src/tests/nodes/log_fp8x23.cairo index 6b6c1c117..b42265b04 100644 --- a/src/tests/nodes/log_fp8x23.cairo +++ b/src/tests/nodes/log_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo index 57e281ede..601e628d4 100644 --- a/src/tests/nodes/log_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 529321914, sign: false }); - data.append(FixedType { mag: 645273413, sign: false }); - data.append(FixedType { mag: 920206991, sign: false }); - data.append(FixedType { mag: 949171945, sign: false }); + data.append(FP8x23 { mag: 529321914, sign: false }); + data.append(FP8x23 { mag: 645273413, sign: false }); + data.append(FP8x23 { mag: 920206991, sign: false }); + data.append(FP8x23 { mag: 949171945, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo index a859ccec6..05627353d 100644 --- a/src/tests/nodes/log_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 34768449, sign: false }); - data.append(FixedType { mag: 36430042, sign: false }); - data.append(FixedType { mag: 39407365, sign: false }); - data.append(FixedType { mag: 39667339, sign: false }); + data.append(FP8x23 { mag: 34768449, sign: false }); + data.append(FP8x23 { mag: 36430042, sign: false }); + data.append(FP8x23 { mag: 39407365, sign: false }); + data.append(FP8x23 { mag: 39667339, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_i32_fp16x16/input_0.cairo b/src/tests/nodes/log_i32_fp16x16/input_0.cairo index c88f7a53b..4431fcbed 100644 --- a/src/tests/nodes/log_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_i32_fp8x23/input_0.cairo b/src/tests/nodes/log_i32_fp8x23/input_0.cairo index 945f62f70..e84cd50ae 100644 --- a/src/tests/nodes/log_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_i32_fp8x23/output_0.cairo b/src/tests/nodes/log_i32_fp8x23/output_0.cairo index a11f0e3d6..1bc06e995 100644 --- a/src/tests/nodes/log_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25130023, sign: false }); - data.append(FixedType { mag: 30944563, sign: false }); - data.append(FixedType { mag: 34204863, sign: false }); - data.append(FixedType { mag: 37267659, sign: false }); + data.append(FP8x23 { mag: 25130023, sign: false }); + data.append(FP8x23 { mag: 30944563, sign: false }); + data.append(FP8x23 { mag: 34204863, sign: false }); + data.append(FP8x23 { mag: 37267659, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_i8_fp16x16/input_0.cairo b/src/tests/nodes/log_i8_fp16x16/input_0.cairo index 3a5c6c37a..cbd67b08e 100644 --- a/src/tests/nodes/log_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i8_fp8x23/input_0.cairo b/src/tests/nodes/log_i8_fp8x23/input_0.cairo index 146e79db2..f007b97e2 100644 --- a/src/tests/nodes/log_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i8_fp8x23/output_0.cairo b/src/tests/nodes/log_i8_fp8x23/output_0.cairo index 36057daf7..8bb36ab58 100644 --- a/src/tests/nodes/log_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 9216000, sign: false }); - data.append(FixedType { mag: 5816320, sign: false }); - data.append(FixedType { mag: 9216000, sign: false }); - data.append(FixedType { mag: 11632640, sign: false }); + data.append(FP8x23 { mag: 9216000, sign: false }); + data.append(FP8x23 { mag: 5816320, sign: false }); + data.append(FP8x23 { mag: 9216000, sign: false }); + data.append(FP8x23 { mag: 11632640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_u32_fp8x23/output_0.cairo b/src/tests/nodes/log_u32_fp8x23/output_0.cairo index 8fea2ee69..3831a0a5b 100644 --- a/src/tests/nodes/log_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 20844907, sign: false }); - data.append(FixedType { mag: 39506402, sign: false }); - data.append(FixedType { mag: 29824421, sign: false }); - data.append(FixedType { mag: 39506402, sign: false }); + data.append(FP8x23 { mag: 20844907, sign: false }); + data.append(FP8x23 { mag: 39506402, sign: false }); + data.append(FP8x23 { mag: 29824421, sign: false }); + data.append(FP8x23 { mag: 39506402, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo index 2b954a490..2658b6500 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo index ac01a2e9f..dfddb91ec 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo index b9a63b8c1..08d271d93 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo index 4d1feb904..f1ddaed73 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo index 9a44712e1..74eb0e682 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo index c64e4dffd..a407cde3a 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo index effc4e221..9af37e8b8 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo index c9e9c1076..33eed4b2f 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1d.cairo b/src/tests/nodes/matmul_i32_1d.cairo index a0814d281..c06d06f18 100644 --- a/src/tests/nodes/matmul_i32_1d.cairo +++ b/src/tests/nodes/matmul_i32_1d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo index c33357708..dd4574c25 100644 --- a/src/tests/nodes/matmul_i32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo index 0cb3f4628..26a296908 100644 --- a/src/tests/nodes/matmul_i32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo index 3a63a6baa..8db80a5f9 100644 --- a/src/tests/nodes/matmul_i32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_1x2.cairo b/src/tests/nodes/matmul_i32_1x2.cairo index b05eb0166..a523d326f 100644 --- a/src/tests/nodes/matmul_i32_1x2.cairo +++ b/src/tests/nodes/matmul_i32_1x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo index deda9f2a3..55431cfcf 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo index 6e6213f05..90fdd9fe4 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo index bc1aaff9a..e80bafe99 100644 --- a/src/tests/nodes/matmul_i32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x1.cairo b/src/tests/nodes/matmul_i32_2x1.cairo index 48f898f26..2d9339ef8 100644 --- a/src/tests/nodes/matmul_i32_2x1.cairo +++ b/src/tests/nodes/matmul_i32_2x1.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo index 151ee76bc..34392a378 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo index 622c06b09..e6f0d9311 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo index 10e4179c9..0e3c74f4f 100644 --- a/src/tests/nodes/matmul_i32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x2.cairo b/src/tests/nodes/matmul_i32_2x2.cairo index f9ab7ebbb..31ab7f222 100644 --- a/src/tests/nodes/matmul_i32_2x2.cairo +++ b/src/tests/nodes/matmul_i32_2x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo index 4bebd06ab..86c90bf36 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo index 93b628f81..aecf6859d 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo index 73b413e94..6d369d3e2 100644 --- a/src/tests/nodes/matmul_i32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_i8_1d.cairo b/src/tests/nodes/matmul_i8_1d.cairo index 52176427f..2cd44dc1c 100644 --- a/src/tests/nodes/matmul_i8_1d.cairo +++ b/src/tests/nodes/matmul_i8_1d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo index d2976de83..7aee90e6b 100644 --- a/src/tests/nodes/matmul_i8_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo index fd5a52ab1..b2938ac91 100644 --- a/src/tests/nodes/matmul_i8_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo index f88bc63b3..7410cc7b3 100644 --- a/src/tests/nodes/matmul_i8_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2.cairo b/src/tests/nodes/matmul_i8_1x2.cairo index f74a4968a..a09072f47 100644 --- a/src/tests/nodes/matmul_i8_1x2.cairo +++ b/src/tests/nodes/matmul_i8_1x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo index 87c4a62e2..162f7e310 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo index c8929aafc..5b24352ec 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo index 2a8696efc..4ddcd4c38 100644 --- a/src/tests/nodes/matmul_i8_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1.cairo b/src/tests/nodes/matmul_i8_2x1.cairo index 2cd344cfb..b8267f98d 100644 --- a/src/tests/nodes/matmul_i8_2x1.cairo +++ b/src/tests/nodes/matmul_i8_2x1.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo index 5c1e58633..81fd42711 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo index ba66f2b91..ce128beb9 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo index 07196122e..23c547b57 100644 --- a/src/tests/nodes/matmul_i8_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2.cairo b/src/tests/nodes/matmul_i8_2x2.cairo index d20570a40..c030e373e 100644 --- a/src/tests/nodes/matmul_i8_2x2.cairo +++ b/src/tests/nodes/matmul_i8_2x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo index 2d19e5799..71cc52da5 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo index 23c0601f7..890a5fc11 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo index f1421131f..ad847fc1b 100644 --- a/src/tests/nodes/matmul_i8_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo index 7685b56ed..9e150961b 100644 --- a/src/tests/nodes/mul_fp8x23/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo index 8fb4e887b..27d439cfa 100644 --- a/src/tests/nodes/mul_fp8x23/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo index 5205ec13a..07370e555 100644 --- a/src/tests/nodes/mul_fp8x23/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23/output_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo index 4d7a458de..e0b9c456b 100644 --- a/src/tests/nodes/mul_i32/input_0.cairo +++ b/src/tests/nodes/mul_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo index 37052f8da..e36551863 100644 --- a/src/tests/nodes/mul_i32/input_1.cairo +++ b/src/tests/nodes/mul_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo index c26a2c627..612059eb1 100644 --- a/src/tests/nodes/mul_i32/output_0.cairo +++ b/src/tests/nodes/mul_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo index a10b011c9..d320d7185 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo index 23ed99e18..7d1fab06b 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo index ca41f4940..2a9b1c676 100644 --- a/src/tests/nodes/mul_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo index 624893eff..718387b61 100644 --- a/src/tests/nodes/mul_i8/input_0.cairo +++ b/src/tests/nodes/mul_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo index b9bfc092a..fdce64ea4 100644 --- a/src/tests/nodes/mul_i8/input_1.cairo +++ b/src/tests/nodes/mul_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo index 6868e9c3b..a8f08ae22 100644 --- a/src/tests/nodes/mul_i8/output_0.cairo +++ b/src/tests/nodes/mul_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo index 3907cbc35..70fd25950 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo index bcbf31651..ba40fd3ba 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo index 9c40824b5..8e812757a 100644 --- a/src/tests/nodes/mul_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo index 52f0272bb..25de5d29f 100644 --- a/src/tests/nodes/or_fp8x23/input_0.cairo +++ b/src/tests/nodes/or_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo index 67e75955f..0dfa2dabe 100644 --- a/src/tests/nodes/or_fp8x23/input_1.cairo +++ b/src/tests/nodes/or_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo index c391245b4..653c0201e 100644 --- a/src/tests/nodes/or_i32/input_0.cairo +++ b/src/tests/nodes/or_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo index ec53b0aad..5a820aa75 100644 --- a/src/tests/nodes/or_i32/input_1.cairo +++ b/src/tests/nodes/or_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo index 41ec9571b..ff1fc1586 100644 --- a/src/tests/nodes/or_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo index d6d960b20..c3e67973c 100644 --- a/src/tests/nodes/or_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo index 2db3f81bd..f5caf222b 100644 --- a/src/tests/nodes/or_i8/input_0.cairo +++ b/src/tests/nodes/or_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo index 6d4e1a677..49f9ecd53 100644 --- a/src/tests/nodes/or_i8/input_1.cairo +++ b/src/tests/nodes/or_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo index 4aaaf98bb..ce70faf4c 100644 --- a/src/tests/nodes/or_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo index 483478a6d..7d5f95eec 100644 --- a/src/tests/nodes/or_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_1D.cairo b/src/tests/nodes/reduce_sum_i32_1D.cairo index 5db51f6c5..a4bd2cf69 100644 --- a/src/tests/nodes/reduce_sum_i32_1D.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo index 839d248fb..c4d5d09d6 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo index 73fcab685..50bb8cfe5 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo index e53d2a5c0..c45951735 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo index a58073bdf..4efbd7b9f 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo index 7ced920d8..797a84b82 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_default.cairo b/src/tests/nodes/reduce_sum_i32_2D_default.cairo index 35da05e95..0463a5316 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo index a58073bdf..4efbd7b9f 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo index eba6a1d0b..7c958388c 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo index 92b84325d..7cc27dbe5 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo index a58073bdf..4efbd7b9f 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo index 8e1441ae4..13e100f9b 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo index a3dc0f555..d54cf7c11 100644 --- a/src/tests/nodes/relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/relu_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 23718869, sign: false }); - data.append(FixedType { mag: 34552664, sign: true }); - data.append(FixedType { mag: 34211188, sign: true }); - data.append(FixedType { mag: 16610226, sign: true }); + data.append(FP8x23 { mag: 23718869, sign: false }); + data.append(FP8x23 { mag: 34552664, sign: true }); + data.append(FP8x23 { mag: 34211188, sign: true }); + data.append(FP8x23 { mag: 16610226, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo index 6ee48bf13..ec1e3eabe 100644 --- a/src/tests/nodes/relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/relu_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 23718870, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 23718870, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo index 9ffd2dc5b..339f35663 100644 --- a/src/tests/nodes/relu_i32/input_0.cairo +++ b/src/tests/nodes/relu_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo index a6f599424..4321c6348 100644 --- a/src/tests/nodes/relu_i32/output_0.cairo +++ b/src/tests/nodes/relu_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo index b9741cfc7..18c508a1c 100644 --- a/src/tests/nodes/relu_i8/input_0.cairo +++ b/src/tests/nodes/relu_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo index 90d7d8bfe..f38ba50a0 100644 --- a/src/tests/nodes/relu_i8/output_0.cairo +++ b/src/tests/nodes/relu_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo index 4a9c5fdf8..475a6d739 100644 --- a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 13876472, sign: true }); - data.append(FixedType { mag: 18112152, sign: false }); - data.append(FixedType { mag: 21105010, sign: true }); - data.append(FixedType { mag: 17882688, sign: true }); + data.append(FP8x23 { mag: 13876472, sign: true }); + data.append(FP8x23 { mag: 18112152, sign: false }); + data.append(FP8x23 { mag: 21105010, sign: true }); + data.append(FP8x23 { mag: 17882688, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo index 249860881..2dbafbebf 100644 --- a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1346720, sign: false }); - data.append(FixedType { mag: 7520550, sign: false }); - data.append(FixedType { mag: 627049, sign: false }); - data.append(FixedType { mag: 889577, sign: false }); + data.append(FP8x23 { mag: 1346720, sign: false }); + data.append(FP8x23 { mag: 7520550, sign: false }); + data.append(FP8x23 { mag: 627049, sign: false }); + data.append(FP8x23 { mag: 889577, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo index 770045641..d8fbf19ac 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo index fec9a7e33..a47fcfdf7 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo index 855b4bf2c..384318237 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 397837, sign: false }); - data.append(FixedType { mag: 999946, sign: false }); - data.append(FixedType { mag: 397837, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 397837, sign: false }); + data.append(FP8x23 { mag: 999946, sign: false }); + data.append(FP8x23 { mag: 397837, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo index 4852755e2..d88f8c98c 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo index 59cc567c6..dceb33939 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo index 4f9282465..1510fe8bc 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 7388661, sign: false }); - data.append(FixedType { mag: 7388661, sign: false }); - data.append(FixedType { mag: 2256044, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 2256044, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo index 892190a98..952393037 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7388661, sign: false }); - data.append(FixedType { mag: 7388661, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 6132564, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 6132564, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_fp8x23.cairo b/src/tests/nodes/sin_fp8x23.cairo index 0b64d96d1..c019679a3 100644 --- a/src/tests/nodes/sin_fp8x23.cairo +++ b/src/tests/nodes/sin_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo index ba60998e9..a8b56b545 100644 --- a/src/tests/nodes/sin_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 15411983, sign: false }); - data.append(FixedType { mag: 1403069, sign: false }); - data.append(FixedType { mag: 11223653, sign: true }); - data.append(FixedType { mag: 30290440, sign: false }); + data.append(FP8x23 { mag: 15411983, sign: false }); + data.append(FP8x23 { mag: 1403069, sign: false }); + data.append(FP8x23 { mag: 11223653, sign: true }); + data.append(FP8x23 { mag: 30290440, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo index 4fd787668..449c438f2 100644 --- a/src/tests/nodes/sin_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8092576, sign: false }); - data.append(FixedType { mag: 1396536, sign: false }); - data.append(FixedType { mag: 8162255, sign: true }); - data.append(FixedType { mag: 3793918, sign: true }); + data.append(FP8x23 { mag: 8092576, sign: false }); + data.append(FP8x23 { mag: 1396536, sign: false }); + data.append(FP8x23 { mag: 8162255, sign: true }); + data.append(FP8x23 { mag: 3793918, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo index 62fdc2a14..6a503d5fa 100644 --- a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo index e988582cb..98e9409ba 100644 --- a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo index da9b2732f..cb66abf65 100644 --- a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 222727, sign: true }); - data.append(FixedType { mag: 4563579, sign: true }); - data.append(FixedType { mag: 7252383, sign: true }); - data.append(FixedType { mag: 8250932, sign: false }); + data.append(FP8x23 { mag: 222727, sign: true }); + data.append(FP8x23 { mag: 4563579, sign: true }); + data.append(FP8x23 { mag: 7252383, sign: true }); + data.append(FP8x23 { mag: 8250932, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo index 875c201e8..8bcf9c317 100644 --- a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo index daa3b2826..afcc4964f 100644 --- a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo index 09fce0ad4..50e7bd044 100644 --- a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6348800, sign: false }); - data.append(FixedType { mag: 2342912, sign: false }); - data.append(FixedType { mag: 7626752, sign: false }); - data.append(FixedType { mag: 1183744, sign: false }); + data.append(FP8x23 { mag: 6348800, sign: false }); + data.append(FP8x23 { mag: 2342912, sign: false }); + data.append(FP8x23 { mag: 7626752, sign: false }); + data.append(FP8x23 { mag: 1183744, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo index 8c51f3392..d8a1a9a79 100644 --- a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5226007, sign: false }); - data.append(FixedType { mag: 4809875, sign: true }); - data.append(FixedType { mag: 7746530, sign: true }); - data.append(FixedType { mag: 8337342, sign: true }); + data.append(FP8x23 { mag: 5226007, sign: false }); + data.append(FP8x23 { mag: 4809875, sign: true }); + data.append(FP8x23 { mag: 7746530, sign: true }); + data.append(FP8x23 { mag: 8337342, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_fp8x23.cairo b/src/tests/nodes/sinh_fp8x23.cairo index cb496c1b9..a35a2caba 100644 --- a/src/tests/nodes/sinh_fp8x23.cairo +++ b/src/tests/nodes/sinh_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo index 0f23c403b..bac7d0d77 100644 --- a/src/tests/nodes/sinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2356323, sign: true }); - data.append(FixedType { mag: 4204899, sign: false }); - data.append(FixedType { mag: 21037695, sign: false }); - data.append(FixedType { mag: 20483758, sign: true }); + data.append(FP8x23 { mag: 2356323, sign: true }); + data.append(FP8x23 { mag: 4204899, sign: false }); + data.append(FP8x23 { mag: 21037695, sign: false }); + data.append(FP8x23 { mag: 20483758, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo index 422e0f2ce..c604ea056 100644 --- a/src/tests/nodes/sinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2387433, sign: true }); - data.append(FixedType { mag: 4383215, sign: false }); - data.append(FixedType { mag: 51160183, sign: false }); - data.append(FixedType { mag: 47845830, sign: true }); + data.append(FP8x23 { mag: 2387433, sign: true }); + data.append(FP8x23 { mag: 4383215, sign: false }); + data.append(FP8x23 { mag: 51160183, sign: false }); + data.append(FP8x23 { mag: 47845830, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo index 14a0e88ce..1066956d5 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo index 8ea137805..b29945dd6 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo index 88308052f..62986d36f 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 30424310, sign: false }); - data.append(FixedType { mag: 30424310, sign: false }); - data.append(FixedType { mag: 84036025, sign: true }); - data.append(FixedType { mag: 9858302, sign: false }); + data.append(FP8x23 { mag: 30424310, sign: false }); + data.append(FP8x23 { mag: 30424310, sign: false }); + data.append(FP8x23 { mag: 84036025, sign: true }); + data.append(FP8x23 { mag: 9858302, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo index c1f881701..97437e820 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo index 8f6e6ef04..86fc4a41c 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo index d8101bce7..c01a9a8d3 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 84017152, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 30425088, sign: false }); - data.append(FixedType { mag: 9854976, sign: false }); + data.append(FP8x23 { mag: 84017152, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 30425088, sign: false }); + data.append(FP8x23 { mag: 9854976, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo index df6ac6750..bf17e79d9 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 622461645, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 9858302, sign: false }); - data.append(FixedType { mag: 9858302, sign: false }); + data.append(FP8x23 { mag: 622461645, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 9858302, sign: false }); + data.append(FP8x23 { mag: 9858302, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo index 2eded89b0..f68de8fc1 100644 --- a/src/tests/nodes/softmax_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 18916324, sign: false }); - data.append(FixedType { mag: 24318116, sign: false }); - data.append(FixedType { mag: 4760436, sign: true }); - data.append(FixedType { mag: 15132412, sign: true }); + data.append(FP8x23 { mag: 18916324, sign: false }); + data.append(FP8x23 { mag: 24318116, sign: false }); + data.append(FP8x23 { mag: 4760436, sign: true }); + data.append(FP8x23 { mag: 15132412, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo index a62431405..39e64a783 100644 --- a/src/tests/nodes/softmax_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7917831, sign: false }); - data.append(FixedType { mag: 8313213, sign: false }); - data.append(FixedType { mag: 470776, sign: false }); - data.append(FixedType { mag: 75394, sign: false }); + data.append(FP8x23 { mag: 7917831, sign: false }); + data.append(FP8x23 { mag: 8313213, sign: false }); + data.append(FP8x23 { mag: 470776, sign: false }); + data.append(FP8x23 { mag: 75394, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo index 86da7e4e8..f2358fe12 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo index a8bdc9654..087758daf 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo index 2c8579060..fd2129785 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo index c21e22ec2..d32debe1b 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo index 3ae67154f..7a1c8656d 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo index 64bd98a1b..71ae09980 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 150784, sign: false }); - data.append(FixedType { mag: 8237056, sign: false }); - data.append(FixedType { mag: 150784, sign: false }); - data.append(FixedType { mag: 8237056, sign: false }); + data.append(FP8x23 { mag: 150784, sign: false }); + data.append(FP8x23 { mag: 8237056, sign: false }); + data.append(FP8x23 { mag: 150784, sign: false }); + data.append(FP8x23 { mag: 8237056, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo index f58fb562f..ebe053930 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 999946, sign: false }); - data.append(FixedType { mag: 7388661, sign: false }); - data.append(FixedType { mag: 999946, sign: false }); - data.append(FixedType { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 999946, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); + data.append(FP8x23 { mag: 999946, sign: false }); + data.append(FP8x23 { mag: 7388661, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo index 95f8ae895..18144bb39 100644 --- a/src/tests/nodes/softplus_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 12544105, sign: false }); - data.append(FixedType { mag: 14326838, sign: true }); - data.append(FixedType { mag: 20577317, sign: false }); - data.append(FixedType { mag: 12791075, sign: true }); + data.append(FP8x23 { mag: 12544105, sign: false }); + data.append(FP8x23 { mag: 14326838, sign: true }); + data.append(FP8x23 { mag: 20577317, sign: false }); + data.append(FP8x23 { mag: 12791075, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo index 2bab6f601..442364f8a 100644 --- a/src/tests/nodes/softplus_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 14240775, sign: false }); - data.append(FixedType { mag: 1397299, sign: false }); - data.append(FixedType { mag: 21269654, sign: false }); - data.append(FixedType { mag: 1651985, sign: false }); + data.append(FP8x23 { mag: 14240775, sign: false }); + data.append(FP8x23 { mag: 1397299, sign: false }); + data.append(FP8x23 { mag: 21269654, sign: false }); + data.append(FP8x23 { mag: 1651985, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo index 92ef6d4fa..a45c6427a 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo index 0d2a01b19..226f0934f 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo index 9b39cd898..87ceed6ef 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2627829, sign: false }); - data.append(FixedType { mag: 2627829, sign: false }); - data.append(FixedType { mag: 407580, sign: false }); - data.append(FixedType { mag: 11016437, sign: false }); + data.append(FP8x23 { mag: 2627829, sign: false }); + data.append(FP8x23 { mag: 2627829, sign: false }); + data.append(FP8x23 { mag: 407580, sign: false }); + data.append(FP8x23 { mag: 11016437, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo index c806b62fe..9f96c126c 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo index 337195c0c..2d3ab96bb 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo index f5d29b3ce..f77189ed2 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5816320, sign: false }); - data.append(FixedType { mag: 17842176, sign: false }); - data.append(FixedType { mag: 407808, sign: false }); - data.append(FixedType { mag: 2629632, sign: false }); + data.append(FP8x23 { mag: 5816320, sign: false }); + data.append(FP8x23 { mag: 17842176, sign: false }); + data.append(FP8x23 { mag: 407808, sign: false }); + data.append(FP8x23 { mag: 2629632, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo index 7f3b7fe19..5227313df 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25573404, sign: false }); - data.append(FixedType { mag: 11016437, sign: false }); - data.append(FixedType { mag: 17841965, sign: false }); - data.append(FixedType { mag: 41999372, sign: false }); + data.append(FP8x23 { mag: 25573404, sign: false }); + data.append(FP8x23 { mag: 11016437, sign: false }); + data.append(FP8x23 { mag: 17841965, sign: false }); + data.append(FP8x23 { mag: 41999372, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo index d5e04b0a2..398a2b3aa 100644 --- a/src/tests/nodes/softsign_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 13239928, sign: false }); - data.append(FixedType { mag: 30467697, sign: true }); - data.append(FixedType { mag: 7575559, sign: false }); - data.append(FixedType { mag: 22798419, sign: false }); + data.append(FP8x23 { mag: 13239928, sign: false }); + data.append(FP8x23 { mag: 30467697, sign: true }); + data.append(FP8x23 { mag: 7575559, sign: false }); + data.append(FP8x23 { mag: 22798419, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo index 485c3c7d2..21bceb883 100644 --- a/src/tests/nodes/softsign_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5135094, sign: false }); - data.append(FixedType { mag: 6577608, sign: true }); - data.append(FixedType { mag: 3980689, sign: false }); - data.append(FixedType { mag: 6132261, sign: false }); + data.append(FP8x23 { mag: 5135094, sign: false }); + data.append(FP8x23 { mag: 6577608, sign: true }); + data.append(FP8x23 { mag: 3980689, sign: false }); + data.append(FP8x23 { mag: 6132261, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo index 1b6ffb598..ee7ba4b7a 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo index aace09d65..7fa71f49a 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo index d276b1a77..8ca3e1ace 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6990506, sign: false }); - data.append(FixedType { mag: 6291456, sign: true }); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 6710886, sign: true }); + data.append(FP8x23 { mag: 6990506, sign: false }); + data.append(FP8x23 { mag: 6291456, sign: true }); + data.append(FP8x23 { mag: 6291456, sign: false }); + data.append(FP8x23 { mag: 6710886, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo index 25326e97b..eb3a77973 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo index fdbb801a5..d517f044d 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo index 4b47a1a15..1cc783795 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5592405, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 6990506, sign: false }); - data.append(FixedType { mag: 6710886, sign: true }); + data.append(FP8x23 { mag: 5592405, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 6990506, sign: false }); + data.append(FP8x23 { mag: 6710886, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo index a8e6933fd..915194935 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 6990506, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 7340032, sign: false }); + data.append(FP8x23 { mag: 6291456, sign: false }); + data.append(FP8x23 { mag: 6990506, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 7340032, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_fp8x23.cairo b/src/tests/nodes/sqrt_fp8x23.cairo index 4c08c1f12..9b3077d2b 100644 --- a/src/tests/nodes/sqrt_fp8x23.cairo +++ b/src/tests/nodes/sqrt_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo index 47c89cd5c..871e1994e 100644 --- a/src/tests/nodes/sqrt_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 38292032, sign: false }); - data.append(FixedType { mag: 45839538, sign: false }); - data.append(FixedType { mag: 48823512, sign: false }); - data.append(FixedType { mag: 48128484, sign: false }); + data.append(FP8x23 { mag: 38292032, sign: false }); + data.append(FP8x23 { mag: 45839538, sign: false }); + data.append(FP8x23 { mag: 48823512, sign: false }); + data.append(FP8x23 { mag: 48128484, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo index cd7e540e3..879f630b8 100644 --- a/src/tests/nodes/sqrt_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 17922523, sign: false }); - data.append(FixedType { mag: 19609434, sign: false }); - data.append(FixedType { mag: 20237621, sign: false }); - data.append(FixedType { mag: 20093058, sign: false }); + data.append(FP8x23 { mag: 17922523, sign: false }); + data.append(FP8x23 { mag: 19609434, sign: false }); + data.append(FP8x23 { mag: 20237621, sign: false }); + data.append(FP8x23 { mag: 20093058, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo index c3077f1c1..5355fb982 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo index d11d6e5c6..8d9b4b795 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo index ff1a20abb..152aa8cbd 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 14529495, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 14529495, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo index ce8b680fb..fc9b37119 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo index 271506e0a..75a51f2ca 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo index 6cda650be..08484a3f1 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 18759680, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 18759680, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo index ecbd98231..6d4783cb1 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 14529495, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 14529495, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo index 8a129c069..d9b2e2515 100644 --- a/src/tests/nodes/sub_fp8x23/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo index a6aee8a7d..214ec2ddd 100644 --- a/src/tests/nodes/sub_fp8x23/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo index 80957ee9b..0f31d02fd 100644 --- a/src/tests/nodes/sub_fp8x23/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23/output_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo index f56b8fbb9..932a94606 100644 --- a/src/tests/nodes/sub_i32/input_0.cairo +++ b/src/tests/nodes/sub_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo index aaee299dc..378caa8ae 100644 --- a/src/tests/nodes/sub_i32/input_1.cairo +++ b/src/tests/nodes/sub_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo index 3df6953a9..3024fb566 100644 --- a/src/tests/nodes/sub_i32/output_0.cairo +++ b/src/tests/nodes/sub_i32/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo index 86237a297..cac235016 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo index 2b552ba83..c10dadec2 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo index b8d0dff82..907a17d99 100644 --- a/src/tests/nodes/sub_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo index 6decefd08..8dd412c5b 100644 --- a/src/tests/nodes/sub_i8/input_0.cairo +++ b/src/tests/nodes/sub_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo index d6da90704..49b2ad719 100644 --- a/src/tests/nodes/sub_i8/input_1.cairo +++ b/src/tests/nodes/sub_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo index 2697b8e39..c8743dd67 100644 --- a/src/tests/nodes/sub_i8/output_0.cairo +++ b/src/tests/nodes/sub_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo index 32e2271aa..9cc0dfb58 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo index 6bcad3332..a3ae12a0b 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo index 868fe33bd..d49f7a084 100644 --- a/src/tests/nodes/sub_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/tanh_fp8x23.cairo b/src/tests/nodes/tanh_fp8x23.cairo index d4ded21d5..1536ab369 100644 --- a/src/tests/nodes/tanh_fp8x23.cairo +++ b/src/tests/nodes/tanh_fp8x23.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo index a74f9b51b..2be03e573 100644 --- a/src/tests/nodes/tanh_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 17641894, sign: true }); - data.append(FixedType { mag: 8395817, sign: true }); - data.append(FixedType { mag: 24711252, sign: true }); - data.append(FixedType { mag: 1922655, sign: false }); + data.append(FP8x23 { mag: 17641894, sign: true }); + data.append(FP8x23 { mag: 8395817, sign: true }); + data.append(FP8x23 { mag: 24711252, sign: true }); + data.append(FP8x23 { mag: 1922655, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo index a1dd717ab..04886c42b 100644 --- a/src/tests/nodes/tanh_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8142239, sign: true }); - data.append(FixedType { mag: 6391740, sign: true }); - data.append(FixedType { mag: 8342388, sign: true }); - data.append(FixedType { mag: 1889681, sign: false }); + data.append(FP8x23 { mag: 8142239, sign: true }); + data.append(FP8x23 { mag: 6391740, sign: true }); + data.append(FP8x23 { mag: 8342388, sign: true }); + data.append(FP8x23 { mag: 1889681, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo index 3f3ef4067..8e27c27f7 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo index a9f8fd5ec..de711fda6 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo index d554ca394..31ece9062 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6388714, sign: true }); - data.append(FixedType { mag: 8086849, sign: false }); - data.append(FixedType { mag: 8086849, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 6388714, sign: true }); + data.append(FP8x23 { mag: 8086849, sign: false }); + data.append(FP8x23 { mag: 8086849, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo index 9334c034d..015ab4022 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo index 6d20083f2..4fe068d78 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo index c0da54618..6f32f2c7b 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6389760, sign: true }); - data.append(FixedType { mag: 6389760, sign: true }); - data.append(FixedType { mag: 6389760, sign: false }); - data.append(FixedType { mag: 6389760, sign: true }); + data.append(FP8x23 { mag: 6389760, sign: true }); + data.append(FP8x23 { mag: 6389760, sign: true }); + data.append(FP8x23 { mag: 6389760, sign: false }); + data.append(FP8x23 { mag: 6389760, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo index e8720b550..db144d35e 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8387846, sign: false }); - data.append(FixedType { mag: 8347124, sign: false }); - data.append(FixedType { mag: 8382981, sign: false }); - data.append(FixedType { mag: 8347124, sign: false }); + data.append(FP8x23 { mag: 8387846, sign: false }); + data.append(FP8x23 { mag: 8347124, sign: false }); + data.append(FP8x23 { mag: 8382981, sign: false }); + data.append(FP8x23 { mag: 8347124, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_i32_2d.cairo b/src/tests/nodes/transpose_i32_2d.cairo index 759ab7ff5..7fba5bfda 100644 --- a/src/tests/nodes/transpose_i32_2d.cairo +++ b/src/tests/nodes/transpose_i32_2d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo index 77090588e..2397586e0 100644 --- a/src/tests/nodes/transpose_i32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo index 9b3ebc3ae..9e04947d5 100644 --- a/src/tests/nodes/transpose_i32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_i32_3d.cairo b/src/tests/nodes/transpose_i32_3d.cairo index 40e456281..34e32772d 100644 --- a/src/tests/nodes/transpose_i32_3d.cairo +++ b/src/tests/nodes/transpose_i32_3d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo index 1b7caaa6e..7890318a1 100644 --- a/src/tests/nodes/transpose_i32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo index 1366da6bb..d955745cf 100644 --- a/src/tests/nodes/transpose_i32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_i8_2d.cairo b/src/tests/nodes/transpose_i8_2d.cairo index 45eda81f0..ffda08d78 100644 --- a/src/tests/nodes/transpose_i8_2d.cairo +++ b/src/tests/nodes/transpose_i8_2d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo index 285025d19..cee347f73 100644 --- a/src/tests/nodes/transpose_i8_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo index 833fe1cd7..7f592693b 100644 --- a/src/tests/nodes/transpose_i8_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_3d.cairo b/src/tests/nodes/transpose_i8_3d.cairo index dfd1e7a3e..9cb8c0a1e 100644 --- a/src/tests/nodes/transpose_i8_3d.cairo +++ b/src/tests/nodes/transpose_i8_3d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo index ffb72b427..9d1625fb1 100644 --- a/src/tests/nodes/transpose_i8_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo index 934273245..d150b8448 100644 --- a/src/tests/nodes/transpose_i8_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo index 4e1c89565..8279876d1 100644 --- a/src/tests/nodes/xor_fp8x23/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo index 8c2476f26..2a32a9dd2 100644 --- a/src/tests/nodes/xor_fp8x23/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo index 557bd393b..770a893af 100644 --- a/src/tests/nodes/xor_i32/input_0.cairo +++ b/src/tests/nodes/xor_i32/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo index f186d2470..c4c3f2700 100644 --- a/src/tests/nodes/xor_i32/input_1.cairo +++ b/src/tests/nodes/xor_i32/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo index 74e772e5c..0146c7528 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo index ef02c9935..83617a805 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo index 0bbeb4b5b..f386a6e63 100644 --- a/src/tests/nodes/xor_i8/input_0.cairo +++ b/src/tests/nodes/xor_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo index 12cafea45..17eec7efc 100644 --- a/src/tests/nodes/xor_i8/input_1.cairo +++ b/src/tests/nodes/xor_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo index 8ab269e83..ca71cf0d8 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo index 99e0e07e7..b6fa11124 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { From e024d2132ff948ac90d722c982c57560c2f95073 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:01:13 +0300 Subject: [PATCH 068/179] fix argmax tests --- .../implementations/tensor_fp16x16.cairo | 45 ++++- .../implementations/tensor_fp8x23.cairo | 44 ++++- src/tests/nodes.cairo | 94 +++++----- src/tests/nodes/acos_fp16x16.cairo | 11 +- src/tests/nodes/acos_fp16x16/input_0.cairo | 18 +- src/tests/nodes/acos_fp16x16/output_0.cairo | 17 +- src/tests/nodes/acosh_fp16x16.cairo | 5 +- src/tests/nodes/acosh_fp16x16/input_0.cairo | 17 +- src/tests/nodes/acosh_fp16x16/output_0.cairo | 17 +- .../nodes/acosh_i32_fp16x16/output_0.cairo | 17 +- .../nodes/acosh_i8_fp16x16/output_0.cairo | 17 +- .../nodes/acosh_u32_fp16x16/input_0.cairo | 2 +- .../nodes/acosh_u32_fp16x16/output_0.cairo | 17 +- .../nodes/acosh_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/add_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/add_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/add_fp16x16/output_0.cairo | 63 ++++--- .../nodes/add_fp16x16_broadcast/input_0.cairo | 63 ++++--- .../nodes/add_fp16x16_broadcast/input_1.cairo | 15 +- .../add_fp16x16_broadcast/output_0.cairo | 63 ++++--- .../nodes/add_fp8x23_broadcast/input_0.cairo | 62 ++++--- .../nodes/add_fp8x23_broadcast/input_1.cairo | 14 +- .../nodes/add_fp8x23_broadcast/output_0.cairo | 62 ++++--- src/tests/nodes/add_u32/input_0.cairo | 2 +- src/tests/nodes/add_u32/input_1.cairo | 2 +- src/tests/nodes/add_u32/output_0.cairo | 2 +- .../nodes/add_u32_broadcast/input_0.cairo | 2 +- .../nodes/add_u32_broadcast/input_1.cairo | 2 +- .../nodes/add_u32_broadcast/output_0.cairo | 2 +- .../nodes/argmax_fp16x16_1D_default.cairo | 10 +- .../argmax_fp16x16_1D_default/input_0.cairo | 15 +- .../argmax_fp16x16_1D_default/output_0.cairo | 2 +- .../argmax_fp16x16_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 15 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp16x16_1D_last_index.cairo | 4 +- .../input_0.cairo | 15 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp16x16_2D_default.cairo | 4 +- .../argmax_fp16x16_2D_default/input_0.cairo | 17 +- .../argmax_fp16x16_2D_default/output_0.cairo | 2 +- .../argmax_fp16x16_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 17 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp16x16_2D_last_index.cairo | 4 +- .../input_0.cairo | 17 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp16x16_3D_default.cairo | 4 +- .../argmax_fp16x16_3D_default/input_0.cairo | 25 +-- .../argmax_fp16x16_3D_default/output_0.cairo | 2 +- .../argmax_fp16x16_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 25 +-- .../output_0.cairo | 2 +- .../nodes/argmax_fp16x16_3D_last_index.cairo | 4 +- .../input_0.cairo | 25 +-- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_1D_default.cairo | 4 +- .../argmax_fp8x23_1D_default/input_0.cairo | 15 +- .../argmax_fp8x23_1D_default/output_0.cairo | 2 +- .../argmax_fp8x23_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 14 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_1D_last_index.cairo | 4 +- .../argmax_fp8x23_1D_last_index/input_0.cairo | 14 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_2D_default.cairo | 4 +- .../argmax_fp8x23_2D_default/input_0.cairo | 16 +- .../argmax_fp8x23_2D_default/output_0.cairo | 2 +- .../argmax_fp8x23_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 16 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_2D_last_index.cairo | 4 +- .../argmax_fp8x23_2D_last_index/input_0.cairo | 16 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_3D_default.cairo | 4 +- .../argmax_fp8x23_3D_default/input_0.cairo | 24 +-- .../argmax_fp8x23_3D_default/output_0.cairo | 2 +- .../argmax_fp8x23_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 24 +-- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_3D_last_index.cairo | 4 +- .../argmax_fp8x23_3D_last_index/input_0.cairo | 24 +-- .../output_0.cairo | 2 +- src/tests/nodes/argmax_i32_1D_default.cairo | 10 +- .../argmax_i32_1D_default/output_0.cairo | 2 +- .../nodes/argmax_i32_1D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_i32_1D_last_index.cairo | 4 +- .../argmax_i32_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_i32_2D_default.cairo | 4 +- .../argmax_i32_2D_default/output_0.cairo | 2 +- .../nodes/argmax_i32_2D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_i32_2D_last_index.cairo | 4 +- .../argmax_i32_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_i32_3D_default.cairo | 4 +- .../argmax_i32_3D_default/output_0.cairo | 2 +- .../nodes/argmax_i32_3D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_i32_3D_last_index.cairo | 4 +- .../argmax_i32_3D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_i8_1D_default.cairo | 4 +- .../nodes/argmax_i8_1D_default/output_0.cairo | 2 +- .../nodes/argmax_i8_1D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmax_i8_1D_last_index.cairo | 4 +- .../argmax_i8_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_i8_2D_default.cairo | 4 +- .../nodes/argmax_i8_2D_default/output_0.cairo | 2 +- .../nodes/argmax_i8_2D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmax_i8_2D_last_index.cairo | 4 +- .../argmax_i8_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_i8_3D_default.cairo | 4 +- .../nodes/argmax_i8_3D_default/output_0.cairo | 2 +- .../nodes/argmax_i8_3D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmax_i8_3D_last_index.cairo | 4 +- .../argmax_i8_3D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_u32_1D_default.cairo | 10 +- .../nodes/argmax_u32_1D_default/input_0.cairo | 2 +- .../argmax_u32_1D_default/output_0.cairo | 2 +- .../nodes/argmax_u32_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmax_u32_1D_last_index.cairo | 4 +- .../argmax_u32_1D_last_index/input_0.cairo | 2 +- .../argmax_u32_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_u32_2D_default.cairo | 4 +- .../nodes/argmax_u32_2D_default/input_0.cairo | 2 +- .../argmax_u32_2D_default/output_0.cairo | 2 +- .../nodes/argmax_u32_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmax_u32_2D_last_index.cairo | 4 +- .../argmax_u32_2D_last_index/input_0.cairo | 2 +- .../argmax_u32_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmax_u32_3D_default.cairo | 4 +- .../nodes/argmax_u32_3D_default/input_0.cairo | 2 +- .../argmax_u32_3D_default/output_0.cairo | 2 +- .../nodes/argmax_u32_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmax_u32_3D_last_index.cairo | 4 +- .../argmax_u32_3D_last_index/input_0.cairo | 2 +- .../argmax_u32_3D_last_index/output_0.cairo | 2 +- .../nodes/argmin_fp16x16_1D_default.cairo | 4 +- .../argmin_fp16x16_1D_default/input_0.cairo | 15 +- .../argmin_fp16x16_1D_default/output_0.cairo | 2 +- .../argmin_fp16x16_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 15 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp16x16_1D_last_index.cairo | 4 +- .../input_0.cairo | 15 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp16x16_2D_default.cairo | 4 +- .../argmin_fp16x16_2D_default/input_0.cairo | 17 +- .../argmin_fp16x16_2D_default/output_0.cairo | 2 +- .../argmin_fp16x16_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 17 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp16x16_2D_last_index.cairo | 4 +- .../input_0.cairo | 17 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp16x16_3D_default.cairo | 4 +- .../argmin_fp16x16_3D_default/input_0.cairo | 25 +-- .../argmin_fp16x16_3D_default/output_0.cairo | 2 +- .../argmin_fp16x16_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 25 +-- .../output_0.cairo | 2 +- .../nodes/argmin_fp16x16_3D_last_index.cairo | 4 +- .../input_0.cairo | 25 +-- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_1D_default.cairo | 4 +- .../argmin_fp8x23_1D_default/input_0.cairo | 14 +- .../argmin_fp8x23_1D_default/output_0.cairo | 2 +- .../argmin_fp8x23_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 14 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_1D_last_index.cairo | 4 +- .../argmin_fp8x23_1D_last_index/input_0.cairo | 14 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_2D_default.cairo | 4 +- .../argmin_fp8x23_2D_default/input_0.cairo | 16 +- .../argmin_fp8x23_2D_default/output_0.cairo | 2 +- .../argmin_fp8x23_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 16 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_2D_last_index.cairo | 4 +- .../argmin_fp8x23_2D_last_index/input_0.cairo | 16 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_3D_default.cairo | 4 +- .../argmin_fp8x23_3D_default/input_0.cairo | 24 +-- .../argmin_fp8x23_3D_default/output_0.cairo | 2 +- .../argmin_fp8x23_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 24 +-- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_3D_last_index.cairo | 4 +- .../argmin_fp8x23_3D_last_index/input_0.cairo | 24 +-- .../output_0.cairo | 2 +- src/tests/nodes/argmin_i32_1D_default.cairo | 4 +- .../argmin_i32_1D_default/output_0.cairo | 2 +- .../nodes/argmin_i32_1D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_i32_1D_last_index.cairo | 4 +- .../argmin_i32_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_i32_2D_default.cairo | 4 +- .../argmin_i32_2D_default/output_0.cairo | 2 +- .../nodes/argmin_i32_2D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_i32_2D_last_index.cairo | 4 +- .../argmin_i32_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_i32_3D_default.cairo | 4 +- .../argmin_i32_3D_default/output_0.cairo | 2 +- .../nodes/argmin_i32_3D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_i32_3D_last_index.cairo | 4 +- .../argmin_i32_3D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_i8_1D_default.cairo | 4 +- .../nodes/argmin_i8_1D_default/output_0.cairo | 2 +- .../nodes/argmin_i8_1D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmin_i8_1D_last_index.cairo | 4 +- .../argmin_i8_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_i8_2D_default.cairo | 4 +- .../nodes/argmin_i8_2D_default/output_0.cairo | 2 +- .../nodes/argmin_i8_2D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmin_i8_2D_last_index.cairo | 4 +- .../argmin_i8_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_i8_3D_default.cairo | 4 +- .../nodes/argmin_i8_3D_default/output_0.cairo | 2 +- .../nodes/argmin_i8_3D_keepdims_false.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmin_i8_3D_last_index.cairo | 4 +- .../argmin_i8_3D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_u32_1D_default.cairo | 4 +- .../nodes/argmin_u32_1D_default/input_0.cairo | 2 +- .../argmin_u32_1D_default/output_0.cairo | 2 +- .../nodes/argmin_u32_1D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmin_u32_1D_last_index.cairo | 4 +- .../argmin_u32_1D_last_index/input_0.cairo | 2 +- .../argmin_u32_1D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_u32_2D_default.cairo | 4 +- .../nodes/argmin_u32_2D_default/input_0.cairo | 2 +- .../argmin_u32_2D_default/output_0.cairo | 2 +- .../nodes/argmin_u32_2D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmin_u32_2D_last_index.cairo | 4 +- .../argmin_u32_2D_last_index/input_0.cairo | 2 +- .../argmin_u32_2D_last_index/output_0.cairo | 2 +- src/tests/nodes/argmin_u32_3D_default.cairo | 4 +- .../nodes/argmin_u32_3D_default/input_0.cairo | 2 +- .../argmin_u32_3D_default/output_0.cairo | 2 +- .../nodes/argmin_u32_3D_keepdims_false.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- .../nodes/argmin_u32_3D_last_index.cairo | 4 +- .../argmin_u32_3D_last_index/input_0.cairo | 2 +- .../argmin_u32_3D_last_index/output_0.cairo | 2 +- src/tests/nodes/asin_fp16x16.cairo | 5 +- src/tests/nodes/asin_fp16x16/input_0.cairo | 17 +- src/tests/nodes/asin_fp16x16/output_0.cairo | 17 +- src/tests/nodes/asinh_fp16x16.cairo | 5 +- src/tests/nodes/asinh_fp16x16/input_0.cairo | 17 +- src/tests/nodes/asinh_fp16x16/output_0.cairo | 17 +- .../nodes/asinh_i32_fp16x16/output_0.cairo | 17 +- .../nodes/asinh_i8_fp16x16/output_0.cairo | 17 +- .../nodes/asinh_u32_fp16x16/input_0.cairo | 2 +- .../nodes/asinh_u32_fp16x16/output_0.cairo | 17 +- .../nodes/asinh_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/atan_fp16x16.cairo | 5 +- src/tests/nodes/atan_fp16x16/input_0.cairo | 17 +- src/tests/nodes/atan_fp16x16/output_0.cairo | 17 +- .../nodes/atan_i32_fp16x16/output_0.cairo | 17 +- .../nodes/atan_i8_fp16x16/output_0.cairo | 17 +- .../nodes/atan_u32_fp16x16/input_0.cairo | 2 +- .../nodes/atan_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/atan_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/ceil_fp16x16.cairo | 5 +- src/tests/nodes/ceil_fp16x16/input_0.cairo | 17 +- src/tests/nodes/ceil_fp16x16/output_0.cairo | 17 +- src/tests/nodes/concat_fp16x16_1d.cairo | 5 +- .../nodes/concat_fp16x16_1d/input_0.cairo | 15 +- .../nodes/concat_fp16x16_1d/input_1.cairo | 15 +- .../nodes/concat_fp16x16_1d/output_0.cairo | 21 ++- src/tests/nodes/concat_fp16x16_2d.cairo | 5 +- .../nodes/concat_fp16x16_2d/input_0.cairo | 17 +- .../nodes/concat_fp16x16_2d/input_1.cairo | 17 +- .../nodes/concat_fp16x16_2d/output_0.cairo | 25 +-- .../nodes/concat_fp16x16_3d_axis_1.cairo | 5 +- .../concat_fp16x16_3d_axis_1/input_0.cairo | 63 ++++--- .../concat_fp16x16_3d_axis_1/input_1.cairo | 63 ++++--- .../concat_fp16x16_3d_axis_1/output_0.cairo | 117 ++++++------ .../nodes/concat_fp16x16_3d_axis_2.cairo | 5 +- .../concat_fp16x16_3d_axis_2/input_0.cairo | 63 ++++--- .../concat_fp16x16_3d_axis_2/input_1.cairo | 63 ++++--- .../concat_fp16x16_3d_axis_2/output_0.cairo | 117 ++++++------ .../nodes/concat_fp16x16_3d_default.cairo | 5 +- .../concat_fp16x16_3d_default/input_0.cairo | 63 ++++--- .../concat_fp16x16_3d_default/input_1.cairo | 63 ++++--- .../concat_fp16x16_3d_default/output_0.cairo | 117 ++++++------ ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 5 +- .../input_0.cairo | 63 ++++--- .../input_1.cairo | 63 ++++--- .../input_2.cairo | 63 ++++--- .../output_0.cairo | 171 +++++++++--------- ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 5 +- .../input_0.cairo | 63 ++++--- .../input_1.cairo | 63 ++++--- .../input_2.cairo | 63 ++++--- .../output_0.cairo | 171 +++++++++--------- .../nodes/concat_fp8x23_1d/input_0.cairo | 14 +- .../nodes/concat_fp8x23_1d/input_1.cairo | 14 +- .../nodes/concat_fp8x23_1d/output_0.cairo | 20 +- .../nodes/concat_fp8x23_2d/input_0.cairo | 16 +- .../nodes/concat_fp8x23_2d/input_1.cairo | 16 +- .../nodes/concat_fp8x23_2d/output_0.cairo | 24 +-- .../concat_fp8x23_3d_axis_1/input_0.cairo | 62 ++++--- .../concat_fp8x23_3d_axis_1/input_1.cairo | 62 ++++--- .../concat_fp8x23_3d_axis_1/output_0.cairo | 116 ++++++------ .../concat_fp8x23_3d_axis_2/input_0.cairo | 62 ++++--- .../concat_fp8x23_3d_axis_2/input_1.cairo | 62 ++++--- .../concat_fp8x23_3d_axis_2/output_0.cairo | 116 ++++++------ .../concat_fp8x23_3d_default/input_0.cairo | 62 ++++--- .../concat_fp8x23_3d_default/input_1.cairo | 62 ++++--- .../concat_fp8x23_3d_default/output_0.cairo | 116 ++++++------ .../input_0.cairo | 62 ++++--- .../input_1.cairo | 62 ++++--- .../input_2.cairo | 62 ++++--- .../output_0.cairo | 170 ++++++++--------- .../input_0.cairo | 62 ++++--- .../input_1.cairo | 62 ++++--- .../input_2.cairo | 62 ++++--- .../output_0.cairo | 170 ++++++++--------- src/tests/nodes/concat_u32_1d.cairo | 4 +- src/tests/nodes/concat_u32_1d/input_0.cairo | 2 +- src/tests/nodes/concat_u32_1d/input_1.cairo | 2 +- src/tests/nodes/concat_u32_1d/output_0.cairo | 2 +- src/tests/nodes/concat_u32_2d.cairo | 4 +- src/tests/nodes/concat_u32_2d/input_0.cairo | 2 +- src/tests/nodes/concat_u32_2d/input_1.cairo | 2 +- src/tests/nodes/concat_u32_2d/output_0.cairo | 2 +- src/tests/nodes/concat_u32_3d_axis_1.cairo | 4 +- .../nodes/concat_u32_3d_axis_1/input_0.cairo | 2 +- .../nodes/concat_u32_3d_axis_1/input_1.cairo | 2 +- .../nodes/concat_u32_3d_axis_1/output_0.cairo | 2 +- src/tests/nodes/concat_u32_3d_axis_2.cairo | 4 +- .../nodes/concat_u32_3d_axis_2/input_0.cairo | 2 +- .../nodes/concat_u32_3d_axis_2/input_1.cairo | 2 +- .../nodes/concat_u32_3d_axis_2/output_0.cairo | 2 +- src/tests/nodes/concat_u32_3d_default.cairo | 4 +- .../nodes/concat_u32_3d_default/input_0.cairo | 2 +- .../nodes/concat_u32_3d_default/input_1.cairo | 2 +- .../concat_u32_3d_default/output_0.cairo | 2 +- .../concat_u32_3d_three_tensors_axis_1.cairo | 4 +- .../input_0.cairo | 2 +- .../input_1.cairo | 2 +- .../input_2.cairo | 2 +- .../output_0.cairo | 2 +- .../concat_u32_3d_three_tensors_axis_2.cairo | 4 +- .../input_0.cairo | 2 +- .../input_1.cairo | 2 +- .../input_2.cairo | 2 +- .../output_0.cairo | 2 +- src/tests/nodes/cos_fp16x16.cairo | 5 +- src/tests/nodes/cos_fp16x16/input_0.cairo | 17 +- src/tests/nodes/cos_fp16x16/output_0.cairo | 17 +- .../nodes/cos_i32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/cos_i8_fp16x16/output_0.cairo | 17 +- src/tests/nodes/cos_u32_fp16x16/input_0.cairo | 2 +- .../nodes/cos_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/cos_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/cosh_fp16x16.cairo | 5 +- src/tests/nodes/cosh_fp16x16/input_0.cairo | 17 +- src/tests/nodes/cosh_fp16x16/output_0.cairo | 17 +- .../nodes/cosh_i32_fp16x16/output_0.cairo | 17 +- .../nodes/cosh_i8_fp16x16/output_0.cairo | 17 +- .../nodes/cosh_u32_fp16x16/input_0.cairo | 2 +- .../nodes/cosh_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/cosh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/cumsum_fp16x16_1d_default.cairo | 5 +- .../cumsum_fp16x16_1d_default/input_0.cairo | 19 +- .../cumsum_fp16x16_1d_default/output_0.cairo | 19 +- .../nodes/cumsum_fp16x16_1d_exclusive.cairo | 5 +- .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 19 +- .../output_0.cairo | 19 +- .../nodes/cumsum_fp16x16_1d_reverse.cairo | 5 +- .../cumsum_fp16x16_1d_reverse/input_0.cairo | 19 +- .../cumsum_fp16x16_1d_reverse/output_0.cairo | 19 +- .../cumsum_fp16x16_1d_reverse_exclusive.cairo | 5 +- .../input_0.cairo | 19 +- .../output_0.cairo | 19 +- .../nodes/cumsum_fp16x16_2d_axis_0.cairo | 5 +- .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 21 ++- .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 21 ++- .../nodes/cumsum_fp16x16_2d_axis_1.cairo | 5 +- .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 21 ++- .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 21 ++- .../cumsum_fp8x23_1d_default/input_0.cairo | 18 +- .../cumsum_fp8x23_1d_default/output_0.cairo | 18 +- .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 18 +- .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 18 +- .../cumsum_fp8x23_1d_reverse/input_0.cairo | 18 +- .../cumsum_fp8x23_1d_reverse/output_0.cairo | 18 +- .../input_0.cairo | 18 +- .../output_0.cairo | 18 +- .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 20 +- .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 20 +- .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 20 +- .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 20 +- src/tests/nodes/cumsum_u32_1d_default.cairo | 4 +- .../nodes/cumsum_u32_1d_default/input_0.cairo | 2 +- .../cumsum_u32_1d_default/output_0.cairo | 2 +- src/tests/nodes/cumsum_u32_1d_exclusive.cairo | 4 +- .../cumsum_u32_1d_exclusive/input_0.cairo | 2 +- .../cumsum_u32_1d_exclusive/output_0.cairo | 2 +- src/tests/nodes/cumsum_u32_1d_reverse.cairo | 4 +- .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 2 +- .../cumsum_u32_1d_reverse/output_0.cairo | 2 +- .../cumsum_u32_1d_reverse_exclusive.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 2 +- src/tests/nodes/cumsum_u32_2d_axis_0.cairo | 4 +- .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 2 +- .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 2 +- src/tests/nodes/cumsum_u32_2d_axis_1.cairo | 4 +- .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 2 +- .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 2 +- src/tests/nodes/div_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/div_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/div_fp16x16/output_0.cairo | 63 ++++--- .../nodes/div_fp16x16_broadcast/input_0.cairo | 63 ++++--- .../nodes/div_fp16x16_broadcast/input_1.cairo | 15 +- .../div_fp16x16_broadcast/output_0.cairo | 63 ++++--- .../nodes/div_fp8x23_broadcast/input_0.cairo | 62 ++++--- .../nodes/div_fp8x23_broadcast/input_1.cairo | 14 +- .../nodes/div_fp8x23_broadcast/output_0.cairo | 62 ++++--- src/tests/nodes/div_u32/input_0.cairo | 2 +- src/tests/nodes/div_u32/input_1.cairo | 2 +- src/tests/nodes/div_u32/output_0.cairo | 2 +- .../nodes/div_u32_broadcast/input_0.cairo | 2 +- .../nodes/div_u32_broadcast/input_1.cairo | 2 +- .../nodes/div_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_fp16x16.cairo | 4 +- src/tests/nodes/equal_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/equal_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/equal_fp16x16/output_0.cairo | 2 +- src/tests/nodes/equal_fp16x16_broadcast.cairo | 4 +- .../equal_fp16x16_broadcast/input_0.cairo | 17 +- .../equal_fp16x16_broadcast/input_1.cairo | 13 +- .../equal_fp16x16_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_fp8x23.cairo | 4 +- src/tests/nodes/equal_fp8x23/output_0.cairo | 2 +- src/tests/nodes/equal_fp8x23_broadcast.cairo | 4 +- .../equal_fp8x23_broadcast/input_0.cairo | 16 +- .../equal_fp8x23_broadcast/input_1.cairo | 12 +- .../equal_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_i32.cairo | 4 +- src/tests/nodes/equal_i32/output_0.cairo | 2 +- src/tests/nodes/equal_i32_broadcast.cairo | 4 +- .../nodes/equal_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_i8.cairo | 4 +- src/tests/nodes/equal_i8/output_0.cairo | 2 +- src/tests/nodes/equal_i8_broadcast.cairo | 4 +- .../nodes/equal_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_u32.cairo | 4 +- src/tests/nodes/equal_u32/input_0.cairo | 2 +- src/tests/nodes/equal_u32/input_1.cairo | 2 +- src/tests/nodes/equal_u32/output_0.cairo | 2 +- src/tests/nodes/equal_u32_broadcast.cairo | 4 +- .../nodes/equal_u32_broadcast/input_0.cairo | 2 +- .../nodes/equal_u32_broadcast/input_1.cairo | 2 +- .../nodes/equal_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/exp_fp16x16.cairo | 5 +- src/tests/nodes/exp_fp16x16/input_0.cairo | 17 +- src/tests/nodes/exp_fp16x16/output_0.cairo | 17 +- .../nodes/exp_i32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/exp_i8_fp16x16/output_0.cairo | 17 +- src/tests/nodes/exp_u32_fp16x16/input_0.cairo | 2 +- .../nodes/exp_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/exp_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/greater_equal_fp16x16.cairo | 4 +- .../nodes/greater_equal_fp16x16/input_0.cairo | 63 ++++--- .../nodes/greater_equal_fp16x16/input_1.cairo | 63 ++++--- .../greater_equal_fp16x16/output_0.cairo | 2 +- .../greater_equal_fp16x16_broadcast.cairo | 4 +- .../input_0.cairo | 63 ++++--- .../input_1.cairo | 15 +- .../output_0.cairo | 2 +- src/tests/nodes/greater_equal_fp8x23.cairo | 4 +- .../nodes/greater_equal_fp8x23/output_0.cairo | 2 +- .../greater_equal_fp8x23_broadcast.cairo | 4 +- .../input_0.cairo | 62 ++++--- .../input_1.cairo | 14 +- .../output_0.cairo | 2 +- src/tests/nodes/greater_equal_i32.cairo | 4 +- .../nodes/greater_equal_i32/output_0.cairo | 2 +- .../nodes/greater_equal_i32_broadcast.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/greater_equal_i8.cairo | 4 +- .../nodes/greater_equal_i8/output_0.cairo | 2 +- .../nodes/greater_equal_i8_broadcast.cairo | 4 +- .../greater_equal_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_equal_u32.cairo | 4 +- .../nodes/greater_equal_u32/input_0.cairo | 2 +- .../nodes/greater_equal_u32/input_1.cairo | 2 +- .../nodes/greater_equal_u32/output_0.cairo | 2 +- .../nodes/greater_equal_u32_broadcast.cairo | 4 +- .../greater_equal_u32_broadcast/input_0.cairo | 2 +- .../greater_equal_u32_broadcast/input_1.cairo | 2 +- .../output_0.cairo | 2 +- src/tests/nodes/greater_fp16x16.cairo | 4 +- src/tests/nodes/greater_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/greater_fp16x16/input_1.cairo | 63 ++++--- .../nodes/greater_fp16x16/output_0.cairo | 2 +- .../nodes/greater_fp16x16_broadcast.cairo | 4 +- .../greater_fp16x16_broadcast/input_0.cairo | 17 +- .../greater_fp16x16_broadcast/input_1.cairo | 13 +- .../greater_fp16x16_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_fp8x23.cairo | 4 +- src/tests/nodes/greater_fp8x23/output_0.cairo | 2 +- .../nodes/greater_fp8x23_broadcast.cairo | 4 +- .../greater_fp8x23_broadcast/input_0.cairo | 16 +- .../greater_fp8x23_broadcast/input_1.cairo | 12 +- .../greater_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_i32.cairo | 4 +- src/tests/nodes/greater_i32/output_0.cairo | 2 +- src/tests/nodes/greater_i32_broadcast.cairo | 4 +- .../greater_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_i8.cairo | 4 +- src/tests/nodes/greater_i8/output_0.cairo | 2 +- src/tests/nodes/greater_i8_broadcast.cairo | 4 +- .../nodes/greater_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_u32.cairo | 4 +- src/tests/nodes/greater_u32/input_0.cairo | 2 +- src/tests/nodes/greater_u32/input_1.cairo | 2 +- src/tests/nodes/greater_u32/output_0.cairo | 2 +- src/tests/nodes/greater_u32_broadcast.cairo | 4 +- .../nodes/greater_u32_broadcast/input_0.cairo | 2 +- .../nodes/greater_u32_broadcast/input_1.cairo | 2 +- .../greater_u32_broadcast/output_0.cairo | 2 +- .../nodes/leaky_relu_fp16x16/input_0.cairo | 17 +- .../nodes/leaky_relu_fp16x16/output_0.cairo | 17 +- .../leaky_relu_i32_fp16x16/output_0.cairo | 17 +- .../leaky_relu_i8_fp16x16/output_0.cairo | 17 +- src/tests/nodes/less_equal_fp16x16.cairo | 4 +- .../nodes/less_equal_fp16x16/input_0.cairo | 17 +- .../nodes/less_equal_fp16x16/input_1.cairo | 17 +- .../nodes/less_equal_fp16x16/output_0.cairo | 2 +- .../nodes/less_equal_fp16x16_broadcast.cairo | 4 +- .../input_0.cairo | 17 +- .../input_1.cairo | 13 +- .../output_0.cairo | 2 +- src/tests/nodes/less_equal_fp8x23.cairo | 4 +- .../nodes/less_equal_fp8x23/output_0.cairo | 2 +- .../nodes/less_equal_fp8x23_broadcast.cairo | 4 +- .../less_equal_fp8x23_broadcast/input_0.cairo | 16 +- .../less_equal_fp8x23_broadcast/input_1.cairo | 12 +- .../output_0.cairo | 2 +- src/tests/nodes/less_equal_i32.cairo | 4 +- src/tests/nodes/less_equal_i32/output_0.cairo | 2 +- .../nodes/less_equal_i32_broadcast.cairo | 4 +- .../less_equal_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_equal_i8.cairo | 4 +- src/tests/nodes/less_equal_i8/output_0.cairo | 2 +- src/tests/nodes/less_equal_i8_broadcast.cairo | 4 +- .../less_equal_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_equal_u32.cairo | 4 +- src/tests/nodes/less_equal_u32/input_0.cairo | 2 +- src/tests/nodes/less_equal_u32/input_1.cairo | 2 +- src/tests/nodes/less_equal_u32/output_0.cairo | 2 +- .../nodes/less_equal_u32_broadcast.cairo | 4 +- .../less_equal_u32_broadcast/input_0.cairo | 2 +- .../less_equal_u32_broadcast/input_1.cairo | 2 +- .../less_equal_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_fp16x16.cairo | 4 +- src/tests/nodes/less_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/less_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/less_fp16x16/output_0.cairo | 2 +- src/tests/nodes/less_fp16x16_broadcast.cairo | 4 +- .../less_fp16x16_broadcast/input_0.cairo | 63 ++++--- .../less_fp16x16_broadcast/input_1.cairo | 15 +- .../less_fp16x16_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_fp8x23.cairo | 4 +- src/tests/nodes/less_fp8x23/output_0.cairo | 2 +- src/tests/nodes/less_fp8x23_broadcast.cairo | 4 +- .../nodes/less_fp8x23_broadcast/input_0.cairo | 62 ++++--- .../nodes/less_fp8x23_broadcast/input_1.cairo | 14 +- .../less_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_i32.cairo | 4 +- src/tests/nodes/less_i32/output_0.cairo | 2 +- src/tests/nodes/less_i32_broadcast.cairo | 4 +- .../nodes/less_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_i8.cairo | 4 +- src/tests/nodes/less_i8/output_0.cairo | 2 +- src/tests/nodes/less_i8_broadcast.cairo | 4 +- .../nodes/less_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_u32.cairo | 4 +- src/tests/nodes/less_u32/input_0.cairo | 2 +- src/tests/nodes/less_u32/input_1.cairo | 2 +- src/tests/nodes/less_u32/output_0.cairo | 2 +- src/tests/nodes/less_u32_broadcast.cairo | 4 +- .../nodes/less_u32_broadcast/input_0.cairo | 2 +- .../nodes/less_u32_broadcast/input_1.cairo | 2 +- .../nodes/less_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/linear_fp16x16/input_0.cairo | 15 +- src/tests/nodes/linear_fp16x16/input_1.cairo | 21 ++- src/tests/nodes/linear_fp16x16/input_2.cairo | 13 +- src/tests/nodes/linear_fp16x16/output_0.cairo | 13 +- src/tests/nodes/linear_u32/input_0.cairo | 2 +- src/tests/nodes/linear_u32/input_1.cairo | 2 +- src/tests/nodes/linear_u32/input_2.cairo | 2 +- src/tests/nodes/linear_u32/output_0.cairo | 2 +- src/tests/nodes/log_fp16x16.cairo | 5 +- src/tests/nodes/log_fp16x16/input_0.cairo | 17 +- src/tests/nodes/log_fp16x16/output_0.cairo | 17 +- .../nodes/log_i32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/log_i8_fp16x16/output_0.cairo | 17 +- src/tests/nodes/log_u32_fp16x16/input_0.cairo | 2 +- .../nodes/log_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/log_u32_fp8x23/input_0.cairo | 2 +- .../logsoftmax_fp16x16_axis_0/input_0.cairo | 17 +- .../logsoftmax_fp16x16_axis_0/output_0.cairo | 17 +- .../logsoftmax_fp16x16_axis_1/input_0.cairo | 17 +- .../logsoftmax_fp16x16_axis_1/output_0.cairo | 17 +- .../logsoftmax_fp8x23_axis_0/input_0.cairo | 16 +- .../logsoftmax_fp8x23_axis_0/output_0.cairo | 16 +- .../logsoftmax_fp8x23_axis_1/input_0.cairo | 16 +- .../logsoftmax_fp8x23_axis_1/output_0.cairo | 16 +- .../output_0.cairo | 17 +- .../output_0.cairo | 17 +- .../output_0.cairo | 16 +- .../output_0.cairo | 16 +- .../output_0.cairo | 17 +- .../output_0.cairo | 17 +- .../output_0.cairo | 16 +- .../output_0.cairo | 16 +- .../input_0.cairo | 2 +- .../output_0.cairo | 17 +- .../input_0.cairo | 2 +- .../output_0.cairo | 17 +- .../input_0.cairo | 2 +- .../output_0.cairo | 16 +- .../input_0.cairo | 2 +- .../output_0.cairo | 16 +- src/tests/nodes/matmul_fp16x16_1d.cairo | 5 +- .../nodes/matmul_fp16x16_1d/input_0.cairo | 15 +- .../nodes/matmul_fp16x16_1d/input_1.cairo | 15 +- .../nodes/matmul_fp16x16_1d/output_0.cairo | 11 +- src/tests/nodes/matmul_fp16x16_1x2.cairo | 5 +- .../nodes/matmul_fp16x16_1x2/input_0.cairo | 13 +- .../nodes/matmul_fp16x16_1x2/input_1.cairo | 13 +- .../nodes/matmul_fp16x16_1x2/output_0.cairo | 11 +- src/tests/nodes/matmul_fp16x16_2x1.cairo | 5 +- .../nodes/matmul_fp16x16_2x1/input_0.cairo | 13 +- .../nodes/matmul_fp16x16_2x1/input_1.cairo | 13 +- .../nodes/matmul_fp16x16_2x1/output_0.cairo | 17 +- src/tests/nodes/matmul_fp16x16_2x2.cairo | 5 +- .../nodes/matmul_fp16x16_2x2/input_0.cairo | 17 +- .../nodes/matmul_fp16x16_2x2/input_1.cairo | 17 +- .../nodes/matmul_fp16x16_2x2/output_0.cairo | 17 +- .../nodes/matmul_fp8x23_1d/input_0.cairo | 14 +- .../nodes/matmul_fp8x23_1d/input_1.cairo | 14 +- .../nodes/matmul_fp8x23_1d/output_0.cairo | 10 +- .../nodes/matmul_fp8x23_1x2/input_0.cairo | 12 +- .../nodes/matmul_fp8x23_1x2/input_1.cairo | 12 +- .../nodes/matmul_fp8x23_1x2/output_0.cairo | 10 +- .../nodes/matmul_fp8x23_2x1/input_0.cairo | 12 +- .../nodes/matmul_fp8x23_2x1/input_1.cairo | 12 +- .../nodes/matmul_fp8x23_2x1/output_0.cairo | 16 +- .../nodes/matmul_fp8x23_2x2/input_0.cairo | 16 +- .../nodes/matmul_fp8x23_2x2/input_1.cairo | 16 +- .../nodes/matmul_fp8x23_2x2/output_0.cairo | 16 +- src/tests/nodes/matmul_u32_1d.cairo | 4 +- src/tests/nodes/matmul_u32_1d/input_0.cairo | 2 +- src/tests/nodes/matmul_u32_1d/input_1.cairo | 2 +- src/tests/nodes/matmul_u32_1d/output_0.cairo | 2 +- src/tests/nodes/matmul_u32_1x2.cairo | 4 +- src/tests/nodes/matmul_u32_1x2/input_0.cairo | 2 +- src/tests/nodes/matmul_u32_1x2/input_1.cairo | 2 +- src/tests/nodes/matmul_u32_1x2/output_0.cairo | 2 +- src/tests/nodes/matmul_u32_2x1.cairo | 4 +- src/tests/nodes/matmul_u32_2x1/input_0.cairo | 2 +- src/tests/nodes/matmul_u32_2x1/input_1.cairo | 2 +- src/tests/nodes/matmul_u32_2x1/output_0.cairo | 2 +- src/tests/nodes/matmul_u32_2x2.cairo | 4 +- src/tests/nodes/matmul_u32_2x2/input_0.cairo | 2 +- src/tests/nodes/matmul_u32_2x2/input_1.cairo | 2 +- src/tests/nodes/matmul_u32_2x2/output_0.cairo | 2 +- src/tests/nodes/mul_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/mul_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/mul_fp16x16/output_0.cairo | 63 ++++--- .../nodes/mul_fp16x16_broadcast/input_0.cairo | 63 ++++--- .../nodes/mul_fp16x16_broadcast/input_1.cairo | 15 +- .../mul_fp16x16_broadcast/output_0.cairo | 63 ++++--- .../nodes/mul_fp8x23_broadcast/input_0.cairo | 62 ++++--- .../nodes/mul_fp8x23_broadcast/input_1.cairo | 14 +- .../nodes/mul_fp8x23_broadcast/output_0.cairo | 62 ++++--- src/tests/nodes/mul_u32/input_0.cairo | 2 +- src/tests/nodes/mul_u32/input_1.cairo | 2 +- src/tests/nodes/mul_u32/output_0.cairo | 2 +- .../nodes/mul_u32_broadcast/input_0.cairo | 2 +- .../nodes/mul_u32_broadcast/input_1.cairo | 2 +- .../nodes/mul_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_fp16x16.cairo | 4 +- src/tests/nodes/or_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/or_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/or_fp16x16/output_0.cairo | 2 +- src/tests/nodes/or_fp16x16_broadcast.cairo | 4 +- .../nodes/or_fp16x16_broadcast/input_0.cairo | 17 +- .../nodes/or_fp16x16_broadcast/input_1.cairo | 13 +- .../nodes/or_fp16x16_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_fp8x23.cairo | 4 +- src/tests/nodes/or_fp8x23/output_0.cairo | 2 +- src/tests/nodes/or_fp8x23_broadcast.cairo | 4 +- .../nodes/or_fp8x23_broadcast/input_0.cairo | 16 +- .../nodes/or_fp8x23_broadcast/input_1.cairo | 12 +- .../nodes/or_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_i32.cairo | 4 +- src/tests/nodes/or_i32/output_0.cairo | 2 +- src/tests/nodes/or_i32_broadcast.cairo | 4 +- .../nodes/or_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_i8.cairo | 4 +- src/tests/nodes/or_i8/output_0.cairo | 2 +- src/tests/nodes/or_i8_broadcast.cairo | 4 +- .../nodes/or_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_u32.cairo | 4 +- src/tests/nodes/or_u32/input_0.cairo | 2 +- src/tests/nodes/or_u32/input_1.cairo | 2 +- src/tests/nodes/or_u32/output_0.cairo | 2 +- src/tests/nodes/or_u32_broadcast.cairo | 4 +- .../nodes/or_u32_broadcast/input_0.cairo | 2 +- .../nodes/or_u32_broadcast/input_1.cairo | 2 +- .../nodes/or_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/reduce_sum_fp16x16_1D.cairo | 5 +- .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 15 +- .../reduce_sum_fp16x16_1D/output_0.cairo | 11 +- .../nodes/reduce_sum_fp16x16_2D_axis_1.cairo | 5 +- .../input_0.cairo | 17 +- .../output_0.cairo | 13 +- .../nodes/reduce_sum_fp16x16_2D_default.cairo | 5 +- .../input_0.cairo | 17 +- .../output_0.cairo | 13 +- .../reduce_sum_fp16x16_2D_keepdims.cairo | 5 +- .../input_0.cairo | 17 +- .../output_0.cairo | 13 +- .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 14 +- .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 10 +- .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 16 +- .../output_0.cairo | 12 +- .../input_0.cairo | 16 +- .../output_0.cairo | 12 +- .../input_0.cairo | 16 +- .../output_0.cairo | 12 +- src/tests/nodes/reduce_sum_u32_1D.cairo | 4 +- .../nodes/reduce_sum_u32_1D/input_0.cairo | 2 +- .../nodes/reduce_sum_u32_1D/output_0.cairo | 2 +- .../nodes/reduce_sum_u32_2D_axis_1.cairo | 4 +- .../reduce_sum_u32_2D_axis_1/input_0.cairo | 2 +- .../reduce_sum_u32_2D_axis_1/output_0.cairo | 2 +- .../nodes/reduce_sum_u32_2D_default.cairo | 4 +- .../reduce_sum_u32_2D_default/input_0.cairo | 2 +- .../reduce_sum_u32_2D_default/output_0.cairo | 2 +- .../nodes/reduce_sum_u32_2D_keepdims.cairo | 4 +- .../reduce_sum_u32_2D_keepdims/input_0.cairo | 2 +- .../reduce_sum_u32_2D_keepdims/output_0.cairo | 2 +- src/tests/nodes/relu_fp16x16/input_0.cairo | 17 +- src/tests/nodes/relu_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 17 +- .../nodes/sigmoid_fp16x16/output_0.cairo | 17 +- .../nodes/sigmoid_i32_fp16x16/output_0.cairo | 17 +- .../nodes/sigmoid_i8_fp16x16/output_0.cairo | 17 +- .../nodes/sigmoid_u32_fp16x16/input_0.cairo | 2 +- .../nodes/sigmoid_u32_fp16x16/output_0.cairo | 17 +- .../nodes/sigmoid_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sin_fp16x16.cairo | 5 +- src/tests/nodes/sin_fp16x16/input_0.cairo | 17 +- src/tests/nodes/sin_fp16x16/output_0.cairo | 17 +- .../nodes/sin_i32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sin_i8_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sin_u32_fp16x16/input_0.cairo | 2 +- .../nodes/sin_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sin_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sinh_fp16x16.cairo | 5 +- src/tests/nodes/sinh_fp16x16/input_0.cairo | 17 +- src/tests/nodes/sinh_fp16x16/output_0.cairo | 17 +- .../nodes/sinh_i32_fp16x16/output_0.cairo | 17 +- .../nodes/sinh_i8_fp16x16/output_0.cairo | 17 +- .../nodes/sinh_u32_fp16x16/input_0.cairo | 2 +- .../nodes/sinh_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sinh_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/softmax_fp16x16/input_0.cairo | 17 +- .../nodes/softmax_fp16x16/output_0.cairo | 17 +- .../nodes/softmax_i32_fp16x16/output_0.cairo | 17 +- .../nodes/softmax_i8_fp16x16/output_0.cairo | 17 +- .../nodes/softmax_u32_fp16x16/input_0.cairo | 2 +- .../nodes/softmax_u32_fp16x16/output_0.cairo | 17 +- .../nodes/softmax_u32_fp8x23/input_0.cairo | 2 +- .../nodes/softplus_fp16x16/input_0.cairo | 17 +- .../nodes/softplus_fp16x16/output_0.cairo | 17 +- .../nodes/softplus_i32_fp16x16/output_0.cairo | 17 +- .../nodes/softplus_i8_fp16x16/output_0.cairo | 17 +- .../nodes/softplus_u32_fp16x16/input_0.cairo | 2 +- .../nodes/softplus_u32_fp16x16/output_0.cairo | 17 +- .../nodes/softplus_u32_fp8x23/input_0.cairo | 2 +- .../nodes/softsign_fp16x16/input_0.cairo | 17 +- .../nodes/softsign_fp16x16/output_0.cairo | 17 +- .../nodes/softsign_i32_fp16x16/output_0.cairo | 17 +- .../nodes/softsign_i8_fp16x16/output_0.cairo | 17 +- .../nodes/softsign_u32_fp16x16/input_0.cairo | 2 +- .../nodes/softsign_u32_fp16x16/output_0.cairo | 17 +- .../nodes/softsign_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sqrt_fp16x16.cairo | 5 +- src/tests/nodes/sqrt_fp16x16/input_0.cairo | 17 +- src/tests/nodes/sqrt_fp16x16/output_0.cairo | 17 +- .../nodes/sqrt_i32_fp16x16/output_0.cairo | 17 +- .../nodes/sqrt_i8_fp16x16/output_0.cairo | 17 +- .../nodes/sqrt_u32_fp16x16/input_0.cairo | 2 +- .../nodes/sqrt_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sub_fp16x16/input_0.cairo | 63 ++++--- src/tests/nodes/sub_fp16x16/input_1.cairo | 63 ++++--- src/tests/nodes/sub_fp16x16/output_0.cairo | 63 ++++--- .../nodes/sub_fp16x16_broadcast/input_0.cairo | 63 ++++--- .../nodes/sub_fp16x16_broadcast/input_1.cairo | 15 +- .../sub_fp16x16_broadcast/output_0.cairo | 63 ++++--- .../nodes/sub_fp8x23_broadcast/input_0.cairo | 62 ++++--- .../nodes/sub_fp8x23_broadcast/input_1.cairo | 14 +- .../nodes/sub_fp8x23_broadcast/output_0.cairo | 62 ++++--- src/tests/nodes/sub_u32/input_0.cairo | 2 +- src/tests/nodes/sub_u32/input_1.cairo | 2 +- src/tests/nodes/sub_u32/output_0.cairo | 2 +- .../nodes/sub_u32_broadcast/input_0.cairo | 2 +- .../nodes/sub_u32_broadcast/input_1.cairo | 2 +- .../nodes/sub_u32_broadcast/output_0.cairo | 2 +- src/tests/nodes/tanh_fp16x16.cairo | 5 +- src/tests/nodes/tanh_fp16x16/input_0.cairo | 17 +- src/tests/nodes/tanh_fp16x16/output_0.cairo | 17 +- .../nodes/tanh_i32_fp16x16/output_0.cairo | 17 +- .../nodes/tanh_i8_fp16x16/output_0.cairo | 17 +- .../nodes/tanh_u32_fp16x16/input_0.cairo | 2 +- .../nodes/tanh_u32_fp16x16/output_0.cairo | 17 +- src/tests/nodes/tanh_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/transpose_fp16x16_2d.cairo | 5 +- .../nodes/transpose_fp16x16_2d/input_0.cairo | 17 +- .../nodes/transpose_fp16x16_2d/output_0.cairo | 17 +- src/tests/nodes/transpose_fp16x16_3d.cairo | 5 +- .../nodes/transpose_fp16x16_3d/input_0.cairo | 25 +-- .../nodes/transpose_fp16x16_3d/output_0.cairo | 25 +-- .../nodes/transpose_fp8x23_2d/input_0.cairo | 16 +- .../nodes/transpose_fp8x23_2d/output_0.cairo | 16 +- .../nodes/transpose_fp8x23_3d/input_0.cairo | 24 +-- .../nodes/transpose_fp8x23_3d/output_0.cairo | 24 +-- src/tests/nodes/transpose_u32_2d.cairo | 4 +- .../nodes/transpose_u32_2d/input_0.cairo | 2 +- .../nodes/transpose_u32_2d/output_0.cairo | 2 +- src/tests/nodes/transpose_u32_3d.cairo | 4 +- .../nodes/transpose_u32_3d/input_0.cairo | 2 +- .../nodes/transpose_u32_3d/output_0.cairo | 2 +- src/tests/nodes/xor_fp16x16.cairo | 4 +- src/tests/nodes/xor_fp16x16/input_0.cairo | 17 +- src/tests/nodes/xor_fp16x16/input_1.cairo | 13 +- src/tests/nodes/xor_fp16x16/output_0.cairo | 2 +- src/tests/nodes/xor_fp16x16_broadcast.cairo | 4 +- .../nodes/xor_fp16x16_broadcast/input_0.cairo | 17 +- .../nodes/xor_fp16x16_broadcast/input_1.cairo | 13 +- .../xor_fp16x16_broadcast/output_0.cairo | 2 +- src/tests/nodes/xor_fp8x23.cairo | 4 +- src/tests/nodes/xor_fp8x23/output_0.cairo | 2 +- src/tests/nodes/xor_fp8x23_broadcast.cairo | 4 +- .../nodes/xor_fp8x23_broadcast/input_0.cairo | 16 +- .../nodes/xor_fp8x23_broadcast/input_1.cairo | 12 +- .../nodes/xor_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/xor_i32.cairo | 4 +- src/tests/nodes/xor_i32/output_0.cairo | 2 +- src/tests/nodes/xor_i32_broadcast.cairo | 4 +- .../nodes/xor_i32_broadcast/output_0.cairo | 2 +- src/tests/nodes/xor_i8.cairo | 4 +- src/tests/nodes/xor_i8/output_0.cairo | 2 +- src/tests/nodes/xor_i8_broadcast.cairo | 4 +- .../nodes/xor_i8_broadcast/output_0.cairo | 2 +- src/tests/nodes/xor_u32.cairo | 4 +- src/tests/nodes/xor_u32/input_0.cairo | 2 +- src/tests/nodes/xor_u32/input_1.cairo | 2 +- src/tests/nodes/xor_u32/output_0.cairo | 2 +- src/tests/nodes/xor_u32_broadcast.cairo | 4 +- .../nodes/xor_u32_broadcast/input_0.cairo | 2 +- .../nodes/xor_u32_broadcast/input_1.cairo | 2 +- .../nodes/xor_u32_broadcast/output_0.cairo | 2 +- 893 files changed, 6397 insertions(+), 5359 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 904e5f480..a78eb9cfc 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -9,7 +9,7 @@ use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor }; use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; @@ -255,3 +255,46 @@ impl U32TryIntoU32 of TryInto { Option::Some(self) } } + +// Internals + +const PRECISION: u32 = 589; // 0.009 + +fn relative_eq(lhs: @FP16x16, rhs: @FP16x16) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + }; + + return is_eq; +} diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 3ae3049f8..20f257576 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -9,7 +9,7 @@ use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + at_tensor, }; use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; @@ -255,3 +255,45 @@ impl U32TryIntoU32 of TryInto { Option::Some(self) } } + +// Internals + +const PRECISION: u32 = 75497; // 0.009 + +fn relative_eq(lhs: @FP8x23, rhs: @FP8x23) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + }; + + return is_eq; +} diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index bec1f7ce6..6a55aac08 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -2,53 +2,53 @@ mod abs_fp16x16; mod abs_fp8x23; mod abs_i32; mod abs_i8; -// mod acos_fp8x23; -// mod acos_fp16x16; -// mod argmax_fp16x16_1D_default; -// mod argmax_fp16x16_1D_keepdims_false; -// mod argmax_fp16x16_1D_last_index; -// mod argmax_fp16x16_2D_default; -// mod argmax_fp16x16_2D_keepdims_false; -// mod argmax_fp16x16_2D_last_index; -// mod argmax_fp16x16_3D_default; -// mod argmax_fp16x16_3D_keepdims_false; -// mod argmax_fp16x16_3D_last_index; -// mod argmax_fp8x23_1D_default; -// mod argmax_fp8x23_1D_keepdims_false; -// mod argmax_fp8x23_1D_last_index; -// mod argmax_fp8x23_2D_default; -// mod argmax_fp8x23_2D_keepdims_false; -// mod argmax_fp8x23_2D_last_index; -// mod argmax_fp8x23_3D_default; -// mod argmax_fp8x23_3D_keepdims_false; -// mod argmax_fp8x23_3D_last_index; -// mod argmax_i32_1D_default; -// mod argmax_i32_1D_keepdims_false; -// mod argmax_i32_1D_last_index; -// mod argmax_i32_2D_default; -// mod argmax_i32_2D_keepdims_false; -// mod argmax_i32_2D_last_index; -// mod argmax_i32_3D_default; -// mod argmax_i32_3D_keepdims_false; -// mod argmax_i32_3D_last_index; -// mod argmax_i8_1D_default; -// mod argmax_i8_1D_keepdims_false; -// mod argmax_i8_1D_last_index; -// mod argmax_i8_2D_default; -// mod argmax_i8_2D_keepdims_false; -// mod argmax_i8_2D_last_index; -// mod argmax_i8_3D_default; -// mod argmax_i8_3D_keepdims_false; -// mod argmax_i8_3D_last_index; -// mod argmax_u32_1D_default; -// mod argmax_u32_1D_keepdims_false; -// mod argmax_u32_1D_last_index; -// mod argmax_u32_2D_default; -// mod argmax_u32_2D_keepdims_false; -// mod argmax_u32_2D_last_index; -// mod argmax_u32_3D_default; -// mod argmax_u32_3D_keepdims_false; -// mod argmax_u32_3D_last_index; +mod acos_fp8x23; +mod acos_fp16x16; +mod argmax_fp16x16_1D_default; +mod argmax_fp16x16_1D_keepdims_false; +mod argmax_fp16x16_1D_last_index; +mod argmax_fp16x16_2D_default; +mod argmax_fp16x16_2D_keepdims_false; +mod argmax_fp16x16_2D_last_index; +mod argmax_fp16x16_3D_default; +mod argmax_fp16x16_3D_keepdims_false; +mod argmax_fp16x16_3D_last_index; +mod argmax_fp8x23_1D_default; +mod argmax_fp8x23_1D_keepdims_false; +mod argmax_fp8x23_1D_last_index; +mod argmax_fp8x23_2D_default; +mod argmax_fp8x23_2D_keepdims_false; +mod argmax_fp8x23_2D_last_index; +mod argmax_fp8x23_3D_default; +mod argmax_fp8x23_3D_keepdims_false; +mod argmax_fp8x23_3D_last_index; +mod argmax_i32_1D_default; +mod argmax_i32_1D_keepdims_false; +mod argmax_i32_1D_last_index; +mod argmax_i32_2D_default; +mod argmax_i32_2D_keepdims_false; +mod argmax_i32_2D_last_index; +mod argmax_i32_3D_default; +mod argmax_i32_3D_keepdims_false; +mod argmax_i32_3D_last_index; +mod argmax_i8_1D_default; +mod argmax_i8_1D_keepdims_false; +mod argmax_i8_1D_last_index; +mod argmax_i8_2D_default; +mod argmax_i8_2D_keepdims_false; +mod argmax_i8_2D_last_index; +mod argmax_i8_3D_default; +mod argmax_i8_3D_keepdims_false; +mod argmax_i8_3D_last_index; +mod argmax_u32_1D_default; +mod argmax_u32_1D_keepdims_false; +mod argmax_u32_1D_last_index; +mod argmax_u32_2D_default; +mod argmax_u32_2D_keepdims_false; +mod argmax_u32_2D_last_index; +mod argmax_u32_3D_default; +mod argmax_u32_3D_keepdims_false; +mod argmax_u32_3D_last_index; // mod argmin_fp16x16_1D_default; // mod argmin_fp16x16_1D_keepdims_false; // mod argmin_fp16x16_1D_last_index; diff --git a/src/tests/nodes/acos_fp16x16.cairo b/src/tests/nodes/acos_fp16x16.cairo index 414ce02fa..705927846 100644 --- a/src/tests/nodes/acos_fp16x16.cairo +++ b/src/tests/nodes/acos_fp16x16.cairo @@ -1,11 +1,12 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] @@ -17,4 +18,4 @@ fn test_acos_fp16x16() { let y = input_0.acos(); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo index 030687cd5..f1adfe6b4 100644 --- a/src/tests/nodes/acos_fp16x16/input_0.cairo +++ b/src/tests/nodes/acos_fp16x16/input_0.cairo @@ -1,19 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 57673, sign: false }); - data.append(FixedType { mag: 46735, sign: false }); - data.append(FixedType { mag: 47892, sign: false }); - data.append(FixedType { mag: 52526, sign: false }); + data.append(FP16x16 { mag: 57673, sign: false }); + data.append(FP16x16 { mag: 46735, sign: false }); + data.append(FP16x16 { mag: 47892, sign: false }); + data.append(FP16x16 { mag: 52526, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file +} diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo index 53772f58b..a770ab90c 100644 --- a/src/tests/nodes/acos_fp16x16/output_0.cairo +++ b/src/tests/nodes/acos_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 32432, sign: false }); - data.append(FixedType { mag: 50911, sign: false }); - data.append(FixedType { mag: 49239, sign: false }); - data.append(FixedType { mag: 42008, sign: false }); + data.append(FP16x16 { mag: 32432, sign: false }); + data.append(FP16x16 { mag: 50911, sign: false }); + data.append(FP16x16 { mag: 49239, sign: false }); + data.append(FP16x16 { mag: 42008, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_fp16x16.cairo b/src/tests/nodes/acosh_fp16x16.cairo index 1e3f3e6ec..309547d0e 100644 --- a/src/tests/nodes/acosh_fp16x16.cairo +++ b/src/tests/nodes/acosh_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo index 2ac325a99..0aed04ac0 100644 --- a/src/tests/nodes/acosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 141514, sign: false }); - data.append(FixedType { mag: 155360, sign: false }); - data.append(FixedType { mag: 119042, sign: false }); - data.append(FixedType { mag: 312767, sign: false }); + data.append(FP16x16 { mag: 141514, sign: false }); + data.append(FP16x16 { mag: 155360, sign: false }); + data.append(FP16x16 { mag: 119042, sign: false }); + data.append(FP16x16 { mag: 312767, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo index 9cfe7e34f..da55eb07d 100644 --- a/src/tests/nodes/acosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 92040, sign: false }); - data.append(FixedType { mag: 98861, sign: false }); - data.append(FixedType { mag: 78893, sign: false }); - data.append(FixedType { mag: 147118, sign: false }); + data.append(FP16x16 { mag: 92040, sign: false }); + data.append(FP16x16 { mag: 98861, sign: false }); + data.append(FP16x16 { mag: 78893, sign: false }); + data.append(FP16x16 { mag: 147118, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo index a1c985716..e5d75f5f0 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 135229, sign: false }); - data.append(FixedType { mag: 86308, sign: false }); - data.append(FixedType { mag: 86308, sign: false }); - data.append(FixedType { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 135229, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo index 336e9d623..ad1cdd118 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 86308, sign: false }); - data.append(FixedType { mag: 86308, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 86308, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo index f701b75a9..a4792605e 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo index c02ac139a..c5d7249e2 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 135229, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 135229, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo index f2aa58ff3..24550cef8 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo index f865e39fa..00649b235 100644 --- a/src/tests/nodes/add_fp16x16/input_0.cairo +++ b/src/tests/nodes/add_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo index 6d244ab35..46d28d789 100644 --- a/src/tests/nodes/add_fp16x16/input_1.cairo +++ b/src/tests/nodes/add_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo index ccee743a1..c6a823845 100644 --- a/src/tests/nodes/add_fp16x16/output_0.cairo +++ b/src/tests/nodes/add_fp16x16/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo index 775295c8f..678714b1b 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo index 2ccd49cad..8a24fc147 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo index 74c8a5a33..9682d5bd8 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo index e17abb6f7..68bf08d42 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo index 2b624c14a..eff38c6ae 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo index 29c9141b0..1fd0f0823 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo index 45faa343a..23e97d7e5 100644 --- a/src/tests/nodes/add_u32/input_0.cairo +++ b/src/tests/nodes/add_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo index 63126cba0..97a7be5ad 100644 --- a/src/tests/nodes/add_u32/input_1.cairo +++ b/src/tests/nodes/add_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo index 8dbd98688..3db1eb432 100644 --- a/src/tests/nodes/add_u32/output_0.cairo +++ b/src/tests/nodes/add_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo index a0258444f..ac854949d 100644 --- a/src/tests/nodes/add_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo index f88126e9d..128f81eed 100644 --- a/src/tests/nodes/add_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo index b5f9c2aee..2d4312522 100644 --- a/src/tests/nodes/add_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_default.cairo b/src/tests/nodes/argmax_fp16x16_1D_default.cairo index c22f87f99..f6419914e 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_fp16x16_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo index ccf5463b0..74854aa43 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8257536, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 3997696, sign: true }); + data.append(FP16x16 { mag: 8257536, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo index 592884d49..30d25cb78 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo index 9a8a139d0..f9f6ba017 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 7733248, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 7733248, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo index 376d9cfdd..fd893d35b 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo index 7fedeeef6..0f6c7ce26 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_default.cairo b/src/tests/nodes/argmax_fp16x16_2D_default.cairo index 11f5f32a8..4a6e4a79b 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo index f3f8a6b0d..712f4ed5f 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6422528, sign: true }); - data.append(FixedType { mag: 5373952, sign: true }); - data.append(FixedType { mag: 3473408, sign: true }); - data.append(FixedType { mag: 5505024, sign: true }); + data.append(FP16x16 { mag: 6422528, sign: true }); + data.append(FP16x16 { mag: 5373952, sign: true }); + data.append(FP16x16 { mag: 3473408, sign: true }); + data.append(FP16x16 { mag: 5505024, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo index 302676301..4772e1bdd 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo index 365028b63..0f8f1e3e1 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: true }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 7340032, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo index 6cb485b7a..5628a9e01 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo index 10d18f8c7..027b5780b 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo index 66e89c01b..f72936a53 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_default.cairo b/src/tests/nodes/argmax_fp16x16_3D_default.cairo index caea55612..20df65650 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo index 36c3b1d9c..2e396e09c 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7143424, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 4521984, sign: true }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: true }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 4521984, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo index f8ee9d526..4fbe6df06 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo index c7eaff0ee..aea9d2496 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo index c4308627f..b42bbea7e 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4390912, sign: true }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 3407872, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo index fec9e9f5b..64d68bd99 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo index 565e757d9..1f368a019 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo index 8cca84bf3..4e3ede230 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 6750208, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 6160384, sign: true }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 3932160, sign: true }); - data.append(FixedType { mag: 8257536, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: true }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 3932160, sign: true }); + data.append(FP16x16 { mag: 8257536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo index 11ea0410a..6a4b255ba 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_1D_default.cairo b/src/tests/nodes/argmax_fp8x23_1D_default.cairo index 86e69fe87..9c4606446 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo index 3ce6cda7b..244e6a7d2 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo index b0d7ca254..1fbc2f10f 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo index b3163eeb1..18348d6dd 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo index 5bd23effc..d84eb0e40 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 989855744, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 989855744, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo index 01dca80e5..e719a8feb 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo index 5a3e04851..ade2f6df9 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo index 454b17b44..76e2b935e 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo index d2248bdc0..2fe6c7cbc 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_2D_default.cairo b/src/tests/nodes/argmax_fp8x23_2D_default.cairo index 2c8b3005b..21e7a2908 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo index 92b397ae5..69f234a6c 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 956301312, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo index 66bf81a47..846cfb099 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo index 9183c2472..27658df23 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo index 932ca9518..aae42cae5 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 897581056, sign: false }); - data.append(FixedType { mag: 201326592, sign: true }); - data.append(FixedType { mag: 662700032, sign: true }); + data.append(FP8x23 { mag: 780140544, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 662700032, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo index 23fddb1e1..af12af7e0 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo index 495f161e8..6e3aaee54 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo index b6e5361d5..2d2a3c9d9 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 914358272, sign: false }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 503316480, sign: true }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 696254464, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo index 63fe1399a..cb934cb87 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_3D_default.cairo b/src/tests/nodes/argmax_fp8x23_3D_default.cairo index 315624db5..4feb747c1 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo index 5374e9f63..3e9bb10db 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1031798784, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 746586112, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo index db3256051..cf3c78883 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo index 865bb1db8..75401571c 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo index 15d2ca47b..ee6259699 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 109051904, sign: true }); - data.append(FixedType { mag: 1056964608, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 1056964608, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo index a7ee4b7f0..d94d93ca9 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo index 13221fecb..f238237a0 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo index c791c470b..05053f05d 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 268435456, sign: true }); - data.append(FixedType { mag: 939524096, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 721420288, sign: false }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 721420288, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo index 70d6bf379..c2e525057 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_default.cairo b/src/tests/nodes/argmax_i32_1D_default.cairo index 13664eb06..7e9e1bc63 100644 --- a/src/tests/nodes/argmax_i32_1D_default.cairo +++ b/src/tests/nodes/argmax_i32_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_i32_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo index f7b9bfce1..862255e47 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_last_index.cairo b/src/tests/nodes/argmax_i32_1D_last_index.cairo index 1e558b4b6..11e173897 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_default.cairo b/src/tests/nodes/argmax_i32_2D_default.cairo index 26cfa2017..8faa8a041 100644 --- a/src/tests/nodes/argmax_i32_2D_default.cairo +++ b/src/tests/nodes/argmax_i32_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo index b2621eaf2..5eb2f3881 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo index 166f1bf27..dc341aece 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_last_index.cairo b/src/tests/nodes/argmax_i32_2D_last_index.cairo index a0ed205c0..719503095 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_default.cairo b/src/tests/nodes/argmax_i32_3D_default.cairo index 070092976..f2eb2321f 100644 --- a/src/tests/nodes/argmax_i32_3D_default.cairo +++ b/src/tests/nodes/argmax_i32_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo index 8caab753d..4efdb0bd0 100644 --- a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo index df885177c..dc9458264 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo index 71366ef08..cf300090b 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_last_index.cairo b/src/tests/nodes/argmax_i32_3D_last_index.cairo index b36c519e1..a0b63c136 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo index 8905ac83f..67c8afb27 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_default.cairo b/src/tests/nodes/argmax_i8_1D_default.cairo index e04a6011c..ac0a22420 100644 --- a/src/tests/nodes/argmax_i8_1D_default.cairo +++ b/src/tests/nodes/argmax_i8_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo index 064e5f9a3..3c74d3bc4 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_last_index.cairo b/src/tests/nodes/argmax_i8_1D_last_index.cairo index 4c0ab844c..6cc95fe41 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo index d2248bdc0..70bfe4e51 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_default.cairo b/src/tests/nodes/argmax_i8_2D_default.cairo index ddb76bb6b..17ddafa92 100644 --- a/src/tests/nodes/argmax_i8_2D_default.cairo +++ b/src/tests/nodes/argmax_i8_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo index a174f99ad..f434690a9 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo index 166f1bf27..dc341aece 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_last_index.cairo b/src/tests/nodes/argmax_i8_2D_last_index.cairo index f96a9d980..c95a30d97 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_default.cairo b/src/tests/nodes/argmax_i8_3D_default.cairo index 083f721ce..4dd1aa32b 100644 --- a/src/tests/nodes/argmax_i8_3D_default.cairo +++ b/src/tests/nodes/argmax_i8_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo index f89a23dc4..995c6ecee 100644 --- a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo index c9c0b0bd5..056a2aeff 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo index 619c5c756..a2c09b3b6 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_last_index.cairo b/src/tests/nodes/argmax_i8_3D_last_index.cairo index c7b81b67d..1a691b3f0 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo index 5ee5ea034..3566e55b9 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_default.cairo b/src/tests/nodes/argmax_u32_1D_default.cairo index 9a7197278..2366062dd 100644 --- a/src/tests/nodes/argmax_u32_1D_default.cairo +++ b/src/tests/nodes/argmax_u32_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_u32_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo index 78a92fc42..4258d0c32 100644 --- a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo index 8e088f052..bc25381e8 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo index 17ff22242..fd41aaca6 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_last_index.cairo b/src/tests/nodes/argmax_u32_1D_last_index.cairo index dfff69a2a..e48020b0e 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo index 7f27c65ee..aaa9f8324 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_default.cairo b/src/tests/nodes/argmax_u32_2D_default.cairo index f0d2af318..cc31349b8 100644 --- a/src/tests/nodes/argmax_u32_2D_default.cairo +++ b/src/tests/nodes/argmax_u32_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo index c1c34ece2..583e22204 100644 --- a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo index b3594e764..9c30d3c1c 100644 --- a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo index 196eafb5c..1764728b8 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo index 71d76e1e6..1656fc9d1 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo index 6cb485b7a..5628a9e01 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_last_index.cairo b/src/tests/nodes/argmax_u32_2D_last_index.cairo index 993afcf0b..c1047a564 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo index eb9647585..b6ed49b44 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo index d3bc368dc..24b3f9fa3 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_default.cairo b/src/tests/nodes/argmax_u32_3D_default.cairo index 6e3fa873d..c8f61e89f 100644 --- a/src/tests/nodes/argmax_u32_3D_default.cairo +++ b/src/tests/nodes/argmax_u32_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo index 1c5c0c66e..3655cdd7f 100644 --- a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo index f8ee9d526..4fbe6df06 100644 --- a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo index e444f2574..3b33c7dd0 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo index 35cd5d207..ae54c5383 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo index 1b8e294d7..c89277282 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_last_index.cairo b/src/tests/nodes/argmax_u32_3D_last_index.cairo index 4bf18139d..cf99d65fa 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo index 7f51637ff..0acf1deb1 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo index 583e7fa91..cc9f6c47e 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_default.cairo b/src/tests/nodes/argmin_fp16x16_1D_default.cairo index 854c8bf5b..714cfd034 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo index 03efaa1c8..05aba50c8 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7012352, sign: true }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo index d2248bdc0..70bfe4e51 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo index ad2a993a8..dccfc4671 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo index ede30630e..2520a43c3 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo index 8a38b5d2f..6bc534eed 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo index 14b976476..1af1258d2 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 6488064, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo index d2248bdc0..70bfe4e51 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_default.cairo b/src/tests/nodes/argmin_fp16x16_2D_default.cairo index 35bb64258..fcf6f2286 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo index 7f5992462..5d1b04510 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 7208960, sign: false }); - data.append(FixedType { mag: 8060928, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 8060928, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo index e6c023ce6..a2600b3f6 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo index de8f8de9a..36148bb0e 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo index 166f1bf27..dc341aece 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo index 5b506926e..d2749adeb 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo index ab70fef51..e887a41de 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 1376256, sign: true }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_default.cairo b/src/tests/nodes/argmin_fp16x16_3D_default.cairo index 1feb6c782..ba167948a 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo index c53a10c5a..9130e88d3 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7995392, sign: false }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo index ec0386ae5..0eda89876 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo index 6fbe949ca..171cc0a9d 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo index 0ab50c68c..93718af3a 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 7602176, sign: true }); - data.append(FixedType { mag: 5373952, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 3080192, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 3080192, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo index f8f4c946c..179e54137 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo index b4af55d09..1e37ac066 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo index fd4ddd1ca..8b848003d 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 6815744, sign: true }); - data.append(FixedType { mag: 6488064, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 6750208, sign: false }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 6553600, sign: false }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo index 583e7fa91..cc9f6c47e 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_1D_default.cairo b/src/tests/nodes/argmin_fp8x23_1D_default.cairo index 287586722..a28d4ee41 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo index 1b68bc674..12dcaa585 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 570425344, sign: true }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo index b0d7ca254..1fbc2f10f 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo index 0504e8091..5ca425414 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo index 390ac3335..c5e7b567a 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 360710144, sign: true }); - data.append(FixedType { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo index 01dca80e5..e719a8feb 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo index 32247295f..ab254b5db 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo index e38f6cc5f..22d17c888 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo index 01dca80e5..e719a8feb 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_2D_default.cairo b/src/tests/nodes/argmin_fp8x23_2D_default.cairo index 11bd582f5..3b3ab4bdb 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo index 1bc363146..feb6f4a77 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 125829120, sign: true }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 570425344, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo index d3bc368dc..4a1111423 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo index b33c580d4..15feb889a 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo index 1f42a0262..9c01b4676 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 595591168, sign: true }); - data.append(FixedType { mag: 922746880, sign: true }); - data.append(FixedType { mag: 75497472, sign: true }); - data.append(FixedType { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo index 6cb485b7a..b8f0186b5 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo index f83b14c74..258a9aef6 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo index 67b9240b8..cf30b88a6 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 679477248, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo index 63fe1399a..cb934cb87 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_3D_default.cairo b/src/tests/nodes/argmin_fp8x23_3D_default.cairo index e353b08f5..e0bedf385 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo index 489ba0f08..a296fe46c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 134217728, sign: true }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 746586112, sign: false }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo index 11ea0410a..2e5998b1d 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo index d7e5fccf2..aa2c8ec15 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo index 1478351bf..c2571d270 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 855638016, sign: false }); - data.append(FixedType { mag: 377487360, sign: true }); - data.append(FixedType { mag: 209715200, sign: true }); - data.append(FixedType { mag: 92274688, sign: true }); - data.append(FixedType { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 855638016, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: true }); + data.append(FP8x23 { mag: 209715200, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: true }); + data.append(FP8x23 { mag: 654311424, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo index a7ee4b7f0..d94d93ca9 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo index ec01cb626..e47bdbb0d 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo index 078e92a71..211c21be8 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 671088640, sign: true }); - data.append(FixedType { mag: 822083584, sign: false }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: true }); + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo index ec0386ae5..e047b17ed 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_default.cairo b/src/tests/nodes/argmin_i32_1D_default.cairo index 74a9f6ab0..e5388a3aa 100644 --- a/src/tests/nodes/argmin_i32_1D_default.cairo +++ b/src/tests/nodes/argmin_i32_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo index 471824288..8c558ab22 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo index d2248bdc0..70bfe4e51 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_last_index.cairo b/src/tests/nodes/argmin_i32_1D_last_index.cairo index c9db2b8ef..b092293b8 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_default.cairo b/src/tests/nodes/argmin_i32_2D_default.cairo index f650f854b..d97ab6f04 100644 --- a/src/tests/nodes/argmin_i32_2D_default.cairo +++ b/src/tests/nodes/argmin_i32_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo index 66bf81a47..c14e70167 100644 --- a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo index c911bf7e8..d475ad6d5 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo index 166f1bf27..dc341aece 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_last_index.cairo b/src/tests/nodes/argmin_i32_2D_last_index.cairo index e7ff5631c..c7cc4c6b2 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo index b3594e764..9c30d3c1c 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_default.cairo b/src/tests/nodes/argmin_i32_3D_default.cairo index 4b4a7cc51..8f0999fae 100644 --- a/src/tests/nodes/argmin_i32_3D_default.cairo +++ b/src/tests/nodes/argmin_i32_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo index b4a58fe55..85509f0cd 100644 --- a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo index c280b2565..596adeb1c 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo index fec9e9f5b..64d68bd99 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_last_index.cairo b/src/tests/nodes/argmin_i32_3D_last_index.cairo index 7a9f36a1a..111a7d66f 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo index 2697687ae..d65a812e2 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_default.cairo b/src/tests/nodes/argmin_i8_1D_default.cairo index 57c0134a9..e12f3290a 100644 --- a/src/tests/nodes/argmin_i8_1D_default.cairo +++ b/src/tests/nodes/argmin_i8_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo index ce61480c8..2b1287185 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_last_index.cairo b/src/tests/nodes/argmin_i8_1D_last_index.cairo index 2d2614479..b54b17238 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_default.cairo b/src/tests/nodes/argmin_i8_2D_default.cairo index 7819fddb5..b04856fa2 100644 --- a/src/tests/nodes/argmin_i8_2D_default.cairo +++ b/src/tests/nodes/argmin_i8_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo index 75ed24175..650584f89 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo index 166f1bf27..dc341aece 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_last_index.cairo b/src/tests/nodes/argmin_i8_2D_last_index.cairo index d7e7aaae8..822e6a939 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_default.cairo b/src/tests/nodes/argmin_i8_3D_default.cairo index c5d708707..e25240235 100644 --- a/src/tests/nodes/argmin_i8_3D_default.cairo +++ b/src/tests/nodes/argmin_i8_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo index 583e7fa91..cc9f6c47e 100644 --- a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo index e57d3320a..d040750ed 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo index fec9e9f5b..64d68bd99 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_last_index.cairo b/src/tests/nodes/argmin_i8_3D_last_index.cairo index 02086b5b9..ae1a6fae1 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo index db3256051..f1679745a 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_default.cairo b/src/tests/nodes/argmin_u32_1D_default.cairo index 4fd20a669..5b8d68d12 100644 --- a/src/tests/nodes/argmin_u32_1D_default.cairo +++ b/src/tests/nodes/argmin_u32_1D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo index d9b2cf01c..246f3620a 100644 --- a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo index e676d4dba..d3b930f2a 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo index be83e5b73..8b8e29945 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo index 01dca80e5..47b1c9786 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_last_index.cairo b/src/tests/nodes/argmin_u32_1D_last_index.cairo index dcc97fd42..91e0c2596 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo index 9408e067a..2a3711136 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo index b0d7ca254..a89e1d5c0 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_default.cairo b/src/tests/nodes/argmin_u32_2D_default.cairo index 3892a0de5..bef55bfb4 100644 --- a/src/tests/nodes/argmin_u32_2D_default.cairo +++ b/src/tests/nodes/argmin_u32_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo index 358c876ba..c9e758723 100644 --- a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo index 63fe1399a..ef4e50cae 100644 --- a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo index a41c89236..559e4739e 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo index d997a7780..dfacca945 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo index 6cb485b7a..5628a9e01 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_last_index.cairo b/src/tests/nodes/argmin_u32_2D_last_index.cairo index 75d43c98b..aa78bde3e 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo index f61122abe..62514e570 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo index b3594e764..9c30d3c1c 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_default.cairo b/src/tests/nodes/argmin_u32_3D_default.cairo index 564104796..e73589229 100644 --- a/src/tests/nodes/argmin_u32_3D_default.cairo +++ b/src/tests/nodes/argmin_u32_3D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo index 5768d844a..a25f80d7c 100644 --- a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo index 5ee5ea034..3566e55b9 100644 --- a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo index 322998bc5..ddb40ec07 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo index b5ea05992..ce0a40120 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo index 157fe88f9..3ee386bf4 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_last_index.cairo b/src/tests/nodes/argmin_u32_3D_last_index.cairo index f0bafa376..641e6c5c1 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo index 721b2ac8e..89f8df364 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo index 70d6bf379..64607a296 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asin_fp16x16.cairo b/src/tests/nodes/asin_fp16x16.cairo index 8667fd10a..c4e9804c5 100644 --- a/src/tests/nodes/asin_fp16x16.cairo +++ b/src/tests/nodes/asin_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo index 4355eaac3..2a981d85f 100644 --- a/src/tests/nodes/asin_fp16x16/input_0.cairo +++ b/src/tests/nodes/asin_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 39178, sign: true }); - data.append(FixedType { mag: 15181, sign: true }); - data.append(FixedType { mag: 30205, sign: true }); - data.append(FixedType { mag: 13386, sign: false }); + data.append(FP16x16 { mag: 39178, sign: true }); + data.append(FP16x16 { mag: 15181, sign: true }); + data.append(FP16x16 { mag: 30205, sign: true }); + data.append(FP16x16 { mag: 13386, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo index 1ce379ef4..8c3b5c947 100644 --- a/src/tests/nodes/asin_fp16x16/output_0.cairo +++ b/src/tests/nodes/asin_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 41993, sign: true }); - data.append(FixedType { mag: 15320, sign: true }); - data.append(FixedType { mag: 31391, sign: true }); - data.append(FixedType { mag: 13480, sign: false }); + data.append(FP16x16 { mag: 41993, sign: true }); + data.append(FP16x16 { mag: 15320, sign: true }); + data.append(FP16x16 { mag: 31391, sign: true }); + data.append(FP16x16 { mag: 13480, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_fp16x16.cairo b/src/tests/nodes/asinh_fp16x16.cairo index 8a0fff6bb..5afdc5a5b 100644 --- a/src/tests/nodes/asinh_fp16x16.cairo +++ b/src/tests/nodes/asinh_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo index 3fce3c8be..1e918749d 100644 --- a/src/tests/nodes/asinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 276699, sign: false }); - data.append(FixedType { mag: 249503, sign: false }); - data.append(FixedType { mag: 249091, sign: false }); - data.append(FixedType { mag: 241997, sign: false }); + data.append(FP16x16 { mag: 276699, sign: false }); + data.append(FP16x16 { mag: 249503, sign: false }); + data.append(FP16x16 { mag: 249091, sign: false }); + data.append(FP16x16 { mag: 241997, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo index 0e958f1e2..3bf27cbdd 100644 --- a/src/tests/nodes/asinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 140720, sign: false }); - data.append(FixedType { mag: 134141, sign: false }); - data.append(FixedType { mag: 134037, sign: false }); - data.append(FixedType { mag: 132207, sign: false }); + data.append(FP16x16 { mag: 140720, sign: false }); + data.append(FP16x16 { mag: 134141, sign: false }); + data.append(FP16x16 { mag: 134037, sign: false }); + data.append(FP16x16 { mag: 132207, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo index dfcae114d..6f14381fa 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 119173, sign: false }); - data.append(FixedType { mag: 57761, sign: false }); - data.append(FixedType { mag: 94610, sign: false }); - data.append(FixedType { mag: 57761, sign: false }); + data.append(FP16x16 { mag: 119173, sign: false }); + data.append(FP16x16 { mag: 57761, sign: false }); + data.append(FP16x16 { mag: 94610, sign: false }); + data.append(FP16x16 { mag: 57761, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo index caa4f5bfb..c62739f16 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 57761, sign: false }); - data.append(FixedType { mag: 94610, sign: false }); - data.append(FixedType { mag: 137279, sign: false }); - data.append(FixedType { mag: 137279, sign: false }); + data.append(FP16x16 { mag: 57761, sign: false }); + data.append(FP16x16 { mag: 94610, sign: false }); + data.append(FP16x16 { mag: 137279, sign: false }); + data.append(FP16x16 { mag: 137279, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo index 6ee958e67..4a406e3f6 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo index a688a2f95..9e2babc7b 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 57761, sign: false }); - data.append(FixedType { mag: 119173, sign: false }); - data.append(FixedType { mag: 137279, sign: false }); - data.append(FixedType { mag: 137279, sign: false }); + data.append(FP16x16 { mag: 57761, sign: false }); + data.append(FP16x16 { mag: 119173, sign: false }); + data.append(FP16x16 { mag: 137279, sign: false }); + data.append(FP16x16 { mag: 137279, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo index dbd8a3675..eee2af9c7 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_fp16x16.cairo b/src/tests/nodes/atan_fp16x16.cairo index 5069cfbaf..8f6744cd7 100644 --- a/src/tests/nodes/atan_fp16x16.cairo +++ b/src/tests/nodes/atan_fp16x16.cairo @@ -3,8 +3,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo index 707dd0059..f63bb3ff4 100644 --- a/src/tests/nodes/atan_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7774631, sign: false }); - data.append(FixedType { mag: 6318193, sign: false }); - data.append(FixedType { mag: 90137, sign: true }); - data.append(FixedType { mag: 3857711, sign: false }); + data.append(FP16x16 { mag: 7774631, sign: false }); + data.append(FP16x16 { mag: 6318193, sign: false }); + data.append(FP16x16 { mag: 90137, sign: true }); + data.append(FP16x16 { mag: 3857711, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo index 8325ff117..43d475ed2 100644 --- a/src/tests/nodes/atan_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 102391, sign: false }); - data.append(FixedType { mag: 102263, sign: false }); - data.append(FixedType { mag: 61743, sign: true }); - data.append(FixedType { mag: 101830, sign: false }); + data.append(FP16x16 { mag: 102391, sign: false }); + data.append(FP16x16 { mag: 102263, sign: false }); + data.append(FP16x16 { mag: 61743, sign: true }); + data.append(FP16x16 { mag: 101830, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo index 99c1a3048..02f1c4e24 100644 --- a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 102358, sign: false }); - data.append(FixedType { mag: 102378, sign: false }); - data.append(FixedType { mag: 98270, sign: false }); - data.append(FixedType { mag: 101578, sign: false }); + data.append(FP16x16 { mag: 102358, sign: false }); + data.append(FP16x16 { mag: 102378, sign: false }); + data.append(FP16x16 { mag: 98270, sign: false }); + data.append(FP16x16 { mag: 101578, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo index e3de7d90f..d112fab35 100644 --- a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 102373, sign: false }); - data.append(FixedType { mag: 101658, sign: false }); - data.append(FixedType { mag: 102134, sign: false }); - data.append(FixedType { mag: 101305, sign: false }); + data.append(FP16x16 { mag: 102373, sign: false }); + data.append(FP16x16 { mag: 101658, sign: false }); + data.append(FP16x16 { mag: 102134, sign: false }); + data.append(FP16x16 { mag: 101305, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo index 3933b128a..001f59ff3 100644 --- a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo index 16c0ef252..9c3700df4 100644 --- a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 102231, sign: false }); - data.append(FixedType { mag: 97002, sign: false }); - data.append(FixedType { mag: 101950, sign: false }); - data.append(FixedType { mag: 102410, sign: false }); + data.append(FP16x16 { mag: 102231, sign: false }); + data.append(FP16x16 { mag: 97002, sign: false }); + data.append(FP16x16 { mag: 101950, sign: false }); + data.append(FP16x16 { mag: 102410, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo index d27ea3cc1..f23193640 100644 --- a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/ceil_fp16x16.cairo b/src/tests/nodes/ceil_fp16x16.cairo index 08b46c5d3..ed58a66d9 100644 --- a/src/tests/nodes/ceil_fp16x16.cairo +++ b/src/tests/nodes/ceil_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo index ce79b88a1..60ce98712 100644 --- a/src/tests/nodes/ceil_fp16x16/input_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 23485, sign: false }); - data.append(FixedType { mag: 36237, sign: true }); - data.append(FixedType { mag: 31610, sign: false }); - data.append(FixedType { mag: 1040, sign: false }); + data.append(FP16x16 { mag: 23485, sign: false }); + data.append(FP16x16 { mag: 36237, sign: true }); + data.append(FP16x16 { mag: 31610, sign: false }); + data.append(FP16x16 { mag: 1040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo index 7900b0b85..f038d2989 100644 --- a/src/tests/nodes/ceil_fp16x16/output_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo index 575b46550..68c1be1a0 100644 --- a/src/tests/nodes/concat_fp16x16_1d.cairo +++ b/src/tests/nodes/concat_fp16x16_1d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo index 67db06586..e6c15e949 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo index 48ee95945..0322a1207 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo index 3d34eed40..00682602f 100644 --- a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -1,19 +1,22 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo index 4f2b70d77..f16a209ba 100644 --- a/src/tests/nodes/concat_fp16x16_2d.cairo +++ b/src/tests/nodes/concat_fp16x16_2d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo index 2989d0b7b..b72cf44a0 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo index 4367f2454..83d03a972 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo index 625da6457..e5f0f3af9 100644 --- a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -1,22 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(4); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo index 05bf4ac42..bcbf0ef64 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo index 235303716..a6324b9b9 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo index 8d98e3f80..6e1aa8c4b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo index dd92e5813..788ca8d78 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -1,69 +1,72 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(6); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo index 57d4d1ffd..1bf642b07 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo index 235303716..a6324b9b9 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo index 8d98e3f80..6e1aa8c4b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo index 21dd7fbf0..35e289c6c 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -1,69 +1,72 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo index 73e355b45..10153f1ca 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo index 235303716..a6324b9b9 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo index 8d98e3f80..6e1aa8c4b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo index 73c645a79..003d7fa16 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -1,69 +1,72 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo index 17593a141..439fcf616 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo @@ -6,8 +6,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo index 235303716..a6324b9b9 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo index 8d98e3f80..6e1aa8c4b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo index 7e45c5af2..49724c332 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 4325376, sign: false }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo index 34a40dd63..be91e5d71 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -1,96 +1,99 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(9); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 4325376, sign: false }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo index d33b8a7ef..36031e9fc 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo @@ -6,8 +6,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo index 235303716..a6324b9b9 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo index 8d98e3f80..6e1aa8c4b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo index 7e45c5af2..49724c332 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 4325376, sign: false }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo index fa4fab744..f79cf1ee1 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -1,96 +1,99 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(9); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 4325376, sign: false }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo index f26a2c183..4b43fc107 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo index c1860b5d6..e1d7975cb 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo index 4743e3017..122c10560 100644 --- a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -1,19 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo index d018bc3e0..02ffc5ed0 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo index ef68044bf..49b1169ff 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo index d95e728b0..b4ce1bd73 100644 --- a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -1,22 +1,24 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(4); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo index 8866e7df2..75cc860f9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo index 793142075..2cbe2bcc6 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo index d0f255f3f..c541e93f8 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -1,69 +1,71 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(6); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo index 8866e7df2..75cc860f9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo index 793142075..2cbe2bcc6 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo index 9fc075c3d..3a7341503 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -1,69 +1,71 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo index 8866e7df2..75cc860f9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo index 793142075..2cbe2bcc6 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo index 3cebbae28..c288dbaee 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -1,69 +1,71 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo index 8866e7df2..75cc860f9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo index 793142075..2cbe2bcc6 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo index 5a422933d..78223dda7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 478150656, sign: false }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 545259520, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 578813952, sign: false }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo index 0fe80fd7e..a443aab6a 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -1,96 +1,98 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(9); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 478150656, sign: false }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 545259520, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 578813952, sign: false }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo index 8866e7df2..75cc860f9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo index 793142075..2cbe2bcc6 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo index 5a422933d..78223dda7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 478150656, sign: false }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 545259520, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 578813952, sign: false }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo index 5c89fdbf2..40d5eb1d1 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -1,96 +1,98 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(9); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 478150656, sign: false }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 545259520, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 578813952, sign: false }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo index 2c623a058..3f4117c0a 100644 --- a/src/tests/nodes/concat_u32_1d.cairo +++ b/src/tests/nodes/concat_u32_1d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo index 4681c7596..feeadd48a 100644 --- a/src/tests/nodes/concat_u32_1d/input_0.cairo +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo index 632eef334..33a977590 100644 --- a/src/tests/nodes/concat_u32_1d/input_1.cairo +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo index f01348cb6..080650b5c 100644 --- a/src/tests/nodes/concat_u32_1d/output_0.cairo +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo index 8c490e0fb..74a620db4 100644 --- a/src/tests/nodes/concat_u32_2d.cairo +++ b/src/tests/nodes/concat_u32_2d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo index 0c5fdf6d1..0c0d8f018 100644 --- a/src/tests/nodes/concat_u32_2d/input_0.cairo +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo index df9839699..521455e40 100644 --- a/src/tests/nodes/concat_u32_2d/input_1.cairo +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo index 03828e525..195fa5f13 100644 --- a/src/tests/nodes/concat_u32_2d/output_0.cairo +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo index 3397447a8..622205de6 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo index 4cf4844bc..d341ca7d6 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo index 9d4ab9a02..aaf40af80 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo index 5bcc8645b..d345781f0 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo index 5f6245bb7..1d9a5e6aa 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo index 4cf4844bc..d341ca7d6 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo index 9d4ab9a02..aaf40af80 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo index be05b541d..6eb78be99 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo index 7a9d069bd..9c2d16474 100644 --- a/src/tests/nodes/concat_u32_3d_default.cairo +++ b/src/tests/nodes/concat_u32_3d_default.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo index 4cf4844bc..d341ca7d6 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo index 9d4ab9a02..aaf40af80 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo index 7f80c8e67..c38227d92 100644 --- a/src/tests/nodes/concat_u32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo index 82cf6c24b..5b613c0ee 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo index 4cf4844bc..d341ca7d6 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo index 9d4ab9a02..aaf40af80 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo index f6d3b55e9..548506503 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo index 8fb1044c7..c9436e96a 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo index 3bc4279a4..5a08b4cbe 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo index 4cf4844bc..d341ca7d6 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo index 9d4ab9a02..aaf40af80 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo index f6d3b55e9..548506503 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo index c77d23ad1..c6ad118b3 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_fp16x16.cairo b/src/tests/nodes/cos_fp16x16.cairo index 29771fb04..35b11efad 100644 --- a/src/tests/nodes/cos_fp16x16.cairo +++ b/src/tests/nodes/cos_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo index 9bbabc1a7..c43a41a2c 100644 --- a/src/tests/nodes/cos_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1124701, sign: false }); - data.append(FixedType { mag: 8168605, sign: false }); - data.append(FixedType { mag: 1101252, sign: false }); - data.append(FixedType { mag: 3797411, sign: false }); + data.append(FP16x16 { mag: 1124701, sign: false }); + data.append(FP16x16 { mag: 8168605, sign: false }); + data.append(FP16x16 { mag: 1101252, sign: false }); + data.append(FP16x16 { mag: 3797411, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo index 27bd09e09..4c7b30f03 100644 --- a/src/tests/nodes/cos_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 7661, sign: true }); - data.append(FixedType { mag: 34261, sign: false }); - data.append(FixedType { mag: 29970, sign: true }); - data.append(FixedType { mag: 11446, sign: false }); + data.append(FP16x16 { mag: 7661, sign: true }); + data.append(FP16x16 { mag: 34261, sign: false }); + data.append(FP16x16 { mag: 29970, sign: true }); + data.append(FP16x16 { mag: 11446, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo index 2cf3ae23b..b34aa4ec0 100644 --- a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11824, sign: true }); - data.append(FixedType { mag: 53692, sign: true }); - data.append(FixedType { mag: 64880, sign: true }); - data.append(FixedType { mag: 49786, sign: true }); + data.append(FP16x16 { mag: 11824, sign: true }); + data.append(FP16x16 { mag: 53692, sign: true }); + data.append(FP16x16 { mag: 64880, sign: true }); + data.append(FP16x16 { mag: 49786, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo index 220a04da4..70a85beee 100644 --- a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 50900, sign: false }); - data.append(FixedType { mag: 37339, sign: false }); - data.append(FixedType { mag: 59948, sign: false }); - data.append(FixedType { mag: 1450, sign: false }); + data.append(FP16x16 { mag: 50900, sign: false }); + data.append(FP16x16 { mag: 37339, sign: false }); + data.append(FP16x16 { mag: 59948, sign: false }); + data.append(FP16x16 { mag: 1450, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo index d410ab347..2f367e4e3 100644 --- a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo index 4eab32a03..19216a22d 100644 --- a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 64611, sign: false }); - data.append(FixedType { mag: 6080, sign: true }); - data.append(FixedType { mag: 55916, sign: false }); - data.append(FixedType { mag: 49407, sign: false }); + data.append(FP16x16 { mag: 64611, sign: false }); + data.append(FP16x16 { mag: 6080, sign: true }); + data.append(FP16x16 { mag: 55916, sign: false }); + data.append(FP16x16 { mag: 49407, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo index 07d23c9de..5565a0614 100644 --- a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_fp16x16.cairo b/src/tests/nodes/cosh_fp16x16.cairo index 4ca6c2e23..aa71896ce 100644 --- a/src/tests/nodes/cosh_fp16x16.cairo +++ b/src/tests/nodes/cosh_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo index f95750f7c..971d96736 100644 --- a/src/tests/nodes/cosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 174763, sign: false }); - data.append(FixedType { mag: 5569, sign: false }); - data.append(FixedType { mag: 19618, sign: true }); - data.append(FixedType { mag: 34591, sign: true }); + data.append(FP16x16 { mag: 174763, sign: false }); + data.append(FP16x16 { mag: 5569, sign: false }); + data.append(FP16x16 { mag: 19618, sign: true }); + data.append(FP16x16 { mag: 34591, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo index f23814806..b6e1b0ef1 100644 --- a/src/tests/nodes/cosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 473877, sign: false }); - data.append(FixedType { mag: 65772, sign: false }); - data.append(FixedType { mag: 68494, sign: false }); - data.append(FixedType { mag: 74879, sign: false }); + data.append(FP16x16 { mag: 473877, sign: false }); + data.append(FP16x16 { mag: 65772, sign: false }); + data.append(FP16x16 { mag: 68494, sign: false }); + data.append(FP16x16 { mag: 74879, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo index 4fd9e2f4e..4025b1982 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 101127, sign: false }); - data.append(FixedType { mag: 246559, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 659794, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 246559, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 659794, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo index da4fc6879..fce816cdd 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 101127, sign: false }); - data.append(FixedType { mag: 101127, sign: false }); - data.append(FixedType { mag: 101127, sign: false }); - data.append(FixedType { mag: 246559, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 246559, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo index a556ee0cd..9c320d6b2 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo index abc914ab7..ce6ed4fa6 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 101127, sign: false }); - data.append(FixedType { mag: 4863423, sign: false }); - data.append(FixedType { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); + data.append(FP16x16 { mag: 4863423, sign: false }); + data.append(FP16x16 { mag: 101127, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo index 05bd283d2..8344cf914 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo index dbc928e3b..f93b1c93f 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo index 1b5c91363..36e268da9 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo index c11cd7137..bdeac83e2 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo index f92156016..c06c4d71c 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo index 1b5c91363..36e268da9 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo index 46a015daf..73b3e5b2a 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo index 519490576..f1498160e 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo index 1b5c91363..36e268da9 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo index 1abc4fbf0..5c58bda46 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo index 7c92f7e3e..724109563 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo index 1b5c91363..36e268da9 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo index 7f6b2493b..7f1e7c992 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo index 63f9ea47b..2e8591a65 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo index 934814fd2..06e8230f6 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo @@ -1,20 +1,23 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo index cb01a5629..3b181fc24 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo @@ -1,20 +1,23 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo index a671d28a2..767be3046 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo index 934814fd2..06e8230f6 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo @@ -1,20 +1,23 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo index 175a17a16..acdc86f97 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo @@ -1,20 +1,23 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo index 14f535fbf..3f26a62a8 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo index c56a40a87..655c3f3a9 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo index 14f535fbf..3f26a62a8 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo index 34e150e89..7a6b7de04 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo index 14f535fbf..3f26a62a8 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo index aa3f91d81..92a2664a9 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo index 14f535fbf..3f26a62a8 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo index de2450141..4f50a8541 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo index b21b34933..895dc915d 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo @@ -1,20 +1,22 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo index 750721b85..2364b1ba3 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo @@ -1,20 +1,22 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo index b21b34933..895dc915d 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo @@ -1,20 +1,22 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo index bc3e164c5..0ffb2fe54 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo @@ -1,20 +1,22 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/cumsum_u32_1d_default.cairo b/src/tests/nodes/cumsum_u32_1d_default.cairo index bc2a6b894..d7b7b0f2e 100644 --- a/src/tests/nodes/cumsum_u32_1d_default.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo index 6a30c058d..8b3128d2b 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo index 3ec20cf1e..583489bb2 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo index c1d178f12..5b36016d3 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo index 6a30c058d..8b3128d2b 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo index 2858f930a..61bf945c0 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse.cairo b/src/tests/nodes/cumsum_u32_1d_reverse.cairo index 6297aa523..1f0d2d480 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo index 6a30c058d..8b3128d2b 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo index 603b312ba..df10e9544 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo index 36845fbdb..dae1c1505 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo index 6a30c058d..8b3128d2b 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo index 190ae26a5..d5e9ee038 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo index 86a4b7f6d..12989bc1c 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo index f9ecdfb1a..4be76d2f8 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo index 00df5dc3c..131e0ab9d 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo index 5ba61ccbd..c806f3601 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo index f9ecdfb1a..4be76d2f8 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo index f5fec9c79..f1311954e 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo index c72691b25..032dea6a1 100644 --- a/src/tests/nodes/div_fp16x16/input_0.cairo +++ b/src/tests/nodes/div_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo index e876b7815..b870f3bea 100644 --- a/src/tests/nodes/div_fp16x16/input_1.cairo +++ b/src/tests/nodes/div_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo index 2fcb02c80..59ec293bf 100644 --- a/src/tests/nodes/div_fp16x16/output_0.cairo +++ b/src/tests/nodes/div_fp16x16/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo index 2e31e794d..e1a8ca2e9 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo index ceebffc97..d1d87a8e3 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo index 6a2bcb425..9bad84ff8 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo index 2e60fe300..e105bb36a 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo index be9b9e7cc..b4c56849b 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo index 018962054..c68ada97e 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo index 18e0e8b27..ae1626487 100644 --- a/src/tests/nodes/div_u32/input_0.cairo +++ b/src/tests/nodes/div_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo index e66b42bdf..9b49dd3ca 100644 --- a/src/tests/nodes/div_u32/input_1.cairo +++ b/src/tests/nodes/div_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo index 11c26ee86..778726418 100644 --- a/src/tests/nodes/div_u32/output_0.cairo +++ b/src/tests/nodes/div_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo index 69839ac8e..5fea73d14 100644 --- a/src/tests/nodes/div_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo index 69e61900e..f7bcd13c5 100644 --- a/src/tests/nodes/div_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo index befd81ef4..ed57217a4 100644 --- a/src/tests/nodes/div_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp16x16.cairo b/src/tests/nodes/equal_fp16x16.cairo index e15710ad0..d26dd6568 100644 --- a/src/tests/nodes/equal_fp16x16.cairo +++ b/src/tests/nodes/equal_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo index 16b74c29b..554f871ea 100644 --- a/src/tests/nodes/equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo index f204ba5a8..c68797ba1 100644 --- a/src/tests/nodes/equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo index 4ab3771e3..35ebc097d 100644 --- a/src/tests/nodes/equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp16x16_broadcast.cairo b/src/tests/nodes/equal_fp16x16_broadcast.cairo index 9b4b7b155..46e6f4daa 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo index d71231702..95e61e77a 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo index f97d91601..1b66a2527 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo index b681bb975..ed5d697ef 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp8x23.cairo b/src/tests/nodes/equal_fp8x23.cairo index 937752d81..e965e068e 100644 --- a/src/tests/nodes/equal_fp8x23.cairo +++ b/src/tests/nodes/equal_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo index aed703aca..fae3ee323 100644 --- a/src/tests/nodes/equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp8x23_broadcast.cairo b/src/tests/nodes/equal_fp8x23_broadcast.cairo index d7955aaad..30f014cac 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo index 3e37426aa..3903cea81 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo index e885029d8..f9ee5626c 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo index 1b8e294d7..daf390cd2 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32.cairo b/src/tests/nodes/equal_i32.cairo index dccd1db40..e931a63dc 100644 --- a/src/tests/nodes/equal_i32.cairo +++ b/src/tests/nodes/equal_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo index 4bb0a6764..3351cc095 100644 --- a/src/tests/nodes/equal_i32/output_0.cairo +++ b/src/tests/nodes/equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32_broadcast.cairo b/src/tests/nodes/equal_i32_broadcast.cairo index 1b66d05ce..8f5fd3c1a 100644 --- a/src/tests/nodes/equal_i32_broadcast.cairo +++ b/src/tests/nodes/equal_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo index f862ecf85..baabeb9ba 100644 --- a/src/tests/nodes/equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i8.cairo b/src/tests/nodes/equal_i8.cairo index 9eef128ad..0943b2781 100644 --- a/src/tests/nodes/equal_i8.cairo +++ b/src/tests/nodes/equal_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo index 8f64120de..e5f623de7 100644 --- a/src/tests/nodes/equal_i8/output_0.cairo +++ b/src/tests/nodes/equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i8_broadcast.cairo b/src/tests/nodes/equal_i8_broadcast.cairo index d014d6d2e..017470c4a 100644 --- a/src/tests/nodes/equal_i8_broadcast.cairo +++ b/src/tests/nodes/equal_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo index 1b8e294d7..c89277282 100644 --- a/src/tests/nodes/equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32.cairo b/src/tests/nodes/equal_u32.cairo index 5121b0095..3b5ec2429 100644 --- a/src/tests/nodes/equal_u32.cairo +++ b/src/tests/nodes/equal_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo index 48c8bef22..5f5f77f65 100644 --- a/src/tests/nodes/equal_u32/input_0.cairo +++ b/src/tests/nodes/equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo index 913270d32..8f5e492e3 100644 --- a/src/tests/nodes/equal_u32/input_1.cairo +++ b/src/tests/nodes/equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo index 3766af84f..dc3d7cb16 100644 --- a/src/tests/nodes/equal_u32/output_0.cairo +++ b/src/tests/nodes/equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast.cairo b/src/tests/nodes/equal_u32_broadcast.cairo index f61525429..15b1cb76e 100644 --- a/src/tests/nodes/equal_u32_broadcast.cairo +++ b/src/tests/nodes/equal_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo index 0ccf29d1f..10a38778a 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo index 2d99c65d5..054de24cd 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo index b681bb975..ed5d697ef 100644 --- a/src/tests/nodes/equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_fp16x16.cairo b/src/tests/nodes/exp_fp16x16.cairo index 9aa055f1d..97522c6d3 100644 --- a/src/tests/nodes/exp_fp16x16.cairo +++ b/src/tests/nodes/exp_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo index 4dfda1e62..5ccdaf443 100644 --- a/src/tests/nodes/exp_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 68670, sign: true }); - data.append(FixedType { mag: 37714, sign: true }); - data.append(FixedType { mag: 196163, sign: true }); - data.append(FixedType { mag: 10079, sign: false }); + data.append(FP16x16 { mag: 68670, sign: true }); + data.append(FP16x16 { mag: 37714, sign: true }); + data.append(FP16x16 { mag: 196163, sign: true }); + data.append(FP16x16 { mag: 10079, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo index 6b1fe72be..a1e585907 100644 --- a/src/tests/nodes/exp_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 22983, sign: false }); - data.append(FixedType { mag: 36859, sign: false }); - data.append(FixedType { mag: 3285, sign: false }); - data.append(FixedType { mag: 76431, sign: false }); + data.append(FP16x16 { mag: 22983, sign: false }); + data.append(FP16x16 { mag: 36859, sign: false }); + data.append(FP16x16 { mag: 3285, sign: false }); + data.append(FP16x16 { mag: 76431, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo index c9fba6376..dcb337952 100644 --- a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 178145, sign: false }); - data.append(FixedType { mag: 484249, sign: false }); - data.append(FixedType { mag: 8869, sign: false }); - data.append(FixedType { mag: 8869, sign: false }); + data.append(FP16x16 { mag: 178145, sign: false }); + data.append(FP16x16 { mag: 484249, sign: false }); + data.append(FP16x16 { mag: 8869, sign: false }); + data.append(FP16x16 { mag: 8869, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo index 22b7b6291..b158fa4b3 100644 --- a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3262, sign: false }); - data.append(FixedType { mag: 178145, sign: false }); - data.append(FixedType { mag: 3262, sign: false }); - data.append(FixedType { mag: 8869, sign: false }); + data.append(FP16x16 { mag: 3262, sign: false }); + data.append(FP16x16 { mag: 178145, sign: false }); + data.append(FP16x16 { mag: 3262, sign: false }); + data.append(FP16x16 { mag: 8869, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo index 1e000796f..a50c29454 100644 --- a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo index 99f86f289..0e9eae179 100644 --- a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 178145, sign: false }); - data.append(FixedType { mag: 484249, sign: false }); - data.append(FixedType { mag: 3578144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 178145, sign: false }); + data.append(FP16x16 { mag: 484249, sign: false }); + data.append(FP16x16 { mag: 3578144, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo index b49b1c681..eb39cd3fc 100644 --- a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp16x16.cairo b/src/tests/nodes/greater_equal_fp16x16.cairo index 447c6ec2e..5d03e4377 100644 --- a/src/tests/nodes/greater_equal_fp16x16.cairo +++ b/src/tests/nodes/greater_equal_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo index b62593df5..da9700e80 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo index a6eb5059f..b339598a4 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo index fc96061c1..2ea45d853 100644 --- a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo index 11f153bb5..a5f824fe8 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo index 423aba9fb..81348f7a3 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo index d5c05608e..6c499da94 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo index 975b0ffb4..d3a4faa4c 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp8x23.cairo b/src/tests/nodes/greater_equal_fp8x23.cairo index 134d31af4..fd274bb85 100644 --- a/src/tests/nodes/greater_equal_fp8x23.cairo +++ b/src/tests/nodes/greater_equal_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo index 08adacf80..5e7562453 100644 --- a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo index f97544055..dfa93ac73 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo index dc4edec46..19003d437 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo index afd7ade1f..d122c90ea 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo index 61366a731..69d42f156 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32.cairo b/src/tests/nodes/greater_equal_i32.cairo index 5190128c7..c149c8c5f 100644 --- a/src/tests/nodes/greater_equal_i32.cairo +++ b/src/tests/nodes/greater_equal_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo index 944ee000d..bd22c4286 100644 --- a/src/tests/nodes/greater_equal_i32/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32_broadcast.cairo b/src/tests/nodes/greater_equal_i32_broadcast.cairo index 46a2c39c6..6a1a7c877 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo index 875f749b5..7a50cd4d3 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i8.cairo b/src/tests/nodes/greater_equal_i8.cairo index d488222fc..6730923ed 100644 --- a/src/tests/nodes/greater_equal_i8.cairo +++ b/src/tests/nodes/greater_equal_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo index 402651eba..2f644d8e2 100644 --- a/src/tests/nodes/greater_equal_i8/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i8_broadcast.cairo b/src/tests/nodes/greater_equal_i8_broadcast.cairo index 01a4e635c..16b3df945 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo index 3cc7383d5..5c8e3392d 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32.cairo b/src/tests/nodes/greater_equal_u32.cairo index 6c6c166a5..29423ae20 100644 --- a/src/tests/nodes/greater_equal_u32.cairo +++ b/src/tests/nodes/greater_equal_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo index c5739bd0d..47eba4acd 100644 --- a/src/tests/nodes/greater_equal_u32/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo index 61526cb82..877e50f39 100644 --- a/src/tests/nodes/greater_equal_u32/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo index ccd1fc902..f0bdb6d3d 100644 --- a/src/tests/nodes/greater_equal_u32/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast.cairo b/src/tests/nodes/greater_equal_u32_broadcast.cairo index ddcf010ea..cb85922a6 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo index 57a150a43..86622fb45 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo index b8bb3745d..65148fac5 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo index 8fe7450d6..1bf9dba11 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp16x16.cairo b/src/tests/nodes/greater_fp16x16.cairo index 28f2f0d64..e91c08cb7 100644 --- a/src/tests/nodes/greater_fp16x16.cairo +++ b/src/tests/nodes/greater_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo index 9f0692b08..7f31666da 100644 --- a/src/tests/nodes/greater_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo index dd9936e44..71587e964 100644 --- a/src/tests/nodes/greater_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo index 8a3195ed4..0ce144e01 100644 --- a/src/tests/nodes/greater_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp16x16_broadcast.cairo b/src/tests/nodes/greater_fp16x16_broadcast.cairo index 4ca90ad20..eca2056c8 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo index face910c4..f0c60de70 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo index fafd3e877..189776f8c 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo index 57df22f21..92592db3b 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp8x23.cairo b/src/tests/nodes/greater_fp8x23.cairo index b01b80c75..1db45bd6a 100644 --- a/src/tests/nodes/greater_fp8x23.cairo +++ b/src/tests/nodes/greater_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo index 27af4f3af..348947aa0 100644 --- a/src/tests/nodes/greater_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp8x23_broadcast.cairo b/src/tests/nodes/greater_fp8x23_broadcast.cairo index ea4bc172d..19e021088 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo index 1bcedede2..dd36095bc 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo index 70af415ea..d63d4240f 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo index b681bb975..ada51d8ee 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32.cairo b/src/tests/nodes/greater_i32.cairo index e3df2ceb6..cf8c5aa4a 100644 --- a/src/tests/nodes/greater_i32.cairo +++ b/src/tests/nodes/greater_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo index 8403c44d3..0a3dd7bef 100644 --- a/src/tests/nodes/greater_i32/output_0.cairo +++ b/src/tests/nodes/greater_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32_broadcast.cairo b/src/tests/nodes/greater_i32_broadcast.cairo index 2b9d96521..5fca3c14f 100644 --- a/src/tests/nodes/greater_i32_broadcast.cairo +++ b/src/tests/nodes/greater_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo index 57df22f21..92592db3b 100644 --- a/src/tests/nodes/greater_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i8.cairo b/src/tests/nodes/greater_i8.cairo index daa58d42e..903867b5d 100644 --- a/src/tests/nodes/greater_i8.cairo +++ b/src/tests/nodes/greater_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo index d5a824713..e26f8bc17 100644 --- a/src/tests/nodes/greater_i8/output_0.cairo +++ b/src/tests/nodes/greater_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i8_broadcast.cairo b/src/tests/nodes/greater_i8_broadcast.cairo index ffef35894..7747b02f0 100644 --- a/src/tests/nodes/greater_i8_broadcast.cairo +++ b/src/tests/nodes/greater_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo index 7f1577c02..b694105e3 100644 --- a/src/tests/nodes/greater_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32.cairo b/src/tests/nodes/greater_u32.cairo index e77669503..3b4046086 100644 --- a/src/tests/nodes/greater_u32.cairo +++ b/src/tests/nodes/greater_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo index 20e7906ae..430c9ed91 100644 --- a/src/tests/nodes/greater_u32/input_0.cairo +++ b/src/tests/nodes/greater_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo index 13fe65747..1063bf1a5 100644 --- a/src/tests/nodes/greater_u32/input_1.cairo +++ b/src/tests/nodes/greater_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo index 011697fb1..0376c67b5 100644 --- a/src/tests/nodes/greater_u32/output_0.cairo +++ b/src/tests/nodes/greater_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast.cairo b/src/tests/nodes/greater_u32_broadcast.cairo index df0699fc5..10ea19488 100644 --- a/src/tests/nodes/greater_u32_broadcast.cairo +++ b/src/tests/nodes/greater_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo index 15e66e192..a385a2e73 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo index 1e31cd10c..519189a99 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo index a7ee4b7f0..d579c33bd 100644 --- a/src/tests/nodes/greater_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo index 1b016d917..b24355e98 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 453171, sign: false }); - data.append(FixedType { mag: 73289, sign: false }); - data.append(FixedType { mag: 90437, sign: true }); - data.append(FixedType { mag: 316640, sign: false }); + data.append(FP16x16 { mag: 453171, sign: false }); + data.append(FP16x16 { mag: 73289, sign: false }); + data.append(FP16x16 { mag: 90437, sign: true }); + data.append(FP16x16 { mag: 316640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo index 19ca34a6d..ccf6d55b7 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 453171, sign: false }); - data.append(FixedType { mag: 73289, sign: false }); - data.append(FixedType { mag: 9043, sign: true }); - data.append(FixedType { mag: 316640, sign: false }); + data.append(FP16x16 { mag: 453171, sign: false }); + data.append(FP16x16 { mag: 73289, sign: false }); + data.append(FP16x16 { mag: 9043, sign: true }); + data.append(FP16x16 { mag: 316640, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo index d45647b71..1ed7f7042 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 13107, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 13107, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo index 09c8c4f96..bf6e6e77e 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 19660, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 19660, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp16x16.cairo b/src/tests/nodes/less_equal_fp16x16.cairo index 3c7b2d8f7..dd46aadd8 100644 --- a/src/tests/nodes/less_equal_fp16x16.cairo +++ b/src/tests/nodes/less_equal_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo index 119163dc1..1ec2ca8f6 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo index 4bc99cbe5..e834f2b72 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/less_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo index 145050226..c581fa726 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo index 96e6840a9..1720a5d8d 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo index f97d91601..1b66a2527 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo index 01c472c0e..0e87a0335 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp8x23.cairo b/src/tests/nodes/less_equal_fp8x23.cairo index b19a134ba..da488ddc1 100644 --- a/src/tests/nodes/less_equal_fp8x23.cairo +++ b/src/tests/nodes/less_equal_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo index f8f4c946c..1b9555329 100644 --- a/src/tests/nodes/less_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo index b29af61b1..0059779ff 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo index 0b938524d..27b4984f2 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo index 70af415ea..d63d4240f 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo index fec9e9f5b..f68321df5 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32.cairo b/src/tests/nodes/less_equal_i32.cairo index 9531ba0b7..474820b5b 100644 --- a/src/tests/nodes/less_equal_i32.cairo +++ b/src/tests/nodes/less_equal_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo index 71366ef08..cf300090b 100644 --- a/src/tests/nodes/less_equal_i32/output_0.cairo +++ b/src/tests/nodes/less_equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32_broadcast.cairo b/src/tests/nodes/less_equal_i32_broadcast.cairo index c685ff6df..72e3667aa 100644 --- a/src/tests/nodes/less_equal_i32_broadcast.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo index 77d9dfd7c..8362d672a 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i8.cairo b/src/tests/nodes/less_equal_i8.cairo index 6091e42e6..e8ff70de7 100644 --- a/src/tests/nodes/less_equal_i8.cairo +++ b/src/tests/nodes/less_equal_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo index 157fe88f9..3ee386bf4 100644 --- a/src/tests/nodes/less_equal_i8/output_0.cairo +++ b/src/tests/nodes/less_equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i8_broadcast.cairo b/src/tests/nodes/less_equal_i8_broadcast.cairo index 3b74d6504..3c06fda77 100644 --- a/src/tests/nodes/less_equal_i8_broadcast.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo index 0a76aeb0c..7f603cfdb 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32.cairo b/src/tests/nodes/less_equal_u32.cairo index 67e7cf883..9175996d0 100644 --- a/src/tests/nodes/less_equal_u32.cairo +++ b/src/tests/nodes/less_equal_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo index 48aa4edc1..332a9f4a4 100644 --- a/src/tests/nodes/less_equal_u32/input_0.cairo +++ b/src/tests/nodes/less_equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo index 757d81ad0..bfe6e86dd 100644 --- a/src/tests/nodes/less_equal_u32/input_1.cairo +++ b/src/tests/nodes/less_equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/less_equal_u32/output_0.cairo +++ b/src/tests/nodes/less_equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast.cairo b/src/tests/nodes/less_equal_u32_broadcast.cairo index 841d2bd48..082f41f18 100644 --- a/src/tests/nodes/less_equal_u32_broadcast.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo index 7512c9c61..076055214 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo index 7f31fac51..6e9c27c6a 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo index 0a76aeb0c..7f603cfdb 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp16x16.cairo b/src/tests/nodes/less_fp16x16.cairo index bbc5b14d9..c9962677f 100644 --- a/src/tests/nodes/less_fp16x16.cairo +++ b/src/tests/nodes/less_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo index a755e8e78..fa9f444aa 100644 --- a/src/tests/nodes/less_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo index 04b3c16f4..be03401ae 100644 --- a/src/tests/nodes/less_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo index b98755bb8..f48af64b0 100644 --- a/src/tests/nodes/less_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp16x16_broadcast.cairo b/src/tests/nodes/less_fp16x16_broadcast.cairo index 1af5233b7..8dfc3eedf 100644 --- a/src/tests/nodes/less_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo index 9616a95aa..b8e5b46a4 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo index 526811cab..9aa7657e4 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo index 64aa5d76f..3b711e2d2 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp8x23.cairo b/src/tests/nodes/less_fp8x23.cairo index 4dd20b457..42a5c3991 100644 --- a/src/tests/nodes/less_fp8x23.cairo +++ b/src/tests/nodes/less_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo index f0509a4c0..888522763 100644 --- a/src/tests/nodes/less_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp8x23_broadcast.cairo b/src/tests/nodes/less_fp8x23_broadcast.cairo index b29ed54e5..78632cf96 100644 --- a/src/tests/nodes/less_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo index dbac91100..acd50be4c 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo index 25d26431b..dfb50ad81 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo index d550be669..8eefe642d 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32.cairo b/src/tests/nodes/less_i32.cairo index ef564eb00..156877d35 100644 --- a/src/tests/nodes/less_i32.cairo +++ b/src/tests/nodes/less_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo index 032dba6f6..f20a1aed1 100644 --- a/src/tests/nodes/less_i32/output_0.cairo +++ b/src/tests/nodes/less_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32_broadcast.cairo b/src/tests/nodes/less_i32_broadcast.cairo index 3aebd93de..e7560bff6 100644 --- a/src/tests/nodes/less_i32_broadcast.cairo +++ b/src/tests/nodes/less_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo index d0fd2d6ab..9cb3dff1e 100644 --- a/src/tests/nodes/less_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i8.cairo b/src/tests/nodes/less_i8.cairo index e0a253815..6cd37e77d 100644 --- a/src/tests/nodes/less_i8.cairo +++ b/src/tests/nodes/less_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo index 7c7a9c586..ad103523e 100644 --- a/src/tests/nodes/less_i8/output_0.cairo +++ b/src/tests/nodes/less_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i8_broadcast.cairo b/src/tests/nodes/less_i8_broadcast.cairo index 1a472b164..3cceec019 100644 --- a/src/tests/nodes/less_i8_broadcast.cairo +++ b/src/tests/nodes/less_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo index 75179d0ca..527718e3a 100644 --- a/src/tests/nodes/less_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32.cairo b/src/tests/nodes/less_u32.cairo index f36132b9e..ddcbd9061 100644 --- a/src/tests/nodes/less_u32.cairo +++ b/src/tests/nodes/less_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo index a347dd623..f665f5e0a 100644 --- a/src/tests/nodes/less_u32/input_0.cairo +++ b/src/tests/nodes/less_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo index 1ad1c3c7e..1e55f1fe7 100644 --- a/src/tests/nodes/less_u32/input_1.cairo +++ b/src/tests/nodes/less_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo index 59d558992..4fc9afb84 100644 --- a/src/tests/nodes/less_u32/output_0.cairo +++ b/src/tests/nodes/less_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast.cairo b/src/tests/nodes/less_u32_broadcast.cairo index e07dfdbc0..e152fc996 100644 --- a/src/tests/nodes/less_u32_broadcast.cairo +++ b/src/tests/nodes/less_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo index 238da0d59..b7f1853ea 100644 --- a/src/tests/nodes/less_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo index 8d9a24b87..d1dfb571b 100644 --- a/src/tests/nodes/less_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo index 92d2318f0..463f7a2f3 100644 --- a/src/tests/nodes/less_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo index 036a4bab1..3e0723ac7 100644 --- a/src/tests/nodes/linear_fp16x16/input_0.cairo +++ b/src/tests/nodes/linear_fp16x16/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 243480, sign: false }); - data.append(FixedType { mag: 81530, sign: false }); - data.append(FixedType { mag: 33568, sign: true }); + data.append(FP16x16 { mag: 243480, sign: false }); + data.append(FP16x16 { mag: 81530, sign: false }); + data.append(FP16x16 { mag: 33568, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo index 3374a61a8..07adaaebc 100644 --- a/src/tests/nodes/linear_fp16x16/input_1.cairo +++ b/src/tests/nodes/linear_fp16x16/input_1.cairo @@ -1,20 +1,23 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 406504, sign: false }); - data.append(FixedType { mag: 169826, sign: true }); - data.append(FixedType { mag: 286936, sign: false }); - data.append(FixedType { mag: 216587, sign: true }); - data.append(FixedType { mag: 320888, sign: true }); - data.append(FixedType { mag: 186065, sign: false }); + data.append(FP16x16 { mag: 406504, sign: false }); + data.append(FP16x16 { mag: 169826, sign: true }); + data.append(FP16x16 { mag: 286936, sign: false }); + data.append(FP16x16 { mag: 216587, sign: true }); + data.append(FP16x16 { mag: 320888, sign: true }); + data.append(FP16x16 { mag: 186065, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo index 07ddb20ed..76af7785d 100644 --- a/src/tests/nodes/linear_fp16x16/input_2.cairo +++ b/src/tests/nodes/linear_fp16x16/input_2.cairo @@ -1,15 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 17100, sign: true }); - data.append(FixedType { mag: 360167, sign: false }); + data.append(FP16x16 { mag: 17100, sign: true }); + data.append(FP16x16 { mag: 360167, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo index ad1ea6673..e1d0bbd44 100644 --- a/src/tests/nodes/linear_fp16x16/output_0.cairo +++ b/src/tests/nodes/linear_fp16x16/output_0.cairo @@ -1,15 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1134904, sign: false }); - data.append(FixedType { mag: 939012, sign: true }); + data.append(FP16x16 { mag: 1134904, sign: false }); + data.append(FP16x16 { mag: 939012, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo index 1c5b420be..e8b0ea650 100644 --- a/src/tests/nodes/linear_u32/input_0.cairo +++ b/src/tests/nodes/linear_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo index c67a3e693..215a9a4a0 100644 --- a/src/tests/nodes/linear_u32/input_1.cairo +++ b/src/tests/nodes/linear_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo index 1822f94cf..05c6a214d 100644 --- a/src/tests/nodes/linear_u32/input_2.cairo +++ b/src/tests/nodes/linear_u32/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo index 4091d642a..77417cf00 100644 --- a/src/tests/nodes/linear_u32/output_0.cairo +++ b/src/tests/nodes/linear_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_fp16x16.cairo b/src/tests/nodes/log_fp16x16.cairo index 6658f477f..0eeabc712 100644 --- a/src/tests/nodes/log_fp16x16.cairo +++ b/src/tests/nodes/log_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo index e5c9cee2e..158888ff7 100644 --- a/src/tests/nodes/log_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1128814, sign: false }); - data.append(FixedType { mag: 6863846, sign: false }); - data.append(FixedType { mag: 920075, sign: false }); - data.append(FixedType { mag: 7713567, sign: false }); + data.append(FP16x16 { mag: 1128814, sign: false }); + data.append(FP16x16 { mag: 6863846, sign: false }); + data.append(FP16x16 { mag: 920075, sign: false }); + data.append(FP16x16 { mag: 7713567, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo index da628dbfa..a624803f0 100644 --- a/src/tests/nodes/log_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 186536, sign: false }); - data.append(FixedType { mag: 304835, sign: false }); - data.append(FixedType { mag: 173136, sign: false }); - data.append(FixedType { mag: 312484, sign: false }); + data.append(FP16x16 { mag: 186536, sign: false }); + data.append(FP16x16 { mag: 304835, sign: false }); + data.append(FP16x16 { mag: 173136, sign: false }); + data.append(FP16x16 { mag: 312484, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_i32_fp16x16/output_0.cairo b/src/tests/nodes/log_i32_fp16x16/output_0.cairo index 3a3802271..6169d068c 100644 --- a/src/tests/nodes/log_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 311531, sign: false }); - data.append(FixedType { mag: 293426, sign: false }); - data.append(FixedType { mag: 291153, sign: false }); - data.append(FixedType { mag: 297749, sign: false }); + data.append(FP16x16 { mag: 311531, sign: false }); + data.append(FP16x16 { mag: 293426, sign: false }); + data.append(FP16x16 { mag: 291153, sign: false }); + data.append(FP16x16 { mag: 297749, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_i8_fp16x16/output_0.cairo b/src/tests/nodes/log_i8_fp16x16/output_0.cairo index 5ee016823..afd0a818a 100644 --- a/src/tests/nodes/log_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 275558, sign: false }); - data.append(FixedType { mag: 303741, sign: false }); - data.append(FixedType { mag: 236645, sign: false }); - data.append(FixedType { mag: 276529, sign: false }); + data.append(FP16x16 { mag: 275558, sign: false }); + data.append(FP16x16 { mag: 303741, sign: false }); + data.append(FP16x16 { mag: 236645, sign: false }); + data.append(FP16x16 { mag: 276529, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_u32_fp16x16/input_0.cairo b/src/tests/nodes/log_u32_fp16x16/input_0.cairo index 7cc477047..172eeb973 100644 --- a/src/tests/nodes/log_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_u32_fp16x16/output_0.cairo b/src/tests/nodes/log_u32_fp16x16/output_0.cairo index 7d1b0da79..9631424e1 100644 --- a/src/tests/nodes/log_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 189423, sign: false }); - data.append(FixedType { mag: 309231, sign: false }); - data.append(FixedType { mag: 243372, sign: false }); - data.append(FixedType { mag: 225049, sign: false }); + data.append(FP16x16 { mag: 189423, sign: false }); + data.append(FP16x16 { mag: 309231, sign: false }); + data.append(FP16x16 { mag: 243372, sign: false }); + data.append(FP16x16 { mag: 225049, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/log_u32_fp8x23/input_0.cairo b/src/tests/nodes/log_u32_fp8x23/input_0.cairo index c0ebafa18..4ab1fd1d9 100644 --- a/src/tests/nodes/log_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo index 2a6dddad4..f4fa0e327 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 116037, sign: false }); - data.append(FixedType { mag: 94428, sign: false }); - data.append(FixedType { mag: 182052, sign: false }); - data.append(FixedType { mag: 91686, sign: true }); + data.append(FP16x16 { mag: 116037, sign: false }); + data.append(FP16x16 { mag: 94428, sign: false }); + data.append(FP16x16 { mag: 182052, sign: false }); + data.append(FP16x16 { mag: 91686, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo index 763d8bfa8..09ad22edd 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 86416, sign: true }); - data.append(FixedType { mag: 3721, sign: true }); - data.append(FixedType { mag: 20401, sign: true }); - data.append(FixedType { mag: 189836, sign: true }); + data.append(FP16x16 { mag: 86416, sign: true }); + data.append(FP16x16 { mag: 3721, sign: true }); + data.append(FP16x16 { mag: 20401, sign: true }); + data.append(FP16x16 { mag: 189836, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo index 1e24ca02b..0f8213491 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 37143, sign: true }); - data.append(FixedType { mag: 194436, sign: true }); - data.append(FixedType { mag: 74078, sign: true }); - data.append(FixedType { mag: 43388, sign: false }); + data.append(FP16x16 { mag: 37143, sign: true }); + data.append(FP16x16 { mag: 194436, sign: true }); + data.append(FP16x16 { mag: 74078, sign: true }); + data.append(FP16x16 { mag: 43388, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo index 0f209e76a..6a4ee686e 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5690, sign: true }); - data.append(FixedType { mag: 162983, sign: true }); - data.append(FixedType { mag: 127562, sign: true }); - data.append(FixedType { mag: 10096, sign: true }); + data.append(FP16x16 { mag: 5690, sign: true }); + data.append(FP16x16 { mag: 162983, sign: true }); + data.append(FP16x16 { mag: 127562, sign: true }); + data.append(FP16x16 { mag: 10096, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo index b1c480a2e..90adb0eef 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 9437097, sign: false }); - data.append(FixedType { mag: 439107, sign: true }); - data.append(FixedType { mag: 8701053, sign: false }); - data.append(FixedType { mag: 11846800, sign: false }); + data.append(FP8x23 { mag: 9437097, sign: false }); + data.append(FP8x23 { mag: 439107, sign: true }); + data.append(FP8x23 { mag: 8701053, sign: false }); + data.append(FP8x23 { mag: 11846800, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo index 60e6a9890..6f93f83ec 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5454588, sign: true }); - data.append(FixedType { mag: 14030456, sign: true }); - data.append(FixedType { mag: 6190632, sign: true }); - data.append(FixedType { mag: 1744548, sign: true }); + data.append(FP8x23 { mag: 5454588, sign: true }); + data.append(FP8x23 { mag: 14030456, sign: true }); + data.append(FP8x23 { mag: 6190632, sign: true }); + data.append(FP8x23 { mag: 1744548, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo index 5f55de1f5..d313d65c3 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6023735, sign: true }); - data.append(FixedType { mag: 7861841, sign: false }); - data.append(FixedType { mag: 20034366, sign: true }); - data.append(FixedType { mag: 4664398, sign: false }); + data.append(FP8x23 { mag: 6023735, sign: true }); + data.append(FP8x23 { mag: 7861841, sign: false }); + data.append(FP8x23 { mag: 20034366, sign: true }); + data.append(FP8x23 { mag: 4664398, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo index 18e030f00..21b6019ef 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 15352108, sign: true }); - data.append(FixedType { mag: 1466530, sign: true }); - data.append(FixedType { mag: 25129093, sign: true }); - data.append(FixedType { mag: 430328, sign: true }); + data.append(FP8x23 { mag: 15352108, sign: true }); + data.append(FP8x23 { mag: 1466530, sign: true }); + data.append(FP8x23 { mag: 25129093, sign: true }); + data.append(FP8x23 { mag: 430328, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo index 318abfcaa..ecc6fd592 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 139390, sign: true }); - data.append(FixedType { mag: 20529, sign: true }); - data.append(FixedType { mag: 8318, sign: true }); - data.append(FixedType { mag: 86065, sign: true }); + data.append(FP16x16 { mag: 139390, sign: true }); + data.append(FP16x16 { mag: 20529, sign: true }); + data.append(FP16x16 { mag: 8318, sign: true }); + data.append(FP16x16 { mag: 86065, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo index e82b83053..a4c8377e2 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 20529, sign: true }); - data.append(FixedType { mag: 86065, sign: true }); - data.append(FixedType { mag: 139390, sign: true }); - data.append(FixedType { mag: 8318, sign: true }); + data.append(FP16x16 { mag: 20529, sign: true }); + data.append(FP16x16 { mag: 86065, sign: true }); + data.append(FP16x16 { mag: 139390, sign: true }); + data.append(FP16x16 { mag: 8318, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo index eecf02e67..2d4a7f7fd 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 17841965, sign: true }); - data.append(FixedType { mag: 2627829, sign: true }); - data.append(FixedType { mag: 1064749, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 17841965, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 1064749, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo index 3ecc6c1d7..e01014a15 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 2627829, sign: true }); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo index c74a797f5..4e271b11c 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 20529, sign: true }); - data.append(FixedType { mag: 3184, sign: true }); - data.append(FixedType { mag: 86065, sign: true }); - data.append(FixedType { mag: 199792, sign: true }); + data.append(FP16x16 { mag: 20529, sign: true }); + data.append(FP16x16 { mag: 3184, sign: true }); + data.append(FP16x16 { mag: 86065, sign: true }); + data.append(FP16x16 { mag: 199792, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo index 1a8da4f3e..68f37c2f9 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3184, sign: true }); - data.append(FixedType { mag: 199792, sign: true }); - data.append(FixedType { mag: 139390, sign: true }); - data.append(FixedType { mag: 8318, sign: true }); + data.append(FP16x16 { mag: 3184, sign: true }); + data.append(FP16x16 { mag: 199792, sign: true }); + data.append(FP16x16 { mag: 139390, sign: true }); + data.append(FP16x16 { mag: 8318, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo index 32cc41b50..27dfaffa9 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2627829, sign: true }); - data.append(FixedType { mag: 17841965, sign: true }); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 1064749, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 17841965, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 1064749, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo index f2d3e7e30..965528a81 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2627829, sign: true }); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 33706684, sign: true }); - data.append(FixedType { mag: 152252, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 33706684, sign: true }); + data.append(FP8x23 { mag: 152252, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo index 4f0431c26..1b59d186c 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo index 098b42248..499bc8a6b 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 86065, sign: true }); - data.append(FixedType { mag: 8318, sign: true }); - data.append(FixedType { mag: 20529, sign: true }); - data.append(FixedType { mag: 139390, sign: true }); + data.append(FP16x16 { mag: 86065, sign: true }); + data.append(FP16x16 { mag: 8318, sign: true }); + data.append(FP16x16 { mag: 20529, sign: true }); + data.append(FP16x16 { mag: 139390, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo index 17eef421b..607befe0f 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo index d42777fa1..d55104567 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8318, sign: true }); - data.append(FixedType { mag: 139390, sign: true }); - data.append(FixedType { mag: 86065, sign: true }); - data.append(FixedType { mag: 20529, sign: true }); + data.append(FP16x16 { mag: 8318, sign: true }); + data.append(FP16x16 { mag: 139390, sign: true }); + data.append(FP16x16 { mag: 86065, sign: true }); + data.append(FP16x16 { mag: 20529, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo index 2f4a2789a..de599902c 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo index 79f0e52c2..973d837b2 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11016437, sign: true }); - data.append(FixedType { mag: 5814539, sign: true }); - data.append(FixedType { mag: 2627829, sign: true }); - data.append(FixedType { mag: 5814539, sign: true }); + data.append(FP8x23 { mag: 11016437, sign: true }); + data.append(FP8x23 { mag: 5814539, sign: true }); + data.append(FP8x23 { mag: 2627829, sign: true }); + data.append(FP8x23 { mag: 5814539, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo index 3cfa93365..e1376d359 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo index 911b7dca2..b7191f8e3 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 5814539, sign: true }); - data.append(FixedType { mag: 5814539, sign: true }); - data.append(FixedType { mag: 1064749, sign: true }); - data.append(FixedType { mag: 17841965, sign: true }); + data.append(FP8x23 { mag: 5814539, sign: true }); + data.append(FP8x23 { mag: 5814539, sign: true }); + data.append(FP8x23 { mag: 1064749, sign: true }); + data.append(FP8x23 { mag: 17841965, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1d.cairo b/src/tests/nodes/matmul_fp16x16_1d.cairo index 243bde5e7..e1e1768f0 100644 --- a/src/tests/nodes/matmul_fp16x16_1d.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo index dac0b7384..4ac93ee24 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo index 43a655e24..3ede4c21a 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo index e22669fa4..40d692728 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo @@ -1,14 +1,17 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1x2.cairo b/src/tests/nodes/matmul_fp16x16_1x2.cairo index 3177a1dd3..e8bfd380f 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo index b2e5545b7..d9cdca32b 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo index 48a17469d..09a805f0f 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo index f573a4bfe..cda85ed45 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo @@ -1,15 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x1.cairo b/src/tests/nodes/matmul_fp16x16_2x1.cairo index 4994ca7f2..36f782867 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo index 5d9d87819..7e63a087a 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo index dd6f8c702..01342f019 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo index 04e8e1097..c9bb1a245 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x2.cairo b/src/tests/nodes/matmul_fp16x16_2x2.cairo index e0ce71bac..8d1a03f6a 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2.cairo @@ -5,8 +5,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo index 26dd5c35c..ba2e6c42a 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo index 502f4112c..8e90eef42 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo index b676f46fe..e88b59e77 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 655360, sign: true }); - data.append(FixedType { mag: 720896, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 655360, sign: true }); + data.append(FP16x16 { mag: 720896, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo index fcf013b64..f976bdd37 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo index 9feb2dec7..515f3156e 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo index ba8ee2c51..fb952c269 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo @@ -1,14 +1,16 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo index 1ddf2e8dc..731c9e3f3 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo index 870873113..b1456ceff 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo index 07d2e5f47..915d5de47 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo @@ -1,15 +1,17 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo index 7bcb26a3f..b1ded0973 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo index 3bdb9ad45..a75b983d6 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo index 45863c5a2..a8807084a 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo index 832c6d938..8e7ea3af6 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo index 6004c63d1..c6d785cb2 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo index 8739dfe66..49e3b9899 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 67108864, sign: true }); - data.append(FixedType { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/matmul_u32_1d.cairo b/src/tests/nodes/matmul_u32_1d.cairo index e262be4cb..f01d7114e 100644 --- a/src/tests/nodes/matmul_u32_1d.cairo +++ b/src/tests/nodes/matmul_u32_1d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo index 8e583d92d..81ddb339c 100644 --- a/src/tests/nodes/matmul_u32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo index aa105f224..c6c19b6e6 100644 --- a/src/tests/nodes/matmul_u32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo index 1e15d9284..d283d1d2f 100644 --- a/src/tests/nodes/matmul_u32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2.cairo b/src/tests/nodes/matmul_u32_1x2.cairo index b82531f3c..fc58345ce 100644 --- a/src/tests/nodes/matmul_u32_1x2.cairo +++ b/src/tests/nodes/matmul_u32_1x2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo index 3dfa9a50b..7368adfd7 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo index b032d165d..f29068842 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo index 2cd0c210f..ad622fe22 100644 --- a/src/tests/nodes/matmul_u32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1.cairo b/src/tests/nodes/matmul_u32_2x1.cairo index b5a35f8cd..4c9084cf6 100644 --- a/src/tests/nodes/matmul_u32_2x1.cairo +++ b/src/tests/nodes/matmul_u32_2x1.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo index 88e52d3db..66a2b2ef3 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo index 36d4266ef..cfdf18021 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo index 132c7302e..712b72b34 100644 --- a/src/tests/nodes/matmul_u32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2.cairo b/src/tests/nodes/matmul_u32_2x2.cairo index 0da9b68b4..d707ef683 100644 --- a/src/tests/nodes/matmul_u32_2x2.cairo +++ b/src/tests/nodes/matmul_u32_2x2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo index e554dc216..bc34fd299 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo index ed84d879d..ccf2e4ba3 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo index b65775d86..dfc982d0b 100644 --- a/src/tests/nodes/matmul_u32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo index b36222a3e..a350b27a5 100644 --- a/src/tests/nodes/mul_fp16x16/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo index 7d42a55c5..6042fe5d6 100644 --- a/src/tests/nodes/mul_fp16x16/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo index ca21b1a0c..80deb06ef 100644 --- a/src/tests/nodes/mul_fp16x16/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo index 7cb5681a9..c0ca8cae8 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo index 74b2db63c..769a2eb1b 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo index 8ac7788c5..fb4085593 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo index 825c9b053..a5d6252c8 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo index 6242b4fe0..b8e620fa6 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo index 50ef7dfb4..4afda4508 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo index fea1387c7..53c37d620 100644 --- a/src/tests/nodes/mul_u32/input_0.cairo +++ b/src/tests/nodes/mul_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo index 1ddde9769..ad9b31183 100644 --- a/src/tests/nodes/mul_u32/input_1.cairo +++ b/src/tests/nodes/mul_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo index a24c0af21..d477ab5ae 100644 --- a/src/tests/nodes/mul_u32/output_0.cairo +++ b/src/tests/nodes/mul_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo index 053d4b648..282bc725e 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo index 81fe30cbc..cae8b86d4 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo index 927e39b2a..b91e0cd4a 100644 --- a/src/tests/nodes/mul_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp16x16.cairo b/src/tests/nodes/or_fp16x16.cairo index b95871d41..24079efd6 100644 --- a/src/tests/nodes/or_fp16x16.cairo +++ b/src/tests/nodes/or_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo index 245ee929d..dc24df617 100644 --- a/src/tests/nodes/or_fp16x16/input_0.cairo +++ b/src/tests/nodes/or_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo index 611ec154c..bde54b025 100644 --- a/src/tests/nodes/or_fp16x16/input_1.cairo +++ b/src/tests/nodes/or_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo index faae29d47..509dbb5fd 100644 --- a/src/tests/nodes/or_fp16x16/output_0.cairo +++ b/src/tests/nodes/or_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp16x16_broadcast.cairo b/src/tests/nodes/or_fp16x16_broadcast.cairo index 5604715d2..eec0b4489 100644 --- a/src/tests/nodes/or_fp16x16_broadcast.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo index fcab63090..508921ff9 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo index 86361976b..5cbc0152a 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp8x23.cairo b/src/tests/nodes/or_fp8x23.cairo index 30e818fa6..5e8f096e9 100644 --- a/src/tests/nodes/or_fp8x23.cairo +++ b/src/tests/nodes/or_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo index 581fcc840..0f4da52cc 100644 --- a/src/tests/nodes/or_fp8x23/output_0.cairo +++ b/src/tests/nodes/or_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp8x23_broadcast.cairo b/src/tests/nodes/or_fp8x23_broadcast.cairo index e12bb7582..f23f115a4 100644 --- a/src/tests/nodes/or_fp8x23_broadcast.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo index 8bdd3f1d4..a825e3d1b 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo index b17b4f307..08a4f54b8 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo index 04e17d1f2..a8f8d4661 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32.cairo b/src/tests/nodes/or_i32.cairo index f6fe533c4..9d57493ea 100644 --- a/src/tests/nodes/or_i32.cairo +++ b/src/tests/nodes/or_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo index e048ead82..92ca575f2 100644 --- a/src/tests/nodes/or_i32/output_0.cairo +++ b/src/tests/nodes/or_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32_broadcast.cairo b/src/tests/nodes/or_i32_broadcast.cairo index 38067b508..b2a5488a3 100644 --- a/src/tests/nodes/or_i32_broadcast.cairo +++ b/src/tests/nodes/or_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo index ec4e00878..decfb3ba3 100644 --- a/src/tests/nodes/or_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i8.cairo b/src/tests/nodes/or_i8.cairo index 519b92795..19464afe1 100644 --- a/src/tests/nodes/or_i8.cairo +++ b/src/tests/nodes/or_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo index 7cda7c299..650067d5b 100644 --- a/src/tests/nodes/or_i8/output_0.cairo +++ b/src/tests/nodes/or_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i8_broadcast.cairo b/src/tests/nodes/or_i8_broadcast.cairo index 07805a7a7..6c8ec4215 100644 --- a/src/tests/nodes/or_i8_broadcast.cairo +++ b/src/tests/nodes/or_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/or_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32.cairo b/src/tests/nodes/or_u32.cairo index 1ac2b242a..ef607d1a7 100644 --- a/src/tests/nodes/or_u32.cairo +++ b/src/tests/nodes/or_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo index e3b4de903..2229ee706 100644 --- a/src/tests/nodes/or_u32/input_0.cairo +++ b/src/tests/nodes/or_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo index 28a5de1af..6da046232 100644 --- a/src/tests/nodes/or_u32/input_1.cairo +++ b/src/tests/nodes/or_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo index 581fcc840..edca1d919 100644 --- a/src/tests/nodes/or_u32/output_0.cairo +++ b/src/tests/nodes/or_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast.cairo b/src/tests/nodes/or_u32_broadcast.cairo index c452c76fe..a3976c8f7 100644 --- a/src/tests/nodes/or_u32_broadcast.cairo +++ b/src/tests/nodes/or_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo index ed41aeebe..7306ef746 100644 --- a/src/tests/nodes/or_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo index 181d59b79..dfe6c239f 100644 --- a/src/tests/nodes/or_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/or_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo index 5a2442291..34d942289 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo index 67db06586..e6c15e949 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo index 9e2190ea5..894e237bd 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo @@ -1,14 +1,17 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo index baacd6ce5..c0e70aab1 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo index 2989d0b7b..b72cf44a0 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo index 02f2829d7..617344a16 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo @@ -1,15 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo index 01f5cd5ac..2c33ad9db 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo index 2989d0b7b..b72cf44a0 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo index 225e8383e..378c3699f 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo @@ -1,15 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo index a6f4e58db..7e3aea2ff 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo index 2989d0b7b..b72cf44a0 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo index 230d83414..8c2464d42 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo index f26a2c183..4b43fc107 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo index 36021cae1..6b1fe6f84 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo @@ -1,14 +1,16 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo index d018bc3e0..02ffc5ed0 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo index 2d4f37bf9..3d5f5375f 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo @@ -1,15 +1,17 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo index d018bc3e0..02ffc5ed0 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo index d4ec16992..ae6d069f3 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo @@ -1,15 +1,17 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo index d018bc3e0..02ffc5ed0 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo index 858c4ca3e..3bddbcf57 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_u32_1D.cairo b/src/tests/nodes/reduce_sum_u32_1D.cairo index 86f1759ae..813d3f17a 100644 --- a/src/tests/nodes/reduce_sum_u32_1D.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo index 4681c7596..feeadd48a 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo index c30dff144..68b76f079 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo index d6ae97318..206d2b9a1 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo index 0c5fdf6d1..0c0d8f018 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo index 9ca27dafe..1e73f6ce1 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_default.cairo b/src/tests/nodes/reduce_sum_u32_2D_default.cairo index 907bd69e7..3f8cb2fef 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo index 0c5fdf6d1..0c0d8f018 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo index 1b1dea023..3f45ca315 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo index 64ab96500..330564708 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo index 0c5fdf6d1..0c0d8f018 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo index d3938c028..79ed51638 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo index 0fe5e4a49..d3211ecb3 100644 --- a/src/tests/nodes/relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/relu_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 241623, sign: false }); - data.append(FixedType { mag: 135784, sign: false }); - data.append(FixedType { mag: 91618, sign: true }); - data.append(FixedType { mag: 52199, sign: false }); + data.append(FP16x16 { mag: 241623, sign: false }); + data.append(FP16x16 { mag: 135784, sign: false }); + data.append(FP16x16 { mag: 91618, sign: true }); + data.append(FP16x16 { mag: 52199, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo index a04d917d6..97721c5fb 100644 --- a/src/tests/nodes/relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/relu_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 241623, sign: false }); - data.append(FixedType { mag: 135784, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 52199, sign: false }); + data.append(FP16x16 { mag: 241623, sign: false }); + data.append(FP16x16 { mag: 135784, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 52199, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo index 4e024e1a7..3af41e097 100644 --- a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 40935, sign: true }); - data.append(FixedType { mag: 33897, sign: false }); - data.append(FixedType { mag: 97672, sign: true }); - data.append(FixedType { mag: 73532, sign: false }); + data.append(FP16x16 { mag: 40935, sign: true }); + data.append(FP16x16 { mag: 33897, sign: false }); + data.append(FP16x16 { mag: 97672, sign: true }); + data.append(FP16x16 { mag: 73532, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo index 73d9d5a49..7997629b3 100644 --- a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 22854, sign: false }); - data.append(FixedType { mag: 41058, sign: false }); - data.append(FixedType { mag: 12049, sign: false }); - data.append(FixedType { mag: 49437, sign: false }); + data.append(FP16x16 { mag: 22854, sign: false }); + data.append(FP16x16 { mag: 41058, sign: false }); + data.append(FP16x16 { mag: 12049, sign: false }); + data.append(FP16x16 { mag: 49437, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo index 8afafd64e..f25a90622 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 47910, sign: false }); - data.append(FixedType { mag: 57723, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 17625, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 57723, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 17625, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo index 0593c8ff2..0403db2e3 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3108, sign: false }); - data.append(FixedType { mag: 7812, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 3108, sign: false }); + data.append(FP16x16 { mag: 7812, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo index 7b4ca3b97..4a4343217 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo index c30c4dff3..84cfc50b5 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 47910, sign: false }); - data.append(FixedType { mag: 47910, sign: false }); - data.append(FixedType { mag: 47910, sign: false }); - data.append(FixedType { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo index a5a58935c..d0958248a 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_fp16x16.cairo b/src/tests/nodes/sin_fp16x16.cairo index 57cd81276..91e8c59fc 100644 --- a/src/tests/nodes/sin_fp16x16.cairo +++ b/src/tests/nodes/sin_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo index 307046012..42710bebf 100644 --- a/src/tests/nodes/sin_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 187441, sign: true }); - data.append(FixedType { mag: 123153, sign: false }); - data.append(FixedType { mag: 59844, sign: true }); - data.append(FixedType { mag: 76013, sign: false }); + data.append(FP16x16 { mag: 187441, sign: true }); + data.append(FP16x16 { mag: 123153, sign: false }); + data.append(FP16x16 { mag: 59844, sign: true }); + data.append(FP16x16 { mag: 76013, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo index 6a13ea4b6..af0533d9e 100644 --- a/src/tests/nodes/sin_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 18203, sign: true }); - data.append(FixedType { mag: 62444, sign: false }); - data.append(FixedType { mag: 51867, sign: true }); - data.append(FixedType { mag: 60080, sign: false }); + data.append(FP16x16 { mag: 18203, sign: true }); + data.append(FP16x16 { mag: 62444, sign: false }); + data.append(FP16x16 { mag: 51867, sign: true }); + data.append(FP16x16 { mag: 60080, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo index 5360100df..6c1716fd1 100644 --- a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 15509, sign: false }); - data.append(FixedType { mag: 63605, sign: true }); - data.append(FixedType { mag: 58588, sign: false }); - data.append(FixedType { mag: 53526, sign: false }); + data.append(FP16x16 { mag: 15509, sign: false }); + data.append(FP16x16 { mag: 63605, sign: true }); + data.append(FP16x16 { mag: 58588, sign: false }); + data.append(FP16x16 { mag: 53526, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo index 82711df03..1848e692e 100644 --- a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 55764, sign: false }); - data.append(FixedType { mag: 64920, sign: false }); - data.append(FixedType { mag: 60294, sign: false }); - data.append(FixedType { mag: 25413, sign: true }); + data.append(FP16x16 { mag: 55764, sign: false }); + data.append(FP16x16 { mag: 64920, sign: false }); + data.append(FP16x16 { mag: 60294, sign: false }); + data.append(FP16x16 { mag: 25413, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo index 249e24fa1..9ab659a5e 100644 --- a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo index 2db6b40ec..2472b3966 100644 --- a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 48050, sign: false }); - data.append(FixedType { mag: 60294, sign: false }); - data.append(FixedType { mag: 65519, sign: true }); - data.append(FixedType { mag: 6945, sign: false }); + data.append(FP16x16 { mag: 48050, sign: false }); + data.append(FP16x16 { mag: 60294, sign: false }); + data.append(FP16x16 { mag: 65519, sign: true }); + data.append(FP16x16 { mag: 6945, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo index dcb471f46..ccea0ee45 100644 --- a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_fp16x16.cairo b/src/tests/nodes/sinh_fp16x16.cairo index eb88b3fdc..48b4ad374 100644 --- a/src/tests/nodes/sinh_fp16x16.cairo +++ b/src/tests/nodes/sinh_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo index aaf902e5b..d2d153d17 100644 --- a/src/tests/nodes/sinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 191221, sign: true }); - data.append(FixedType { mag: 176805, sign: true }); - data.append(FixedType { mag: 179634, sign: false }); - data.append(FixedType { mag: 177006, sign: true }); + data.append(FP16x16 { mag: 191221, sign: true }); + data.append(FP16x16 { mag: 176805, sign: true }); + data.append(FP16x16 { mag: 179634, sign: false }); + data.append(FP16x16 { mag: 177006, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo index 8e9b95cc8..53329cec1 100644 --- a/src/tests/nodes/sinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 604463, sign: true }); - data.append(FixedType { mag: 484320, sign: true }); - data.append(FixedType { mag: 505875, sign: false }); - data.append(FixedType { mag: 485818, sign: true }); + data.append(FP16x16 { mag: 604463, sign: true }); + data.append(FP16x16 { mag: 484320, sign: true }); + data.append(FP16x16 { mag: 505875, sign: false }); + data.append(FP16x16 { mag: 485818, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo index 445797d38..1b2b20e97 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 77017, sign: true }); - data.append(FixedType { mag: 77017, sign: false }); - data.append(FixedType { mag: 237689, sign: true }); - data.append(FixedType { mag: 656531, sign: true }); + data.append(FP16x16 { mag: 77017, sign: true }); + data.append(FP16x16 { mag: 77017, sign: false }); + data.append(FP16x16 { mag: 237689, sign: true }); + data.append(FP16x16 { mag: 656531, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo index b41da9069..45ecb3cfb 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 77017, sign: true }); - data.append(FixedType { mag: 656531, sign: true }); - data.append(FixedType { mag: 656531, sign: true }); - data.append(FixedType { mag: 77017, sign: false }); + data.append(FP16x16 { mag: 77017, sign: true }); + data.append(FP16x16 { mag: 656531, sign: true }); + data.append(FP16x16 { mag: 656531, sign: true }); + data.append(FP16x16 { mag: 77017, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo index c47ef98bd..3f240aaef 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo index c4496f2d1..1c3e6f70c 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 77017, sign: false }); - data.append(FixedType { mag: 77017, sign: false }); - data.append(FixedType { mag: 4862981, sign: false }); - data.append(FixedType { mag: 237689, sign: false }); + data.append(FP16x16 { mag: 77017, sign: false }); + data.append(FP16x16 { mag: 77017, sign: false }); + data.append(FP16x16 { mag: 4862981, sign: false }); + data.append(FP16x16 { mag: 237689, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo index 975b1118c..b64e76062 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo index 138c05607..782af0fe2 100644 --- a/src/tests/nodes/softmax_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 11810, sign: true }); - data.append(FixedType { mag: 193132, sign: false }); - data.append(FixedType { mag: 147644, sign: false }); - data.append(FixedType { mag: 123955, sign: true }); + data.append(FP16x16 { mag: 11810, sign: true }); + data.append(FP16x16 { mag: 193132, sign: false }); + data.append(FP16x16 { mag: 147644, sign: false }); + data.append(FP16x16 { mag: 123955, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo index b6c156a7b..eb1630ba8 100644 --- a/src/tests/nodes/softmax_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2752, sign: false }); - data.append(FixedType { mag: 62783, sign: false }); - data.append(FixedType { mag: 64513, sign: false }); - data.append(FixedType { mag: 1022, sign: false }); + data.append(FP16x16 { mag: 2752, sign: false }); + data.append(FP16x16 { mag: 62783, sign: false }); + data.append(FP16x16 { mag: 64513, sign: false }); + data.append(FP16x16 { mag: 1022, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo index 573697651..0c12f35cc 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 62427, sign: false }); - data.append(FixedType { mag: 3108, sign: false }); - data.append(FixedType { mag: 57723, sign: false }); - data.append(FixedType { mag: 7812, sign: false }); + data.append(FP16x16 { mag: 62427, sign: false }); + data.append(FP16x16 { mag: 3108, sign: false }); + data.append(FP16x16 { mag: 57723, sign: false }); + data.append(FP16x16 { mag: 7812, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo index 54dc0b2eb..70efefb2f 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 7812, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 57696, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 7812, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 57696, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo index 20a5eef0c..2438aa1b6 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo index aae3a6576..a662f4309 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 17625, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); - data.append(FixedType { mag: 47910, sign: false }); - data.append(FixedType { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 17625, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 47910, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo index f15973209..a31ae48f1 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo index 7d9496f13..8b2ea5fcf 100644 --- a/src/tests/nodes/softplus_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 38394, sign: false }); - data.append(FixedType { mag: 18964, sign: false }); - data.append(FixedType { mag: 98498, sign: false }); - data.append(FixedType { mag: 52313, sign: false }); + data.append(FP16x16 { mag: 38394, sign: false }); + data.append(FP16x16 { mag: 18964, sign: false }); + data.append(FP16x16 { mag: 98498, sign: false }); + data.append(FP16x16 { mag: 52313, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo index c4323ac39..176d7438d 100644 --- a/src/tests/nodes/softplus_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 67396, sign: false }); - data.append(FixedType { mag: 55591, sign: false }); - data.append(FixedType { mag: 111662, sign: false }); - data.append(FixedType { mag: 76669, sign: false }); + data.append(FP16x16 { mag: 67396, sign: false }); + data.append(FP16x16 { mag: 55591, sign: false }); + data.append(FP16x16 { mag: 111662, sign: false }); + data.append(FP16x16 { mag: 76669, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo index 2cddb573a..807260eb9 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 86065, sign: false }); - data.append(FixedType { mag: 8318, sign: false }); - data.append(FixedType { mag: 8318, sign: false }); - data.append(FixedType { mag: 8318, sign: false }); + data.append(FP16x16 { mag: 86065, sign: false }); + data.append(FP16x16 { mag: 8318, sign: false }); + data.append(FP16x16 { mag: 8318, sign: false }); + data.append(FP16x16 { mag: 8318, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo index e7f884222..3d00a8454 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 86080, sign: false }); - data.append(FixedType { mag: 45440, sign: false }); - data.append(FixedType { mag: 45440, sign: false }); - data.append(FixedType { mag: 8344, sign: false }); + data.append(FP16x16 { mag: 86080, sign: false }); + data.append(FP16x16 { mag: 45440, sign: false }); + data.append(FP16x16 { mag: 45440, sign: false }); + data.append(FP16x16 { mag: 8344, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo index f701b75a9..a4792605e 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo index 4c8b44212..e65854624 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 263333, sign: false }); - data.append(FixedType { mag: 86065, sign: false }); - data.append(FixedType { mag: 86065, sign: false }); - data.append(FixedType { mag: 86065, sign: false }); + data.append(FP16x16 { mag: 263333, sign: false }); + data.append(FP16x16 { mag: 86065, sign: false }); + data.append(FP16x16 { mag: 86065, sign: false }); + data.append(FP16x16 { mag: 86065, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo index ba938d4e9..fd19490e4 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo index 780154e38..0cdab8f95 100644 --- a/src/tests/nodes/softsign_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 422146, sign: false }); - data.append(FixedType { mag: 240652, sign: false }); - data.append(FixedType { mag: 153455, sign: false }); - data.append(FixedType { mag: 269993, sign: true }); + data.append(FP16x16 { mag: 422146, sign: false }); + data.append(FP16x16 { mag: 240652, sign: false }); + data.append(FP16x16 { mag: 153455, sign: false }); + data.append(FP16x16 { mag: 269993, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo index 4cd6d7bfe..ec0782f18 100644 --- a/src/tests/nodes/softsign_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 56729, sign: false }); - data.append(FixedType { mag: 51508, sign: false }); - data.append(FixedType { mag: 45923, sign: false }); - data.append(FixedType { mag: 52735, sign: true }); + data.append(FP16x16 { mag: 56729, sign: false }); + data.append(FP16x16 { mag: 51508, sign: false }); + data.append(FP16x16 { mag: 45923, sign: false }); + data.append(FP16x16 { mag: 52735, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo index 9940cbee6..29a5a8990 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 52428, sign: false }); - data.append(FixedType { mag: 54613, sign: true }); - data.append(FixedType { mag: 54613, sign: true }); - data.append(FixedType { mag: 54613, sign: true }); + data.append(FP16x16 { mag: 52428, sign: false }); + data.append(FP16x16 { mag: 54613, sign: true }); + data.append(FP16x16 { mag: 54613, sign: true }); + data.append(FP16x16 { mag: 54613, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo index 2cd50fd95..fb320119d 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 52428, sign: false }); - data.append(FixedType { mag: 32768, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 43690, sign: true }); + data.append(FP16x16 { mag: 52428, sign: false }); + data.append(FP16x16 { mag: 32768, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 43690, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo index 1df7800c3..445d2ac01 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo index c9fb3b0b3..ea1516ca6 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 56173, sign: false }); - data.append(FixedType { mag: 56173, sign: false }); - data.append(FixedType { mag: 56173, sign: false }); - data.append(FixedType { mag: 49152, sign: false }); + data.append(FP16x16 { mag: 56173, sign: false }); + data.append(FP16x16 { mag: 56173, sign: false }); + data.append(FP16x16 { mag: 56173, sign: false }); + data.append(FP16x16 { mag: 49152, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo index 6817ce562..2cde3ab72 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_fp16x16.cairo b/src/tests/nodes/sqrt_fp16x16.cairo index f5c00b883..dd49653b2 100644 --- a/src/tests/nodes/sqrt_fp16x16.cairo +++ b/src/tests/nodes/sqrt_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo index 17eaef85e..47828ca81 100644 --- a/src/tests/nodes/sqrt_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 372701, sign: false }); - data.append(FixedType { mag: 96937, sign: false }); - data.append(FixedType { mag: 172145, sign: false }); - data.append(FixedType { mag: 5219, sign: false }); + data.append(FP16x16 { mag: 372701, sign: false }); + data.append(FP16x16 { mag: 96937, sign: false }); + data.append(FP16x16 { mag: 172145, sign: false }); + data.append(FP16x16 { mag: 5219, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo index 0dcf21246..41b339a10 100644 --- a/src/tests/nodes/sqrt_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 156286, sign: false }); - data.append(FixedType { mag: 79704, sign: false }); - data.append(FixedType { mag: 106215, sign: false }); - data.append(FixedType { mag: 18494, sign: false }); + data.append(FP16x16 { mag: 156286, sign: false }); + data.append(FP16x16 { mag: 79704, sign: false }); + data.append(FP16x16 { mag: 106215, sign: false }); + data.append(FP16x16 { mag: 18494, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo index b8fc3ee0e..1d34ad781 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 92681, sign: false }); - data.append(FixedType { mag: 146542, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 92681, sign: false }); + data.append(FP16x16 { mag: 146542, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo index f55d8d5ea..b4c4b8a2a 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 113511, sign: false }); - data.append(FixedType { mag: 146542, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 113511, sign: false }); + data.append(FP16x16 { mag: 146542, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo index 3284faf22..ac69c9843 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo index 10aa6b5a2..f32b2d60e 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 113511, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 113511, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo index e6842fe14..495bfd379 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo index 15a5bac5c..8d3eca335 100644 --- a/src/tests/nodes/sub_fp16x16/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo index fe549e5be..5b1cc4223 100644 --- a/src/tests/nodes/sub_fp16x16/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16/input_1.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo index 7768bb010..34d6f5990 100644 --- a/src/tests/nodes/sub_fp16x16/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo index a96ae8767..de87668ac 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo index 3d4c6bb4c..cd986b406 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo index 4c8e54d4a..ef050be39 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo @@ -1,42 +1,45 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo index af727a84f..7e52cead5 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo index 13028f229..d5cf7dee7 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(3); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo index e0c546f08..d8ccbc0ea 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo @@ -1,42 +1,44 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo index 1f08942a0..fc1ae3264 100644 --- a/src/tests/nodes/sub_u32/input_0.cairo +++ b/src/tests/nodes/sub_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo index 4b98bd254..939329aaf 100644 --- a/src/tests/nodes/sub_u32/input_1.cairo +++ b/src/tests/nodes/sub_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo index 94af33104..75e259684 100644 --- a/src/tests/nodes/sub_u32/output_0.cairo +++ b/src/tests/nodes/sub_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo index d495450a5..36d2257ce 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo index fecd05f8f..f5ccdb999 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo index dae8a8ba7..9bea88418 100644 --- a/src/tests/nodes/sub_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_fp16x16.cairo b/src/tests/nodes/tanh_fp16x16.cairo index 707d6e10d..c7488ebba 100644 --- a/src/tests/nodes/tanh_fp16x16.cairo +++ b/src/tests/nodes/tanh_fp16x16.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo index 48342c9f4..c7ed05802 100644 --- a/src/tests/nodes/tanh_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 30249, sign: true }); - data.append(FixedType { mag: 165174, sign: true }); - data.append(FixedType { mag: 145036, sign: false }); - data.append(FixedType { mag: 81100, sign: false }); + data.append(FP16x16 { mag: 30249, sign: true }); + data.append(FP16x16 { mag: 165174, sign: true }); + data.append(FP16x16 { mag: 145036, sign: false }); + data.append(FP16x16 { mag: 81100, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo index e0c128d08..12ae50db7 100644 --- a/src/tests/nodes/tanh_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 28269, sign: true }); - data.append(FixedType { mag: 64693, sign: true }); - data.append(FixedType { mag: 63986, sign: false }); - data.append(FixedType { mag: 55360, sign: false }); + data.append(FP16x16 { mag: 28269, sign: true }); + data.append(FP16x16 { mag: 64693, sign: true }); + data.append(FP16x16 { mag: 63986, sign: false }); + data.append(FP16x16 { mag: 55360, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo index 7910c3e23..0ef94e1ad 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 63178, sign: false }); - data.append(FixedType { mag: 49911, sign: true }); - data.append(FixedType { mag: 63178, sign: false }); - data.append(FixedType { mag: 49911, sign: true }); + data.append(FP16x16 { mag: 63178, sign: false }); + data.append(FP16x16 { mag: 49911, sign: true }); + data.append(FP16x16 { mag: 63178, sign: false }); + data.append(FP16x16 { mag: 49911, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo index 36c5719a2..3499bd196 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 49911, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 49911, sign: true }); - data.append(FixedType { mag: 49911, sign: false }); + data.append(FP16x16 { mag: 49911, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 49911, sign: true }); + data.append(FP16x16 { mag: 49911, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo index 695a993a3..72799798f 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo index a8d5fcf08..35ee58fad 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 65492, sign: false }); - data.append(FixedType { mag: 65492, sign: false }); - data.append(FixedType { mag: 63178, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65492, sign: false }); + data.append(FP16x16 { mag: 65492, sign: false }); + data.append(FP16x16 { mag: 63178, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo index 231ca3ecc..651358e69 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_fp16x16_2d.cairo b/src/tests/nodes/transpose_fp16x16_2d.cairo index 7c8091b6e..d587bcdaf 100644 --- a/src/tests/nodes/transpose_fp16x16_2d.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo index 7d1f9f770..27ee7660f 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 4325376, sign: true }); - data.append(FixedType { mag: 7864320, sign: true }); - data.append(FixedType { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 4325376, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo index cd48e7193..2210452ec 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 7864320, sign: true }); - data.append(FixedType { mag: 4325376, sign: true }); - data.append(FixedType { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 4325376, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp16x16_3d.cairo b/src/tests/nodes/transpose_fp16x16_3d.cairo index 1635c937f..661842bed 100644 --- a/src/tests/nodes/transpose_fp16x16_3d.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d.cairo @@ -4,8 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorPartialEq +}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo index e7191d8ed..cb127a83a 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 7012352, sign: true }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 3866624, sign: true }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo index e394702ed..5bacafeeb 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo @@ -1,23 +1,26 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 7012352, sign: true }); - data.append(FixedType { mag: 3866624, sign: true }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo index 384951fa6..54e1d1add 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo index 5cc353282..6a6ec9a47 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo index 5f1c591d1..44d45deba 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 838860800, sign: true }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo index 8d9b8008b..92c038b59 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo @@ -1,23 +1,25 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 838860800, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/transpose_u32_2d.cairo b/src/tests/nodes/transpose_u32_2d.cairo index 0b57b56ed..a99971cdf 100644 --- a/src/tests/nodes/transpose_u32_2d.cairo +++ b/src/tests/nodes/transpose_u32_2d.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo index 9068f0aac..6f1193a80 100644 --- a/src/tests/nodes/transpose_u32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo index 895fc568b..2b0681388 100644 --- a/src/tests/nodes/transpose_u32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_3d.cairo b/src/tests/nodes/transpose_u32_3d.cairo index 34293c5e8..185e74244 100644 --- a/src/tests/nodes/transpose_u32_3d.cairo +++ b/src/tests/nodes/transpose_u32_3d.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo index be8fe4d4e..07bdac7b5 100644 --- a/src/tests/nodes/transpose_u32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo index 457192daf..5edd6d45f 100644 --- a/src/tests/nodes/transpose_u32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp16x16.cairo b/src/tests/nodes/xor_fp16x16.cairo index 68f5280f2..e68270ac7 100644 --- a/src/tests/nodes/xor_fp16x16.cairo +++ b/src/tests/nodes/xor_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo index 362f5a579..bc215fceb 100644 --- a/src/tests/nodes/xor_fp16x16/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo index d5fb87471..36599572f 100644 --- a/src/tests/nodes/xor_fp16x16/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo index 619c5c756..a2c09b3b6 100644 --- a/src/tests/nodes/xor_fp16x16/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp16x16_broadcast.cairo b/src/tests/nodes/xor_fp16x16_broadcast.cairo index 47b4e232f..243d8747e 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo index 84742967b..fa2826408 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo @@ -1,18 +1,21 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo index f49e3c1fe..ef8b072bd 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo @@ -1,16 +1,19 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo index 04e17d1f2..b6ecc85e4 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp8x23.cairo b/src/tests/nodes/xor_fp8x23.cairo index de2662dc9..812eca2d1 100644 --- a/src/tests/nodes/xor_fp8x23.cairo +++ b/src/tests/nodes/xor_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo index 656163d00..3dceca203 100644 --- a/src/tests/nodes/xor_fp8x23/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp8x23_broadcast.cairo b/src/tests/nodes/xor_fp8x23_broadcast.cairo index 9358f3405..30b99c40a 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo index 447d7d010..5182972b8 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo @@ -1,18 +1,20 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo index 1a6f6848a..40d59a3e9 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; + -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo index 619c5c756..41280a50f 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32.cairo b/src/tests/nodes/xor_i32.cairo index ebaa0f6bf..259943c51 100644 --- a/src/tests/nodes/xor_i32.cairo +++ b/src/tests/nodes/xor_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo index 9679e2036..bc7facc81 100644 --- a/src/tests/nodes/xor_i32/output_0.cairo +++ b/src/tests/nodes/xor_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32_broadcast.cairo b/src/tests/nodes/xor_i32_broadcast.cairo index 4d582886d..78faa30e7 100644 --- a/src/tests/nodes/xor_i32_broadcast.cairo +++ b/src/tests/nodes/xor_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo index 619c5c756..a2c09b3b6 100644 --- a/src/tests/nodes/xor_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i8.cairo b/src/tests/nodes/xor_i8.cairo index 4e965c23f..3f95ecefc 100644 --- a/src/tests/nodes/xor_i8.cairo +++ b/src/tests/nodes/xor_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo index 30f806126..cde4f15f9 100644 --- a/src/tests/nodes/xor_i8/output_0.cairo +++ b/src/tests/nodes/xor_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i8_broadcast.cairo b/src/tests/nodes/xor_i8_broadcast.cairo index 0470db225..a7e153abe 100644 --- a/src/tests/nodes/xor_i8_broadcast.cairo +++ b/src/tests/nodes/xor_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo index 619c5c756..a2c09b3b6 100644 --- a/src/tests/nodes/xor_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32.cairo b/src/tests/nodes/xor_u32.cairo index 7e8d41d41..329041ae2 100644 --- a/src/tests/nodes/xor_u32.cairo +++ b/src/tests/nodes/xor_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo index d5a74465c..d1e32f93b 100644 --- a/src/tests/nodes/xor_u32/input_0.cairo +++ b/src/tests/nodes/xor_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo index 2e9a85f2d..0d44c8c70 100644 --- a/src/tests/nodes/xor_u32/input_1.cairo +++ b/src/tests/nodes/xor_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo index dfcdd516a..468d6f6a8 100644 --- a/src/tests/nodes/xor_u32/output_0.cairo +++ b/src/tests/nodes/xor_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast.cairo b/src/tests/nodes/xor_u32_broadcast.cairo index ba6fd4884..d1e4018d1 100644 --- a/src/tests/nodes/xor_u32_broadcast.cairo +++ b/src/tests/nodes/xor_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo index fcf798d32..64341062f 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo index ed95bfa7d..37b8b24b9 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo index 619c5c756..a2c09b3b6 100644 --- a/src/tests/nodes/xor_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); From 1be5bbabeb3d22e519ce1b3af0daeb970f3bb9f5 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:02:02 +0300 Subject: [PATCH 069/179] fix argmin tests --- src/tests/nodes.cairo | 90 +++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 6a55aac08..44954cda2 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -49,51 +49,51 @@ mod argmax_u32_2D_last_index; mod argmax_u32_3D_default; mod argmax_u32_3D_keepdims_false; mod argmax_u32_3D_last_index; -// mod argmin_fp16x16_1D_default; -// mod argmin_fp16x16_1D_keepdims_false; -// mod argmin_fp16x16_1D_last_index; -// mod argmin_fp16x16_2D_default; -// mod argmin_fp16x16_2D_keepdims_false; -// mod argmin_fp16x16_2D_last_index; -// mod argmin_fp16x16_3D_default; -// mod argmin_fp16x16_3D_keepdims_false; -// mod argmin_fp16x16_3D_last_index; -// mod argmin_fp8x23_1D_default; -// mod argmin_fp8x23_1D_keepdims_false; -// mod argmin_fp8x23_1D_last_index; -// mod argmin_fp8x23_2D_default; -// mod argmin_fp8x23_2D_keepdims_false; -// mod argmin_fp8x23_2D_last_index; -// mod argmin_fp8x23_3D_default; -// mod argmin_fp8x23_3D_keepdims_false; -// mod argmin_fp8x23_3D_last_index; -// mod argmin_i32_1D_default; -// mod argmin_i32_1D_keepdims_false; -// mod argmin_i32_1D_last_index; -// mod argmin_i32_2D_default; -// mod argmin_i32_2D_keepdims_false; -// mod argmin_i32_2D_last_index; -// mod argmin_i32_3D_default; -// mod argmin_i32_3D_keepdims_false; -// mod argmin_i32_3D_last_index; -// mod argmin_i8_1D_default; -// mod argmin_i8_1D_keepdims_false; -// mod argmin_i8_1D_last_index; -// mod argmin_i8_2D_default; -// mod argmin_i8_2D_keepdims_false; -// mod argmin_i8_2D_last_index; -// mod argmin_i8_3D_default; -// mod argmin_i8_3D_keepdims_false; -// mod argmin_i8_3D_last_index; -// mod argmin_u32_1D_default; -// mod argmin_u32_1D_keepdims_false; -// mod argmin_u32_1D_last_index; -// mod argmin_u32_2D_default; -// mod argmin_u32_2D_keepdims_false; -// mod argmin_u32_2D_last_index; -// mod argmin_u32_3D_default; -// mod argmin_u32_3D_keepdims_false; -// mod argmin_u32_3D_last_index; +mod argmin_fp16x16_1D_default; +mod argmin_fp16x16_1D_keepdims_false; +mod argmin_fp16x16_1D_last_index; +mod argmin_fp16x16_2D_default; +mod argmin_fp16x16_2D_keepdims_false; +mod argmin_fp16x16_2D_last_index; +mod argmin_fp16x16_3D_default; +mod argmin_fp16x16_3D_keepdims_false; +mod argmin_fp16x16_3D_last_index; +mod argmin_fp8x23_1D_default; +mod argmin_fp8x23_1D_keepdims_false; +mod argmin_fp8x23_1D_last_index; +mod argmin_fp8x23_2D_default; +mod argmin_fp8x23_2D_keepdims_false; +mod argmin_fp8x23_2D_last_index; +mod argmin_fp8x23_3D_default; +mod argmin_fp8x23_3D_keepdims_false; +mod argmin_fp8x23_3D_last_index; +mod argmin_i32_1D_default; +mod argmin_i32_1D_keepdims_false; +mod argmin_i32_1D_last_index; +mod argmin_i32_2D_default; +mod argmin_i32_2D_keepdims_false; +mod argmin_i32_2D_last_index; +mod argmin_i32_3D_default; +mod argmin_i32_3D_keepdims_false; +mod argmin_i32_3D_last_index; +mod argmin_i8_1D_default; +mod argmin_i8_1D_keepdims_false; +mod argmin_i8_1D_last_index; +mod argmin_i8_2D_default; +mod argmin_i8_2D_keepdims_false; +mod argmin_i8_2D_last_index; +mod argmin_i8_3D_default; +mod argmin_i8_3D_keepdims_false; +mod argmin_i8_3D_last_index; +mod argmin_u32_1D_default; +mod argmin_u32_1D_keepdims_false; +mod argmin_u32_1D_last_index; +mod argmin_u32_2D_default; +mod argmin_u32_2D_keepdims_false; +mod argmin_u32_2D_last_index; +mod argmin_u32_3D_default; +mod argmin_u32_3D_keepdims_false; +mod argmin_u32_3D_last_index; // mod transpose_fp16x16_2d; // mod transpose_fp16x16_3d; // mod transpose_fp8x23_2d; From 44f54b238b17b97bbf4f748c68082bb43fd5d407 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:05:09 +0300 Subject: [PATCH 070/179] fix transpose tests --- src/tests/nodes.cairo | 20 +++++++++---------- src/tests/nodes/concat_fp8x23_1d.cairo | 4 ++-- src/tests/nodes/concat_fp8x23_2d.cairo | 4 ++-- src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 4 ++-- src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 4 ++-- .../nodes/concat_fp8x23_3d_default.cairo | 4 ++-- ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 4 ++-- ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 4 ++-- src/tests/nodes/concat_i8_1d.cairo | 4 ++-- src/tests/nodes/concat_i8_2d.cairo | 4 ++-- src/tests/nodes/concat_i8_3d_axis_1.cairo | 4 ++-- src/tests/nodes/concat_i8_3d_axis_2.cairo | 4 ++-- src/tests/nodes/concat_i8_3d_default.cairo | 4 ++-- .../concat_i8_3d_three_tensors_axis_1.cairo | 4 ++-- .../concat_i8_3d_three_tensors_axis_2.cairo | 4 ++-- .../nodes/cumsum_fp8x23_1d_default.cairo | 4 ++-- .../nodes/cumsum_fp8x23_1d_exclusive.cairo | 4 ++-- .../nodes/cumsum_fp8x23_1d_reverse.cairo | 4 ++-- .../cumsum_fp8x23_1d_reverse_exclusive.cairo | 4 ++-- src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo | 4 ++-- src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo | 4 ++-- src/tests/nodes/matmul_fp8x23_1d.cairo | 4 ++-- src/tests/nodes/matmul_fp8x23_1x2.cairo | 4 ++-- src/tests/nodes/matmul_fp8x23_2x1.cairo | 4 ++-- src/tests/nodes/matmul_fp8x23_2x2.cairo | 4 ++-- src/tests/nodes/reduce_sum_fp8x23_1D.cairo | 4 ++-- .../nodes/reduce_sum_fp8x23_2D_axis_1.cairo | 4 ++-- .../nodes/reduce_sum_fp8x23_2D_default.cairo | 4 ++-- .../nodes/reduce_sum_fp8x23_2D_keepdims.cairo | 4 ++-- src/tests/nodes/reduce_sum_i8_1D.cairo | 4 ++-- src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 4 ++-- .../nodes/reduce_sum_i8_2D_default.cairo | 4 ++-- .../nodes/reduce_sum_i8_2D_keepdims.cairo | 4 ++-- src/tests/nodes/transpose_fp8x23_2d.cairo | 4 ++-- src/tests/nodes/transpose_fp8x23_3d.cairo | 4 ++-- 35 files changed, 78 insertions(+), 78 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 44954cda2..e0819b8fe 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -94,16 +94,16 @@ mod argmin_u32_2D_last_index; mod argmin_u32_3D_default; mod argmin_u32_3D_keepdims_false; mod argmin_u32_3D_last_index; -// mod transpose_fp16x16_2d; -// mod transpose_fp16x16_3d; -// mod transpose_fp8x23_2d; -// mod transpose_fp8x23_3d; -// mod transpose_i32_2d; -// mod transpose_i32_3d; -// mod transpose_i8_2d; -// mod transpose_i8_3d; -// mod transpose_u32_2d; -// mod transpose_u32_3d; +mod transpose_fp16x16_2d; +mod transpose_fp16x16_3d; +mod transpose_fp8x23_2d; +mod transpose_fp8x23_3d; +mod transpose_i32_2d; +mod transpose_i32_3d; +mod transpose_i8_2d; +mod transpose_i8_3d; +mod transpose_u32_2d; +mod transpose_u32_3d; // mod asin_fp16x16; // mod asin_fp8x23; // mod atan_fp16x16; diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo index 78c3fda52..2fbd0843a 100644 --- a/src/tests/nodes/concat_fp8x23_1d.cairo +++ b/src/tests/nodes/concat_fp8x23_1d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo index 334201ce1..6c5f44d2b 100644 --- a/src/tests/nodes/concat_fp8x23_2d.cairo +++ b/src/tests/nodes/concat_fp8x23_2d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo index 94b5bb16f..8a0287144 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo index 4750da5dd..bb7faef59 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo index 15628bbb4..01ccd7b85 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo index 9d4f0b25c..f2663361a 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo index 956e9a404..254692893 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_1d.cairo b/src/tests/nodes/concat_i8_1d.cairo index 6198e6c0e..4b33c4034 100644 --- a/src/tests/nodes/concat_i8_1d.cairo +++ b/src/tests/nodes/concat_i8_1d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_2d.cairo b/src/tests/nodes/concat_i8_2d.cairo index a9ce4a45c..85132064e 100644 --- a/src/tests/nodes/concat_i8_2d.cairo +++ b/src/tests/nodes/concat_i8_2d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_3d_axis_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1.cairo index 10cfac679..b99e2c0a0 100644 --- a/src/tests/nodes/concat_i8_3d_axis_1.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_1.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_3d_axis_2.cairo b/src/tests/nodes/concat_i8_3d_axis_2.cairo index 46d11f03a..ac78ee370 100644 --- a/src/tests/nodes/concat_i8_3d_axis_2.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_3d_default.cairo b/src/tests/nodes/concat_i8_3d_default.cairo index eb55088e7..0dbc147e0 100644 --- a/src/tests/nodes/concat_i8_3d_default.cairo +++ b/src/tests/nodes/concat_i8_3d_default.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo index 7967620c6..1d2feb338 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo index 92d862a5b..f92a50236 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo @@ -6,8 +6,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo index 5ecfa0fcb..4e871eb38 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo index 8383c1b6c..95a041190 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo index 078f33843..2ae807b26 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo index 111b30c3a..8d337b282 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo index 5d1660fc1..705484c28 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo index 78b5b6848..519937370 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_1d.cairo b/src/tests/nodes/matmul_fp8x23_1d.cairo index 753cdecb0..3b70dcd0f 100644 --- a/src/tests/nodes/matmul_fp8x23_1d.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_1x2.cairo b/src/tests/nodes/matmul_fp8x23_1x2.cairo index 65bf89655..79afdca5e 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_2x1.cairo b/src/tests/nodes/matmul_fp8x23_2x1.cairo index a12395014..91a5d6614 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_2x2.cairo b/src/tests/nodes/matmul_fp8x23_2x2.cairo index 6fb8f65e0..c68378d0c 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo index b87a8b2da..35f65a3f3 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo index 93a990944..cd381015c 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo index 09694f209..be6e79304 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo index 3047a3fec..fa6be356d 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo index 99c955828..1a260ce6d 100644 --- a/src/tests/nodes/reduce_sum_i8_1D.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo index c4b654412..dbda07838 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo index 8e8bde416..640ed9961 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo index 888c11725..317814a83 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp8x23_2d.cairo b/src/tests/nodes/transpose_fp8x23_2d.cairo index 2279aff6f..4adef9b80 100644 --- a/src/tests/nodes/transpose_fp8x23_2d.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp8x23_3d.cairo b/src/tests/nodes/transpose_fp8x23_3d.cairo index cbf0f9bc4..a5858c37a 100644 --- a/src/tests/nodes/transpose_fp8x23_3d.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] From cb8eb14d30832c1089dfe8b99133be333f88395c Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:06:07 +0300 Subject: [PATCH 071/179] fix asin tests --- src/tests/nodes.cairo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index e0819b8fe..244e1d8e0 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -104,8 +104,8 @@ mod transpose_i8_2d; mod transpose_i8_3d; mod transpose_u32_2d; mod transpose_u32_3d; -// mod asin_fp16x16; -// mod asin_fp8x23; +mod asin_fp16x16; +mod asin_fp8x23; // mod atan_fp16x16; // mod atan_fp8x23; // mod atan_i32_fp8x23; From bbca3eaf38e7b0cbc5af059dd5d31f72b23c8459 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:19:02 +0300 Subject: [PATCH 072/179] fix atan tests --- src/tests/nodes.cairo | 16 ++++++++-------- src/tests/nodes/acosh_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/acosh_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/acosh_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/acosh_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/acosh_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/acosh_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/asinh_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/asinh_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/asinh_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/asinh_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/asinh_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/asinh_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/atan_i32_fp16x16.cairo | 4 ++-- src/tests/nodes/atan_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/atan_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/atan_i8_fp8x23.cairo | 4 ++-- src/tests/nodes/atan_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/atan_u32_fp8x23.cairo | 4 ++-- src/tests/nodes/cos_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/cos_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/cos_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/cos_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/cos_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/cos_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/cosh_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/cosh_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/cosh_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/cosh_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/cosh_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/cosh_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/exp_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/exp_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/exp_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/exp_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/exp_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/exp_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/log_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/log_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/log_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/log_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/log_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/log_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/sin_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/sin_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/sin_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/sin_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/sin_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/sin_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/sinh_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/sinh_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/sinh_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/sinh_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/sinh_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/sinh_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/sqrt_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/sqrt_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/sqrt_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/sqrt_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/sqrt_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/sqrt_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/tanh_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/tanh_i32_fp8x23.cairo | 4 ++-- src/tests/nodes/tanh_i8_fp16x16.cairo | 4 ++-- src/tests/nodes/tanh_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/tanh_u32_fp16x16.cairo | 4 ++-- src/tests/nodes/tanh_u32_fp8x23.cairo | 5 ++--- 67 files changed, 150 insertions(+), 160 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 244e1d8e0..f511f5924 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -106,14 +106,14 @@ mod transpose_u32_2d; mod transpose_u32_3d; mod asin_fp16x16; mod asin_fp8x23; -// mod atan_fp16x16; -// mod atan_fp8x23; -// mod atan_i32_fp8x23; -// mod atan_i32_fp16x16; -// mod atan_i8_fp8x23; -// mod atan_i8_fp16x16; -// mod atan_u32_fp8x23; -// mod atan_u32_fp16x16; +mod atan_fp16x16; +mod atan_fp8x23; +mod atan_i32_fp8x23; +mod atan_i32_fp16x16; +mod atan_i8_fp8x23; +mod atan_i8_fp16x16; +mod atan_u32_fp8x23; +mod atan_u32_fp16x16; // mod ceil_fp16x16; // mod ceil_fp8x23; // mod cos_fp16x16; diff --git a/src/tests/nodes/acosh_i32_fp16x16.cairo b/src/tests/nodes/acosh_i32_fp16x16.cairo index c763ddc6c..b179ee1ad 100644 --- a/src/tests/nodes/acosh_i32_fp16x16.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_acosh_i32_fp16x16() { diff --git a/src/tests/nodes/acosh_i32_fp8x23.cairo b/src/tests/nodes/acosh_i32_fp8x23.cairo index fbcf63d06..c2506eef1 100644 --- a/src/tests/nodes/acosh_i32_fp8x23.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_i8_fp16x16.cairo b/src/tests/nodes/acosh_i8_fp16x16.cairo index 4d15637ff..899d3f77d 100644 --- a/src/tests/nodes/acosh_i8_fp16x16.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_i8_fp8x23.cairo b/src/tests/nodes/acosh_i8_fp8x23.cairo index c28ca4ba1..fc4583b91 100644 --- a/src/tests/nodes/acosh_i8_fp8x23.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_acosh_i8_fp8x23() { diff --git a/src/tests/nodes/acosh_u32_fp16x16.cairo b/src/tests/nodes/acosh_u32_fp16x16.cairo index 965520e85..e513caa26 100644 --- a/src/tests/nodes/acosh_u32_fp16x16.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_u32_fp8x23.cairo b/src/tests/nodes/acosh_u32_fp8x23.cairo index 39e51d0eb..e06ad030f 100644 --- a/src/tests/nodes/acosh_u32_fp8x23.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_acosh_u32_fp8x23() { diff --git a/src/tests/nodes/asinh_i32_fp16x16.cairo b/src/tests/nodes/asinh_i32_fp16x16.cairo index b59cb2014..d66d05948 100644 --- a/src/tests/nodes/asinh_i32_fp16x16.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_asinh_i32_fp16x16() { diff --git a/src/tests/nodes/asinh_i32_fp8x23.cairo b/src/tests/nodes/asinh_i32_fp8x23.cairo index 36b7c6022..415a0451e 100644 --- a/src/tests/nodes/asinh_i32_fp8x23.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_i8_fp16x16.cairo b/src/tests/nodes/asinh_i8_fp16x16.cairo index 7591d4a21..4cfdcc4dd 100644 --- a/src/tests/nodes/asinh_i8_fp16x16.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_i8_fp8x23.cairo b/src/tests/nodes/asinh_i8_fp8x23.cairo index 0eb8f4975..48a6f52c0 100644 --- a/src/tests/nodes/asinh_i8_fp8x23.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_asinh_i8_fp8x23() { diff --git a/src/tests/nodes/asinh_u32_fp16x16.cairo b/src/tests/nodes/asinh_u32_fp16x16.cairo index 11e7fd59c..e5d39a217 100644 --- a/src/tests/nodes/asinh_u32_fp16x16.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_u32_fp8x23.cairo b/src/tests/nodes/asinh_u32_fp8x23.cairo index bc24fb346..7c093315b 100644 --- a/src/tests/nodes/asinh_u32_fp8x23.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_asinh_u32_fp8x23() { diff --git a/src/tests/nodes/atan_i32_fp16x16.cairo b/src/tests/nodes/atan_i32_fp16x16.cairo index 94f840a03..7095ca34b 100644 --- a/src/tests/nodes/atan_i32_fp16x16.cairo +++ b/src/tests/nodes/atan_i32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_i32_fp8x23.cairo b/src/tests/nodes/atan_i32_fp8x23.cairo index 2bb8c0098..a817fb050 100644 --- a/src/tests/nodes/atan_i32_fp8x23.cairo +++ b/src/tests/nodes/atan_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_i8_fp16x16.cairo b/src/tests/nodes/atan_i8_fp16x16.cairo index a6ea9defa..54e65d9e5 100644 --- a/src/tests/nodes/atan_i8_fp16x16.cairo +++ b/src/tests/nodes/atan_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_i8_fp8x23.cairo b/src/tests/nodes/atan_i8_fp8x23.cairo index 9fee3df7e..0d3efc784 100644 --- a/src/tests/nodes/atan_i8_fp8x23.cairo +++ b/src/tests/nodes/atan_i8_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_u32_fp16x16.cairo b/src/tests/nodes/atan_u32_fp16x16.cairo index e617f536a..bbca2c8f0 100644 --- a/src/tests/nodes/atan_u32_fp16x16.cairo +++ b/src/tests/nodes/atan_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_u32_fp8x23.cairo b/src/tests/nodes/atan_u32_fp8x23.cairo index 526e3a98c..a82ac8aad 100644 --- a/src/tests/nodes/atan_u32_fp8x23.cairo +++ b/src/tests/nodes/atan_u32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_i32_fp16x16.cairo b/src/tests/nodes/cos_i32_fp16x16.cairo index e51e7223a..03d5c32d9 100644 --- a/src/tests/nodes/cos_i32_fp16x16.cairo +++ b/src/tests/nodes/cos_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_cos_i32_fp16x16() { diff --git a/src/tests/nodes/cos_i32_fp8x23.cairo b/src/tests/nodes/cos_i32_fp8x23.cairo index b5864259f..514f6e3e5 100644 --- a/src/tests/nodes/cos_i32_fp8x23.cairo +++ b/src/tests/nodes/cos_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_i8_fp16x16.cairo b/src/tests/nodes/cos_i8_fp16x16.cairo index 89005fac5..8a7faf5d6 100644 --- a/src/tests/nodes/cos_i8_fp16x16.cairo +++ b/src/tests/nodes/cos_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_i8_fp8x23.cairo b/src/tests/nodes/cos_i8_fp8x23.cairo index a09cbb62e..0c69e65bb 100644 --- a/src/tests/nodes/cos_i8_fp8x23.cairo +++ b/src/tests/nodes/cos_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_cos_i8_fp8x23() { diff --git a/src/tests/nodes/cos_u32_fp16x16.cairo b/src/tests/nodes/cos_u32_fp16x16.cairo index 3ab953abc..b5859750f 100644 --- a/src/tests/nodes/cos_u32_fp16x16.cairo +++ b/src/tests/nodes/cos_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_u32_fp8x23.cairo b/src/tests/nodes/cos_u32_fp8x23.cairo index 44af02592..0c15ccc9f 100644 --- a/src/tests/nodes/cos_u32_fp8x23.cairo +++ b/src/tests/nodes/cos_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_cos_u32_fp8x23() { diff --git a/src/tests/nodes/cosh_i32_fp16x16.cairo b/src/tests/nodes/cosh_i32_fp16x16.cairo index 296aec2f6..c83b76317 100644 --- a/src/tests/nodes/cosh_i32_fp16x16.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_cosh_i32_fp16x16() { diff --git a/src/tests/nodes/cosh_i32_fp8x23.cairo b/src/tests/nodes/cosh_i32_fp8x23.cairo index d1481350e..27ef2732a 100644 --- a/src/tests/nodes/cosh_i32_fp8x23.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_i8_fp16x16.cairo b/src/tests/nodes/cosh_i8_fp16x16.cairo index 98d1c0e6d..1a0b689f5 100644 --- a/src/tests/nodes/cosh_i8_fp16x16.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_i8_fp8x23.cairo b/src/tests/nodes/cosh_i8_fp8x23.cairo index ac7b90dd3..cb5ac3d57 100644 --- a/src/tests/nodes/cosh_i8_fp8x23.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_cosh_i8_fp8x23() { diff --git a/src/tests/nodes/cosh_u32_fp16x16.cairo b/src/tests/nodes/cosh_u32_fp16x16.cairo index ea78253c5..868823194 100644 --- a/src/tests/nodes/cosh_u32_fp16x16.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_u32_fp8x23.cairo b/src/tests/nodes/cosh_u32_fp8x23.cairo index 44f266fc2..3b01a5a6f 100644 --- a/src/tests/nodes/cosh_u32_fp8x23.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_cosh_u32_fp8x23() { diff --git a/src/tests/nodes/exp_i32_fp16x16.cairo b/src/tests/nodes/exp_i32_fp16x16.cairo index 1be4dc061..23de3dbc7 100644 --- a/src/tests/nodes/exp_i32_fp16x16.cairo +++ b/src/tests/nodes/exp_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_exp_i32_fp16x16() { diff --git a/src/tests/nodes/exp_i32_fp8x23.cairo b/src/tests/nodes/exp_i32_fp8x23.cairo index 7f05236b3..3bf5c54b6 100644 --- a/src/tests/nodes/exp_i32_fp8x23.cairo +++ b/src/tests/nodes/exp_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_i8_fp16x16.cairo b/src/tests/nodes/exp_i8_fp16x16.cairo index 48ab0cb77..7eea4c096 100644 --- a/src/tests/nodes/exp_i8_fp16x16.cairo +++ b/src/tests/nodes/exp_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_i8_fp8x23.cairo b/src/tests/nodes/exp_i8_fp8x23.cairo index e583e0887..8b2bf9c66 100644 --- a/src/tests/nodes/exp_i8_fp8x23.cairo +++ b/src/tests/nodes/exp_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_exp_i8_fp8x23() { diff --git a/src/tests/nodes/exp_u32_fp16x16.cairo b/src/tests/nodes/exp_u32_fp16x16.cairo index 624feac15..562b19124 100644 --- a/src/tests/nodes/exp_u32_fp16x16.cairo +++ b/src/tests/nodes/exp_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_u32_fp8x23.cairo b/src/tests/nodes/exp_u32_fp8x23.cairo index 78498e131..e73bcf308 100644 --- a/src/tests/nodes/exp_u32_fp8x23.cairo +++ b/src/tests/nodes/exp_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_exp_u32_fp8x23() { diff --git a/src/tests/nodes/log_i32_fp16x16.cairo b/src/tests/nodes/log_i32_fp16x16.cairo index cbfaab34d..9e3ca72df 100644 --- a/src/tests/nodes/log_i32_fp16x16.cairo +++ b/src/tests/nodes/log_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_log_i32_fp16x16() { diff --git a/src/tests/nodes/log_i32_fp8x23.cairo b/src/tests/nodes/log_i32_fp8x23.cairo index 9afa4b191..9975862e8 100644 --- a/src/tests/nodes/log_i32_fp8x23.cairo +++ b/src/tests/nodes/log_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_i8_fp16x16.cairo b/src/tests/nodes/log_i8_fp16x16.cairo index 96c3fa585..fda4b859b 100644 --- a/src/tests/nodes/log_i8_fp16x16.cairo +++ b/src/tests/nodes/log_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_i8_fp8x23.cairo b/src/tests/nodes/log_i8_fp8x23.cairo index 685159977..fa9e21fa1 100644 --- a/src/tests/nodes/log_i8_fp8x23.cairo +++ b/src/tests/nodes/log_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_log_i8_fp8x23() { diff --git a/src/tests/nodes/log_u32_fp16x16.cairo b/src/tests/nodes/log_u32_fp16x16.cairo index 0d7b2a88c..45a07345b 100644 --- a/src/tests/nodes/log_u32_fp16x16.cairo +++ b/src/tests/nodes/log_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_u32_fp8x23.cairo b/src/tests/nodes/log_u32_fp8x23.cairo index eb32ba0b8..ea20a550a 100644 --- a/src/tests/nodes/log_u32_fp8x23.cairo +++ b/src/tests/nodes/log_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_log_u32_fp8x23() { diff --git a/src/tests/nodes/sin_i32_fp16x16.cairo b/src/tests/nodes/sin_i32_fp16x16.cairo index d2ff3de63..c8d969996 100644 --- a/src/tests/nodes/sin_i32_fp16x16.cairo +++ b/src/tests/nodes/sin_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sin_i32_fp16x16() { diff --git a/src/tests/nodes/sin_i32_fp8x23.cairo b/src/tests/nodes/sin_i32_fp8x23.cairo index 7714ec793..3f5a8a641 100644 --- a/src/tests/nodes/sin_i32_fp8x23.cairo +++ b/src/tests/nodes/sin_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_i8_fp16x16.cairo b/src/tests/nodes/sin_i8_fp16x16.cairo index 88a285a5b..2c2a45f27 100644 --- a/src/tests/nodes/sin_i8_fp16x16.cairo +++ b/src/tests/nodes/sin_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_i8_fp8x23.cairo b/src/tests/nodes/sin_i8_fp8x23.cairo index c3b8f65c6..a93b999a0 100644 --- a/src/tests/nodes/sin_i8_fp8x23.cairo +++ b/src/tests/nodes/sin_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_sin_i8_fp8x23() { diff --git a/src/tests/nodes/sin_u32_fp16x16.cairo b/src/tests/nodes/sin_u32_fp16x16.cairo index 546293f7f..4fa544094 100644 --- a/src/tests/nodes/sin_u32_fp16x16.cairo +++ b/src/tests/nodes/sin_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_u32_fp8x23.cairo b/src/tests/nodes/sin_u32_fp8x23.cairo index e89d2cce4..56a077154 100644 --- a/src/tests/nodes/sin_u32_fp8x23.cairo +++ b/src/tests/nodes/sin_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sin_u32_fp8x23() { diff --git a/src/tests/nodes/sinh_i32_fp16x16.cairo b/src/tests/nodes/sinh_i32_fp16x16.cairo index 6ff37deff..ef8da9a76 100644 --- a/src/tests/nodes/sinh_i32_fp16x16.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sinh_i32_fp16x16() { diff --git a/src/tests/nodes/sinh_i32_fp8x23.cairo b/src/tests/nodes/sinh_i32_fp8x23.cairo index f1acb7300..3a42818c3 100644 --- a/src/tests/nodes/sinh_i32_fp8x23.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_i8_fp16x16.cairo b/src/tests/nodes/sinh_i8_fp16x16.cairo index 2d5d9f3f9..10fd349df 100644 --- a/src/tests/nodes/sinh_i8_fp16x16.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_i8_fp8x23.cairo b/src/tests/nodes/sinh_i8_fp8x23.cairo index 00e98ccf9..1b320741c 100644 --- a/src/tests/nodes/sinh_i8_fp8x23.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_sinh_i8_fp8x23() { diff --git a/src/tests/nodes/sinh_u32_fp16x16.cairo b/src/tests/nodes/sinh_u32_fp16x16.cairo index 69fbc15f8..dbe4651d6 100644 --- a/src/tests/nodes/sinh_u32_fp16x16.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_u32_fp8x23.cairo b/src/tests/nodes/sinh_u32_fp8x23.cairo index 3f3244c97..e6d7775b5 100644 --- a/src/tests/nodes/sinh_u32_fp8x23.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sinh_u32_fp8x23() { diff --git a/src/tests/nodes/sqrt_i32_fp16x16.cairo b/src/tests/nodes/sqrt_i32_fp16x16.cairo index ba436cfa1..e21b1f464 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sqrt_i32_fp16x16() { diff --git a/src/tests/nodes/sqrt_i32_fp8x23.cairo b/src/tests/nodes/sqrt_i32_fp8x23.cairo index 027bea1df..488c4f52f 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_i8_fp16x16.cairo b/src/tests/nodes/sqrt_i8_fp16x16.cairo index abe46b8d4..92d59a07c 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_i8_fp8x23.cairo b/src/tests/nodes/sqrt_i8_fp8x23.cairo index 05d24065d..96e4f5679 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_sqrt_i8_fp8x23() { diff --git a/src/tests/nodes/sqrt_u32_fp16x16.cairo b/src/tests/nodes/sqrt_u32_fp16x16.cairo index 4ad9159b3..8e2604522 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_u32_fp8x23.cairo b/src/tests/nodes/sqrt_u32_fp8x23.cairo index fe30153cd..af42a5339 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sqrt_u32_fp8x23() { diff --git a/src/tests/nodes/tanh_i32_fp16x16.cairo b/src/tests/nodes/tanh_i32_fp16x16.cairo index 831f030f4..9953c0949 100644 --- a/src/tests/nodes/tanh_i32_fp16x16.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_tanh_i32_fp16x16() { diff --git a/src/tests/nodes/tanh_i32_fp8x23.cairo b/src/tests/nodes/tanh_i32_fp8x23.cairo index 433e8eaf2..06a1debe2 100644 --- a/src/tests/nodes/tanh_i32_fp8x23.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_i8_fp16x16.cairo b/src/tests/nodes/tanh_i8_fp16x16.cairo index dba89a2a7..22fde3884 100644 --- a/src/tests/nodes/tanh_i8_fp16x16.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_i8_fp8x23.cairo b/src/tests/nodes/tanh_i8_fp8x23.cairo index 90745c492..e238884ab 100644 --- a/src/tests/nodes/tanh_i8_fp8x23.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23.cairo @@ -4,10 +4,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_tanh_i8_fp8x23() { diff --git a/src/tests/nodes/tanh_u32_fp16x16.cairo b/src/tests/nodes/tanh_u32_fp16x16.cairo index aaee1faff..6015c3827 100644 --- a/src/tests/nodes/tanh_u32_fp16x16.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_u32_fp8x23.cairo b/src/tests/nodes/tanh_u32_fp8x23.cairo index 747842ba3..104a56b84 100644 --- a/src/tests/nodes/tanh_u32_fp8x23.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23.cairo @@ -4,10 +4,9 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_tanh_u32_fp8x23() { From 5b3b2381dee01709a5b1fd22fdb805d25eda9364 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:20:54 +0300 Subject: [PATCH 073/179] Update nodes.cairo --- src/tests/nodes.cairo | 96 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f511f5924..ae43c1531 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -114,54 +114,54 @@ mod atan_i8_fp8x23; mod atan_i8_fp16x16; mod atan_u32_fp8x23; mod atan_u32_fp16x16; -// mod ceil_fp16x16; -// mod ceil_fp8x23; -// mod cos_fp16x16; -// mod cos_fp8x23; -// mod cos_i32_fp8x23; -// mod cos_i32_fp16x16; -// mod cos_i8_fp8x23; -// mod cos_i8_fp16x16; -// mod cos_u32_fp8x23; -// mod cos_u32_fp16x16; -// mod cumsum_fp16x16_1d_default; -// mod cumsum_fp16x16_1d_exclusive; -// mod cumsum_fp16x16_1d_reverse; -// mod cumsum_fp16x16_1d_reverse_exclusive; -// mod cumsum_fp16x16_2d_axis_0; -// mod cumsum_fp16x16_2d_axis_1; -// mod cumsum_fp8x23_1d_default; -// mod cumsum_fp8x23_1d_exclusive; -// mod cumsum_fp8x23_1d_reverse; -// mod cumsum_fp8x23_1d_reverse_exclusive; -// mod cumsum_fp8x23_2d_axis_0; -// mod cumsum_fp8x23_2d_axis_1; -// mod cumsum_i32_1d_default; -// mod cumsum_i32_1d_exclusive; -// mod cumsum_i32_1d_reverse; -// mod cumsum_i32_1d_reverse_exclusive; -// mod cumsum_i32_2d_axis_0; -// mod cumsum_i32_2d_axis_1; -// mod cumsum_i8_1d_default; -// mod cumsum_i8_1d_exclusive; -// mod cumsum_i8_1d_reverse; -// mod cumsum_i8_1d_reverse_exclusive; -// mod cumsum_i8_2d_axis_0; -// mod cumsum_i8_2d_axis_1; -// mod cumsum_u32_1d_default; -// mod cumsum_u32_1d_exclusive; -// mod cumsum_u32_1d_reverse; -// mod cumsum_u32_1d_reverse_exclusive; -// mod cumsum_u32_2d_axis_0; -// mod cumsum_u32_2d_axis_1; -// mod cosh_fp16x16; -// mod cosh_fp8x23; -// mod cosh_i32_fp8x23; -// mod cosh_i32_fp16x16; -// mod cosh_i8_fp8x23; -// mod cosh_i8_fp16x16; -// mod cosh_u32_fp8x23; -// mod cosh_u32_fp16x16; +mod ceil_fp16x16; +mod ceil_fp8x23; +mod cos_fp16x16; +mod cos_fp8x23; +mod cos_i32_fp8x23; +mod cos_i32_fp16x16; +mod cos_i8_fp8x23; +mod cos_i8_fp16x16; +mod cos_u32_fp8x23; +mod cos_u32_fp16x16; +mod cumsum_fp16x16_1d_default; +mod cumsum_fp16x16_1d_exclusive; +mod cumsum_fp16x16_1d_reverse; +mod cumsum_fp16x16_1d_reverse_exclusive; +mod cumsum_fp16x16_2d_axis_0; +mod cumsum_fp16x16_2d_axis_1; +mod cumsum_fp8x23_1d_default; +mod cumsum_fp8x23_1d_exclusive; +mod cumsum_fp8x23_1d_reverse; +mod cumsum_fp8x23_1d_reverse_exclusive; +mod cumsum_fp8x23_2d_axis_0; +mod cumsum_fp8x23_2d_axis_1; +mod cumsum_i32_1d_default; +mod cumsum_i32_1d_exclusive; +mod cumsum_i32_1d_reverse; +mod cumsum_i32_1d_reverse_exclusive; +mod cumsum_i32_2d_axis_0; +mod cumsum_i32_2d_axis_1; +mod cumsum_i8_1d_default; +mod cumsum_i8_1d_exclusive; +mod cumsum_i8_1d_reverse; +mod cumsum_i8_1d_reverse_exclusive; +mod cumsum_i8_2d_axis_0; +mod cumsum_i8_2d_axis_1; +mod cumsum_u32_1d_default; +mod cumsum_u32_1d_exclusive; +mod cumsum_u32_1d_reverse; +mod cumsum_u32_1d_reverse_exclusive; +mod cumsum_u32_2d_axis_0; +mod cumsum_u32_2d_axis_1; +mod cosh_fp16x16; +mod cosh_fp8x23; +mod cosh_i32_fp8x23; +mod cosh_i32_fp16x16; +mod cosh_i8_fp8x23; +mod cosh_i8_fp16x16; +mod cosh_u32_fp8x23; +mod cosh_u32_fp16x16; // mod sinh_fp16x16; // mod sinh_fp8x23; // mod sinh_i32_fp8x23; From 8bb838fe9bbabb8674093d80be32413f3d27423f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 13:29:42 +0300 Subject: [PATCH 074/179] fix sinh --- .../tensor/implementations/tensor_fp16x16.cairo | 2 +- .../tensor/implementations/tensor_fp8x23.cairo | 2 +- .../implementations/tensor_i32_fp16x16.cairo | 2 +- .../implementations/tensor_i32_fp8x23.cairo | 2 +- .../implementations/tensor_i8_fp16x16.cairo | 2 +- .../implementations/tensor_i8_fp8x23.cairo | 2 +- .../implementations/tensor_u32_fp16x16.cairo | 2 +- .../implementations/tensor_u32_fp8x23.cairo | 2 +- src/tests/nodes.cairo | 16 ++++++++-------- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index a78eb9cfc..ed709e18f 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -130,7 +130,7 @@ impl Tensor_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sinh::sinh_from_fp(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 20f257576..1eaf99e63 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -130,7 +130,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sinh::sinh_from_fp(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index 66f021a78..285d6c539 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -132,7 +132,7 @@ impl Tensor_i32_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index 6317fb733..f7090cf37 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -132,7 +132,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo index fe5681fcc..bc2039b6e 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -134,7 +134,7 @@ impl Tensor_i8_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index a716e062b..7b9149145 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -134,7 +134,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo index 3e1c8dc57..b7cf64c3b 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -131,7 +131,7 @@ impl Tensor_u32_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 1ff1a6ff1..75113465f 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -131,7 +131,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + math::sinh::sinh_from_int(*self) } fn tanh(self: @Tensor) -> Tensor { diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index ae43c1531..242fb0e05 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -162,14 +162,14 @@ mod cosh_i8_fp8x23; mod cosh_i8_fp16x16; mod cosh_u32_fp8x23; mod cosh_u32_fp16x16; -// mod sinh_fp16x16; -// mod sinh_fp8x23; -// mod sinh_i32_fp8x23; -// mod sinh_i32_fp16x16; -// mod sinh_i8_fp8x23; -// mod sinh_i8_fp16x16; -// mod sinh_u32_fp8x23; -// mod sinh_u32_fp16x16; +mod sinh_fp16x16; +mod sinh_fp8x23; +mod sinh_i32_fp8x23; +mod sinh_i32_fp16x16; +mod sinh_i8_fp8x23; +mod sinh_i8_fp16x16; +mod sinh_u32_fp8x23; +mod sinh_u32_fp16x16; // mod tanh_fp16x16; // mod tanh_fp8x23; // mod tanh_i32_fp8x23; From 9b6fbc4904c3e01d5e1e5969fc1a5864e6ac8ed2 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:00:22 +0300 Subject: [PATCH 075/179] Update nodes.cairo --- src/tests/nodes.cairo | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 242fb0e05..30d13c6d8 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -170,22 +170,22 @@ mod sinh_i8_fp8x23; mod sinh_i8_fp16x16; mod sinh_u32_fp8x23; mod sinh_u32_fp16x16; -// mod tanh_fp16x16; -// mod tanh_fp8x23; -// mod tanh_i32_fp8x23; -// mod tanh_i32_fp16x16; -// mod tanh_i8_fp8x23; -// mod tanh_i8_fp16x16; -// mod tanh_u32_fp8x23; -// mod tanh_u32_fp16x16; -// mod log_fp16x16; -// mod log_fp8x23; -// mod log_i32_fp8x23; -// mod log_i32_fp16x16; -// mod log_i8_fp8x23; -// mod log_i8_fp16x16; -// mod log_u32_fp8x23; -// mod log_u32_fp16x16; +mod tanh_fp16x16; +mod tanh_fp8x23; +mod tanh_i32_fp8x23; +mod tanh_i32_fp16x16; +mod tanh_i8_fp8x23; +mod tanh_i8_fp16x16; +mod tanh_u32_fp8x23; +mod tanh_u32_fp16x16; +mod log_fp16x16; +mod log_fp8x23; +mod log_i32_fp8x23; +mod log_i32_fp16x16; +mod log_i8_fp8x23; +mod log_i8_fp16x16; +mod log_u32_fp8x23; +mod log_u32_fp16x16; // mod reduce_sum_fp16x16_1D; // mod reduce_sum_fp16x16_2D_default; // mod reduce_sum_fp16x16_2D_keepdims; From ad586f2cf8f8f0be4916327ce8b898bb83e9f90e Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:13:12 +0300 Subject: [PATCH 076/179] fix reduce sum tests --- src/tests/nodes.cairo | 40 ++--- src/tests/nodes/add_fp16x16.cairo | 2 +- src/tests/nodes/add_fp16x16_broadcast.cairo | 2 +- src/tests/nodes/add_fp8x23.cairo | 2 +- src/tests/nodes/add_fp8x23_broadcast.cairo | 2 +- src/tests/nodes/concat_i8_1d/input_0.cairo | 13 +- src/tests/nodes/concat_i8_1d/input_1.cairo | 13 +- src/tests/nodes/concat_i8_1d/output_0.cairo | 19 +- src/tests/nodes/concat_i8_2d/input_0.cairo | 15 +- src/tests/nodes/concat_i8_2d/input_1.cairo | 15 +- src/tests/nodes/concat_i8_2d/output_0.cairo | 23 +-- .../nodes/concat_i8_3d_axis_1/input_0.cairo | 61 +++---- .../nodes/concat_i8_3d_axis_1/input_1.cairo | 61 +++---- .../nodes/concat_i8_3d_axis_1/output_0.cairo | 115 ++++++------ .../nodes/concat_i8_3d_axis_2/input_0.cairo | 61 +++---- .../nodes/concat_i8_3d_axis_2/input_1.cairo | 61 +++---- .../nodes/concat_i8_3d_axis_2/output_0.cairo | 115 ++++++------ .../nodes/concat_i8_3d_default/input_0.cairo | 61 +++---- .../nodes/concat_i8_3d_default/input_1.cairo | 61 +++---- .../nodes/concat_i8_3d_default/output_0.cairo | 115 ++++++------ .../input_0.cairo | 61 +++---- .../input_1.cairo | 61 +++---- .../input_2.cairo | 61 +++---- .../output_0.cairo | 169 +++++++++--------- .../input_0.cairo | 61 +++---- .../input_1.cairo | 61 +++---- .../input_2.cairo | 61 +++---- .../output_0.cairo | 169 +++++++++--------- src/tests/nodes/div_fp16x16.cairo | 2 +- src/tests/nodes/div_fp16x16_broadcast.cairo | 2 +- src/tests/nodes/div_fp8x23.cairo | 2 +- src/tests/nodes/div_fp8x23_broadcast.cairo | 2 +- src/tests/nodes/mul_fp16x16.cairo | 2 +- src/tests/nodes/mul_fp16x16_broadcast.cairo | 2 +- src/tests/nodes/mul_fp8x23.cairo | 2 +- src/tests/nodes/mul_fp8x23_broadcast.cairo | 2 +- src/tests/nodes/reduce_sum_i8_1D.cairo | 4 +- .../nodes/reduce_sum_i8_1D/input_0.cairo | 14 +- .../nodes/reduce_sum_i8_1D/output_0.cairo | 9 +- src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 4 +- .../reduce_sum_i8_2D_axis_1/input_0.cairo | 15 +- .../reduce_sum_i8_2D_axis_1/output_0.cairo | 11 +- .../nodes/reduce_sum_i8_2D_default.cairo | 4 +- .../reduce_sum_i8_2D_default/input_0.cairo | 15 +- .../reduce_sum_i8_2D_default/output_0.cairo | 11 +- .../nodes/reduce_sum_i8_2D_keepdims.cairo | 4 +- .../reduce_sum_i8_2D_keepdims/input_0.cairo | 15 +- .../reduce_sum_i8_2D_keepdims/output_0.cairo | 11 +- src/tests/nodes/sub_fp16x16.cairo | 2 +- src/tests/nodes/sub_fp16x16_broadcast.cairo | 2 +- src/tests/nodes/sub_fp8x23.cairo | 2 +- src/tests/nodes/sub_fp8x23_broadcast.cairo | 2 +- 52 files changed, 867 insertions(+), 835 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 30d13c6d8..f073914cc 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -186,26 +186,26 @@ mod log_i8_fp8x23; mod log_i8_fp16x16; mod log_u32_fp8x23; mod log_u32_fp16x16; -// mod reduce_sum_fp16x16_1D; -// mod reduce_sum_fp16x16_2D_default; -// mod reduce_sum_fp16x16_2D_keepdims; -// mod reduce_sum_fp16x16_2D_axis_1; -// mod reduce_sum_fp8x23_1D; -// mod reduce_sum_fp8x23_2D_default; -// mod reduce_sum_fp8x23_2D_keepdims; -// mod reduce_sum_fp8x23_2D_axis_1; -// mod reduce_sum_i32_1D; -// mod reduce_sum_i32_2D_default; -// mod reduce_sum_i32_2D_keepdims; -// mod reduce_sum_i32_2D_axis_1; -// mod reduce_sum_i8_1D; -// mod reduce_sum_i8_2D_default; -// mod reduce_sum_i8_2D_keepdims; -// mod reduce_sum_i8_2D_axis_1; -// mod reduce_sum_u32_1D; -// mod reduce_sum_u32_2D_default; -// mod reduce_sum_u32_2D_keepdims; -// mod reduce_sum_u32_2D_axis_1; +mod reduce_sum_fp16x16_1D; +mod reduce_sum_fp16x16_2D_default; +mod reduce_sum_fp16x16_2D_keepdims; +mod reduce_sum_fp16x16_2D_axis_1; +mod reduce_sum_fp8x23_1D; +mod reduce_sum_fp8x23_2D_default; +mod reduce_sum_fp8x23_2D_keepdims; +mod reduce_sum_fp8x23_2D_axis_1; +mod reduce_sum_i32_1D; +mod reduce_sum_i32_2D_default; +mod reduce_sum_i32_2D_keepdims; +mod reduce_sum_i32_2D_axis_1; +mod reduce_sum_i8_1D; +mod reduce_sum_i8_2D_default; +mod reduce_sum_i8_2D_keepdims; +mod reduce_sum_i8_2D_axis_1; +mod reduce_sum_u32_1D; +mod reduce_sum_u32_2D_default; +mod reduce_sum_u32_2D_keepdims; +mod reduce_sum_u32_2D_axis_1; // mod exp_fp16x16; // mod exp_fp8x23; // mod exp_i32_fp8x23; diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo index 8f981a797..1933396d2 100644 --- a/src/tests/nodes/add_fp16x16.cairo +++ b/src/tests/nodes/add_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorAdd}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorAdd}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo index fe6e171be..2767e2d54 100644 --- a/src/tests/nodes/add_fp16x16_broadcast.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorAdd}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorAdd}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo index fb73ae977..9af5c58ef 100644 --- a/src/tests/nodes/add_fp8x23.cairo +++ b/src/tests/nodes/add_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorAdd}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorAdd}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo index 575847779..e6f0d7fc5 100644 --- a/src/tests/nodes/add_fp8x23_broadcast.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorAdd}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorAdd}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_i8_1d/input_0.cairo b/src/tests/nodes/concat_i8_1d/input_0.cairo index 61b138e63..093b7168e 100644 --- a/src/tests/nodes/concat_i8_1d/input_0.cairo +++ b/src/tests/nodes/concat_i8_1d/input_0.cairo @@ -1,16 +1,17 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_1d/input_1.cairo b/src/tests/nodes/concat_i8_1d/input_1.cairo index 9bf2bbadb..594735edd 100644 --- a/src/tests/nodes/concat_i8_1d/input_1.cairo +++ b/src/tests/nodes/concat_i8_1d/input_1.cairo @@ -1,16 +1,17 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_1d/output_0.cairo b/src/tests/nodes/concat_i8_1d/output_0.cairo index f4cc71a42..98d652a94 100644 --- a/src/tests/nodes/concat_i8_1d/output_0.cairo +++ b/src/tests/nodes/concat_i8_1d/output_0.cairo @@ -1,19 +1,20 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_2d/input_0.cairo b/src/tests/nodes/concat_i8_2d/input_0.cairo index 095672ea7..b627482d8 100644 --- a/src/tests/nodes/concat_i8_2d/input_0.cairo +++ b/src/tests/nodes/concat_i8_2d/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_2d/input_1.cairo b/src/tests/nodes/concat_i8_2d/input_1.cairo index d9190c875..4b16f14b7 100644 --- a/src/tests/nodes/concat_i8_2d/input_1.cairo +++ b/src/tests/nodes/concat_i8_2d/input_1.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_2d/output_0.cairo b/src/tests/nodes/concat_i8_2d/output_0.cairo index 5e23d5b58..e17746963 100644 --- a/src/tests/nodes/concat_i8_2d/output_0.cairo +++ b/src/tests/nodes/concat_i8_2d/output_0.cairo @@ -1,22 +1,23 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(4); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo index 0b5b08268..1e8d0bcd7 100644 --- a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo index 918442621..89c1caede 100644 --- a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo index da8e0726e..fc77c8f66 100644 --- a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo @@ -1,69 +1,70 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(6); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo index 0b5b08268..1e8d0bcd7 100644 --- a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo index 918442621..89c1caede 100644 --- a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo index 0aee11e9f..f9ddab121 100644 --- a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo @@ -1,69 +1,70 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(6); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_default/input_0.cairo b/src/tests/nodes/concat_i8_3d_default/input_0.cairo index 0b5b08268..1e8d0bcd7 100644 --- a/src/tests/nodes/concat_i8_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_i8_3d_default/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_default/input_1.cairo b/src/tests/nodes/concat_i8_3d_default/input_1.cairo index 918442621..89c1caede 100644 --- a/src/tests/nodes/concat_i8_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_i8_3d_default/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_default/output_0.cairo b/src/tests/nodes/concat_i8_3d_default/output_0.cairo index ec0392c75..14054d36d 100644 --- a/src/tests/nodes/concat_i8_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_i8_3d_default/output_0.cairo @@ -1,69 +1,70 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo index 0b5b08268..1e8d0bcd7 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo index 918442621..89c1caede 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo index 080506104..461492ebf 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 54, sign: false }); - data.append(FixedType { mag: 55, sign: false }); - data.append(FixedType { mag: 56, sign: false }); - data.append(FixedType { mag: 57, sign: false }); - data.append(FixedType { mag: 58, sign: false }); - data.append(FixedType { mag: 59, sign: false }); - data.append(FixedType { mag: 60, sign: false }); - data.append(FixedType { mag: 61, sign: false }); - data.append(FixedType { mag: 62, sign: false }); - data.append(FixedType { mag: 63, sign: false }); - data.append(FixedType { mag: 64, sign: false }); - data.append(FixedType { mag: 65, sign: false }); - data.append(FixedType { mag: 66, sign: false }); - data.append(FixedType { mag: 67, sign: false }); - data.append(FixedType { mag: 68, sign: false }); - data.append(FixedType { mag: 69, sign: false }); - data.append(FixedType { mag: 70, sign: false }); - data.append(FixedType { mag: 71, sign: false }); - data.append(FixedType { mag: 72, sign: false }); - data.append(FixedType { mag: 73, sign: false }); - data.append(FixedType { mag: 74, sign: false }); - data.append(FixedType { mag: 75, sign: false }); - data.append(FixedType { mag: 76, sign: false }); - data.append(FixedType { mag: 77, sign: false }); - data.append(FixedType { mag: 78, sign: false }); - data.append(FixedType { mag: 79, sign: false }); - data.append(FixedType { mag: 80, sign: false }); + data.append(FP16x16 { mag: 54, sign: false }); + data.append(FP16x16 { mag: 55, sign: false }); + data.append(FP16x16 { mag: 56, sign: false }); + data.append(FP16x16 { mag: 57, sign: false }); + data.append(FP16x16 { mag: 58, sign: false }); + data.append(FP16x16 { mag: 59, sign: false }); + data.append(FP16x16 { mag: 60, sign: false }); + data.append(FP16x16 { mag: 61, sign: false }); + data.append(FP16x16 { mag: 62, sign: false }); + data.append(FP16x16 { mag: 63, sign: false }); + data.append(FP16x16 { mag: 64, sign: false }); + data.append(FP16x16 { mag: 65, sign: false }); + data.append(FP16x16 { mag: 66, sign: false }); + data.append(FP16x16 { mag: 67, sign: false }); + data.append(FP16x16 { mag: 68, sign: false }); + data.append(FP16x16 { mag: 69, sign: false }); + data.append(FP16x16 { mag: 70, sign: false }); + data.append(FP16x16 { mag: 71, sign: false }); + data.append(FP16x16 { mag: 72, sign: false }); + data.append(FP16x16 { mag: 73, sign: false }); + data.append(FP16x16 { mag: 74, sign: false }); + data.append(FP16x16 { mag: 75, sign: false }); + data.append(FP16x16 { mag: 76, sign: false }); + data.append(FP16x16 { mag: 77, sign: false }); + data.append(FP16x16 { mag: 78, sign: false }); + data.append(FP16x16 { mag: 79, sign: false }); + data.append(FP16x16 { mag: 80, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo index 0cf4cc833..e9a462bc0 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo @@ -1,96 +1,97 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(9); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 54, sign: false }); - data.append(FixedType { mag: 55, sign: false }); - data.append(FixedType { mag: 56, sign: false }); - data.append(FixedType { mag: 57, sign: false }); - data.append(FixedType { mag: 58, sign: false }); - data.append(FixedType { mag: 59, sign: false }); - data.append(FixedType { mag: 60, sign: false }); - data.append(FixedType { mag: 61, sign: false }); - data.append(FixedType { mag: 62, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 63, sign: false }); - data.append(FixedType { mag: 64, sign: false }); - data.append(FixedType { mag: 65, sign: false }); - data.append(FixedType { mag: 66, sign: false }); - data.append(FixedType { mag: 67, sign: false }); - data.append(FixedType { mag: 68, sign: false }); - data.append(FixedType { mag: 69, sign: false }); - data.append(FixedType { mag: 70, sign: false }); - data.append(FixedType { mag: 71, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); - data.append(FixedType { mag: 72, sign: false }); - data.append(FixedType { mag: 73, sign: false }); - data.append(FixedType { mag: 74, sign: false }); - data.append(FixedType { mag: 75, sign: false }); - data.append(FixedType { mag: 76, sign: false }); - data.append(FixedType { mag: 77, sign: false }); - data.append(FixedType { mag: 78, sign: false }); - data.append(FixedType { mag: 79, sign: false }); - data.append(FixedType { mag: 80, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 54, sign: false }); + data.append(FP16x16 { mag: 55, sign: false }); + data.append(FP16x16 { mag: 56, sign: false }); + data.append(FP16x16 { mag: 57, sign: false }); + data.append(FP16x16 { mag: 58, sign: false }); + data.append(FP16x16 { mag: 59, sign: false }); + data.append(FP16x16 { mag: 60, sign: false }); + data.append(FP16x16 { mag: 61, sign: false }); + data.append(FP16x16 { mag: 62, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 63, sign: false }); + data.append(FP16x16 { mag: 64, sign: false }); + data.append(FP16x16 { mag: 65, sign: false }); + data.append(FP16x16 { mag: 66, sign: false }); + data.append(FP16x16 { mag: 67, sign: false }); + data.append(FP16x16 { mag: 68, sign: false }); + data.append(FP16x16 { mag: 69, sign: false }); + data.append(FP16x16 { mag: 70, sign: false }); + data.append(FP16x16 { mag: 71, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); + data.append(FP16x16 { mag: 72, sign: false }); + data.append(FP16x16 { mag: 73, sign: false }); + data.append(FP16x16 { mag: 74, sign: false }); + data.append(FP16x16 { mag: 75, sign: false }); + data.append(FP16x16 { mag: 76, sign: false }); + data.append(FP16x16 { mag: 77, sign: false }); + data.append(FP16x16 { mag: 78, sign: false }); + data.append(FP16x16 { mag: 79, sign: false }); + data.append(FP16x16 { mag: 80, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo index 0b5b08268..1e8d0bcd7 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo index 918442621..89c1caede 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_1() -> Tensor { +fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo index 080506104..461492ebf 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo @@ -1,42 +1,43 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_2() -> Tensor { +fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 54, sign: false }); - data.append(FixedType { mag: 55, sign: false }); - data.append(FixedType { mag: 56, sign: false }); - data.append(FixedType { mag: 57, sign: false }); - data.append(FixedType { mag: 58, sign: false }); - data.append(FixedType { mag: 59, sign: false }); - data.append(FixedType { mag: 60, sign: false }); - data.append(FixedType { mag: 61, sign: false }); - data.append(FixedType { mag: 62, sign: false }); - data.append(FixedType { mag: 63, sign: false }); - data.append(FixedType { mag: 64, sign: false }); - data.append(FixedType { mag: 65, sign: false }); - data.append(FixedType { mag: 66, sign: false }); - data.append(FixedType { mag: 67, sign: false }); - data.append(FixedType { mag: 68, sign: false }); - data.append(FixedType { mag: 69, sign: false }); - data.append(FixedType { mag: 70, sign: false }); - data.append(FixedType { mag: 71, sign: false }); - data.append(FixedType { mag: 72, sign: false }); - data.append(FixedType { mag: 73, sign: false }); - data.append(FixedType { mag: 74, sign: false }); - data.append(FixedType { mag: 75, sign: false }); - data.append(FixedType { mag: 76, sign: false }); - data.append(FixedType { mag: 77, sign: false }); - data.append(FixedType { mag: 78, sign: false }); - data.append(FixedType { mag: 79, sign: false }); - data.append(FixedType { mag: 80, sign: false }); + data.append(FP16x16 { mag: 54, sign: false }); + data.append(FP16x16 { mag: 55, sign: false }); + data.append(FP16x16 { mag: 56, sign: false }); + data.append(FP16x16 { mag: 57, sign: false }); + data.append(FP16x16 { mag: 58, sign: false }); + data.append(FP16x16 { mag: 59, sign: false }); + data.append(FP16x16 { mag: 60, sign: false }); + data.append(FP16x16 { mag: 61, sign: false }); + data.append(FP16x16 { mag: 62, sign: false }); + data.append(FP16x16 { mag: 63, sign: false }); + data.append(FP16x16 { mag: 64, sign: false }); + data.append(FP16x16 { mag: 65, sign: false }); + data.append(FP16x16 { mag: 66, sign: false }); + data.append(FP16x16 { mag: 67, sign: false }); + data.append(FP16x16 { mag: 68, sign: false }); + data.append(FP16x16 { mag: 69, sign: false }); + data.append(FP16x16 { mag: 70, sign: false }); + data.append(FP16x16 { mag: 71, sign: false }); + data.append(FP16x16 { mag: 72, sign: false }); + data.append(FP16x16 { mag: 73, sign: false }); + data.append(FP16x16 { mag: 74, sign: false }); + data.append(FP16x16 { mag: 75, sign: false }); + data.append(FP16x16 { mag: 76, sign: false }); + data.append(FP16x16 { mag: 77, sign: false }); + data.append(FP16x16 { mag: 78, sign: false }); + data.append(FP16x16 { mag: 79, sign: false }); + data.append(FP16x16 { mag: 80, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo index 5ee78ec1d..208808045 100644 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo @@ -1,96 +1,97 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(3); shape.append(9); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 27, sign: false }); - data.append(FixedType { mag: 28, sign: false }); - data.append(FixedType { mag: 29, sign: false }); - data.append(FixedType { mag: 54, sign: false }); - data.append(FixedType { mag: 55, sign: false }); - data.append(FixedType { mag: 56, sign: false }); - data.append(FixedType { mag: 3, sign: false }); - data.append(FixedType { mag: 4, sign: false }); - data.append(FixedType { mag: 5, sign: false }); - data.append(FixedType { mag: 30, sign: false }); - data.append(FixedType { mag: 31, sign: false }); - data.append(FixedType { mag: 32, sign: false }); - data.append(FixedType { mag: 57, sign: false }); - data.append(FixedType { mag: 58, sign: false }); - data.append(FixedType { mag: 59, sign: false }); - data.append(FixedType { mag: 6, sign: false }); - data.append(FixedType { mag: 7, sign: false }); - data.append(FixedType { mag: 8, sign: false }); - data.append(FixedType { mag: 33, sign: false }); - data.append(FixedType { mag: 34, sign: false }); - data.append(FixedType { mag: 35, sign: false }); - data.append(FixedType { mag: 60, sign: false }); - data.append(FixedType { mag: 61, sign: false }); - data.append(FixedType { mag: 62, sign: false }); - data.append(FixedType { mag: 9, sign: false }); - data.append(FixedType { mag: 10, sign: false }); - data.append(FixedType { mag: 11, sign: false }); - data.append(FixedType { mag: 36, sign: false }); - data.append(FixedType { mag: 37, sign: false }); - data.append(FixedType { mag: 38, sign: false }); - data.append(FixedType { mag: 63, sign: false }); - data.append(FixedType { mag: 64, sign: false }); - data.append(FixedType { mag: 65, sign: false }); - data.append(FixedType { mag: 12, sign: false }); - data.append(FixedType { mag: 13, sign: false }); - data.append(FixedType { mag: 14, sign: false }); - data.append(FixedType { mag: 39, sign: false }); - data.append(FixedType { mag: 40, sign: false }); - data.append(FixedType { mag: 41, sign: false }); - data.append(FixedType { mag: 66, sign: false }); - data.append(FixedType { mag: 67, sign: false }); - data.append(FixedType { mag: 68, sign: false }); - data.append(FixedType { mag: 15, sign: false }); - data.append(FixedType { mag: 16, sign: false }); - data.append(FixedType { mag: 17, sign: false }); - data.append(FixedType { mag: 42, sign: false }); - data.append(FixedType { mag: 43, sign: false }); - data.append(FixedType { mag: 44, sign: false }); - data.append(FixedType { mag: 69, sign: false }); - data.append(FixedType { mag: 70, sign: false }); - data.append(FixedType { mag: 71, sign: false }); - data.append(FixedType { mag: 18, sign: false }); - data.append(FixedType { mag: 19, sign: false }); - data.append(FixedType { mag: 20, sign: false }); - data.append(FixedType { mag: 45, sign: false }); - data.append(FixedType { mag: 46, sign: false }); - data.append(FixedType { mag: 47, sign: false }); - data.append(FixedType { mag: 72, sign: false }); - data.append(FixedType { mag: 73, sign: false }); - data.append(FixedType { mag: 74, sign: false }); - data.append(FixedType { mag: 21, sign: false }); - data.append(FixedType { mag: 22, sign: false }); - data.append(FixedType { mag: 23, sign: false }); - data.append(FixedType { mag: 48, sign: false }); - data.append(FixedType { mag: 49, sign: false }); - data.append(FixedType { mag: 50, sign: false }); - data.append(FixedType { mag: 75, sign: false }); - data.append(FixedType { mag: 76, sign: false }); - data.append(FixedType { mag: 77, sign: false }); - data.append(FixedType { mag: 24, sign: false }); - data.append(FixedType { mag: 25, sign: false }); - data.append(FixedType { mag: 26, sign: false }); - data.append(FixedType { mag: 51, sign: false }); - data.append(FixedType { mag: 52, sign: false }); - data.append(FixedType { mag: 53, sign: false }); - data.append(FixedType { mag: 78, sign: false }); - data.append(FixedType { mag: 79, sign: false }); - data.append(FixedType { mag: 80, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 27, sign: false }); + data.append(FP16x16 { mag: 28, sign: false }); + data.append(FP16x16 { mag: 29, sign: false }); + data.append(FP16x16 { mag: 54, sign: false }); + data.append(FP16x16 { mag: 55, sign: false }); + data.append(FP16x16 { mag: 56, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); + data.append(FP16x16 { mag: 30, sign: false }); + data.append(FP16x16 { mag: 31, sign: false }); + data.append(FP16x16 { mag: 32, sign: false }); + data.append(FP16x16 { mag: 57, sign: false }); + data.append(FP16x16 { mag: 58, sign: false }); + data.append(FP16x16 { mag: 59, sign: false }); + data.append(FP16x16 { mag: 6, sign: false }); + data.append(FP16x16 { mag: 7, sign: false }); + data.append(FP16x16 { mag: 8, sign: false }); + data.append(FP16x16 { mag: 33, sign: false }); + data.append(FP16x16 { mag: 34, sign: false }); + data.append(FP16x16 { mag: 35, sign: false }); + data.append(FP16x16 { mag: 60, sign: false }); + data.append(FP16x16 { mag: 61, sign: false }); + data.append(FP16x16 { mag: 62, sign: false }); + data.append(FP16x16 { mag: 9, sign: false }); + data.append(FP16x16 { mag: 10, sign: false }); + data.append(FP16x16 { mag: 11, sign: false }); + data.append(FP16x16 { mag: 36, sign: false }); + data.append(FP16x16 { mag: 37, sign: false }); + data.append(FP16x16 { mag: 38, sign: false }); + data.append(FP16x16 { mag: 63, sign: false }); + data.append(FP16x16 { mag: 64, sign: false }); + data.append(FP16x16 { mag: 65, sign: false }); + data.append(FP16x16 { mag: 12, sign: false }); + data.append(FP16x16 { mag: 13, sign: false }); + data.append(FP16x16 { mag: 14, sign: false }); + data.append(FP16x16 { mag: 39, sign: false }); + data.append(FP16x16 { mag: 40, sign: false }); + data.append(FP16x16 { mag: 41, sign: false }); + data.append(FP16x16 { mag: 66, sign: false }); + data.append(FP16x16 { mag: 67, sign: false }); + data.append(FP16x16 { mag: 68, sign: false }); + data.append(FP16x16 { mag: 15, sign: false }); + data.append(FP16x16 { mag: 16, sign: false }); + data.append(FP16x16 { mag: 17, sign: false }); + data.append(FP16x16 { mag: 42, sign: false }); + data.append(FP16x16 { mag: 43, sign: false }); + data.append(FP16x16 { mag: 44, sign: false }); + data.append(FP16x16 { mag: 69, sign: false }); + data.append(FP16x16 { mag: 70, sign: false }); + data.append(FP16x16 { mag: 71, sign: false }); + data.append(FP16x16 { mag: 18, sign: false }); + data.append(FP16x16 { mag: 19, sign: false }); + data.append(FP16x16 { mag: 20, sign: false }); + data.append(FP16x16 { mag: 45, sign: false }); + data.append(FP16x16 { mag: 46, sign: false }); + data.append(FP16x16 { mag: 47, sign: false }); + data.append(FP16x16 { mag: 72, sign: false }); + data.append(FP16x16 { mag: 73, sign: false }); + data.append(FP16x16 { mag: 74, sign: false }); + data.append(FP16x16 { mag: 21, sign: false }); + data.append(FP16x16 { mag: 22, sign: false }); + data.append(FP16x16 { mag: 23, sign: false }); + data.append(FP16x16 { mag: 48, sign: false }); + data.append(FP16x16 { mag: 49, sign: false }); + data.append(FP16x16 { mag: 50, sign: false }); + data.append(FP16x16 { mag: 75, sign: false }); + data.append(FP16x16 { mag: 76, sign: false }); + data.append(FP16x16 { mag: 77, sign: false }); + data.append(FP16x16 { mag: 24, sign: false }); + data.append(FP16x16 { mag: 25, sign: false }); + data.append(FP16x16 { mag: 26, sign: false }); + data.append(FP16x16 { mag: 51, sign: false }); + data.append(FP16x16 { mag: 52, sign: false }); + data.append(FP16x16 { mag: 53, sign: false }); + data.append(FP16x16 { mag: 78, sign: false }); + data.append(FP16x16 { mag: 79, sign: false }); + data.append(FP16x16 { mag: 80, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo index f3cce6fcf..03151988d 100644 --- a/src/tests/nodes/div_fp16x16.cairo +++ b/src/tests/nodes/div_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorDiv}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo index e34d6165b..d0c5334ed 100644 --- a/src/tests/nodes/div_fp16x16_broadcast.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorDiv}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo index 02ce3e12b..f33f37164 100644 --- a/src/tests/nodes/div_fp8x23.cairo +++ b/src/tests/nodes/div_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorDiv}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo index a809c3028..89ec8a686 100644 --- a/src/tests/nodes/div_fp8x23_broadcast.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorDiv}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo index 6a00e793e..09900b5e1 100644 --- a/src/tests/nodes/mul_fp16x16.cairo +++ b/src/tests/nodes/mul_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorMul}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorMul}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo index addeb33b2..938dc81d1 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorMul}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorMul}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo index c42b8f379..c25f97158 100644 --- a/src/tests/nodes/mul_fp8x23.cairo +++ b/src/tests/nodes/mul_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorMul}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorMul}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo index 41587f986..337758b99 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorMul}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorMul}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo index 1a260ce6d..0b26257dd 100644 --- a/src/tests/nodes/reduce_sum_i8_1D.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo index 61b138e63..91472d590 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo @@ -1,16 +1,18 @@ use array::ArrayTrait; + use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo index 4ebd65c07..482737baa 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo @@ -1,14 +1,15 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 3, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo index dbda07838..4d149962c 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo index 095672ea7..b627482d8 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo index 5f1337b2a..768474ce0 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo @@ -1,15 +1,16 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 5, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 5, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo index 640ed9961..5149fd51c 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo index 095672ea7..b627482d8 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo index c3c525aed..0d98a368d 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo @@ -1,15 +1,16 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 4, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo index 317814a83..24d0d34d3 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo @@ -4,8 +4,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo index 095672ea7..b627482d8 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo @@ -1,18 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1, sign: false }); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 3, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 1, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 3, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo index d4ddcaca1..e251549ac 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo @@ -1,16 +1,17 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 2, sign: false }); - data.append(FixedType { mag: 4, sign: false }); + data.append(FP16x16 { mag: 2, sign: false }); + data.append(FP16x16 { mag: 4, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo index 31cf9ca7e..ffe3018af 100644 --- a/src/tests/nodes/sub_fp16x16.cairo +++ b/src/tests/nodes/sub_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorSub}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorSub}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo index b80a003f4..4902c2cbb 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorSub}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorSub}; use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo index ee6eaeeb9..6f3036062 100644 --- a/src/tests/nodes/sub_fp8x23.cairo +++ b/src/tests/nodes/sub_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorSub}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorSub}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo index d74ba5415..8f512acb1 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorSub}; +use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorSub}; use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; use orion::utils::assert_eq; From 711e775733a9bd8b32407dcfa8966366e874ee2f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:25:03 +0300 Subject: [PATCH 077/179] fix add tests --- src/tests/nodes.cairo | 224 ++++++++++---------- src/tests/nodes/add_fp16x16.cairo | 5 +- src/tests/nodes/add_fp16x16_broadcast.cairo | 4 +- src/tests/nodes/add_fp8x23.cairo | 4 +- src/tests/nodes/add_fp8x23_broadcast.cairo | 4 +- src/tests/nodes/add_i32.cairo | 4 +- src/tests/nodes/add_i32_broadcast.cairo | 4 +- src/tests/nodes/add_i8.cairo | 4 +- src/tests/nodes/add_i8_broadcast.cairo | 4 +- src/tests/nodes/add_u32.cairo | 4 +- src/tests/nodes/add_u32_broadcast.cairo | 4 +- 11 files changed, 132 insertions(+), 133 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f073914cc..e20287f39 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -206,118 +206,118 @@ mod reduce_sum_u32_1D; mod reduce_sum_u32_2D_default; mod reduce_sum_u32_2D_keepdims; mod reduce_sum_u32_2D_axis_1; -// mod exp_fp16x16; -// mod exp_fp8x23; -// mod exp_i32_fp8x23; -// mod exp_i32_fp16x16; -// mod exp_i8_fp8x23; -// mod exp_i8_fp16x16; -// mod exp_u32_fp8x23; -// mod exp_u32_fp16x16; -// mod equal_fp16x16; -// mod equal_fp16x16_broadcast; -// mod equal_fp8x23; -// mod equal_fp8x23_broadcast; -// mod equal_i32; -// mod equal_i32_broadcast; -// mod equal_i8; -// mod equal_i8_broadcast; -// mod equal_u32; -// mod equal_u32_broadcast; -// mod greater_fp16x16; -// mod greater_fp16x16_broadcast; -// mod greater_fp8x23; -// mod greater_fp8x23_broadcast; -// mod greater_i32; -// mod greater_i32_broadcast; -// mod greater_i8; -// mod greater_i8_broadcast; -// mod greater_u32; -// mod greater_u32_broadcast; -// mod less_equal_fp16x16; -// mod less_equal_fp16x16_broadcast; -// mod less_equal_fp8x23; -// mod less_equal_fp8x23_broadcast; -// mod less_equal_i32; -// mod less_equal_i32_broadcast; -// mod less_equal_i8; -// mod less_equal_i8_broadcast; -// mod less_equal_u32; -// mod less_equal_u32_broadcast; -// mod sqrt_fp16x16; -// mod sqrt_fp8x23; -// mod sqrt_i32_fp8x23; -// mod sqrt_i32_fp16x16; -// mod sqrt_i8_fp8x23; -// mod sqrt_i8_fp16x16; -// mod sqrt_u32_fp8x23; -// mod sqrt_u32_fp16x16; -// mod or_fp16x16; -// mod or_fp16x16_broadcast; -// mod or_fp8x23; -// mod or_fp8x23_broadcast; -// mod or_i32; -// mod or_i32_broadcast; -// mod or_i8; -// mod or_i8_broadcast; -// mod or_u32; -// mod or_u32_broadcast; -// mod xor_fp16x16; -// mod xor_fp16x16_broadcast; -// mod xor_fp8x23; -// mod xor_fp8x23_broadcast; -// mod xor_i32; -// mod xor_i32_broadcast; -// mod xor_i8; -// mod xor_i8_broadcast; -// mod xor_u32; -// mod xor_u32_broadcast; -// mod matmul_fp16x16_1d; -// mod matmul_fp16x16_2x2; -// mod matmul_fp16x16_2x1; -// mod matmul_fp16x16_1x2; -// mod matmul_fp8x23_1d; -// mod matmul_fp8x23_2x2; -// mod matmul_fp8x23_2x1; -// mod matmul_fp8x23_1x2; -// mod matmul_i32_1d; -// mod matmul_i32_2x2; -// mod matmul_i32_2x1; -// mod matmul_i32_1x2; -// mod matmul_i8_1d; -// mod matmul_i8_2x2; -// mod matmul_i8_2x1; -// mod matmul_i8_1x2; -// mod matmul_u32_1d; -// mod matmul_u32_2x2; -// mod matmul_u32_2x1; -// mod matmul_u32_1x2; -// mod acosh_fp16x16; -// mod acosh_fp8x23; -// mod acosh_i32_fp8x23; -// mod acosh_i32_fp16x16; -// mod acosh_i8_fp8x23; -// mod acosh_i8_fp16x16; -// mod acosh_u32_fp8x23; -// mod acosh_u32_fp16x16; -// mod asinh_fp16x16; -// mod asinh_fp8x23; -// mod asinh_i32_fp8x23; -// mod asinh_i32_fp16x16; -// mod asinh_i8_fp8x23; -// mod asinh_i8_fp16x16; -// mod asinh_u32_fp8x23; -// mod asinh_u32_fp16x16; -// mod add_fp16x16; -// mod add_fp16x16_broadcast; -// mod add_fp8x23; -// mod add_fp8x23_broadcast; -// mod add_i32; -// mod add_i32_broadcast; -// mod add_i8; -// mod add_i8_broadcast; -// mod add_u32; -// mod add_u32_broadcast; +mod exp_fp16x16; +mod exp_fp8x23; +mod exp_i32_fp8x23; +mod exp_i32_fp16x16; +mod exp_i8_fp8x23; +mod exp_i8_fp16x16; +mod exp_u32_fp8x23; +mod exp_u32_fp16x16; +mod equal_fp16x16; +mod equal_fp16x16_broadcast; +mod equal_fp8x23; +mod equal_fp8x23_broadcast; +mod equal_i32; +mod equal_i32_broadcast; +mod equal_i8; +mod equal_i8_broadcast; +mod equal_u32; +mod equal_u32_broadcast; +mod greater_fp16x16; +mod greater_fp16x16_broadcast; +mod greater_fp8x23; +mod greater_fp8x23_broadcast; +mod greater_i32; +mod greater_i32_broadcast; +mod greater_i8; +mod greater_i8_broadcast; +mod greater_u32; +mod greater_u32_broadcast; +mod less_equal_fp16x16; +mod less_equal_fp16x16_broadcast; +mod less_equal_fp8x23; +mod less_equal_fp8x23_broadcast; +mod less_equal_i32; +mod less_equal_i32_broadcast; +mod less_equal_i8; +mod less_equal_i8_broadcast; +mod less_equal_u32; +mod less_equal_u32_broadcast; +mod sqrt_fp16x16; +mod sqrt_fp8x23; +mod sqrt_i32_fp8x23; +mod sqrt_i32_fp16x16; +mod sqrt_i8_fp8x23; +mod sqrt_i8_fp16x16; +mod sqrt_u32_fp8x23; +mod sqrt_u32_fp16x16; +mod or_fp16x16; +mod or_fp16x16_broadcast; +mod or_fp8x23; +mod or_fp8x23_broadcast; +mod or_i32; +mod or_i32_broadcast; +mod or_i8; +mod or_i8_broadcast; +mod or_u32; +mod or_u32_broadcast; +mod xor_fp16x16; +mod xor_fp16x16_broadcast; +mod xor_fp8x23; +mod xor_fp8x23_broadcast; +mod xor_i32; +mod xor_i32_broadcast; +mod xor_i8; +mod xor_i8_broadcast; +mod xor_u32; +mod xor_u32_broadcast; +mod matmul_fp16x16_1d; +mod matmul_fp16x16_2x2; +mod matmul_fp16x16_2x1; +mod matmul_fp16x16_1x2; +mod matmul_fp8x23_1d; +mod matmul_fp8x23_2x2; +mod matmul_fp8x23_2x1; +mod matmul_fp8x23_1x2; +mod matmul_i32_1d; +mod matmul_i32_2x2; +mod matmul_i32_2x1; +mod matmul_i32_1x2; +mod matmul_i8_1d; +mod matmul_i8_2x2; +mod matmul_i8_2x1; +mod matmul_i8_1x2; +mod matmul_u32_1d; +mod matmul_u32_2x2; +mod matmul_u32_2x1; +mod matmul_u32_1x2; +mod acosh_fp16x16; +mod acosh_fp8x23; +mod acosh_i32_fp8x23; +mod acosh_i32_fp16x16; +mod acosh_i8_fp8x23; +mod acosh_i8_fp16x16; +mod acosh_u32_fp8x23; +mod acosh_u32_fp16x16; +mod asinh_fp16x16; +mod asinh_fp8x23; +mod asinh_i32_fp8x23; +mod asinh_i32_fp16x16; +mod asinh_i8_fp8x23; +mod asinh_i8_fp16x16; +mod asinh_u32_fp8x23; +mod asinh_u32_fp16x16; +mod add_fp16x16; +mod add_fp16x16_broadcast; +mod add_fp8x23; +mod add_fp8x23_broadcast; +mod add_i32; +mod add_i32_broadcast; +mod add_i8; +mod add_i8_broadcast; +mod add_u32; +mod add_u32_broadcast; // mod sub_fp16x16; // mod sub_fp16x16_broadcast; // mod sub_fp8x23; diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo index 1933396d2..431877f06 100644 --- a/src/tests/nodes/add_fp16x16.cairo +++ b/src/tests/nodes/add_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod input_1; mod output_0; - use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo index 2767e2d54..6956a73fc 100644 --- a/src/tests/nodes/add_fp16x16_broadcast.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo index 9af5c58ef..6cef78b83 100644 --- a/src/tests/nodes/add_fp8x23.cairo +++ b/src/tests/nodes/add_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo index e6f0d7fc5..18441d6f0 100644 --- a/src/tests/nodes/add_fp8x23_broadcast.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_i32.cairo b/src/tests/nodes/add_i32.cairo index ca1a261ec..7ac3e7c1f 100644 --- a/src/tests/nodes/add_i32.cairo +++ b/src/tests/nodes/add_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_i32_broadcast.cairo b/src/tests/nodes/add_i32_broadcast.cairo index a458985b0..cfe007309 100644 --- a/src/tests/nodes/add_i32_broadcast.cairo +++ b/src/tests/nodes/add_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_i8.cairo b/src/tests/nodes/add_i8.cairo index eace999a5..fa7dbd131 100644 --- a/src/tests/nodes/add_i8.cairo +++ b/src/tests/nodes/add_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_i8_broadcast.cairo b/src/tests/nodes/add_i8_broadcast.cairo index f448e5612..156c401f7 100644 --- a/src/tests/nodes/add_i8_broadcast.cairo +++ b/src/tests/nodes/add_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_u32.cairo b/src/tests/nodes/add_u32.cairo index c84223cf3..195a158ea 100644 --- a/src/tests/nodes/add_u32.cairo +++ b/src/tests/nodes/add_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_u32_broadcast.cairo b/src/tests/nodes/add_u32_broadcast.cairo index 5db2c7af1..24752ac2b 100644 --- a/src/tests/nodes/add_u32_broadcast.cairo +++ b/src/tests/nodes/add_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorAdd}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] From 08bbf0a1e58a03763e7ce6213af1aaf41b757fcb Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:30:17 +0300 Subject: [PATCH 078/179] fix sub tests --- src/tests/nodes.cairo | 20 ++++++++++---------- src/tests/nodes/sub_fp16x16.cairo | 4 ++-- src/tests/nodes/sub_fp16x16_broadcast.cairo | 4 ++-- src/tests/nodes/sub_fp8x23.cairo | 4 ++-- src/tests/nodes/sub_fp8x23_broadcast.cairo | 10 +++++----- src/tests/nodes/sub_i32.cairo | 4 ++-- src/tests/nodes/sub_i32_broadcast.cairo | 4 ++-- src/tests/nodes/sub_i8.cairo | 4 ++-- src/tests/nodes/sub_i8_broadcast.cairo | 10 +++++----- src/tests/nodes/sub_u32.cairo | 12 +++++++----- src/tests/nodes/sub_u32_broadcast.cairo | 12 +++++++----- 11 files changed, 46 insertions(+), 42 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index e20287f39..96543f62c 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -318,16 +318,16 @@ mod add_i8; mod add_i8_broadcast; mod add_u32; mod add_u32_broadcast; -// mod sub_fp16x16; -// mod sub_fp16x16_broadcast; -// mod sub_fp8x23; -// mod sub_fp8x23_broadcast; -// mod sub_i32; -// mod sub_i32_broadcast; -// mod sub_i8; -// mod sub_i8_broadcast; -// mod sub_u32; -// mod sub_u32_broadcast; +mod sub_fp16x16; +mod sub_fp16x16_broadcast; +mod sub_fp8x23; +mod sub_fp8x23_broadcast; +mod sub_i32; +mod sub_i32_broadcast; +mod sub_i8; +mod sub_i8_broadcast; +mod sub_u32; +mod sub_u32_broadcast; // mod mul_fp16x16; // mod mul_fp16x16_broadcast; // mod mul_fp8x23; diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo index ffe3018af..701be515a 100644 --- a/src/tests/nodes/sub_fp16x16.cairo +++ b/src/tests/nodes/sub_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo index 4902c2cbb..9b45175e1 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo index 6f3036062..31ec74fa7 100644 --- a/src/tests/nodes/sub_fp8x23.cairo +++ b/src/tests/nodes/sub_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo index 8f512acb1..2eb5027c8 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_i32.cairo b/src/tests/nodes/sub_i32.cairo index ae21e669d..214a5b9c5 100644 --- a/src/tests/nodes/sub_i32.cairo +++ b/src/tests/nodes/sub_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_i32_broadcast.cairo b/src/tests/nodes/sub_i32_broadcast.cairo index c226e74cb..c3b2e0826 100644 --- a/src/tests/nodes/sub_i32_broadcast.cairo +++ b/src/tests/nodes/sub_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_i8.cairo b/src/tests/nodes/sub_i8.cairo index 256cf2705..4077c0c94 100644 --- a/src/tests/nodes/sub_i8.cairo +++ b/src/tests/nodes/sub_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_i8_broadcast.cairo b/src/tests/nodes/sub_i8_broadcast.cairo index a7f9ef56d..94d70cb85 100644 --- a/src/tests/nodes/sub_i8_broadcast.cairo +++ b/src/tests/nodes/sub_i8_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_u32.cairo b/src/tests/nodes/sub_u32.cairo index c1680a309..4e4dfeda2 100644 --- a/src/tests/nodes/sub_u32.cairo +++ b/src/tests/nodes/sub_u32.cairo @@ -1,12 +1,14 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ + Tensor_i32_fp16x16, u32TensorSub +}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_u32_broadcast.cairo b/src/tests/nodes/sub_u32_broadcast.cairo index ee04a19f7..a5ce30873 100644 --- a/src/tests/nodes/sub_u32_broadcast.cairo +++ b/src/tests/nodes/sub_u32_broadcast.cairo @@ -1,12 +1,14 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorSub}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ + Tensor_i32_fp16x16, u32TensorSub +}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] From 56d3be422028c042de9efc246405e2ef82b3a0d0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:34:38 +0300 Subject: [PATCH 079/179] fix tensor mul tests --- src/tests/nodes.cairo | 20 ++++++++++---------- src/tests/nodes/mul_fp16x16.cairo | 4 ++-- src/tests/nodes/mul_fp16x16_broadcast.cairo | 4 ++-- src/tests/nodes/mul_fp8x23.cairo | 4 ++-- src/tests/nodes/mul_fp8x23_broadcast.cairo | 4 ++-- src/tests/nodes/mul_i32.cairo | 4 ++-- src/tests/nodes/mul_i32_broadcast.cairo | 5 +++-- src/tests/nodes/mul_i8.cairo | 5 +++-- src/tests/nodes/mul_i8_broadcast.cairo | 4 ++-- src/tests/nodes/mul_u32.cairo | 4 ++-- src/tests/nodes/mul_u32_broadcast.cairo | 4 ++-- 11 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 96543f62c..33e172047 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -328,16 +328,16 @@ mod sub_i8; mod sub_i8_broadcast; mod sub_u32; mod sub_u32_broadcast; -// mod mul_fp16x16; -// mod mul_fp16x16_broadcast; -// mod mul_fp8x23; -// mod mul_fp8x23_broadcast; -// mod mul_i32; -// mod mul_i32_broadcast; -// mod mul_i8; -// mod mul_i8_broadcast; -// mod mul_u32; -// mod mul_u32_broadcast; +mod mul_fp16x16; +mod mul_fp16x16_broadcast; +mod mul_fp8x23; +mod mul_fp8x23_broadcast; +mod mul_i32; +mod mul_i32_broadcast; +mod mul_i8; +mod mul_i8_broadcast; +mod mul_u32; +mod mul_u32_broadcast; // mod div_fp16x16; // mod div_fp16x16_broadcast; // mod div_fp8x23; diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo index 09900b5e1..a5af760e3 100644 --- a/src/tests/nodes/mul_fp16x16.cairo +++ b/src/tests/nodes/mul_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo index 938dc81d1..f02393f63 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo index c25f97158..3c5f8bdd4 100644 --- a/src/tests/nodes/mul_fp8x23.cairo +++ b/src/tests/nodes/mul_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo index 337758b99..95b2db23b 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_i32.cairo b/src/tests/nodes/mul_i32.cairo index 4725c4837..ae1c81d32 100644 --- a/src/tests/nodes/mul_i32.cairo +++ b/src/tests/nodes/mul_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_i32_broadcast.cairo b/src/tests/nodes/mul_i32_broadcast.cairo index 8c011b7cb..fc928cd3d 100644 --- a/src/tests/nodes/mul_i32_broadcast.cairo +++ b/src/tests/nodes/mul_i32_broadcast.cairo @@ -5,10 +5,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_mul_i32_broadcast() { diff --git a/src/tests/nodes/mul_i8.cairo b/src/tests/nodes/mul_i8.cairo index d49cbf7a8..cfc4cc58e 100644 --- a/src/tests/nodes/mul_i8.cairo +++ b/src/tests/nodes/mul_i8.cairo @@ -5,10 +5,11 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_mul_i8() { diff --git a/src/tests/nodes/mul_i8_broadcast.cairo b/src/tests/nodes/mul_i8_broadcast.cairo index 7d8f13394..713a9ec0b 100644 --- a/src/tests/nodes/mul_i8_broadcast.cairo +++ b/src/tests/nodes/mul_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_u32.cairo b/src/tests/nodes/mul_u32.cairo index 723491103..a61137a71 100644 --- a/src/tests/nodes/mul_u32.cairo +++ b/src/tests/nodes/mul_u32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_u32_broadcast.cairo b/src/tests/nodes/mul_u32_broadcast.cairo index a954a8cbd..470ca1566 100644 --- a/src/tests/nodes/mul_u32_broadcast.cairo +++ b/src/tests/nodes/mul_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorMul}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] From 7139e7f78471549d25efb57aca5558884f703fe3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:39:09 +0300 Subject: [PATCH 080/179] fix tensor div --- src/tests/nodes.cairo | 20 ++++++++++---------- src/tests/nodes/div_fp16x16.cairo | 4 ++-- src/tests/nodes/div_fp16x16_broadcast.cairo | 4 ++-- src/tests/nodes/div_fp8x23.cairo | 4 ++-- src/tests/nodes/div_fp8x23_broadcast.cairo | 12 ++++++------ src/tests/nodes/div_i32.cairo | 4 ++-- src/tests/nodes/div_i32_broadcast.cairo | 4 ++-- src/tests/nodes/div_i8.cairo | 4 ++-- src/tests/nodes/div_i8_broadcast.cairo | 4 ++-- src/tests/nodes/div_u32.cairo | 9 ++++++--- src/tests/nodes/div_u32_broadcast.cairo | 4 ++-- 11 files changed, 38 insertions(+), 35 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 33e172047..a89c0c1d1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -338,16 +338,16 @@ mod mul_i8; mod mul_i8_broadcast; mod mul_u32; mod mul_u32_broadcast; -// mod div_fp16x16; -// mod div_fp16x16_broadcast; -// mod div_fp8x23; -// mod div_fp8x23_broadcast; -// mod div_i32; -// mod div_i32_broadcast; -// mod div_i8; -// mod div_i8_broadcast; -// mod div_u32; -// mod div_u32_broadcast; +mod div_fp16x16; +mod div_fp16x16_broadcast; +mod div_fp8x23; +mod div_fp8x23_broadcast; +mod div_i32; +mod div_i32_broadcast; +mod div_i8; +mod div_i8_broadcast; +mod div_u32; +mod div_u32_broadcast; // mod leaky_relu_fp16x16; // mod leaky_relu_fp8x23; // mod leaky_relu_i32_fp8x23; diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo index 03151988d..4421155ff 100644 --- a/src/tests/nodes/div_fp16x16.cairo +++ b/src/tests/nodes/div_fp16x16.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo index d0c5334ed..767641aa3 100644 --- a/src/tests/nodes/div_fp16x16_broadcast.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo index f33f37164..293f65d9e 100644 --- a/src/tests/nodes/div_fp8x23.cairo +++ b/src/tests/nodes/div_fp8x23.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo index 89ec8a686..ea6394676 100644 --- a/src/tests/nodes/div_fp8x23_broadcast.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_fp8x23_broadcast() { let y = input_0 / input_1; assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/div_i32.cairo b/src/tests/nodes/div_i32.cairo index 3886e83f0..914589b08 100644 --- a/src/tests/nodes/div_i32.cairo +++ b/src/tests/nodes/div_i32.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_i32_broadcast.cairo b/src/tests/nodes/div_i32_broadcast.cairo index 9f8d6af8e..1c7616d48 100644 --- a/src/tests/nodes/div_i32_broadcast.cairo +++ b/src/tests/nodes/div_i32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_i8.cairo b/src/tests/nodes/div_i8.cairo index 36a86b3be..44ebb02c2 100644 --- a/src/tests/nodes/div_i8.cairo +++ b/src/tests/nodes/div_i8.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_i8_broadcast.cairo b/src/tests/nodes/div_i8_broadcast.cairo index f264c5ed5..8371bfc94 100644 --- a/src/tests/nodes/div_i8_broadcast.cairo +++ b/src/tests/nodes/div_i8_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_u32.cairo b/src/tests/nodes/div_u32.cairo index 8b4dc4573..691cf627c 100644 --- a/src/tests/nodes/div_u32.cairo +++ b/src/tests/nodes/div_u32.cairo @@ -5,10 +5,13 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ + Tensor_u32_fp16x16, u32TensorDiv +}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_div_u32() { @@ -19,4 +22,4 @@ fn test_div_u32() { let y = input_0 / input_1; assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/div_u32_broadcast.cairo b/src/tests/nodes/div_u32_broadcast.cairo index 8851264a1..8583a9c10 100644 --- a/src/tests/nodes/div_u32_broadcast.cairo +++ b/src/tests/nodes/div_u32_broadcast.cairo @@ -5,8 +5,8 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32, u32TensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorDiv}; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] From bc212a9d845fb5e1c47b8ba3cde67f7d76c21ea1 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:51:57 +0300 Subject: [PATCH 081/179] fix leaky relu tests --- src/tests/nodes.cairo | 12 ++++++------ src/tests/nodes/leaky_relu_fp16x16.cairo | 4 ++-- src/tests/nodes/leaky_relu_fp8x23.cairo | 4 ++-- src/tests/nodes/leaky_relu_i32_fp16x16.cairo | 5 ++--- src/tests/nodes/leaky_relu_i32_fp8x23.cairo | 5 ++--- src/tests/nodes/leaky_relu_i8_fp16x16.cairo | 11 +++++------ .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 14 +++++++------- src/tests/nodes/leaky_relu_i8_fp8x23.cairo | 5 +++-- src/tests/nodes/linear_fp16x16.cairo | 4 ++-- src/tests/nodes/linear_fp8x23.cairo | 4 ++-- src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo | 4 ++-- src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo | 4 ++-- src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo | 4 ++-- src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo | 4 ++-- .../nodes/logsoftmax_i32_fp16x16_axis_0.cairo | 6 ++---- .../nodes/logsoftmax_i32_fp16x16_axis_1.cairo | 6 ++---- src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo | 5 ++--- src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo | 5 ++--- src/tests/nodes/relu_fp16x16.cairo | 4 ++-- src/tests/nodes/relu_fp8x23.cairo | 4 ++-- src/tests/nodes/sigmoid_fp16x16.cairo | 4 ++-- src/tests/nodes/sigmoid_fp8x23.cairo | 4 ++-- src/tests/nodes/sigmoid_i32_fp16x16.cairo | 6 ++---- src/tests/nodes/sigmoid_i32_fp8x23.cairo | 5 ++--- src/tests/nodes/softmax_fp16x16.cairo | 4 ++-- src/tests/nodes/softmax_fp8x23.cairo | 4 ++-- src/tests/nodes/softmax_i32_fp16x16.cairo | 6 ++---- src/tests/nodes/softmax_i32_fp8x23.cairo | 5 ++--- src/tests/nodes/softplus_fp16x16.cairo | 4 ++-- src/tests/nodes/softplus_fp8x23.cairo | 4 ++-- src/tests/nodes/softplus_i32_fp16x16.cairo | 6 ++---- src/tests/nodes/softplus_i32_fp8x23.cairo | 5 ++--- src/tests/nodes/softsign_fp16x16.cairo | 4 ++-- src/tests/nodes/softsign_fp8x23.cairo | 4 ++-- src/tests/nodes/softsign_i32_fp16x16.cairo | 6 ++---- src/tests/nodes/softsign_i32_fp8x23.cairo | 5 ++--- 36 files changed, 85 insertions(+), 105 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index a89c0c1d1..6efdf2c83 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -348,12 +348,12 @@ mod div_i8; mod div_i8_broadcast; mod div_u32; mod div_u32_broadcast; -// mod leaky_relu_fp16x16; -// mod leaky_relu_fp8x23; -// mod leaky_relu_i32_fp8x23; -// mod leaky_relu_i32_fp16x16; -// mod leaky_relu_i8_fp8x23; -// mod leaky_relu_i8_fp16x16; +mod leaky_relu_fp16x16; +mod leaky_relu_fp8x23; +mod leaky_relu_i32_fp8x23; +mod leaky_relu_i32_fp16x16; +mod leaky_relu_i8_fp8x23; +mod leaky_relu_i8_fp16x16; // mod linear_fp16x16; // mod linear_fp8x23; // mod linear_i32; diff --git a/src/tests/nodes/leaky_relu_fp16x16.cairo b/src/tests/nodes/leaky_relu_fp16x16.cairo index eb9077405..4487592f8 100644 --- a/src/tests/nodes/leaky_relu_fp16x16.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_fp8x23.cairo b/src/tests/nodes/leaky_relu_fp8x23.cairo index e31922753..cf2334fb7 100644 --- a/src/tests/nodes/leaky_relu_fp8x23.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16.cairo index 5ab5e37d4..d60811b3c 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23.cairo index 6c6bb3b43..4d898c37b 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16.cairo index 5c2ad32ab..f3db0aa60 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16.cairo @@ -1,12 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +17,4 @@ fn test_leaky_relu_i8_fp16x16() { let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo index 03aa6f872..445c26e86 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo @@ -1,19 +1,19 @@ use array::ArrayTrait; use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::numbers::{i8, FP16x16}; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 2, sign: false }); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23.cairo index ff5f3dee3..d019a20f1 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23.cairo @@ -4,11 +4,12 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_leaky_relu_i8_fp8x23() { diff --git a/src/tests/nodes/linear_fp16x16.cairo b/src/tests/nodes/linear_fp16x16.cairo index 70dfb0ecf..0726b2015 100644 --- a/src/tests/nodes/linear_fp16x16.cairo +++ b/src/tests/nodes/linear_fp16x16.cairo @@ -6,9 +6,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_fp8x23.cairo b/src/tests/nodes/linear_fp8x23.cairo index 619ee0bbe..903828561 100644 --- a/src/tests/nodes/linear_fp8x23.cairo +++ b/src/tests/nodes/linear_fp8x23.cairo @@ -6,9 +6,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo index c04e2476b..b6b7493f3 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo index 76a403a3a..6568d26fc 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo index 57d0e731d..3a6d301f8 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo index 00cdca872..b68a9a0ea 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo index aa32e1c18..06627d01f 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_logsoftmax_i32_fp16x16_axis_0() { diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo index a6df42bca..228e76326 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_logsoftmax_i32_fp16x16_axis_1() { diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo index 5fa8a76a1..8959640df 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo index b2e84d218..3b2abfa33 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_fp16x16.cairo b/src/tests/nodes/relu_fp16x16.cairo index 47b9d002f..2ffcb34d5 100644 --- a/src/tests/nodes/relu_fp16x16.cairo +++ b/src/tests/nodes/relu_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_fp8x23.cairo b/src/tests/nodes/relu_fp8x23.cairo index 2fb24d946..217ce23c8 100644 --- a/src/tests/nodes/relu_fp8x23.cairo +++ b/src/tests/nodes/relu_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_fp16x16.cairo b/src/tests/nodes/sigmoid_fp16x16.cairo index 5d351874f..12835e44f 100644 --- a/src/tests/nodes/sigmoid_fp16x16.cairo +++ b/src/tests/nodes/sigmoid_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_fp8x23.cairo b/src/tests/nodes/sigmoid_fp8x23.cairo index bf07b40d5..25cf33e3f 100644 --- a/src/tests/nodes/sigmoid_fp8x23.cairo +++ b/src/tests/nodes/sigmoid_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_i32_fp16x16.cairo b/src/tests/nodes/sigmoid_i32_fp16x16.cairo index 13b922307..5db6c853d 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_sigmoid_i32_fp16x16() { diff --git a/src/tests/nodes/sigmoid_i32_fp8x23.cairo b/src/tests/nodes/sigmoid_i32_fp8x23.cairo index fd508e706..b99620ea5 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_fp16x16.cairo b/src/tests/nodes/softmax_fp16x16.cairo index 3d6666487..75d37d47a 100644 --- a/src/tests/nodes/softmax_fp16x16.cairo +++ b/src/tests/nodes/softmax_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_fp8x23.cairo b/src/tests/nodes/softmax_fp8x23.cairo index 05208c493..43fcd5451 100644 --- a/src/tests/nodes/softmax_fp8x23.cairo +++ b/src/tests/nodes/softmax_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_i32_fp16x16.cairo b/src/tests/nodes/softmax_i32_fp16x16.cairo index 1126b9ce3..562aa7184 100644 --- a/src/tests/nodes/softmax_i32_fp16x16.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_softmax_i32_fp16x16() { diff --git a/src/tests/nodes/softmax_i32_fp8x23.cairo b/src/tests/nodes/softmax_i32_fp8x23.cairo index 127a6e410..1cebfac1f 100644 --- a/src/tests/nodes/softmax_i32_fp8x23.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_fp16x16.cairo b/src/tests/nodes/softplus_fp16x16.cairo index 00c9b8cb9..08f247238 100644 --- a/src/tests/nodes/softplus_fp16x16.cairo +++ b/src/tests/nodes/softplus_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_fp8x23.cairo b/src/tests/nodes/softplus_fp8x23.cairo index 616de295f..14f8c7cfd 100644 --- a/src/tests/nodes/softplus_fp8x23.cairo +++ b/src/tests/nodes/softplus_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_i32_fp16x16.cairo b/src/tests/nodes/softplus_i32_fp16x16.cairo index a481b52c6..f6a6e6d8a 100644 --- a/src/tests/nodes/softplus_i32_fp16x16.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_softplus_i32_fp16x16() { diff --git a/src/tests/nodes/softplus_i32_fp8x23.cairo b/src/tests/nodes/softplus_i32_fp8x23.cairo index 725bb1e06..c8bd283ce 100644 --- a/src/tests/nodes/softplus_i32_fp8x23.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_fp16x16.cairo b/src/tests/nodes/softsign_fp16x16.cairo index 576169a02..73955b5d7 100644 --- a/src/tests/nodes/softsign_fp16x16.cairo +++ b/src/tests/nodes/softsign_fp16x16.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_fp8x23.cairo b/src/tests/nodes/softsign_fp8x23.cairo index 97d2aea3e..2b39f1bd2 100644 --- a/src/tests/nodes/softsign_fp8x23.cairo +++ b/src/tests/nodes/softsign_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_fp::NN_fp; +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_i32_fp16x16.cairo b/src/tests/nodes/softsign_i32_fp16x16.cairo index d5df87c92..11f1d313c 100644 --- a/src/tests/nodes/softsign_i32_fp16x16.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16.cairo @@ -4,11 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_softsign_i32_fp16x16() { diff --git a/src/tests/nodes/softsign_i32_fp8x23.cairo b/src/tests/nodes/softsign_i32_fp8x23.cairo index 8f39d23a7..ffbd7a83b 100644 --- a/src/tests/nodes/softsign_i32_fp8x23.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] From c29095618a3bd19e36d3c61188bcd80360bdb0eb Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 14:55:36 +0300 Subject: [PATCH 082/179] fix linear layer tests --- src/tests/nodes.cairo | 42 ++++++++++++++++---------------- src/tests/nodes/linear_i32.cairo | 5 ++-- src/tests/nodes/linear_i8.cairo | 5 ++-- src/tests/nodes/linear_u32.cairo | 6 ++--- src/tests/nodes/relu_i32.cairo | 5 ++-- src/tests/nodes/relu_i8.cairo | 5 ++-- 6 files changed, 31 insertions(+), 37 deletions(-) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 6efdf2c83..f5238af89 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -354,27 +354,27 @@ mod leaky_relu_i32_fp8x23; mod leaky_relu_i32_fp16x16; mod leaky_relu_i8_fp8x23; mod leaky_relu_i8_fp16x16; -// mod linear_fp16x16; -// mod linear_fp8x23; -// mod linear_i32; -// mod linear_i8; -// mod linear_u32; -// mod logsoftmax_fp16x16_axis_0; -// mod logsoftmax_fp16x16_axis_1; -// mod logsoftmax_fp8x23_axis_0; -// mod logsoftmax_fp8x23_axis_1; -// mod logsoftmax_i32_fp8x23_axis_0; -// mod logsoftmax_i32_fp8x23_axis_1; -// mod logsoftmax_i32_fp16x16_axis_0; -// mod logsoftmax_i32_fp16x16_axis_1; -// mod logsoftmax_i8_fp8x23_axis_0; -// mod logsoftmax_i8_fp8x23_axis_1; -// mod logsoftmax_i8_fp16x16_axis_0; -// mod logsoftmax_i8_fp16x16_axis_1; -// mod logsoftmax_u32_fp8x23_axis_0; -// mod logsoftmax_u32_fp8x23_axis_1; -// mod logsoftmax_u32_fp16x16_axis_0; -// mod logsoftmax_u32_fp16x16_axis_1; +mod linear_fp16x16; +mod linear_fp8x23; +mod linear_i32; +mod linear_i8; +mod linear_u32; +mod logsoftmax_fp16x16_axis_0; +mod logsoftmax_fp16x16_axis_1; +mod logsoftmax_fp8x23_axis_0; +mod logsoftmax_fp8x23_axis_1; +mod logsoftmax_i32_fp8x23_axis_0; +mod logsoftmax_i32_fp8x23_axis_1; +mod logsoftmax_i32_fp16x16_axis_0; +mod logsoftmax_i32_fp16x16_axis_1; +mod logsoftmax_i8_fp8x23_axis_0; +mod logsoftmax_i8_fp8x23_axis_1; +mod logsoftmax_i8_fp16x16_axis_0; +mod logsoftmax_i8_fp16x16_axis_1; +mod logsoftmax_u32_fp8x23_axis_0; +mod logsoftmax_u32_fp8x23_axis_1; +mod logsoftmax_u32_fp16x16_axis_0; +mod logsoftmax_u32_fp16x16_axis_1; // mod relu_fp16x16; // mod relu_fp8x23; // mod relu_i32; diff --git a/src/tests/nodes/linear_i32.cairo b/src/tests/nodes/linear_i32.cairo index 7e3ca8c88..d32135be7 100644 --- a/src/tests/nodes/linear_i32.cairo +++ b/src/tests/nodes/linear_i32.cairo @@ -6,9 +6,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_i8.cairo b/src/tests/nodes/linear_i8.cairo index 94cb1f96c..832141470 100644 --- a/src/tests/nodes/linear_i8.cairo +++ b/src/tests/nodes/linear_i8.cairo @@ -6,9 +6,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_u32.cairo b/src/tests/nodes/linear_u32.cairo index 91e47e715..a5ada4f83 100644 --- a/src/tests/nodes/linear_u32.cairo +++ b/src/tests/nodes/linear_u32.cairo @@ -3,12 +3,10 @@ mod input_1; mod input_2; mod output_0; - use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_i32.cairo b/src/tests/nodes/relu_i32.cairo index d947fcb3d..a8e941f40 100644 --- a/src/tests/nodes/relu_i32.cairo +++ b/src/tests/nodes/relu_i32.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_i8.cairo b/src/tests/nodes/relu_i8.cairo index 2f535777e..087b6bac1 100644 --- a/src/tests/nodes/relu_i8.cairo +++ b/src/tests/nodes/relu_i8.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; use orion::utils::assert_eq; #[test] From 3e4b31b779228ee7ea91b3dd54d5dc3b4f21f7c2 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 15:00:31 +0300 Subject: [PATCH 083/179] fix logsoftmax tests --- src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo | 5 ++--- src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo | 5 ++--- src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo | 4 ++-- src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo | 4 ++-- src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo | 6 +++--- src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo | 5 ++--- src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo | 5 ++--- src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo | 5 ++--- src/tests/nodes/sigmoid_i8_fp16x16.cairo | 5 ++--- src/tests/nodes/sigmoid_i8_fp8x23.cairo | 4 ++-- src/tests/nodes/sigmoid_u32_fp16x16.cairo | 5 ++--- src/tests/nodes/sigmoid_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/softmax_i8_fp16x16.cairo | 5 ++--- src/tests/nodes/softmax_i8_fp8x23.cairo | 4 ++-- src/tests/nodes/softmax_u32_fp16x16.cairo | 5 ++--- src/tests/nodes/softmax_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/softplus_i8_fp16x16.cairo | 5 ++--- src/tests/nodes/softplus_i8_fp8x23.cairo | 4 ++-- src/tests/nodes/softplus_u32_fp16x16.cairo | 5 ++--- src/tests/nodes/softplus_u32_fp8x23.cairo | 5 ++--- src/tests/nodes/softsign_i8_fp16x16.cairo | 5 ++--- src/tests/nodes/softsign_i8_fp8x23.cairo | 4 ++-- src/tests/nodes/softsign_u32_fp16x16.cairo | 5 ++--- src/tests/nodes/softsign_u32_fp8x23.cairo | 5 ++--- 24 files changed, 49 insertions(+), 66 deletions(-) diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo index bb252df0f..f3b20da9c 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo index 2e8dd74af..b2e77797b 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo index 6525caa26..ce7d4da01 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo index 4aac09b2a..a5a53f329 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo index 196c45b69..b4d650ba9 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo @@ -3,12 +3,12 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; + #[test] #[available_gas(2000000000)] fn test_logsoftmax_u32_fp16x16_axis_0() { diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo index c683128e1..3ce6c3d95 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo index 2defbcdbf..9462d37e6 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo index a0dd259e0..40099d6b9 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_i8_fp16x16.cairo b/src/tests/nodes/sigmoid_i8_fp16x16.cairo index 19eee3e83..38629388a 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_i8_fp8x23.cairo b/src/tests/nodes/sigmoid_i8_fp8x23.cairo index f8cbda853..7f46e589d 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_u32_fp16x16.cairo b/src/tests/nodes/sigmoid_u32_fp16x16.cairo index 8dc1d5b09..e3baabf94 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_u32_fp8x23.cairo b/src/tests/nodes/sigmoid_u32_fp8x23.cairo index c5264b63d..34db8bad6 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_i8_fp16x16.cairo b/src/tests/nodes/softmax_i8_fp16x16.cairo index e5141f73c..65e01f9ee 100644 --- a/src/tests/nodes/softmax_i8_fp16x16.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_i8_fp8x23.cairo b/src/tests/nodes/softmax_i8_fp8x23.cairo index 8adc744ea..8d959ab33 100644 --- a/src/tests/nodes/softmax_i8_fp8x23.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_u32_fp16x16.cairo b/src/tests/nodes/softmax_u32_fp16x16.cairo index f7692123c..83089c6a5 100644 --- a/src/tests/nodes/softmax_u32_fp16x16.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_u32_fp8x23.cairo b/src/tests/nodes/softmax_u32_fp8x23.cairo index e530b12ec..0ea4e4595 100644 --- a/src/tests/nodes/softmax_u32_fp8x23.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_i8_fp16x16.cairo b/src/tests/nodes/softplus_i8_fp16x16.cairo index b2d17f645..a6dd6fa03 100644 --- a/src/tests/nodes/softplus_i8_fp16x16.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_i8_fp8x23.cairo b/src/tests/nodes/softplus_i8_fp8x23.cairo index 822f6aa53..1e120a98c 100644 --- a/src/tests/nodes/softplus_i8_fp8x23.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_u32_fp16x16.cairo b/src/tests/nodes/softplus_u32_fp16x16.cairo index bd8788cb2..280fb82bc 100644 --- a/src/tests/nodes/softplus_u32_fp16x16.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_u32_fp8x23.cairo b/src/tests/nodes/softplus_u32_fp8x23.cairo index 18bfadcfb..792bcb222 100644 --- a/src/tests/nodes/softplus_u32_fp8x23.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_i8_fp16x16.cairo b/src/tests/nodes/softsign_i8_fp16x16.cairo index a1d9db3ba..cd228c1bc 100644 --- a/src/tests/nodes/softsign_i8_fp16x16.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16.cairo @@ -4,9 +4,8 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_i8_fp8x23.cairo b/src/tests/nodes/softsign_i8_fp8x23.cairo index cfe9e3ff0..57b76899b 100644 --- a/src/tests/nodes/softsign_i8_fp8x23.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23.cairo @@ -4,9 +4,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_i8::NN_i8; +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_u32_fp16x16.cairo b/src/tests/nodes/softsign_u32_fp16x16.cairo index 9f306160c..fd84ba502 100644 --- a/src/tests/nodes/softsign_u32_fp16x16.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_u32_fp8x23.cairo b/src/tests/nodes/softsign_u32_fp8x23.cairo index 3f768b0d8..7aa28881d 100644 --- a/src/tests/nodes/softsign_u32_fp8x23.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23.cairo @@ -3,10 +3,9 @@ mod output_0; use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::impl_nn_u32::NN_u32; +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] From 87ae5a941bd0491f67f376a2a075ee2d238e736a Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 15:09:39 +0300 Subject: [PATCH 084/179] fixed concat tests --- src/tests/nodes.cairo | 151 +++++++++--------- src/tests/nodes/concat_i8_1d.cairo | 22 --- src/tests/nodes/concat_i8_1d/input_0.cairo | 18 --- src/tests/nodes/concat_i8_1d/input_1.cairo | 18 --- src/tests/nodes/concat_i8_1d/output_0.cairo | 21 --- src/tests/nodes/concat_i8_2d.cairo | 22 --- src/tests/nodes/concat_i8_2d/input_0.cairo | 20 --- src/tests/nodes/concat_i8_2d/input_1.cairo | 20 --- src/tests/nodes/concat_i8_2d/output_0.cairo | 24 --- src/tests/nodes/concat_i8_3d_axis_1.cairo | 22 --- .../nodes/concat_i8_3d_axis_1/input_0.cairo | 44 ----- .../nodes/concat_i8_3d_axis_1/input_1.cairo | 44 ----- .../nodes/concat_i8_3d_axis_1/output_0.cairo | 71 -------- src/tests/nodes/concat_i8_3d_axis_2.cairo | 22 --- .../nodes/concat_i8_3d_axis_2/input_0.cairo | 44 ----- .../nodes/concat_i8_3d_axis_2/input_1.cairo | 44 ----- .../nodes/concat_i8_3d_axis_2/output_0.cairo | 71 -------- src/tests/nodes/concat_i8_3d_default.cairo | 22 --- .../nodes/concat_i8_3d_default/input_0.cairo | 44 ----- .../nodes/concat_i8_3d_default/input_1.cairo | 44 ----- .../nodes/concat_i8_3d_default/output_0.cairo | 71 -------- .../concat_i8_3d_three_tensors_axis_1.cairo | 24 --- .../input_0.cairo | 44 ----- .../input_1.cairo | 44 ----- .../input_2.cairo | 44 ----- .../output_0.cairo | 98 ------------ .../concat_i8_3d_three_tensors_axis_2.cairo | 24 --- .../input_0.cairo | 44 ----- .../input_1.cairo | 44 ----- .../input_2.cairo | 44 ----- .../output_0.cairo | 98 ------------ 31 files changed, 72 insertions(+), 1295 deletions(-) delete mode 100644 src/tests/nodes/concat_i8_1d.cairo delete mode 100644 src/tests/nodes/concat_i8_1d/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_1d/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_1d/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_2d.cairo delete mode 100644 src/tests/nodes/concat_i8_2d/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_2d/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_2d/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_2.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_default.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_default/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_default/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_default/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo delete mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f5238af89..27e9d74e7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -375,82 +375,75 @@ mod logsoftmax_u32_fp8x23_axis_0; mod logsoftmax_u32_fp8x23_axis_1; mod logsoftmax_u32_fp16x16_axis_0; mod logsoftmax_u32_fp16x16_axis_1; -// mod relu_fp16x16; -// mod relu_fp8x23; -// mod relu_i32; -// mod relu_i8; -// mod sigmoid_fp8x23; -// mod sigmoid_fp16x16; -// mod sigmoid_i32_fp8x23; -// mod sigmoid_i32_fp16x16; -// mod sigmoid_i8_fp8x23; -// mod sigmoid_i8_fp16x16; -// mod sigmoid_u32_fp8x23; -// mod sigmoid_u32_fp16x16; -// mod softmax_fp8x23; -// mod softmax_fp16x16; -// mod softmax_i32_fp8x23; -// mod softmax_i32_fp16x16; -// mod softmax_i8_fp8x23; -// mod softmax_i8_fp16x16; -// mod softmax_u32_fp8x23; -// mod softmax_u32_fp16x16; -// mod softplus_fp8x23; -// mod softplus_fp16x16; -// mod softplus_i32_fp8x23; -// mod softplus_i32_fp16x16; -// mod softplus_i8_fp8x23; -// mod softplus_i8_fp16x16; -// mod softplus_u32_fp8x23; -// mod softplus_u32_fp16x16; -// mod softsign_fp8x23; -// mod softsign_fp16x16; -// mod softsign_i32_fp8x23; -// mod softsign_i32_fp16x16; -// mod softsign_i8_fp8x23; -// mod softsign_i8_fp16x16; -// mod softsign_u32_fp8x23; -// mod softsign_u32_fp16x16; -// mod sin_fp16x16; -// mod sin_fp8x23; -// mod sin_i32_fp8x23; -// mod sin_i32_fp16x16; -// mod sin_i8_fp8x23; -// mod sin_i8_fp16x16; -// mod sin_u32_fp8x23; -// mod sin_u32_fp16x16; -// mod concat_fp16x16_1d; -// mod concat_fp16x16_2d; -// mod concat_fp16x16_3d_default; -// mod concat_fp16x16_3d_axis_1; -// mod concat_fp16x16_3d_axis_2; -// mod concat_fp16x16_3d_three_tensors_axis_1; -// mod concat_fp16x16_3d_three_tensors_axis_2; -// mod concat_fp8x23_1d; -// mod concat_fp8x23_2d; -// mod concat_fp8x23_3d_default; -// mod concat_fp8x23_3d_axis_1; -// mod concat_fp8x23_3d_axis_2; -// mod concat_fp8x23_3d_three_tensors_axis_1; -// mod concat_fp8x23_3d_three_tensors_axis_2; -// mod concat_i32_1d; -// mod concat_i32_2d; -// mod concat_i32_3d_default; -// mod concat_i32_3d_axis_1; -// mod concat_i32_3d_axis_2; -// mod concat_i32_3d_three_tensors_axis_1; -// mod concat_i32_3d_three_tensors_axis_2; -// mod concat_i8_1d; -// mod concat_i8_2d; -// mod concat_i8_3d_default; -// mod concat_i8_3d_axis_1; -// mod concat_i8_3d_axis_2; -// mod concat_i8_3d_three_tensors_axis_1; -// mod concat_i8_3d_three_tensors_axis_2; -// mod concat_u32_1d; -// mod concat_u32_2d; -// mod concat_u32_3d_default; -// mod concat_u32_3d_axis_1; -// mod concat_u32_3d_axis_2; -// mod concat_u32_3d_three_tensors_axis_1; -// mod concat_u32_3d_three_tensors_axis_2; +mod relu_fp16x16; +mod relu_fp8x23; +mod relu_i32; +mod relu_i8; +mod sigmoid_fp8x23; +mod sigmoid_fp16x16; +mod sigmoid_i32_fp8x23; +mod sigmoid_i32_fp16x16; +mod sigmoid_i8_fp8x23; +mod sigmoid_i8_fp16x16; +mod sigmoid_u32_fp8x23; +mod sigmoid_u32_fp16x16; +mod softmax_fp8x23; +mod softmax_fp16x16; +mod softmax_i32_fp8x23; +mod softmax_i32_fp16x16; +mod softmax_i8_fp8x23; +mod softmax_i8_fp16x16; +mod softmax_u32_fp8x23; +mod softmax_u32_fp16x16; +mod softplus_fp8x23; +mod softplus_fp16x16; +mod softplus_i32_fp8x23; +mod softplus_i32_fp16x16; +mod softplus_i8_fp8x23; +mod softplus_i8_fp16x16; +mod softplus_u32_fp8x23; +mod softplus_u32_fp16x16; +mod softsign_fp8x23; +mod softsign_fp16x16; +mod softsign_i32_fp8x23; +mod softsign_i32_fp16x16; +mod softsign_i8_fp8x23; +mod softsign_i8_fp16x16; +mod softsign_u32_fp8x23; +mod softsign_u32_fp16x16; +mod sin_fp16x16; +mod sin_fp8x23; +mod sin_i32_fp8x23; +mod sin_i32_fp16x16; +mod sin_i8_fp8x23; +mod sin_i8_fp16x16; +mod sin_u32_fp8x23; +mod sin_u32_fp16x16; +mod concat_fp16x16_1d; +mod concat_fp16x16_2d; +mod concat_fp16x16_3d_default; +mod concat_fp16x16_3d_axis_1; +mod concat_fp16x16_3d_axis_2; +mod concat_fp16x16_3d_three_tensors_axis_1; +mod concat_fp16x16_3d_three_tensors_axis_2; +mod concat_fp8x23_1d; +mod concat_fp8x23_2d; +mod concat_fp8x23_3d_default; +mod concat_fp8x23_3d_axis_1; +mod concat_fp8x23_3d_axis_2; +mod concat_fp8x23_3d_three_tensors_axis_1; +mod concat_fp8x23_3d_three_tensors_axis_2; +mod concat_i32_1d; +mod concat_i32_2d; +mod concat_i32_3d_default; +mod concat_i32_3d_axis_1; +mod concat_i32_3d_axis_2; +mod concat_i32_3d_three_tensors_axis_1; +mod concat_i32_3d_three_tensors_axis_2; +mod concat_u32_1d; +mod concat_u32_2d; +mod concat_u32_3d_default; +mod concat_u32_3d_axis_1; +mod concat_u32_3d_axis_2; +mod concat_u32_3d_three_tensors_axis_1; +mod concat_u32_3d_three_tensors_axis_2; diff --git a/src/tests/nodes/concat_i8_1d.cairo b/src/tests/nodes/concat_i8_1d.cairo deleted file mode 100644 index 4b33c4034..000000000 --- a/src/tests/nodes/concat_i8_1d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_0.cairo b/src/tests/nodes/concat_i8_1d/input_0.cairo deleted file mode 100644 index 093b7168e..000000000 --- a/src/tests/nodes/concat_i8_1d/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_1.cairo b/src/tests/nodes/concat_i8_1d/input_1.cairo deleted file mode 100644 index 594735edd..000000000 --- a/src/tests/nodes/concat_i8_1d/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/output_0.cairo b/src/tests/nodes/concat_i8_1d/output_0.cairo deleted file mode 100644 index 98d652a94..000000000 --- a/src/tests/nodes/concat_i8_1d/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d.cairo b/src/tests/nodes/concat_i8_2d.cairo deleted file mode 100644 index 85132064e..000000000 --- a/src/tests/nodes/concat_i8_2d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_2d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_0.cairo b/src/tests/nodes/concat_i8_2d/input_0.cairo deleted file mode 100644 index b627482d8..000000000 --- a/src/tests/nodes/concat_i8_2d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_1.cairo b/src/tests/nodes/concat_i8_2d/input_1.cairo deleted file mode 100644 index 4b16f14b7..000000000 --- a/src/tests/nodes/concat_i8_2d/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/output_0.cairo b/src/tests/nodes/concat_i8_2d/output_0.cairo deleted file mode 100644 index e17746963..000000000 --- a/src/tests/nodes/concat_i8_2d/output_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(4); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1.cairo deleted file mode 100644 index b99e2c0a0..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_3d_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo deleted file mode 100644 index 1e8d0bcd7..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo deleted file mode 100644 index 89c1caede..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo deleted file mode 100644 index fc77c8f66..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(6); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2.cairo b/src/tests/nodes/concat_i8_3d_axis_2.cairo deleted file mode 100644 index ac78ee370..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_3d_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo deleted file mode 100644 index 1e8d0bcd7..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo deleted file mode 100644 index 89c1caede..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo deleted file mode 100644 index f9ddab121..000000000 --- a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default.cairo b/src/tests/nodes/concat_i8_3d_default.cairo deleted file mode 100644 index 0dbc147e0..000000000 --- a/src/tests/nodes/concat_i8_3d_default.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_3d_default() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_0.cairo b/src/tests/nodes/concat_i8_3d_default/input_0.cairo deleted file mode 100644 index 1e8d0bcd7..000000000 --- a/src/tests/nodes/concat_i8_3d_default/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_1.cairo b/src/tests/nodes/concat_i8_3d_default/input_1.cairo deleted file mode 100644 index 89c1caede..000000000 --- a/src/tests/nodes/concat_i8_3d_default/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/output_0.cairo b/src/tests/nodes/concat_i8_3d_default/output_0.cairo deleted file mode 100644 index 14054d36d..000000000 --- a/src/tests/nodes/concat_i8_3d_default/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo deleted file mode 100644 index 1d2feb338..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_3d_three_tensors_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo deleted file mode 100644 index 1e8d0bcd7..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo deleted file mode 100644 index 89c1caede..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo deleted file mode 100644 index 461492ebf..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 54, sign: false }); - data.append(FP16x16 { mag: 55, sign: false }); - data.append(FP16x16 { mag: 56, sign: false }); - data.append(FP16x16 { mag: 57, sign: false }); - data.append(FP16x16 { mag: 58, sign: false }); - data.append(FP16x16 { mag: 59, sign: false }); - data.append(FP16x16 { mag: 60, sign: false }); - data.append(FP16x16 { mag: 61, sign: false }); - data.append(FP16x16 { mag: 62, sign: false }); - data.append(FP16x16 { mag: 63, sign: false }); - data.append(FP16x16 { mag: 64, sign: false }); - data.append(FP16x16 { mag: 65, sign: false }); - data.append(FP16x16 { mag: 66, sign: false }); - data.append(FP16x16 { mag: 67, sign: false }); - data.append(FP16x16 { mag: 68, sign: false }); - data.append(FP16x16 { mag: 69, sign: false }); - data.append(FP16x16 { mag: 70, sign: false }); - data.append(FP16x16 { mag: 71, sign: false }); - data.append(FP16x16 { mag: 72, sign: false }); - data.append(FP16x16 { mag: 73, sign: false }); - data.append(FP16x16 { mag: 74, sign: false }); - data.append(FP16x16 { mag: 75, sign: false }); - data.append(FP16x16 { mag: 76, sign: false }); - data.append(FP16x16 { mag: 77, sign: false }); - data.append(FP16x16 { mag: 78, sign: false }); - data.append(FP16x16 { mag: 79, sign: false }); - data.append(FP16x16 { mag: 80, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo deleted file mode 100644 index e9a462bc0..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(9); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 54, sign: false }); - data.append(FP16x16 { mag: 55, sign: false }); - data.append(FP16x16 { mag: 56, sign: false }); - data.append(FP16x16 { mag: 57, sign: false }); - data.append(FP16x16 { mag: 58, sign: false }); - data.append(FP16x16 { mag: 59, sign: false }); - data.append(FP16x16 { mag: 60, sign: false }); - data.append(FP16x16 { mag: 61, sign: false }); - data.append(FP16x16 { mag: 62, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 63, sign: false }); - data.append(FP16x16 { mag: 64, sign: false }); - data.append(FP16x16 { mag: 65, sign: false }); - data.append(FP16x16 { mag: 66, sign: false }); - data.append(FP16x16 { mag: 67, sign: false }); - data.append(FP16x16 { mag: 68, sign: false }); - data.append(FP16x16 { mag: 69, sign: false }); - data.append(FP16x16 { mag: 70, sign: false }); - data.append(FP16x16 { mag: 71, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - data.append(FP16x16 { mag: 72, sign: false }); - data.append(FP16x16 { mag: 73, sign: false }); - data.append(FP16x16 { mag: 74, sign: false }); - data.append(FP16x16 { mag: 75, sign: false }); - data.append(FP16x16 { mag: 76, sign: false }); - data.append(FP16x16 { mag: 77, sign: false }); - data.append(FP16x16 { mag: 78, sign: false }); - data.append(FP16x16 { mag: 79, sign: false }); - data.append(FP16x16 { mag: 80, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo deleted file mode 100644 index f92a50236..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i8_3d_three_tensors_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo deleted file mode 100644 index 1e8d0bcd7..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo deleted file mode 100644 index 89c1caede..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo deleted file mode 100644 index 461492ebf..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 54, sign: false }); - data.append(FP16x16 { mag: 55, sign: false }); - data.append(FP16x16 { mag: 56, sign: false }); - data.append(FP16x16 { mag: 57, sign: false }); - data.append(FP16x16 { mag: 58, sign: false }); - data.append(FP16x16 { mag: 59, sign: false }); - data.append(FP16x16 { mag: 60, sign: false }); - data.append(FP16x16 { mag: 61, sign: false }); - data.append(FP16x16 { mag: 62, sign: false }); - data.append(FP16x16 { mag: 63, sign: false }); - data.append(FP16x16 { mag: 64, sign: false }); - data.append(FP16x16 { mag: 65, sign: false }); - data.append(FP16x16 { mag: 66, sign: false }); - data.append(FP16x16 { mag: 67, sign: false }); - data.append(FP16x16 { mag: 68, sign: false }); - data.append(FP16x16 { mag: 69, sign: false }); - data.append(FP16x16 { mag: 70, sign: false }); - data.append(FP16x16 { mag: 71, sign: false }); - data.append(FP16x16 { mag: 72, sign: false }); - data.append(FP16x16 { mag: 73, sign: false }); - data.append(FP16x16 { mag: 74, sign: false }); - data.append(FP16x16 { mag: 75, sign: false }); - data.append(FP16x16 { mag: 76, sign: false }); - data.append(FP16x16 { mag: 77, sign: false }); - data.append(FP16x16 { mag: 78, sign: false }); - data.append(FP16x16 { mag: 79, sign: false }); - data.append(FP16x16 { mag: 80, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo deleted file mode 100644 index 208808045..000000000 --- a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(9); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 27, sign: false }); - data.append(FP16x16 { mag: 28, sign: false }); - data.append(FP16x16 { mag: 29, sign: false }); - data.append(FP16x16 { mag: 54, sign: false }); - data.append(FP16x16 { mag: 55, sign: false }); - data.append(FP16x16 { mag: 56, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - data.append(FP16x16 { mag: 30, sign: false }); - data.append(FP16x16 { mag: 31, sign: false }); - data.append(FP16x16 { mag: 32, sign: false }); - data.append(FP16x16 { mag: 57, sign: false }); - data.append(FP16x16 { mag: 58, sign: false }); - data.append(FP16x16 { mag: 59, sign: false }); - data.append(FP16x16 { mag: 6, sign: false }); - data.append(FP16x16 { mag: 7, sign: false }); - data.append(FP16x16 { mag: 8, sign: false }); - data.append(FP16x16 { mag: 33, sign: false }); - data.append(FP16x16 { mag: 34, sign: false }); - data.append(FP16x16 { mag: 35, sign: false }); - data.append(FP16x16 { mag: 60, sign: false }); - data.append(FP16x16 { mag: 61, sign: false }); - data.append(FP16x16 { mag: 62, sign: false }); - data.append(FP16x16 { mag: 9, sign: false }); - data.append(FP16x16 { mag: 10, sign: false }); - data.append(FP16x16 { mag: 11, sign: false }); - data.append(FP16x16 { mag: 36, sign: false }); - data.append(FP16x16 { mag: 37, sign: false }); - data.append(FP16x16 { mag: 38, sign: false }); - data.append(FP16x16 { mag: 63, sign: false }); - data.append(FP16x16 { mag: 64, sign: false }); - data.append(FP16x16 { mag: 65, sign: false }); - data.append(FP16x16 { mag: 12, sign: false }); - data.append(FP16x16 { mag: 13, sign: false }); - data.append(FP16x16 { mag: 14, sign: false }); - data.append(FP16x16 { mag: 39, sign: false }); - data.append(FP16x16 { mag: 40, sign: false }); - data.append(FP16x16 { mag: 41, sign: false }); - data.append(FP16x16 { mag: 66, sign: false }); - data.append(FP16x16 { mag: 67, sign: false }); - data.append(FP16x16 { mag: 68, sign: false }); - data.append(FP16x16 { mag: 15, sign: false }); - data.append(FP16x16 { mag: 16, sign: false }); - data.append(FP16x16 { mag: 17, sign: false }); - data.append(FP16x16 { mag: 42, sign: false }); - data.append(FP16x16 { mag: 43, sign: false }); - data.append(FP16x16 { mag: 44, sign: false }); - data.append(FP16x16 { mag: 69, sign: false }); - data.append(FP16x16 { mag: 70, sign: false }); - data.append(FP16x16 { mag: 71, sign: false }); - data.append(FP16x16 { mag: 18, sign: false }); - data.append(FP16x16 { mag: 19, sign: false }); - data.append(FP16x16 { mag: 20, sign: false }); - data.append(FP16x16 { mag: 45, sign: false }); - data.append(FP16x16 { mag: 46, sign: false }); - data.append(FP16x16 { mag: 47, sign: false }); - data.append(FP16x16 { mag: 72, sign: false }); - data.append(FP16x16 { mag: 73, sign: false }); - data.append(FP16x16 { mag: 74, sign: false }); - data.append(FP16x16 { mag: 21, sign: false }); - data.append(FP16x16 { mag: 22, sign: false }); - data.append(FP16x16 { mag: 23, sign: false }); - data.append(FP16x16 { mag: 48, sign: false }); - data.append(FP16x16 { mag: 49, sign: false }); - data.append(FP16x16 { mag: 50, sign: false }); - data.append(FP16x16 { mag: 75, sign: false }); - data.append(FP16x16 { mag: 76, sign: false }); - data.append(FP16x16 { mag: 77, sign: false }); - data.append(FP16x16 { mag: 24, sign: false }); - data.append(FP16x16 { mag: 25, sign: false }); - data.append(FP16x16 { mag: 26, sign: false }); - data.append(FP16x16 { mag: 51, sign: false }); - data.append(FP16x16 { mag: 52, sign: false }); - data.append(FP16x16 { mag: 53, sign: false }); - data.append(FP16x16 { mag: 78, sign: false }); - data.append(FP16x16 { mag: 79, sign: false }); - data.append(FP16x16 { mag: 80, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) -} \ No newline at end of file From f40d004154901a697d2e57e62115ab54a16bcce1 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 15:14:38 +0300 Subject: [PATCH 085/179] Update tests.cairo --- src/tests.cairo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests.cairo b/src/tests.cairo index ad175c9d2..e73b539a3 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ -// mod numbers; +mod numbers; // mod performance; -// mod tensor_core; +mod tensor_core; mod nodes; -// mod helpers; +mod helpers; From daa753a56765cda87c8f0d4a91d9651c7931f37d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 17:11:13 +0300 Subject: [PATCH 086/179] add generic quantize linear --- src/lib.cairo | 2 +- src/operators/tensor.cairo | 1 + src/operators/tensor/core.cairo | 75 +++++++++++++ .../implementations/tensor_fp16x16.cairo | 18 ++- .../implementations/tensor_fp8x23.cairo | 18 ++- .../implementations/tensor_i32_fp16x16.cairo | 16 ++- .../implementations/tensor_i32_fp8x23.cairo | 16 ++- .../implementations/tensor_i8_fp16x16.cairo | 6 + .../implementations/tensor_i8_fp8x23.cairo | 6 + .../implementations/tensor_u32_fp16x16.cairo | 7 ++ .../implementations/tensor_u32_fp8x23.cairo | 7 ++ src/operators/tensor/quantization.cairo | 1 + .../tensor/quantization/quantize_linear.cairo | 106 ++++++++++++++++++ .../functional/quantize_linear.cairo | 43 ++++--- 14 files changed, 293 insertions(+), 29 deletions(-) create mode 100644 src/operators/tensor/quantization.cairo create mode 100644 src/operators/tensor/quantization/quantize_linear.cairo diff --git a/src/lib.cairo b/src/lib.cairo index 4b62df94d..b928b20dd 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,6 +1,6 @@ mod performance; mod operators; mod numbers; -mod tests; +// mod tests; mod utils; diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index ac9ea1a18..86e18b1db 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -2,5 +2,6 @@ mod core; mod helpers; mod math; mod linalg; +mod quantization; mod implementations; \ No newline at end of file diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index d27a53b46..385db12f3 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -5,6 +5,7 @@ use option::OptionTrait; use orion::operators::tensor::helpers::{len_from_shape, check_shape}; use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::i8; #[derive(Copy, Drop)] struct Tensor { @@ -2450,6 +2451,80 @@ trait TensorTrait { /// ``` /// fn concat(tensors: Span>, axis: usize,) -> Tensor; + /// # performance.quantize_linear + /// + /// ```rust + /// fn quantize_linear(self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor) -> Tensor::; + /// ``` + /// + /// Quantizes a Tensor using linear quantization. + /// + /// The linear quantization operator. It consumes a high precision tensor, a scale, and a zero point + /// to compute the low precision / quantized tensor. The scale factor and zero point must have same shape, + /// and can be either a scalar for per-tensor / per layer quantization, or a 1-D tensor for per-axis quantization. + /// The quantization formula is `y = saturate ((x / y_scale) + y_zero_point)`. For saturation, it saturates to `[-128, 127]`. + /// For (x / y_scale), it's rounding to the nearest even. + /// + /// ## Args + /// + /// * `self`(`@Tensor`) - The input tensor. + /// * `y_scale`(`@Tensor`) - Scale for doing quantization to get `y`. + /// * `y_zero_point`(`@Tensor`) - Zero point for doing quantization to get `y`. + /// + /// ## Returns + /// + /// A new `Tensor` with the same shape as the input tensor, containing the quantized values. + /// + /// ## Examples + /// + /// ```rust + /// use array::{ArrayTrait, SpanTrait}; + /// + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; + /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; + /// use orion::numbers::signed_integer::i8::i8; + /// use orion::performance::core::PerfomanceTrait; + /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; + /// + /// fn quantize_linear_example() -> Tensor { + /// // We instantiate a 1D Tensor here. + /// let x = TensorTrait::::new( + /// shape: array![6].span(), + /// data: array![ + /// IntegerTrait::new(0, false), + /// IntegerTrait::new(2, false), + /// IntegerTrait::new(3, false), + /// IntegerTrait::new(1000, false), + /// IntegerTrait::new(254, true), + /// IntegerTrait::new(1000, true), + /// ] + /// .span(), + /// extra: Option::None(()) + /// ); + /// + /// // We instantiate the y_scale here. + /// let y_scale = TensorTrait::::new( + /// shape: array![1].span(), + /// data: array![IntegerTrait::new(2, false)].span(), + /// extra: Option::None(()) + /// ); + /// + /// // We instantiate the y_zero_point here. + /// let y_zero_point = TensorTrait::::new( + /// shape: array![1].span(), + /// data: array![IntegerTrait::new(1, false)].span(), + /// extra: Option::None(()) + /// ); + /// + /// return x.quantize_linear(@y_scale, @y_zero_point); + /// } + /// >>> [1, 2, 2, 127, -126, -128] + /// ``` + /// + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor::; } diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index ed709e18f..f8456d477 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -5,14 +5,16 @@ use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; -use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor }; -use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::numbers::i8; impl Tensor_fp16x16 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -177,6 +179,18 @@ impl Tensor_fp16x16 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + FixedTrait::new(8388608, true), + FixedTrait::new(8323072, false) + ) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 1eaf99e63..77c34eafe 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -5,14 +5,16 @@ use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; -use orion::numbers::fixed_point::core::{FixedImpl}; +use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::numbers::i8; impl Tensor_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -177,6 +179,18 @@ impl Tensor_fp8x23 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + FixedTrait::new(1073741824, true), + FixedTrait::new(1065353216, false) + ) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index 285d6c539..71bd9a1dd 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -12,9 +12,11 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::numbers::i8; impl Tensor_i32_fp16x16 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -179,6 +181,18 @@ impl Tensor_i32_fp16x16 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + i32 { mag: 128, sign: true }, + i32 { mag: 128, sign: false }, + ) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index f7090cf37..bae202eee 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -12,9 +12,11 @@ use orion::operators::tensor::core::{ new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; -use orion::operators::tensor::{math, linalg}; +use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::numbers::i8; impl Tensor_i32_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -179,6 +181,18 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + i32 { mag: 128, sign: true }, + i32 { mag: 128, sign: false }, + ) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo index bc2039b6e..7373b8ab5 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -181,6 +181,12 @@ impl Tensor_i8_fp16x16 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 7b9149145..84d393387 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -181,6 +181,12 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo index b7cf64c3b..2712a1fbc 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -14,6 +14,7 @@ use orion::operators::tensor::core::{ use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::numbers::i8; impl Tensor_u32_fp16x16 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -179,6 +180,12 @@ impl Tensor_u32_fp16x16 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 75113465f..2d3a677d6 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -14,6 +14,7 @@ use orion::operators::tensor::core::{ use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::numbers::i8; impl Tensor_u32_fp8x23 of TensorTrait { fn new(shape: Span, data: Span, extra: Option) -> Tensor { @@ -179,6 +180,12 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn concat(tensors: Span>, axis: usize,) -> Tensor { math::concat::concat(tensors, axis) } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/quantization.cairo b/src/operators/tensor/quantization.cairo new file mode 100644 index 000000000..17355a72f --- /dev/null +++ b/src/operators/tensor/quantization.cairo @@ -0,0 +1 @@ +mod quantize_linear; \ No newline at end of file diff --git a/src/operators/tensor/quantization/quantize_linear.cairo b/src/operators/tensor/quantization/quantize_linear.cairo new file mode 100644 index 000000000..d1a0cffa8 --- /dev/null +++ b/src/operators/tensor/quantization/quantize_linear.cairo @@ -0,0 +1,106 @@ +use core::debug::PrintTrait; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::TryInto; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::math::arithmetic::saturated_add; +use orion::utils::saturate; + +/// Cf: TensorTrait::quantize_linear docstring +fn quantize_linear< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TAdd: Add, + impl TDiv: Div, + impl TTensorDiv: Div>, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QCopy: Copy, + impl QDrop: Drop, +>( + x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T +) -> Tensor:: { + if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { + quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0], min, max) + } else { + check_compatibility(*x.shape, *y_scale.shape); + check_compatibility(*x.shape, *y_zero_point.shape); + check_compatibility(*y_scale.shape, *y_zero_point.shape); + quantize_per_axis(x, y_scale, y_zero_point, min, max) + } +} + +fn quantize_per_axis< + T, + F, + Q, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, + impl TAdd: Add, + impl TTensorDiv: Div>, + impl TPartialOrd: PartialOrd, + impl TTryInto: TryInto, + impl TCopy: Copy, + impl TDrop: Drop, + impl QDrop: Drop, +>( + x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T +) -> Tensor:: { + saturated_add(@(*x / *y_scale), y_zero_point, min, max) +} + +fn quantize_element_wise< + T, + F, + Q, + impl TCopy: Copy, + impl TDrop: Drop, + impl QCopy: Copy, + impl QDrop: Drop, + impl TPartialOrd: PartialOrd, + impl TDiv: Div, + impl TAdd: Add, + impl TTryIntoQ: TryInto, + impl QTensor: TensorTrait +>( + mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T +) -> Tensor:: { + let mut result_data = ArrayTrait::::new(); + + loop { + match x.data.pop_front() { + Option::Some(item) => { + let quantized = quantize(*item, y_scale, y_zero_point, min, max); + result_data.append(quantized); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(x.shape, result_data.span(), x.extra); +} + +fn quantize< + T, + Q, + impl TCopy: Copy, + impl TDrop: Drop, + impl TPartialOrd: PartialOrd, + impl TDiv: Div, + impl TAdd: Add, + impl TTryIntoQ: TryInto +>( + x: T, y_scale: T, y_zero_point: T, min: T, max: T +) -> Q { + saturate(min, max, ((x / y_scale) + y_zero_point)).try_into().unwrap() +} diff --git a/src/performance/functional/quantize_linear.cairo b/src/performance/functional/quantize_linear.cairo index 5082be697..6512ca9c4 100644 --- a/src/performance/functional/quantize_linear.cairo +++ b/src/performance/functional/quantize_linear.cairo @@ -4,28 +4,27 @@ use array::SpanTrait; use option::OptionTrait; use traits::TryInto; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::math::arithmetic::saturated_add; use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::math::arithmetic::saturated_add; use orion::utils::saturate; /// Cf: PerfomanceTrait::quantize_linear docstring fn quantize_linear< T, - Q, F, + Q, impl TTensor: TensorTrait, impl QTensor: TensorTrait, - impl TTensorAdd: Add>, - impl TTensorDiv: Div>, impl TAdd: Add, impl TDiv: Div, + impl TTensorDiv: Div>, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, impl TCopy: Copy, impl TDrop: Drop, - impl QDrop: Drop + impl QCopy: Copy, + impl QDrop: Drop, >( x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T ) -> Tensor:: { @@ -41,18 +40,17 @@ fn quantize_linear< fn quantize_per_axis< T, - Q, F, + Q, impl TTensor: TensorTrait, impl QTensor: TensorTrait, - impl TTensorAdd: Add>, - impl TTensorDiv: Div>, impl TAdd: Add, + impl TTensorDiv: Div>, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, impl TCopy: Copy, impl TDrop: Drop, - impl QDrop: Drop + impl QDrop: Drop, >( x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T ) -> Tensor:: { @@ -61,16 +59,17 @@ fn quantize_per_axis< fn quantize_element_wise< T, - Q, F, - impl QTensor: TensorTrait, - impl TAdd: Add, - impl TDiv: Div, - impl TPartialOrd: PartialOrd, - impl TTryInto: TryInto, + Q, impl TCopy: Copy, impl TDrop: Drop, - impl QDrop: Drop + impl QCopy: Copy, + impl QDrop: Drop, + impl TPartialOrd: PartialOrd, + impl TDiv: Div, + impl TAdd: Add, + impl TTryIntoQ: TryInto, + impl QTensor: TensorTrait >( mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T ) -> Tensor:: { @@ -94,12 +93,12 @@ fn quantize_element_wise< fn quantize< T, Q, - impl TAdd: Add, - impl TDiv: Div, - impl TPartialOrd: PartialOrd, - impl TTryInto: TryInto, impl TCopy: Copy, - impl TDrop: Drop + impl TDrop: Drop, + impl TPartialOrd: PartialOrd, + impl TDiv: Div, + impl TAdd: Add, + impl TTryIntoQ: TryInto >( x: T, y_scale: T, y_zero_point: T, min: T, max: T ) -> Q { From 85d0a84c3452480781ddd1a4d7d76ef338696706 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 17:40:42 +0300 Subject: [PATCH 087/179] add generic dequantize_linear --- src/operators/tensor/core.cairo | 73 ++++++++++++++- .../implementations/tensor_fp16x16.cairo | 10 +- .../implementations/tensor_fp8x23.cairo | 8 +- .../implementations/tensor_i32_fp16x16.cairo | 10 +- .../implementations/tensor_i32_fp8x23.cairo | 10 +- .../implementations/tensor_i8_fp16x16.cairo | 6 ++ .../implementations/tensor_i8_fp8x23.cairo | 6 ++ .../implementations/tensor_u32_fp16x16.cairo | 8 +- .../implementations/tensor_u32_fp8x23.cairo | 8 +- src/operators/tensor/quantization.cairo | 3 +- .../quantization/dequantize_linear.cairo | 93 +++++++++++++++++++ 11 files changed, 227 insertions(+), 8 deletions(-) create mode 100644 src/operators/tensor/quantization/dequantize_linear.cairo diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 385db12f3..cb316414b 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -2451,7 +2451,7 @@ trait TensorTrait { /// ``` /// fn concat(tensors: Span>, axis: usize,) -> Tensor; - /// # performance.quantize_linear + /// # tensor.quantize_linear /// /// ```rust /// fn quantize_linear(self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor) -> Tensor::; @@ -2525,6 +2525,77 @@ trait TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor::; + /// # tensor.dequantize_linear + /// + /// ```rust + /// fn dequantize_linear(self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor) -> Tensor::; + /// ``` + /// + /// Dequantizes a Tensor using linear dequantization. + /// + /// The linear dequantization operator. It consumes a quantized tensor, a scale, and a zero point to compute + /// the full precision tensor. The dequantization formula is y = (x - x_zero_point) * x_scale. x_scale and + /// x_zero_point must have same shape, and can be either a scalar for per-tensor / per layer quantization, + /// or a 1-D tensor for per-axis quantization. + /// + /// ## Args + /// + /// * `self`(`@Tensor`) - The input tensor. + /// * `x_scale`(`@Tensor`) - Scale for input `x`. + /// * `x_zero_point`(`@Tensor`) - Zero point for input `x`. + /// + /// ## Returns + /// + /// A new `Tensor` with the same shape as the input tensor, containing the dequantized values. + /// + /// ## Examples + /// + /// ```rust + /// use array::{ArrayTrait, SpanTrait}; + /// + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; + /// use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; + /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; + /// use orion::numbers::signed_integer::i32::i32; + /// use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; + /// use orion::performance::core::PerfomanceTrait; + /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; + /// + /// fn dequantize_linear_example() -> Tensor { + /// // We instantiate a 1D Tensor here. + /// let x = TensorTrait::::new( + /// shape: array![4].span(), + /// data: array![ + /// IntegerTrait::new(0, false), + /// IntegerTrait::new(3, false), + /// IntegerTrait::new(125, false), + /// IntegerTrait::new(127, false), + /// ].span(), + /// extra: Option::None(()) + /// ); + /// + /// // We instantiate the x_scale here. + /// let x_scale = TensorTrait::::new( + /// shape: array![1].span(), + /// data: array![IntegerTrait::new(2, false)].span(), + /// extra: Option::None(()) + /// ); + /// + /// // We instantiate the x_zero_point here. + /// let x_zero_point = TensorTrait::::new( + /// shape: array![1].span(), + /// data: array![IntegerTrait::new(0, false)].span(), + /// extra: Option::None(()) + /// ); + /// + /// return x.dequantize_linear(@x_scale, @x_zero_point); + /// } + /// >>> [0, 6, 250, 254] + /// ``` + /// + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor::; } diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index f8456d477..267f7fdd5 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -13,7 +13,9 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, TensorI8IntoTensorFP16x16 +}; use orion::numbers::i8; impl Tensor_fp16x16 of TensorTrait { @@ -191,6 +193,12 @@ impl Tensor_fp16x16 of TensorTrait { FixedTrait::new(8323072, false) ) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 77c34eafe..ed20b4734 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -13,7 +13,7 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::{Tensor_i8_fp8x23, TensorI8IntoTensorFP8x23}; use orion::numbers::i8; impl Tensor_fp8x23 of TensorTrait { @@ -191,6 +191,12 @@ impl Tensor_fp8x23 of TensorTrait { FixedTrait::new(1065353216, false) ) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index 71bd9a1dd..d7b9d4f5f 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -15,7 +15,9 @@ use orion::operators::tensor::core::{ use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, TensorI8IntoTensorI32 +}; use orion::numbers::i8; impl Tensor_i32_fp16x16 of TensorTrait { @@ -193,6 +195,12 @@ impl Tensor_i32_fp16x16 of TensorTrait { i32 { mag: 128, sign: false }, ) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index bae202eee..fe2619b8d 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -15,7 +15,9 @@ use orion::operators::tensor::core::{ use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ + Tensor_i8_fp8x23, TensorI8IntoTensorI32 +}; use orion::numbers::i8; impl Tensor_i32_fp8x23 of TensorTrait { @@ -193,6 +195,12 @@ impl Tensor_i32_fp8x23 of TensorTrait { i32 { mag: 128, sign: false }, ) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo index 7373b8ab5..d1f1f0962 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -187,6 +187,12 @@ impl Tensor_i8_fp16x16 of TensorTrait { ) -> Tensor:: { panic(array!['not supported with i8']) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 84d393387..5bf2ca605 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -187,6 +187,12 @@ impl Tensor_i8_fp8x23 of TensorTrait { ) -> Tensor:: { panic(array!['not supported with i8']) } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with i8']) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo index 2712a1fbc..6606bc274 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -184,7 +184,13 @@ impl Tensor_u32_fp16x16 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + panic(array!['not supported with u32']) + } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with u32']) } } diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 2d3a677d6..320d72bbe 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -184,7 +184,13 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + panic(array!['not supported with u32']) + } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + panic(array!['not supported with u32']) } } diff --git a/src/operators/tensor/quantization.cairo b/src/operators/tensor/quantization.cairo index 17355a72f..31ee00711 100644 --- a/src/operators/tensor/quantization.cairo +++ b/src/operators/tensor/quantization.cairo @@ -1 +1,2 @@ -mod quantize_linear; \ No newline at end of file +mod quantize_linear; +mod dequantize_linear; \ No newline at end of file diff --git a/src/operators/tensor/quantization/dequantize_linear.cairo b/src/operators/tensor/quantization/dequantize_linear.cairo new file mode 100644 index 000000000..c62cc561e --- /dev/null +++ b/src/operators/tensor/quantization/dequantize_linear.cairo @@ -0,0 +1,93 @@ +use core::traits::Into; +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; + +use orion::operators::tensor::core::{Tensor, TensorTrait}; +use orion::operators::tensor::helpers::check_compatibility; +use orion::utils::saturate; + +/// Cf: PerfomanceTrait::dequantize_linear docstring +fn dequantize_linear< + Q, + T, + F, + impl TTensor: TensorTrait, + impl QIntoT: Into, + impl TSub: Sub, + impl TMul: Mul, + impl TTensorSub: Sub>, + impl TTensorMul: Mul>, + impl QTensorIntoTTensor: Into, Tensor>, + impl TDrop: Drop, + impl TCopy: Copy, + impl QCopy: Copy, + impl QDrop: Drop +>( + x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor +) -> Tensor:: { + if (*x_scale.data).len() == 1 && (*x_zero_point.data).len() == 1 { + dequantize_element_wise(*x, *x_scale.data[0], *x_zero_point.data[0]) + } else { + check_compatibility(*x.shape, *x_scale.shape); + check_compatibility(*x.shape, *x_zero_point.shape); + check_compatibility(*x_scale.shape, *x_zero_point.shape); + dequantize_per_axis(@(*x).into(), x_scale, x_zero_point) + } +} + +fn dequantize_per_axis< + T, + F, + impl TTensor: TensorTrait, + impl TTensorSub: Sub>, + impl TTensorMul: Mul>, + impl TCopy: Copy, + impl TDrop: Drop +>( + x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor +) -> Tensor:: { + let mut result_data = ArrayTrait::::new(); + + (*x - *x_zero_point) * *x_scale +} + +fn dequantize_element_wise< + Q, + T, + F, + impl TTensor: TensorTrait, + impl QIntoT: Into, + impl TSub: Sub, + impl TMul: Mul, + impl TDrop: Drop, + impl TCopy: Copy, + impl QCopy: Copy, + impl QDrop: Drop +>( + mut x: Tensor::, x_scale: T, x_zero_point: T +) -> Tensor:: { + let mut result_data = ArrayTrait::::new(); + + loop { + match x.data.pop_front() { + Option::Some(item) => { + let dequantized = dequantize(*item, x_scale, x_zero_point); + result_data.append(dequantized); + }, + Option::None(_) => { + break; + } + }; + }; + + return TensorTrait::new(x.shape, result_data.span(), x.extra); +} + +fn dequantize< + Q, T, impl QIntoT: Into, impl TSub: Sub, impl TMul: Mul, impl TDrop: Drop +>( + x: Q, x_scale: T, x_zero_point: T +) -> T { + (x.into() - x_zero_point) * x_scale +} From 597a53a6b443fd0444a909653349628a1cf64a4f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 17:58:40 +0300 Subject: [PATCH 088/179] fix quantize_linear test --- src/lib.cairo | 2 +- .../implementations/tensor_i32_fp16x16.cairo | 2 +- .../implementations/tensor_i32_fp8x23.cairo | 2 +- src/tests.cairo | 2 +- src/tests/performance.cairo | 2 +- .../quantize_linear_fp_test/fp_i8_test.cairo | 42 +++++++++---------- .../quantize_linear_i32_test.cairo | 8 ++-- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/lib.cairo b/src/lib.cairo index b928b20dd..4b62df94d 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,6 +1,6 @@ mod performance; mod operators; mod numbers; -// mod tests; +mod tests; mod utils; diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index d7b9d4f5f..0f1b726ca 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -192,7 +192,7 @@ impl Tensor_i32_fp16x16 of TensorTrait { y_scale, y_zero_point, i32 { mag: 128, sign: true }, - i32 { mag: 128, sign: false }, + i32 { mag: 127, sign: false }, ) } diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index fe2619b8d..bb9a3006e 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -192,7 +192,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { y_scale, y_zero_point, i32 { mag: 128, sign: true }, - i32 { mag: 128, sign: false }, + i32 { mag: 127, sign: false }, ) } diff --git a/src/tests.cairo b/src/tests.cairo index e73b539a3..8463adb0a 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ mod numbers; -// mod performance; +mod performance; mod tensor_core; mod nodes; mod helpers; diff --git a/src/tests/performance.cairo b/src/tests/performance.cairo index a5ac0ba2f..3a29d9114 100644 --- a/src/tests/performance.cairo +++ b/src/tests/performance.cairo @@ -1,2 +1,2 @@ mod quantize_linear_test; -mod dequantize_linear_test; +// mod dequantize_linear_test; diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo index 3540dad47..a38fcb51f 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo @@ -6,13 +6,12 @@ mod fp8x23 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; - use orion::performance::core::PerfomanceTrait; - use orion::performance::implementations::impl_performance_fp::Performance_fp_i8; + use orion::numbers::FP8x23; #[test] #[available_gas(2000000)] @@ -20,7 +19,7 @@ mod fp8x23 { // X let mut shape = ArrayTrait::::new(); shape.append(6); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); @@ -33,7 +32,7 @@ mod fp8x23 { // YSCALE let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); @@ -41,7 +40,7 @@ mod fp8x23 { // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(1, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); @@ -65,7 +64,7 @@ mod fp8x23 { shape.append(3); shape.append(3); shape.append(2); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(162, true)); data.append(FixedTrait::new_unscaled(10, false)); data.append(FixedTrait::new_unscaled(100, true)); @@ -93,7 +92,7 @@ mod fp8x23 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); @@ -106,7 +105,7 @@ mod fp8x23 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(84, false)); data.append(FixedTrait::new_unscaled(24, false)); data.append(FixedTrait::new_unscaled(196, false)); @@ -145,13 +144,12 @@ mod fp16x16 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; - use orion::performance::core::PerfomanceTrait; - use orion::performance::implementations::impl_performance_fp::Performance_fp_i8; + use orion::numbers::FP16x16; #[test] #[available_gas(2000000)] @@ -159,7 +157,7 @@ mod fp16x16 { // X let mut shape = ArrayTrait::::new(); shape.append(6); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); @@ -172,7 +170,7 @@ mod fp16x16 { // YSCALE let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); @@ -180,7 +178,7 @@ mod fp16x16 { // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(1, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); @@ -204,7 +202,7 @@ mod fp16x16 { shape.append(3); shape.append(3); shape.append(2); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(162, true)); data.append(FixedTrait::new_unscaled(10, false)); data.append(FixedTrait::new_unscaled(100, true)); @@ -232,7 +230,7 @@ mod fp16x16 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); @@ -245,7 +243,7 @@ mod fp16x16 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(84, false)); data.append(FixedTrait::new_unscaled(24, false)); data.append(FixedTrait::new_unscaled(196, false)); diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 5d555777e..8ece06a41 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -4,11 +4,10 @@ use array::SpanTrait; use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; #[test] #[available_gas(2000000)] @@ -44,6 +43,8 @@ fn quantize_linear() { let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); + (*y.data.at(3).mag).print(); + assert((*y.data[0]).into() == 1, '*result[0] == 1'); assert((*y.data[1]).into() == 2, '*result[1] == 2'); assert((*y.data[2]).into() == 2, '*result[2] == 2'); @@ -52,6 +53,7 @@ fn quantize_linear() { assert((*y.data[5]).into() == -128, '*result[5] == -128'); } + #[test] #[available_gas(20000000)] fn per_axis() { From 0afa24c455012f8c73934d344ff06de29f6d677c Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 18:09:37 +0300 Subject: [PATCH 089/179] fixe dequantize_linear tests --- src/tests/performance.cairo | 2 +- .../fp_i8_test.cairo | 322 +++++++++++------- .../dequantize_linear_i32_test.cairo | 8 +- 3 files changed, 202 insertions(+), 130 deletions(-) diff --git a/src/tests/performance.cairo b/src/tests/performance.cairo index 3a29d9114..a5ac0ba2f 100644 --- a/src/tests/performance.cairo +++ b/src/tests/performance.cairo @@ -1,2 +1,2 @@ mod quantize_linear_test; -// mod dequantize_linear_test; +mod dequantize_linear_test; diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo index 68762bb8a..bc8d9bb8a 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo @@ -6,15 +6,12 @@ mod fp8x23 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; - use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23PartialEq - }; - use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; - use orion::performance::core::PerfomanceTrait; - use orion::performance::implementations::impl_performance_fp::Performance_fp_i8; + use orion::numbers::FP8x23; #[test] #[available_gas(2000000)] @@ -33,7 +30,7 @@ mod fp8x23 { // XSCALE let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); @@ -41,98 +38,109 @@ mod fp8x23 { // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); + let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); - assert((*y.data[0]).into() == FixedTrait::new_unscaled(0, false), '*result[0] == 0'); - assert((*y.data[1]).into() == FixedTrait::new_unscaled(6, false), '*result[1] == 6'); - assert((*y.data[2]).into() == FixedTrait::new_unscaled(250, false), '*result[2] == 250'); - assert((*y.data[3]).into() == FixedTrait::new_unscaled(254, false), '*result[3] == 254'); + assert( + (*y.data[0]).into() == FixedTrait::::new_unscaled(0, false), + '*result[0] == 0' + ); + assert( + (*y.data[1]).into() == FixedTrait::::new_unscaled(6, false), + '*result[1] == 6' + ); + assert( + (*y.data[2]).into() == FixedTrait::::new_unscaled(250, false), + '*result[2] == 250' + ); + assert( + (*y.data[3]).into() == FixedTrait::::new_unscaled(254, false), + '*result[3] == 254' + ); } +// TODO: fix it when move performance tests in nodes. +// #[test] +// #[available_gas(20000000)] +// fn per_axis() { +// // X +// let mut shape = ArrayTrait::::new(); +// shape.append(1); +// shape.append(3); +// shape.append(3); +// shape.append(2); +// let mut data = ArrayTrait::::new(); +// data.append(IntegerTrait::new(3, false)); +// data.append(IntegerTrait::new(89, false)); +// data.append(IntegerTrait::new(34, false)); +// data.append(IntegerTrait::new(127, false)); +// data.append(IntegerTrait::new(74, false)); +// data.append(IntegerTrait::new(59, false)); +// data.append(IntegerTrait::new(5, false)); +// data.append(IntegerTrait::new(24, false)); +// data.append(IntegerTrait::new(24, false)); +// data.append(IntegerTrait::new(87, false)); +// data.append(IntegerTrait::new(32, false)); +// data.append(IntegerTrait::new(13, false)); +// data.append(IntegerTrait::new(127, false)); +// data.append(IntegerTrait::new(99, false)); +// data.append(IntegerTrait::new(4, false)); +// data.append(IntegerTrait::new(127, false)); +// data.append(IntegerTrait::new(121, false)); +// data.append(IntegerTrait::new(102, false)); +// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; +// let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - // TODO: fix it when move performance tests in nodes. - // #[test] - // #[available_gas(20000000)] - // fn per_axis() { - // // X - // let mut shape = ArrayTrait::::new(); - // shape.append(1); - // shape.append(3); - // shape.append(3); - // shape.append(2); - // let mut data = ArrayTrait::::new(); - // data.append(IntegerTrait::new(3, false)); - // data.append(IntegerTrait::new(89, false)); - // data.append(IntegerTrait::new(34, false)); - // data.append(IntegerTrait::new(127, false)); - // data.append(IntegerTrait::new(74, false)); - // data.append(IntegerTrait::new(59, false)); - // data.append(IntegerTrait::new(5, false)); - // data.append(IntegerTrait::new(24, false)); - // data.append(IntegerTrait::new(24, false)); - // data.append(IntegerTrait::new(87, false)); - // data.append(IntegerTrait::new(32, false)); - // data.append(IntegerTrait::new(13, false)); - // data.append(IntegerTrait::new(127, false)); - // data.append(IntegerTrait::new(99, false)); - // data.append(IntegerTrait::new(4, false)); - // data.append(IntegerTrait::new(127, false)); - // data.append(IntegerTrait::new(121, false)); - // data.append(IntegerTrait::new(102, false)); - // let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - // let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - - // // XSCALE - // let mut shape = ArrayTrait::::new(); - // shape.append(1); - // shape.append(3); - // shape.append(1); - // shape.append(1); - // let mut data = ArrayTrait::::new(); - // data.append(FixedTrait::new_unscaled(2, false)); - // data.append(FixedTrait::new_unscaled(4, false)); - // data.append(FixedTrait::new_unscaled(5, false)); - // let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - // let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); +// // XSCALE +// let mut shape = ArrayTrait::::new(); +// shape.append(1); +// shape.append(3); +// shape.append(1); +// shape.append(1); +// let mut data = ArrayTrait::::new(); +// data.append(FixedTrait::new_unscaled(2, false)); +// data.append(FixedTrait::new_unscaled(4, false)); +// data.append(FixedTrait::new_unscaled(5, false)); +// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; +// let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - // // ZEROPOINT - // let mut shape = ArrayTrait::::new(); - // shape.append(1); - // shape.append(3); - // shape.append(1); - // shape.append(1); - // let mut data = ArrayTrait::::new(); - // data.append(FixedTrait::new_unscaled(1, false)); - // data.append(FixedTrait::new_unscaled(2, false)); - // data.append(FixedTrait::new_unscaled(3, false)); - // let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - // let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); +// // ZEROPOINT +// let mut shape = ArrayTrait::::new(); +// shape.append(1); +// shape.append(3); +// shape.append(1); +// shape.append(1); +// let mut data = ArrayTrait::::new(); +// data.append(FixedTrait::new_unscaled(1, false)); +// data.append(FixedTrait::new_unscaled(2, false)); +// data.append(FixedTrait::new_unscaled(3, false)); +// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; +// let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - // let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); +// let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); - // assert((*y.data[0]).into() == FixedTrait::new_unscaled(4, false), '*result[0] == 162'); - // assert((*y.data[1]).into() == FixedTrait::new_unscaled(176, false), '*result[1] == 10'); - // assert((*y.data[2]).into() == FixedTrait::new_unscaled(66, false), '*result[2] == 100'); - // assert((*y.data[3]).into() == FixedTrait::new_unscaled(252, false), '*result[3] == 232'); - // assert((*y.data[4]).into() == FixedTrait::new_unscaled(146, false), '*result[4] == 20'); - // assert((*y.data[5]).into() == FixedTrait::new_unscaled(116, false), '*result[5] == 50'); - // assert((*y.data[6]).into() == FixedTrait::new_unscaled(12, false), '*result[6] == 76'); - // assert((*y.data[7]).into() == FixedTrait::new_unscaled(88, false), '*result[7] == 0'); - // assert((*y.data[8]).into() == FixedTrait::new_unscaled(88, false), '*result[8] == 0'); - // assert((*y.data[9]).into() == FixedTrait::new_unscaled(340, false), '*result[9] == 252'); - // assert((*y.data[10]).into() == FixedTrait::new_unscaled(120, false), '*result[10] == 32'); - // assert((*y.data[11]).into() == FixedTrait::new_unscaled(44, false), '*result[11] == 44'); - // assert((*y.data[12]).into() == FixedTrait::new_unscaled(620, false), '*result[12] == 245'); - // assert((*y.data[13]).into() == FixedTrait::new_unscaled(480, false), '*result[13] == 485'); - // assert((*y.data[14]).into() == FixedTrait::new_unscaled(5, false), '*result[14] == 960'); - // assert((*y.data[15]).into() == FixedTrait::new_unscaled(620, false), '*result[15] == 270'); - // assert((*y.data[16]).into() == FixedTrait::new_unscaled(590, false), '*result[16] == 375'); - // assert((*y.data[17]).into() == FixedTrait::new_unscaled(495, false), '*result[17] == 470'); - // } +// assert((*y.data[0]).into() == FixedTrait::new_unscaled(4, false), '*result[0] == 162'); +// assert((*y.data[1]).into() == FixedTrait::new_unscaled(176, false), '*result[1] == 10'); +// assert((*y.data[2]).into() == FixedTrait::new_unscaled(66, false), '*result[2] == 100'); +// assert((*y.data[3]).into() == FixedTrait::new_unscaled(252, false), '*result[3] == 232'); +// assert((*y.data[4]).into() == FixedTrait::new_unscaled(146, false), '*result[4] == 20'); +// assert((*y.data[5]).into() == FixedTrait::new_unscaled(116, false), '*result[5] == 50'); +// assert((*y.data[6]).into() == FixedTrait::new_unscaled(12, false), '*result[6] == 76'); +// assert((*y.data[7]).into() == FixedTrait::new_unscaled(88, false), '*result[7] == 0'); +// assert((*y.data[8]).into() == FixedTrait::new_unscaled(88, false), '*result[8] == 0'); +// assert((*y.data[9]).into() == FixedTrait::new_unscaled(340, false), '*result[9] == 252'); +// assert((*y.data[10]).into() == FixedTrait::new_unscaled(120, false), '*result[10] == 32'); +// assert((*y.data[11]).into() == FixedTrait::new_unscaled(44, false), '*result[11] == 44'); +// assert((*y.data[12]).into() == FixedTrait::new_unscaled(620, false), '*result[12] == 245'); +// assert((*y.data[13]).into() == FixedTrait::new_unscaled(480, false), '*result[13] == 485'); +// assert((*y.data[14]).into() == FixedTrait::new_unscaled(5, false), '*result[14] == 960'); +// assert((*y.data[15]).into() == FixedTrait::new_unscaled(620, false), '*result[15] == 270'); +// assert((*y.data[16]).into() == FixedTrait::new_unscaled(590, false), '*result[16] == 375'); +// assert((*y.data[17]).into() == FixedTrait::new_unscaled(495, false), '*result[17] == 470'); +// } } #[cfg(test)] @@ -142,16 +150,16 @@ mod fp16x16 { use traits::Into; use debug::PrintTrait; + use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; - use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; - use orion::performance::core::PerfomanceTrait; - use orion::performance::implementations::impl_performance_fp::Performance_fp_i8; + use orion::numbers::FP16x16; #[test] #[available_gas(2000000)] @@ -170,7 +178,7 @@ mod fp16x16 { // XSCALE let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); let extra = Option::::None(()); let x_scale = TensorTrait::new(shape.span(), data.span(), extra); @@ -178,17 +186,29 @@ mod fp16x16 { // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); let extra = Option::::None(()); let x_zero_point = TensorTrait::new(shape.span(), data.span(), extra); - let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); + let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); - assert((*y.data[0]).into() == FixedTrait::new_unscaled(0, false), '*result[0] == 0'); - assert((*y.data[1]).into() == FixedTrait::new_unscaled(6, false), '*result[1] == 6'); - assert((*y.data[2]).into() == FixedTrait::new_unscaled(250, false), '*result[2] == 250'); - assert((*y.data[3]).into() == FixedTrait::new_unscaled(254, false), '*result[3] == 254'); + assert( + (*y.data[0]).into() == FixedTrait::::new_unscaled(0, false), + '*result[0] == 0' + ); + assert( + (*y.data[1]).into() == FixedTrait::::new_unscaled(6, false), + '*result[1] == 6' + ); + assert( + (*y.data[2]).into() == FixedTrait::::new_unscaled(250, false), + '*result[2] == 250' + ); + assert( + (*y.data[3]).into() == FixedTrait::::new_unscaled(254, false), + '*result[3] == 254' + ); } #[test] @@ -228,7 +248,7 @@ mod fp16x16 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); @@ -241,32 +261,86 @@ mod fp16x16 { shape.append(3); shape.append(1); shape.append(1); - let mut data = ArrayTrait::::new(); + let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); - let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); + let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); - assert((*y.data[0]).into() == FixedTrait::new_unscaled(4, false), '*result[0] == 162'); - assert((*y.data[1]).into() == FixedTrait::new_unscaled(176, false), '*result[1] == 10'); - assert((*y.data[2]).into() == FixedTrait::new_unscaled(66, false), '*result[2] == 100'); - assert((*y.data[3]).into() == FixedTrait::new_unscaled(252, false), '*result[3] == 232'); - assert((*y.data[4]).into() == FixedTrait::new_unscaled(146, false), '*result[4] == 20'); - assert((*y.data[5]).into() == FixedTrait::new_unscaled(116, false), '*result[5] == 50'); - assert((*y.data[6]).into() == FixedTrait::new_unscaled(12, false), '*result[6] == 76'); - assert((*y.data[7]).into() == FixedTrait::new_unscaled(88, false), '*result[7] == 0'); - assert((*y.data[8]).into() == FixedTrait::new_unscaled(88, false), '*result[8] == 0'); - assert((*y.data[9]).into() == FixedTrait::new_unscaled(340, false), '*result[9] == 252'); - assert((*y.data[10]).into() == FixedTrait::new_unscaled(120, false), '*result[10] == 32'); - assert((*y.data[11]).into() == FixedTrait::new_unscaled(44, false), '*result[11] == 44'); - assert((*y.data[12]).into() == FixedTrait::new_unscaled(620, false), '*result[12] == 245'); - assert((*y.data[13]).into() == FixedTrait::new_unscaled(480, false), '*result[13] == 485'); - assert((*y.data[14]).into() == FixedTrait::new_unscaled(5, false), '*result[14] == 960'); - assert((*y.data[15]).into() == FixedTrait::new_unscaled(620, false), '*result[15] == 270'); - assert((*y.data[16]).into() == FixedTrait::new_unscaled(590, false), '*result[16] == 375'); - assert((*y.data[17]).into() == FixedTrait::new_unscaled(495, false), '*result[17] == 470'); + assert( + (*y.data[0]).into() == FixedTrait::::new_unscaled(4, false), + '*result[0] == 162' + ); + assert( + (*y.data[1]).into() == FixedTrait::::new_unscaled(176, false), + '*result[1] == 10' + ); + assert( + (*y.data[2]).into() == FixedTrait::::new_unscaled(66, false), + '*result[2] == 100' + ); + assert( + (*y.data[3]).into() == FixedTrait::::new_unscaled(252, false), + '*result[3] == 232' + ); + assert( + (*y.data[4]).into() == FixedTrait::::new_unscaled(146, false), + '*result[4] == 20' + ); + assert( + (*y.data[5]).into() == FixedTrait::::new_unscaled(116, false), + '*result[5] == 50' + ); + assert( + (*y.data[6]).into() == FixedTrait::::new_unscaled(12, false), + '*result[6] == 76' + ); + assert( + (*y.data[7]).into() == FixedTrait::::new_unscaled(88, false), + '*result[7] == 0' + ); + assert( + (*y.data[8]).into() == FixedTrait::::new_unscaled(88, false), + '*result[8] == 0' + ); + assert( + (*y.data[9]).into() == FixedTrait::::new_unscaled(340, false), + '*result[9] == 252' + ); + assert( + (*y.data[10]).into() == FixedTrait::::new_unscaled(120, false), + '*result[10] == 32' + ); + assert( + (*y.data[11]).into() == FixedTrait::::new_unscaled(44, false), + '*result[11] == 44' + ); + assert( + (*y.data[12]).into() == FixedTrait::::new_unscaled(620, false), + '*result[12] == 245' + ); + assert( + (*y.data[13]).into() == FixedTrait::::new_unscaled(480, false), + '*result[13] == 485' + ); + assert( + (*y.data[14]).into() == FixedTrait::::new_unscaled(5, false), + '*result[14] == 960' + ); + assert( + (*y.data[15]).into() == FixedTrait::::new_unscaled(620, false), + '*result[15] == 270' + ); + assert( + (*y.data[16]).into() == FixedTrait::::new_unscaled(590, false), + '*result[16] == 375' + ); + assert( + (*y.data[17]).into() == FixedTrait::::new_unscaled(495, false), + '*result[17] == 470' + ); } } diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo index 4423600bc..762b4c4ea 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo @@ -4,12 +4,10 @@ use array::SpanTrait; use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; -use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; #[test] #[available_gas(2000000)] From e1602f11294d88ac3c114b5bad460c99bb181e72 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 18:12:01 +0300 Subject: [PATCH 090/179] remove performance trait --- src/lib.cairo | 1 - src/performance.cairo | 4 - src/performance/core.cairo | 153 ------------------ src/performance/functional.cairo | 2 - .../functional/dequantize_linear.cairo | 2 - .../dequantize_linear_fp.cairo | 3 - .../dequantize_linear_fp/core.cairo | 25 --- .../dequantize_linear_fp/fp16x16.cairo | 61 ------- .../dequantize_linear_fp/fp8x23.cairo | 61 ------- .../dequantize_linear_i32.cairo | 58 ------- .../functional/quantize_linear.cairo | 106 ------------ .../quantize_linear/quantize_linear_fp.cairo | 1 - .../quantize_linear_fp/fp_i8.cairo | 3 - .../quantize_linear_fp/fp_i8/core.cairo | 26 --- .../quantize_linear_fp/fp_i8/fp16x16.cairo | 66 -------- .../quantize_linear_fp/fp_i8/fp8x23.cairo | 67 -------- .../quantize_linear/quantize_linear_i32.cairo | 59 ------- src/performance/implementations.cairo | 2 - .../impl_performance_fp8x23_i8.cairo | 24 --- .../impl_performance_i32_i8.cairo | 26 --- .../quantize_linear_i32_test.cairo | 1 - 21 files changed, 751 deletions(-) delete mode 100644 src/performance.cairo delete mode 100644 src/performance/core.cairo delete mode 100644 src/performance/functional.cairo delete mode 100644 src/performance/functional/dequantize_linear.cairo delete mode 100644 src/performance/functional/dequantize_linear/dequantize_linear_fp.cairo delete mode 100644 src/performance/functional/dequantize_linear/dequantize_linear_fp/core.cairo delete mode 100644 src/performance/functional/dequantize_linear/dequantize_linear_fp/fp16x16.cairo delete mode 100644 src/performance/functional/dequantize_linear/dequantize_linear_fp/fp8x23.cairo delete mode 100644 src/performance/functional/dequantize_linear/dequantize_linear_i32.cairo delete mode 100644 src/performance/functional/quantize_linear.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_fp.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/core.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp16x16.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp8x23.cairo delete mode 100644 src/performance/functional/quantize_linear/quantize_linear_i32.cairo delete mode 100644 src/performance/implementations.cairo delete mode 100644 src/performance/implementations/impl_performance_fp8x23_i8.cairo delete mode 100644 src/performance/implementations/impl_performance_i32_i8.cairo diff --git a/src/lib.cairo b/src/lib.cairo index 4b62df94d..7cc13d360 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,4 +1,3 @@ -mod performance; mod operators; mod numbers; mod tests; diff --git a/src/performance.cairo b/src/performance.cairo deleted file mode 100644 index f8caa9fac..000000000 --- a/src/performance.cairo +++ /dev/null @@ -1,4 +0,0 @@ -mod functional; -mod implementations; -mod core; - diff --git a/src/performance/core.cairo b/src/performance/core.cairo deleted file mode 100644 index 54ba66584..000000000 --- a/src/performance/core.cairo +++ /dev/null @@ -1,153 +0,0 @@ -use orion::operators::tensor::core::Tensor; - -/// Trait -/// -/// quantize_linear - Quantizes a Tensor using linear quantization. -/// dequantize_linear - Dequantizes a Tensor using linear dequantization. -trait PerfomanceTrait { - /// # performance.quantize_linear - /// - /// ```rust - /// fn quantize_linear(self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor) -> Tensor::; - /// ``` - /// - /// Quantizes a Tensor using linear quantization. - /// - /// The linear quantization operator. It consumes a high precision tensor, a scale, and a zero point - /// to compute the low precision / quantized tensor. The scale factor and zero point must have same shape, - /// and can be either a scalar for per-tensor / per layer quantization, or a 1-D tensor for per-axis quantization. - /// The quantization formula is `y = saturate ((x / y_scale) + y_zero_point)`. For saturation, it saturates to `[-128, 127]`. - /// For (x / y_scale), it's rounding to the nearest even. - /// - /// ## Args - /// - /// * `self`(`@Tensor`) - The input tensor. - /// * `y_scale`(`@Tensor`) - Scale for doing quantization to get `y`. - /// * `y_zero_point`(`@Tensor`) - Zero point for doing quantization to get `y`. - /// - /// ## Returns - /// - /// A new `Tensor` with the same shape as the input tensor, containing the quantized values. - /// - /// ## Examples - /// - /// ```rust - /// use array::{ArrayTrait, SpanTrait}; - /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::signed_integer::i8::i8; - /// use orion::performance::core::PerfomanceTrait; - /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - /// - /// fn quantize_linear_example() -> Tensor { - /// // We instantiate a 1D Tensor here. - /// let x = TensorTrait::::new( - /// shape: array![6].span(), - /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), - /// IntegerTrait::new(1000, false), - /// IntegerTrait::new(254, true), - /// IntegerTrait::new(1000, true), - /// ] - /// .span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the y_scale here. - /// let y_scale = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(2, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the y_zero_point here. - /// let y_zero_point = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(1, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// return x.quantize_linear(@y_scale, @y_zero_point); - /// } - /// >>> [1, 2, 2, 127, -126, -128] - /// ``` - /// - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor::; - /// # performance.dequantize_linear - /// - /// ```rust - /// fn dequantize_linear(self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor) -> Tensor::; - /// ``` - /// - /// Dequantizes a Tensor using linear dequantization. - /// - /// The linear dequantization operator. It consumes a quantized tensor, a scale, and a zero point to compute - /// the full precision tensor. The dequantization formula is y = (x - x_zero_point) * x_scale. x_scale and - /// x_zero_point must have same shape, and can be either a scalar for per-tensor / per layer quantization, - /// or a 1-D tensor for per-axis quantization. - /// - /// ## Args - /// - /// * `self`(`@Tensor`) - The input tensor. - /// * `x_scale`(`@Tensor`) - Scale for input `x`. - /// * `x_zero_point`(`@Tensor`) - Zero point for input `x`. - /// - /// ## Returns - /// - /// A new `Tensor` with the same shape as the input tensor, containing the dequantized values. - /// - /// ## Examples - /// - /// ```rust - /// use array::{ArrayTrait, SpanTrait}; - /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - /// use orion::numbers::signed_integer::i32::i32; - /// use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; - /// use orion::performance::core::PerfomanceTrait; - /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - /// - /// fn dequantize_linear_example() -> Tensor { - /// // We instantiate a 1D Tensor here. - /// let x = TensorTrait::::new( - /// shape: array![4].span(), - /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(3, false), - /// IntegerTrait::new(125, false), - /// IntegerTrait::new(127, false), - /// ].span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the x_scale here. - /// let x_scale = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(2, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the x_zero_point here. - /// let x_zero_point = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(0, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// return x.dequantize_linear(@x_scale, @x_zero_point); - /// } - /// >>> [0, 6, 250, 254] - /// ``` - /// - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor::; -} diff --git a/src/performance/functional.cairo b/src/performance/functional.cairo deleted file mode 100644 index cbe446621..000000000 --- a/src/performance/functional.cairo +++ /dev/null @@ -1,2 +0,0 @@ -mod quantize_linear; -// mod dequantize_linear; diff --git a/src/performance/functional/dequantize_linear.cairo b/src/performance/functional/dequantize_linear.cairo deleted file mode 100644 index 5225b8b79..000000000 --- a/src/performance/functional/dequantize_linear.cairo +++ /dev/null @@ -1,2 +0,0 @@ -mod dequantize_linear_i32; -mod dequantize_linear_fp; diff --git a/src/performance/functional/dequantize_linear/dequantize_linear_fp.cairo b/src/performance/functional/dequantize_linear/dequantize_linear_fp.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/performance/functional/dequantize_linear/dequantize_linear_fp.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/performance/functional/dequantize_linear/dequantize_linear_fp/core.cairo b/src/performance/functional/dequantize_linear/dequantize_linear_fp/core.cairo deleted file mode 100644 index 15ff0a4ad..000000000 --- a/src/performance/functional/dequantize_linear/dequantize_linear_fp/core.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor}; -use orion::performance::functional::dequantize_linear::dequantize_linear_fp::fp8x23; -use orion::performance::functional::dequantize_linear::dequantize_linear_fp::fp16x16; - -/// Cf: PerfomanceTrait::dequantize_linear docstring -fn dequantize_linear( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Option> { - match *x.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::dequantize_linear(x, x_scale, x_zero_point) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::dequantize_linear(x, x_scale, x_zero_point) - ), - }, - Option::None(_) => Option::Some(fp16x16::dequantize_linear(x, x_scale, x_zero_point)), - }, - Option::None(_) => Option::Some(fp16x16::dequantize_linear(x, x_scale, x_zero_point)), - } -} diff --git a/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp16x16.cairo b/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp16x16.cairo deleted file mode 100644 index 292e7114f..000000000 --- a/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp16x16.cairo +++ /dev/null @@ -1,61 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::{i8, i8_to_fp16x16}; -use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Sub, FP16x16Mul}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::core::FixedType; -use orion::operators::tensor::implementations::impl_tensor_fp::{ - Tensor_fp, FixedTypeTensorSub, FixedTypeTensorMul -}; -use orion::operators::tensor::implementations::impl_tensor_i8::TensorI8IntoTensorFP; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::saturate; - -/// Cf: PerfomanceTrait::dequantize_linear docstring -fn dequantize_linear( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - if (*x_scale.data).len() == 1 && (*x_zero_point.data).len() == 1 { - dequantize_element_wise(*x, *x_scale.data[0], *x_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *x_scale.shape); - check_compatibility(*x.shape, *x_zero_point.shape); - check_compatibility(*x_scale.shape, *x_zero_point.shape); - dequantize_per_axis(@(*x).into(), x_scale, x_zero_point) - } -} - -fn dequantize_per_axis( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - (*x - *x_zero_point) * *x_scale -} - -fn dequantize_element_wise( - mut x: Tensor::, x_scale: FixedType, x_zero_point: FixedType -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let dequantized = dequantize(*item, x_scale, x_zero_point); - result_data.append(dequantized); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn dequantize(x: i8, x_scale: FixedType, x_zero_point: FixedType) -> FixedType { - (i8_to_fp16x16(x) - x_zero_point) * x_scale -} diff --git a/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp8x23.cairo b/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp8x23.cairo deleted file mode 100644 index 1ffa2a3e8..000000000 --- a/src/performance/functional/dequantize_linear/dequantize_linear_fp/fp8x23.cairo +++ /dev/null @@ -1,61 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::i8::{i8, i8_to_fp8x23}; -use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Sub, FP8x23Mul}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::core::FixedType; -use orion::operators::tensor::implementations::impl_tensor_fp::{ - Tensor_fp, FixedTypeTensorSub, FixedTypeTensorMul -}; -use orion::operators::tensor::implementations::impl_tensor_i8::TensorI8IntoTensorFP; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::saturate; - -/// Cf: PerfomanceTrait::dequantize_linear docstring -fn dequantize_linear( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - if (*x_scale.data).len() == 1 && (*x_zero_point.data).len() == 1 { - dequantize_element_wise(*x, *x_scale.data[0], *x_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *x_scale.shape); - check_compatibility(*x.shape, *x_zero_point.shape); - check_compatibility(*x_scale.shape, *x_zero_point.shape); - dequantize_per_axis(@(*x).into(), x_scale, x_zero_point) - } -} - -fn dequantize_per_axis( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - (*x - *x_zero_point) * *x_scale -} - -fn dequantize_element_wise( - mut x: Tensor::, x_scale: FixedType, x_zero_point: FixedType -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let dequantized = dequantize(*item, x_scale, x_zero_point); - result_data.append(dequantized); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn dequantize(x: i8, x_scale: FixedType, x_zero_point: FixedType) -> FixedType { - (i8_to_fp8x23(x) - x_zero_point) * x_scale -} diff --git a/src/performance/functional/dequantize_linear/dequantize_linear_i32.cairo b/src/performance/functional/dequantize_linear/dequantize_linear_i32.cairo deleted file mode 100644 index 8d289c2c7..000000000 --- a/src/performance/functional/dequantize_linear/dequantize_linear_i32.cairo +++ /dev/null @@ -1,58 +0,0 @@ -use core::traits::Into; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i32::{ - Tensor_i32, i32TensorSub, i32TensorMul -}; -use orion::operators::tensor::implementations::impl_tensor_i8::TensorI8IntoTensorI32; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::saturate; - -/// Cf: PerfomanceTrait::dequantize_linear docstring -fn dequantize_linear( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - if (*x_scale.data).len() == 1 && (*x_zero_point.data).len() == 1 { - dequantize_element_wise(*x, *x_scale.data[0], *x_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *x_scale.shape); - check_compatibility(*x.shape, *x_zero_point.shape); - check_compatibility(*x_scale.shape, *x_zero_point.shape); - dequantize_per_axis(@(*x).into(), x_scale, x_zero_point) - } -} - -fn dequantize_per_axis( - x: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - (*x - *x_zero_point) * *x_scale -} - -fn dequantize_element_wise(mut x: Tensor::, x_scale: i32, x_zero_point: i32) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let dequantized = dequantize(*item, x_scale, x_zero_point); - result_data.append(dequantized); - }, - Option::None(_) => { - break; - } - }; - }; - - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn dequantize(x: i8, x_scale: i32, x_zero_point: i32) -> i32 { - (x.into() - x_zero_point) * x_scale -} diff --git a/src/performance/functional/quantize_linear.cairo b/src/performance/functional/quantize_linear.cairo deleted file mode 100644 index 6512ca9c4..000000000 --- a/src/performance/functional/quantize_linear.cairo +++ /dev/null @@ -1,106 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::TryInto; - -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; -use orion::operators::tensor::math::arithmetic::saturated_add; -use orion::utils::saturate; - -/// Cf: PerfomanceTrait::quantize_linear docstring -fn quantize_linear< - T, - F, - Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, - impl TAdd: Add, - impl TDiv: Div, - impl TTensorDiv: Div>, - impl TPartialOrd: PartialOrd, - impl TTryInto: TryInto, - impl TCopy: Copy, - impl TDrop: Drop, - impl QCopy: Copy, - impl QDrop: Drop, ->( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T -) -> Tensor:: { - if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { - quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0], min, max) - } else { - check_compatibility(*x.shape, *y_scale.shape); - check_compatibility(*x.shape, *y_zero_point.shape); - check_compatibility(*y_scale.shape, *y_zero_point.shape); - quantize_per_axis(x, y_scale, y_zero_point, min, max) - } -} - -fn quantize_per_axis< - T, - F, - Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, - impl TAdd: Add, - impl TTensorDiv: Div>, - impl TPartialOrd: PartialOrd, - impl TTryInto: TryInto, - impl TCopy: Copy, - impl TDrop: Drop, - impl QDrop: Drop, ->( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor, min: T, max: T -) -> Tensor:: { - saturated_add(@(*x / *y_scale), y_zero_point, min, max) -} - -fn quantize_element_wise< - T, - F, - Q, - impl TCopy: Copy, - impl TDrop: Drop, - impl QCopy: Copy, - impl QDrop: Drop, - impl TPartialOrd: PartialOrd, - impl TDiv: Div, - impl TAdd: Add, - impl TTryIntoQ: TryInto, - impl QTensor: TensorTrait ->( - mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let quantized = quantize(*item, y_scale, y_zero_point, min, max); - result_data.append(quantized); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn quantize< - T, - Q, - impl TCopy: Copy, - impl TDrop: Drop, - impl TPartialOrd: PartialOrd, - impl TDiv: Div, - impl TAdd: Add, - impl TTryIntoQ: TryInto ->( - x: T, y_scale: T, y_zero_point: T, min: T, max: T -) -> Q { - saturate(min, max, ((x / y_scale) + y_zero_point)).try_into().unwrap() -} diff --git a/src/performance/functional/quantize_linear/quantize_linear_fp.cairo b/src/performance/functional/quantize_linear/quantize_linear_fp.cairo deleted file mode 100644 index 339155638..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_fp.cairo +++ /dev/null @@ -1 +0,0 @@ -mod fp_i8; diff --git a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8.cairo b/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8.cairo deleted file mode 100644 index 50d44d68c..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8.cairo +++ /dev/null @@ -1,3 +0,0 @@ -mod core; -mod fp8x23; -mod fp16x16; diff --git a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/core.cairo b/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/core.cairo deleted file mode 100644 index 58890ed2f..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/core.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{Tensor, ExtraParams}; -use orion::numbers::signed_integer::i8::i8; -use orion::performance::functional::quantize_linear::quantize_linear_fp::fp_i8::fp8x23; -use orion::performance::functional::quantize_linear::quantize_linear_fp::fp_i8::fp16x16; -use orion::numbers::signed_integer::i32::i32; - -/// Cf: PerfomanceTrait::quantize_linear docstring -fn quantize_linear( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Option> { - match *x.extra { - Option::Some(extra_params) => match extra_params.fixed_point { - Option::Some(fixed_point) => match fixed_point { - FixedImpl::FP8x23(()) => Option::Some( - fp8x23::quantize_linear(x, y_scale, y_zero_point) - ), - FixedImpl::FP16x16(()) => Option::Some( - fp16x16::quantize_linear(x, y_scale, y_zero_point) - ), - }, - Option::None(_) => Option::Some(fp16x16::quantize_linear(x, y_scale, y_zero_point)), - }, - Option::None(_) => Option::Some(fp16x16::quantize_linear(x, y_scale, y_zero_point)), - } -} diff --git a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp16x16.cairo b/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp16x16.cairo deleted file mode 100644 index 85cf16238..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp16x16.cairo +++ /dev/null @@ -1,66 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::TryInto; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialOrd, FP16x16Div, FP16x16Add, FP16x16TryIntoI8 -}; -use orion::operators::tensor::math::arithmetic::arithmetic_fp::fp16x16::{ - saturated_add_i8, saturated_div -}; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::{saturate}; - -/// Cf: PerfomanceTrait::quantize_linear docstring -fn quantize_linear( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { - quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *y_scale.shape); - check_compatibility(*x.shape, *y_zero_point.shape); - check_compatibility(*y_scale.shape, *y_zero_point.shape); - quantize_per_axis(x, y_scale, y_zero_point) - } -} - -fn quantize_per_axis( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - saturated_add_i8(@(*x / *y_scale), y_zero_point) -} - -fn quantize_element_wise( - mut x: Tensor::, y_scale: FixedType, y_zero_point: FixedType -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let quantized = quantize(*item, y_scale, y_zero_point); - result_data.append(quantized.try_into().unwrap()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn quantize(x: FixedType, y_scale: FixedType, y_zero_point: FixedType) -> FixedType { - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - ((x / y_scale) + y_zero_point) - ) -} diff --git a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp8x23.cairo b/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp8x23.cairo deleted file mode 100644 index 8995acd6a..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_fp/fp_i8/fp8x23.cairo +++ /dev/null @@ -1,67 +0,0 @@ -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::TryInto; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp, FixedTypeTensorDiv}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::fixed_point::implementations::fp8x23::core::{ - FP8x23Impl, FP8x23PartialOrd, FP8x23Div, FP8x23Add, FP8x23TryIntoI8 -}; -use orion::operators::tensor::math::arithmetic::arithmetic_fp::fp8x23::{ - saturated_add_i8, saturated_div -}; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::{saturate}; - -/// Cf: PerfomanceTrait::quantize_linear docstring -fn quantize_linear( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { - quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *y_scale.shape); - check_compatibility(*x.shape, *y_zero_point.shape); - check_compatibility(*y_scale.shape, *y_zero_point.shape); - quantize_per_axis(x, y_scale, y_zero_point) - } -} - -fn quantize_per_axis( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - saturated_add_i8(@(*x / *y_scale), y_zero_point) -} - -fn quantize_element_wise( - mut x: Tensor::, y_scale: FixedType, y_zero_point: FixedType -) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let quantized = quantize(*item, y_scale, y_zero_point); - result_data.append(quantized.try_into().unwrap()); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - - -fn quantize(x: FixedType, y_scale: FixedType, y_zero_point: FixedType) -> FixedType { - saturate( - FixedTrait::new_unscaled(128, true), - FixedTrait::new_unscaled(127, false), - ((x / y_scale) + y_zero_point) - ) -} diff --git a/src/performance/functional/quantize_linear/quantize_linear_i32.cairo b/src/performance/functional/quantize_linear/quantize_linear_i32.cairo deleted file mode 100644 index f98be60a2..000000000 --- a/src/performance/functional/quantize_linear/quantize_linear_i32.cairo +++ /dev/null @@ -1,59 +0,0 @@ -use core::debug::PrintTrait; -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::TryInto; - -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32, i32TensorDiv, }; -use orion::operators::tensor::implementations::impl_tensor_i8::{Tensor_i8, i8TensorDiv, }; -use orion::operators::tensor::math::arithmetic::arithmetic_i32::{saturated_add_i8}; -use orion::operators::tensor::helpers::check_compatibility; -use orion::utils::saturate; - -/// Cf: PerfomanceTrait::quantize_linear docstring -fn quantize_linear( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - if (*y_scale.data).len() == 1 && (*y_zero_point.data).len() == 1 { - quantize_element_wise(*x, *y_scale.data[0], *y_zero_point.data[0]) - } else { - check_compatibility(*x.shape, *y_scale.shape); - check_compatibility(*x.shape, *y_zero_point.shape); - check_compatibility(*y_scale.shape, *y_zero_point.shape); - quantize_per_axis(x, y_scale, y_zero_point) - } -} - -fn quantize_per_axis( - x: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor -) -> Tensor:: { - saturated_add_i8(@(*x / *y_scale), y_zero_point) -} - -fn quantize_element_wise(mut x: Tensor::, y_scale: i32, y_zero_point: i32) -> Tensor:: { - let mut result_data = ArrayTrait::::new(); - - loop { - match x.data.pop_front() { - Option::Some(item) => { - let quantized = quantize(*item, y_scale, y_zero_point); - result_data.append(quantized); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(x.shape, result_data.span(), x.extra); -} - -fn quantize(x: i32, y_scale: i32, y_zero_point: i32) -> i8 { - saturate( - IntegerTrait::new(128, true), IntegerTrait::new(127, false), ((x / y_scale) + y_zero_point) - ) - .try_into() - .unwrap() -} diff --git a/src/performance/implementations.cairo b/src/performance/implementations.cairo deleted file mode 100644 index 0f0a1d230..000000000 --- a/src/performance/implementations.cairo +++ /dev/null @@ -1,2 +0,0 @@ -// mod impl_performance_i32_i8; -// mod impl_performance_fp8x23_i8; diff --git a/src/performance/implementations/impl_performance_fp8x23_i8.cairo b/src/performance/implementations/impl_performance_fp8x23_i8.cairo deleted file mode 100644 index ec60cb3f5..000000000 --- a/src/performance/implementations/impl_performance_fp8x23_i8.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use core::option::OptionTrait; - -use orion::numbers::signed_integer::i8::i8; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; - -use orion::operators::tensor::core::Tensor; -use orion::performance::core::PerfomanceTrait; - -impl Performance_fp_i8 of PerfomanceTrait { - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor { - //quantize_linear(self, y_scale, y_zero_point).unwrap() - panic(array![]) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor { - //dequantize_linear(self, x_scale, x_zero_point).unwrap() - panic(array![]) - } -} diff --git a/src/performance/implementations/impl_performance_i32_i8.cairo b/src/performance/implementations/impl_performance_i32_i8.cairo deleted file mode 100644 index 70a759f16..000000000 --- a/src/performance/implementations/impl_performance_i32_i8.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use orion::numbers::signed_integer::{i32::i32, i8::i8}; - -use orion::operators::tensor::core::Tensor; -use orion::operators::tensor::implementations::tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23; - -use orion::performance::core::PerfomanceTrait; -use orion::performance::functional; - - -impl Performance_i32_i8 of PerfomanceTrait { - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor { - functional::quantize_linear::quantize_linear( - self, y_scale, y_zero_point, i32 { mag: 128, sign: true }, i32 { mag: 127, sign: false } - ) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor { - //dequantize_linear(self, x_scale, x_zero_point) - panic(array![]) - } -} diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 8ece06a41..2ddd3149f 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -7,7 +7,6 @@ use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8:: use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; -use orion::performance::core::PerfomanceTrait; #[test] #[available_gas(2000000)] From 07d90d2cdb3cbb5b3f5906a8e3aa8caf13fb5fda Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 18:39:46 +0300 Subject: [PATCH 091/179] Update tensor.cairo --- src/operators/tensor.cairo | 47 +++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 86e18b1db..10e597dff 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -4,4 +4,49 @@ mod math; mod linalg; mod quantization; mod implementations; - \ No newline at end of file + +use orion::operators::tensor::core::{Tensor, ExtraParams, TensorSerde, TensorTrait}; + +use orion::operators::tensor::implementations::tensor_fp8x23::{ + Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, + FP8x23TensorPartialEq, +}; + +use orion::operators::tensor::implementations::tensor_fp16x16::{ + Tensor_fp16x16, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, + FP16x16TensorPartialEq, +}; + +use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ + Tensor_i8_fp8x23, i8TensorAdd as i8FP8x23TensorAdd, i8TensorSub as i8FP8x23Sub, + i8TensorMul as i8FP8x23Mul, i8TensorDiv as i8FP8x23Div, + TensorI8IntoTensorI32 as TensorI8FP8x23IntoTensorI32, + TensorI8IntoTensorFP8x23 as TensorI8FP8x23IntoTensorFP8x23, +}; + +use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ + Tensor_i8_fp16x16, i8TensorAdd as i8FP16x16TensorAdd, i8TensorSub as i8FP16x16Sub, + i8TensorMul as i8FP16x16Mul, i8TensorDiv as i8FP16x16Div, + TensorI8IntoTensorI32 as TensorI8FP16x16IntoTensorI32, + TensorI8IntoTensorFP16x16 as TensorI8FP16x16IntoTensorFP16x16, +}; + +use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ + Tensor_i32_fp8x23, i32TensorAdd as i32FP8x23TensorAdd, i32TensorSub as i32FP8x23Sub, + i32TensorMul as i32FP8x23Mul, i32TensorDiv as i32FP8x23Div, +}; + +use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ + Tensor_i32_fp16x16, i32TensorAdd as i32FP16x16TensorAdd, i32TensorSub as i32FP16x16Sub, + i32TensorMul as i32FP16x16Mul, i32TensorDiv as i32FP16x16Div, +}; + +use orion::operators::tensor::implementations::tensor_u32_fp8x23::{ + Tensor_u32_fp8x23, u32TensorAdd as u32FP8x23TensorAdd, u32TensorSub as u32FP8x23Sub, + u32TensorMul as u32FP8x23Mul, u32TensorDiv as u32FP8x23Div, +}; + +use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ + Tensor_u32_fp16x16, u32TensorAdd as u32FP16x16TensorAdd, u32TensorSub as u32FP16x16Sub, + u32TensorMul as u32FP16x16Mul, u32TensorDiv as u32FP16x16Div, +}; From aab3aa7b0c74ba5ad270cd49469e9319ee01ffb2 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 18:49:12 +0300 Subject: [PATCH 092/179] Update numbers.cairo --- src/numbers.cairo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/numbers.cairo b/src/numbers.cairo index 1bc61336d..9b8a1757b 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -1,6 +1,8 @@ mod fixed_point; mod signed_integer; +use orion::numbers::fixed_point::core::FixedTrait; + // Common methods from Fixed Point and Signed Integers. trait NumberTrait { fn new(mag: MAG, sign: bool) -> T; From 0242f66659c147e6511cd66a01c9f501ef15ad87 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 19:10:18 +0300 Subject: [PATCH 093/179] update fixed point doc --- docgen/src/main.rs | 8 - docs/framework/numbers/fixed-point/fp.abs.md | 10 +- docs/framework/numbers/fixed-point/fp.acos.md | 9 +- .../numbers/fixed-point/fp.acos_fast.md | 9 +- .../framework/numbers/fixed-point/fp.acosh.md | 9 +- docs/framework/numbers/fixed-point/fp.asin.md | 9 +- .../numbers/fixed-point/fp.asin_fast.md | 9 +- .../framework/numbers/fixed-point/fp.asinh.md | 9 +- docs/framework/numbers/fixed-point/fp.atan.md | 9 +- .../numbers/fixed-point/fp.atan_fast.md | 9 +- .../framework/numbers/fixed-point/fp.atanh.md | 9 +- docs/framework/numbers/fixed-point/fp.ceil.md | 9 +- docs/framework/numbers/fixed-point/fp.cos.md | 9 +- .../numbers/fixed-point/fp.cos_fast.md | 9 +- docs/framework/numbers/fixed-point/fp.cosh.md | 9 +- docs/framework/numbers/fixed-point/fp.exp.md | 9 +- docs/framework/numbers/fixed-point/fp.exp2.md | 9 +- .../framework/numbers/fixed-point/fp.floor.md | 9 +- .../numbers/fixed-point/fp.from_felt.md | 10 +- docs/framework/numbers/fixed-point/fp.ln.md | 9 +- .../framework/numbers/fixed-point/fp.log10.md | 9 +- docs/framework/numbers/fixed-point/fp.log2.md | 9 +- docs/framework/numbers/fixed-point/fp.new.md | 9 +- .../numbers/fixed-point/fp.new_unscaled.md | 9 +- docs/framework/numbers/fixed-point/fp.pow.md | 11 +- .../framework/numbers/fixed-point/fp.round.md | 9 +- docs/framework/numbers/fixed-point/fp.sin.md | 9 +- .../numbers/fixed-point/fp.sin_fast.md | 9 +- docs/framework/numbers/fixed-point/fp.sinh.md | 9 +- docs/framework/numbers/fixed-point/fp.sqrt.md | 9 +- docs/framework/numbers/fixed-point/fp.tan.md | 9 +- .../numbers/fixed-point/fp.tan_fast.md | 9 +- docs/framework/numbers/fixed-point/fp.tanh.md | 9 +- .../operators/neural-network/README.md | 20 +- .../tensor/tensor.dequantize_linear.md | 67 ++++ .../tensor/tensor.quantize_linear.md | 70 +++++ src/numbers/fixed_point/core.cairo | 294 ++++++++---------- 37 files changed, 412 insertions(+), 339 deletions(-) create mode 100644 docs/framework/operators/tensor/tensor.dequantize_linear.md create mode 100644 docs/framework/operators/tensor/tensor.quantize_linear.md diff --git a/docgen/src/main.rs b/docgen/src/main.rs index 330332432..493511d4c 100644 --- a/docgen/src/main.rs +++ b/docgen/src/main.rs @@ -34,14 +34,6 @@ fn main() { let trait_name: &str = "IntegerTrait"; doc_trait(trait_path, doc_path, label); doc_functions(trait_path, doc_path, trait_name, label); - - // PERFORMANCE DOC - let trait_path = "src/performance/core.cairo"; - let doc_path = "docs/framework/performance"; - let label = "performance"; - let trait_name = "PerfomanceTrait"; - doc_trait(trait_path, doc_path, label); - doc_functions(trait_path, doc_path, trait_name, label); } fn doc_trait(trait_path: &str, doc_path: &str, label: &str) { diff --git a/docs/framework/numbers/fixed-point/fp.abs.md b/docs/framework/numbers/fixed-point/fp.abs.md index 13e01d26a..a7dd2db49 100644 --- a/docs/framework/numbers/fixed-point/fp.abs.md +++ b/docs/framework/numbers/fixed-point/fp.abs.md @@ -1,14 +1,14 @@ # fp.abs ```rust -fn abs(self: FixedType) -> FixedType; +fn abs(self: T) -> T; ``` Returns the absolute value of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,10 @@ The absolute value of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn abs_fp_example() -> FixedType { + +fn abs_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, true); diff --git a/docs/framework/numbers/fixed-point/fp.acos.md b/docs/framework/numbers/fixed-point/fp.acos.md index 5998cf793..7b2d82ca5 100644 --- a/docs/framework/numbers/fixed-point/fp.acos.md +++ b/docs/framework/numbers/fixed-point/fp.acos.md @@ -1,14 +1,14 @@ # fp.acos ```rust -fn acos(self: FixedType) -> FixedType; +fn acos(self: T) -> T; ``` Returns the arccosine (inverse of cosine) of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the acos of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn acos_fp_example() -> FixedType { +fn acos_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, true); diff --git a/docs/framework/numbers/fixed-point/fp.acos_fast.md b/docs/framework/numbers/fixed-point/fp.acos_fast.md index e8e982994..bd9aaa1d9 100644 --- a/docs/framework/numbers/fixed-point/fp.acos_fast.md +++ b/docs/framework/numbers/fixed-point/fp.acos_fast.md @@ -1,14 +1,14 @@ # fp.acos_fast ```rust -fn acos_fast(self: FixedType) -> FixedType; +fn acos_fast(self: T) -> T; ``` Returns the arccosine (inverse of cosine) of the fixed point number faster with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the acos of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn acos_fast_fp_example() -> FixedType { +fn acos_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, true); diff --git a/docs/framework/numbers/fixed-point/fp.acosh.md b/docs/framework/numbers/fixed-point/fp.acosh.md index 4a394bc91..685adddab 100644 --- a/docs/framework/numbers/fixed-point/fp.acosh.md +++ b/docs/framework/numbers/fixed-point/fp.acosh.md @@ -1,14 +1,14 @@ # fp.acosh ```rust -fn acosh(self: FixedType) -> FixedType; +fn acosh(self: T) -> T; ``` Returns the value of the inverse hyperbolic cosine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The inverse hyperbolic cosine of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn acosh_fp_example() -> FixedType { +fn acosh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.asin.md b/docs/framework/numbers/fixed-point/fp.asin.md index 9c0838bc7..e012f6295 100644 --- a/docs/framework/numbers/fixed-point/fp.asin.md +++ b/docs/framework/numbers/fixed-point/fp.asin.md @@ -1,14 +1,14 @@ # fp.asin ```rust -fn asin(self: FixedType) -> FixedType; +fn asin(self: T) -> T; ``` Returns the arcsine (inverse of sine) of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the asin of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn asin_fp_example() -> FixedType { +fn asin_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, false); diff --git a/docs/framework/numbers/fixed-point/fp.asin_fast.md b/docs/framework/numbers/fixed-point/fp.asin_fast.md index 4c090d308..e4a032d87 100644 --- a/docs/framework/numbers/fixed-point/fp.asin_fast.md +++ b/docs/framework/numbers/fixed-point/fp.asin_fast.md @@ -1,14 +1,14 @@ # fp.asin_fast ```rust -fn asin_fast(self: FixedType) -> FixedType; +fn asin_fast(self: T) -> T; ``` Returns the arcsine (inverse of sine) of the fixed point number faster with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the asin of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn asin_fast_fp_example() -> FixedType { +fn asin_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, false); diff --git a/docs/framework/numbers/fixed-point/fp.asinh.md b/docs/framework/numbers/fixed-point/fp.asinh.md index edfe579b0..43a7128e1 100644 --- a/docs/framework/numbers/fixed-point/fp.asinh.md +++ b/docs/framework/numbers/fixed-point/fp.asinh.md @@ -1,14 +1,14 @@ # fp.asinh ```rust -fn asinh(self: FixedType) -> FixedType; +fn asinh(self: T) -> T; ``` Returns the value of the inverse hyperbolic sine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The inverse hyperbolic sine of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn asinh_fp_example() -> FixedType { +fn asinh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.atan.md b/docs/framework/numbers/fixed-point/fp.atan.md index febb7a7ab..87f04eb43 100644 --- a/docs/framework/numbers/fixed-point/fp.atan.md +++ b/docs/framework/numbers/fixed-point/fp.atan.md @@ -1,14 +1,14 @@ # fp.atan ```rust -fn atan(self: FixedType) -> FixedType; +fn atan(self: T) -> T; ``` Returns the arctangent (inverse of tangent) of the input fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the arctangent (inverse of tangent) of the inp ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn atan_fp_example() -> FixedType { +fn atan_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.atan_fast.md b/docs/framework/numbers/fixed-point/fp.atan_fast.md index f60d7100d..9cd91edc7 100644 --- a/docs/framework/numbers/fixed-point/fp.atan_fast.md +++ b/docs/framework/numbers/fixed-point/fp.atan_fast.md @@ -1,14 +1,14 @@ # fp.atan_fast ```rust -fn atan_fast(self: FixedType) -> FixedType; +fn atan_fast(self: T) -> T; ``` Returns the arctangent (inverse of tangent) of the input fixed point number faster with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the arctangent (inverse of tangent) of the inp ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn atan_fast_fp_example() -> FixedType { +fn atan_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.atanh.md b/docs/framework/numbers/fixed-point/fp.atanh.md index 6c37618d6..21b0bf3be 100644 --- a/docs/framework/numbers/fixed-point/fp.atanh.md +++ b/docs/framework/numbers/fixed-point/fp.atanh.md @@ -1,14 +1,14 @@ # fp.atanh ```rust -fn atanh(self: FixedType) -> FixedType; +fn atanh(self: T) -> T; ``` Returns the value of the inverse hyperbolic tangent of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The inverse hyperbolic tangent of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn atanh_fp_example() -> FixedType { +fn atanh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::from_felt(32768); // 0.5 diff --git a/docs/framework/numbers/fixed-point/fp.ceil.md b/docs/framework/numbers/fixed-point/fp.ceil.md index 9f778c095..a3b93e0d3 100644 --- a/docs/framework/numbers/fixed-point/fp.ceil.md +++ b/docs/framework/numbers/fixed-point/fp.ceil.md @@ -1,14 +1,14 @@ # fp.ceil ```rust -fn ceil(self: FixedType) -> FixedType; +fn ceil(self: T) -> T; ``` Returns the smallest integer greater than or equal to the fixed point number. ## Args -*`self`(`FixedType`) - The input fixed point +*`self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The smallest integer greater than or equal to the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn ceil_fp_example() -> FixedType { +fn ceil_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::from_felt(190054); // 2.9 diff --git a/docs/framework/numbers/fixed-point/fp.cos.md b/docs/framework/numbers/fixed-point/fp.cos.md index e352fdced..c09c46c25 100644 --- a/docs/framework/numbers/fixed-point/fp.cos.md +++ b/docs/framework/numbers/fixed-point/fp.cos.md @@ -1,14 +1,14 @@ # fp.cos ```rust -fn cos(self: FixedType) -> FixedType; +fn cos(self: T) -> T; ``` Returns the cosine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the cosine of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn cos_fp_example() -> FixedType { +fn cos_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.cos_fast.md b/docs/framework/numbers/fixed-point/fp.cos_fast.md index 810ddbbe5..605e36100 100644 --- a/docs/framework/numbers/fixed-point/fp.cos_fast.md +++ b/docs/framework/numbers/fixed-point/fp.cos_fast.md @@ -1,14 +1,14 @@ # fp.cos_fast ```rust -fn cos_fast(self: FixedType) -> FixedType; +fn cos_fast(self: T) -> T; ``` Returns the cosine of the fixed point number fast with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the cosine of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn cos_fast_fp_example() -> FixedType { +fn cos_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.cosh.md b/docs/framework/numbers/fixed-point/fp.cosh.md index 6163bd35e..231e9ec2b 100644 --- a/docs/framework/numbers/fixed-point/fp.cosh.md +++ b/docs/framework/numbers/fixed-point/fp.cosh.md @@ -1,14 +1,14 @@ # fp.cosh ```rust -fn cosh(self: FixedType) -> FixedType; +fn cosh(self: T) -> T; ``` Returns the value of the hyperbolic cosine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The hyperbolic cosine of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn cosh_fp_example() -> FixedType { +fn cosh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.exp.md b/docs/framework/numbers/fixed-point/fp.exp.md index dfffa4bd1..a1ae7e4ac 100644 --- a/docs/framework/numbers/fixed-point/fp.exp.md +++ b/docs/framework/numbers/fixed-point/fp.exp.md @@ -1,14 +1,14 @@ # fp.exp ```rust -fn exp(self: FixedType) -> FixedType; +fn exp(self: T) -> T; ``` Returns the value of e raised to the power of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The natural exponent of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn exp_fp_example() -> FixedType { +fn exp_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.exp2.md b/docs/framework/numbers/fixed-point/fp.exp2.md index 2c42fbbc7..27cccb262 100644 --- a/docs/framework/numbers/fixed-point/fp.exp2.md +++ b/docs/framework/numbers/fixed-point/fp.exp2.md @@ -1,14 +1,14 @@ # fp.exp2 ```rust -fn exp2(self: FixedType) -> FixedType; +fn exp2(self: T) -> T; ``` Returns the value of 2 raised to the power of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The binary exponent of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn exp2_fp_example() -> FixedType { +fn exp2_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.floor.md b/docs/framework/numbers/fixed-point/fp.floor.md index 6dde41760..4b6939368 100644 --- a/docs/framework/numbers/fixed-point/fp.floor.md +++ b/docs/framework/numbers/fixed-point/fp.floor.md @@ -1,14 +1,14 @@ # fp.floor ```rust -fn floor(self: FixedType) -> FixedType; +fn floor(self: T) -> T; ``` Returns the largest integer less than or equal to the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ Returns the largest integer less than or equal to the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn floor_fp_example() -> FixedType { +fn floor_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::from_felt(190054); // 2.9 diff --git a/docs/framework/numbers/fixed-point/fp.from_felt.md b/docs/framework/numbers/fixed-point/fp.from_felt.md index 227b0b612..783dd023e 100644 --- a/docs/framework/numbers/fixed-point/fp.from_felt.md +++ b/docs/framework/numbers/fixed-point/fp.from_felt.md @@ -2,14 +2,14 @@ ```rust -fn from_felt(val: felt252) -> FixedType; +fn from_felt(val: felt252) -> T; ``` Creates a new fixed point instance from a felt252 value. ## Args -* `val`(`felt252`) - `felt252` value to convert in FixedType +* `val`(`felt252`) - `felt252` value to convert in fixed point. ## Returns @@ -18,9 +18,11 @@ A new fixed point instance. ## Examples ```rust -fn from_felt_example() -> FixedType { +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; + +fn from_felt_example() -> FP16x16 { // We can call `from_felt` function as follows . - FixedTrait::from_felt(190054); + FixedTrait::from_felt(190054) } >>> {mag: 190054, sign: false} // = 2.9 ``` diff --git a/docs/framework/numbers/fixed-point/fp.ln.md b/docs/framework/numbers/fixed-point/fp.ln.md index 51b3bef8e..8959d6161 100644 --- a/docs/framework/numbers/fixed-point/fp.ln.md +++ b/docs/framework/numbers/fixed-point/fp.ln.md @@ -2,14 +2,14 @@ ```rust -fn ln(self: FixedType) -> FixedType; +fn ln(self: T) -> T; ``` Returns the natural logarithm of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -18,10 +18,9 @@ A fixed point representing the natural logarithm of the input number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn ln_fp_example() -> FixedType { +fn ln_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(1, false); diff --git a/docs/framework/numbers/fixed-point/fp.log10.md b/docs/framework/numbers/fixed-point/fp.log10.md index 850e05f5a..3f570d851 100644 --- a/docs/framework/numbers/fixed-point/fp.log10.md +++ b/docs/framework/numbers/fixed-point/fp.log10.md @@ -1,14 +1,14 @@ # fp.log10 ```rust -fn log10(self: FixedType) -> FixedType; +fn log10(self: T) -> T; ``` Returns the base-10 logarithm of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point representing the base 10 logarithm of the input number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn log10_fp_example() -> FixedType { +fn log10_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(3, false); diff --git a/docs/framework/numbers/fixed-point/fp.log2.md b/docs/framework/numbers/fixed-point/fp.log2.md index c39272c46..b6facc2fe 100644 --- a/docs/framework/numbers/fixed-point/fp.log2.md +++ b/docs/framework/numbers/fixed-point/fp.log2.md @@ -1,14 +1,14 @@ # fp.log2 ```rust -fn log2(self: FixedType) -> FixedType; +fn log2(self: T) -> T; ``` Returns the base-2 logarithm of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Panics @@ -21,10 +21,9 @@ A fixed point representing the binary logarithm of the input number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn log2_fp_example() -> FixedType { +fn log2_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(3, false); diff --git a/docs/framework/numbers/fixed-point/fp.new.md b/docs/framework/numbers/fixed-point/fp.new.md index e46e9277a..0f041a850 100644 --- a/docs/framework/numbers/fixed-point/fp.new.md +++ b/docs/framework/numbers/fixed-point/fp.new.md @@ -1,14 +1,14 @@ # FixedTrait::new ```rust -fn new(mag: u32, sign: bool) -> FixedType; +fn new(mag: MAG, sign: bool) -> T; ``` Constructs a new fixed point instance. ## Args -* `mag`(`u32`) - The magnitude of the fixed point. +* `mag`(`MAG`) - The magnitude of the fixed point. * `sign`(`bool`) - The sign of the fixed point, where `true` represents a negative number. ## Returns @@ -18,10 +18,9 @@ A new fixed point instance. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn new_fp_example() -> FixedType { +fn new_fp_example() -> FP16x16 { // We can call `new` function as follows. FixedTrait::new(65536, false) } diff --git a/docs/framework/numbers/fixed-point/fp.new_unscaled.md b/docs/framework/numbers/fixed-point/fp.new_unscaled.md index b897f93a5..dda9e8192 100644 --- a/docs/framework/numbers/fixed-point/fp.new_unscaled.md +++ b/docs/framework/numbers/fixed-point/fp.new_unscaled.md @@ -1,14 +1,14 @@ # FixedTrait::new\_unscaled ```rust - fn new_unscaled(mag: u32, sign: bool) -> FixedType; + fn new_unscaled(mag: MAG, sign: bool) -> T; ``` Creates a new fixed point instance with the specified unscaled magnitude and sign. ## Args -`mag`(`u32`) - The unscaled magnitude of the fixed point. +`mag`(`MAG`) - The unscaled magnitude of the fixed point. `sign`(`bool`) - The sign of the fixed point, where `true` represents a negative number. ## Returns @@ -18,10 +18,9 @@ A new fixed point instance. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn new_unscaled_example() -> FixedType { +fn new_unscaled_example() -> FP16x16 { // We can call `new_unscaled` function as follows. FixedTrait::new_unscaled(1, false) } diff --git a/docs/framework/numbers/fixed-point/fp.pow.md b/docs/framework/numbers/fixed-point/fp.pow.md index 956e59576..6bff5b5af 100644 --- a/docs/framework/numbers/fixed-point/fp.pow.md +++ b/docs/framework/numbers/fixed-point/fp.pow.md @@ -1,15 +1,15 @@ # fp.pow ```rust -fn pow(self: FixedType, b: FixedType) -> FixedType; +fn pow(self: T, b: T) -> T; ``` Returns the result of raising the fixed point number to the power of another fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point. -* `b`(`FixedType`) - The exponent fixed point number. +* `self`(`T`) - The input fixed point. +* `b`(`T`) - The exponent fixed point number. ## Returns @@ -18,10 +18,9 @@ A fixed point number representing the result of x^y. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn pow_fp_example() -> FixedType { +fn pow_fp_example() -> FP16x16 { // We instantiate FixedTrait points here. let a = FixedTrait::new_unscaled(3, false); let b = FixedTrait::new_unscaled(4, false); diff --git a/docs/framework/numbers/fixed-point/fp.round.md b/docs/framework/numbers/fixed-point/fp.round.md index 7711b3c2b..e7721808a 100644 --- a/docs/framework/numbers/fixed-point/fp.round.md +++ b/docs/framework/numbers/fixed-point/fp.round.md @@ -1,14 +1,14 @@ # fp.round ```rust -fn round(self: FixedType) -> FixedType; +fn round(self: T) -> T; ``` Rounds the fixed point number to the nearest whole number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -18,10 +18,9 @@ A fixed point number representing the rounded value. ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn round_fp_example() -> FixedType { +fn round_fp_example() -> FP16x16 { // We instantiate FixedTrait points here. let a = FixedTrait::from_felt(190054); // 2.9 diff --git a/docs/framework/numbers/fixed-point/fp.sin.md b/docs/framework/numbers/fixed-point/fp.sin.md index 079806547..43aa5e84f 100644 --- a/docs/framework/numbers/fixed-point/fp.sin.md +++ b/docs/framework/numbers/fixed-point/fp.sin.md @@ -1,14 +1,14 @@ # fp.sin ```rust -fn sin(self: FixedType) -> FixedType; +fn sin(self: T) -> T; ``` Returns the sine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the sin of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn sin_fp_example() -> FixedType { +fn sin_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.sin_fast.md b/docs/framework/numbers/fixed-point/fp.sin_fast.md index a8f159bf1..999dd5fd6 100644 --- a/docs/framework/numbers/fixed-point/fp.sin_fast.md +++ b/docs/framework/numbers/fixed-point/fp.sin_fast.md @@ -1,14 +1,14 @@ # fp.sin_fast ```rust -fn sin_fast(self: FixedType) -> FixedType; +fn sin_fast(self: T) -> T; ``` Returns the sine of the fixed point number faster with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the sin of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn sin_fast_fp_example() -> FixedType { +fn sin_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.sinh.md b/docs/framework/numbers/fixed-point/fp.sinh.md index e87b83ae8..6dff4da04 100644 --- a/docs/framework/numbers/fixed-point/fp.sinh.md +++ b/docs/framework/numbers/fixed-point/fp.sinh.md @@ -1,14 +1,14 @@ # fp.sinh ```rust -fn sinh(self: FixedType) -> FixedType; +fn sinh(self: T) -> T; ``` Returns the value of the hyperbolic sine of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The hyperbolic sine of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn sinh_fp_example() -> FixedType { +fn sinh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.sqrt.md b/docs/framework/numbers/fixed-point/fp.sqrt.md index 04393bfdf..7ac877d2f 100644 --- a/docs/framework/numbers/fixed-point/fp.sqrt.md +++ b/docs/framework/numbers/fixed-point/fp.sqrt.md @@ -1,14 +1,14 @@ # fp.sqrt ```rust -fn sqrt(self: FixedType) -> FixedType; +fn sqrt(self: T) -> T; ``` Returns the square root of the fixed point number. ## Args -`self`(`FixedType`) - The input fixed point +`self`(`T`) - The input fixed point ## Panics @@ -21,10 +21,9 @@ A fixed point number representing the square root of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn sqrt_fp_example() -> FixedType { +fn sqrt_fp_example() -> FP16x16 { // We instantiate FixedTrait points here. let a = FixedTrait::new_unscaled(9, false); diff --git a/docs/framework/numbers/fixed-point/fp.tan.md b/docs/framework/numbers/fixed-point/fp.tan.md index 1ae168c76..2bb686dbb 100644 --- a/docs/framework/numbers/fixed-point/fp.tan.md +++ b/docs/framework/numbers/fixed-point/fp.tan.md @@ -1,14 +1,14 @@ # fp.tan ```rust -fn tan(self: FixedType) -> FixedType; +fn tan(self: T) -> T; ``` Returns the tangent of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the tan of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn tan_fp_example() -> FixedType { +fn tan_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.tan_fast.md b/docs/framework/numbers/fixed-point/fp.tan_fast.md index 8e520ac93..3e71b5bd6 100644 --- a/docs/framework/numbers/fixed-point/fp.tan_fast.md +++ b/docs/framework/numbers/fixed-point/fp.tan_fast.md @@ -1,14 +1,14 @@ # fp.tan_fast ```rust -fn tan_fast(self: FixedType) -> FixedType; +fn tan_fast(self: T) -> T; ``` Returns the tangent of the fixed point number faster with LUT. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ A fixed point number representing the tan of the input value. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn tan_fast_fp_example() -> FixedType { +fn tan_fast_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/numbers/fixed-point/fp.tanh.md b/docs/framework/numbers/fixed-point/fp.tanh.md index 5301ac022..3bda5aed2 100644 --- a/docs/framework/numbers/fixed-point/fp.tanh.md +++ b/docs/framework/numbers/fixed-point/fp.tanh.md @@ -1,14 +1,14 @@ # fp.tanh ```rust -fn tanh(self: FixedType) -> FixedType; +fn tanh(self: T) -> T; ``` Returns the value of the hyperbolic tangent of the fixed point number. ## Args -* `self`(`FixedType`) - The input fixed point +* `self`(`T`) - The input fixed point ## Returns @@ -17,10 +17,9 @@ The hyperbolic tangent of the input fixed point number. ## Examples ```rust -use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; +use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; -fn tanh_fp_example() -> FixedType { +fn tanh_fp_example() -> FP16x16 { // We instantiate fixed point here. let fp = FixedTrait::new_unscaled(2, false); diff --git a/docs/framework/operators/neural-network/README.md b/docs/framework/operators/neural-network/README.md index b673f3b8a..4e87d71cb 100644 --- a/docs/framework/operators/neural-network/README.md +++ b/docs/framework/operators/neural-network/README.md @@ -21,14 +21,14 @@ Orion supports currently these `NN` types. `NNTrait` contains the primitive functions to build a Neural Network. -| function | description | -| ------------------------------------ | ----------------------------------------------------------------------------------------- | -| [`nn.relu`](nn.relu.md) | Applies the rectified linear unit function element-wise. | -| [`nn.leaky_relu`](nn.leaky\_relu.md) | Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise. | -| [`nn.sigmoid`](nn.sigmoid.md) | Applies the Sigmoid function to an n-dimensional input tensor. | -| [`nn.softmax`](nn.softmax.md) | Computes softmax activations. | -| [`nn.logsoftmax`](nn.logsoftmax.md) | Applies the natural log to Softmax function to an n-dimensional input Tensor. | -| [`nn.softsign`](nn.softsign.md) | Applies the Softsign function element-wise. | -| [`nn.softplus`](nn.softplus.md) | Applies the Softplus function element-wise. | -| [`nn.linear`](nn.linear.md) | Performs a linear transformation of the input tensor using the provided weights and bias. | +| function | description | +| --- | --- | +| [`nn.relu`](nn.relu.md) | Applies the rectified linear unit function element-wise. | +| [`nn.leaky_relu`](nn.leaky\_relu.md) | Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise. | +| [`nn.sigmoid`](nn.sigmoid.md) | Applies the Sigmoid function to an n-dimensional input tensor. | +| [`nn.softmax`](nn.softmax.md) | Computes softmax activations. | +| [`nn.logsoftmax`](nn.logsoftmax.md) | Applies the natural log to Softmax function to an n-dimensional input Tensor. | +| [`nn.softsign`](nn.softsign.md) | Applies the Softsign function element-wise. | +| [`nn.softplus`](nn.softplus.md) | Applies the Softplus function element-wise. | +| [`nn.linear`](nn.linear.md) | Performs a linear transformation of the input tensor using the provided weights and bias. | diff --git a/docs/framework/operators/tensor/tensor.dequantize_linear.md b/docs/framework/operators/tensor/tensor.dequantize_linear.md new file mode 100644 index 000000000..420338330 --- /dev/null +++ b/docs/framework/operators/tensor/tensor.dequantize_linear.md @@ -0,0 +1,67 @@ +# tensor.dequantize_linear + +```rust +fn dequantize_linear(self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor) -> Tensor::; +``` + +Dequantizes a Tensor using linear dequantization. + +The linear dequantization operator. It consumes a quantized tensor, a scale, and a zero point to compute +the full precision tensor. The dequantization formula is y = (x - x_zero_point) * x_scale. x_scale and +x_zero_point must have same shape, and can be either a scalar for per-tensor / per layer quantization, +or a 1-D tensor for per-axis quantization. + +## Args + +* `self`(`@Tensor`) - The input tensor. +* `x_scale`(`@Tensor`) - Scale for input `x`. +* `x_zero_point`(`@Tensor`) - Zero point for input `x`. + +## Returns + +A new `Tensor` with the same shape as the input tensor, containing the dequantized values. + +## Examples + +```rust +use array::{ArrayTrait, SpanTrait}; + +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::i32::i32; +use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; +use orion::performance::core::PerfomanceTrait; +use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; + +fn dequantize_linear_example() -> Tensor { + // We instantiate a 1D Tensor here. + let x = TensorTrait::::new( + shape: array![4].span(), + data: array![ + IntegerTrait::new(0, false), + IntegerTrait::new(3, false), + IntegerTrait::new(125, false), + IntegerTrait::new(127, false), + ].span(), + extra: Option::None(()) + ); + + // We instantiate the x_scale here. + let x_scale = TensorTrait::::new( + shape: array![1].span(), + data: array![IntegerTrait::new(2, false)].span(), + extra: Option::None(()) + ); + + // We instantiate the x_zero_point here. + let x_zero_point = TensorTrait::::new( + shape: array![1].span(), + data: array![IntegerTrait::new(0, false)].span(), + extra: Option::None(()) + ); + + return x.dequantize_linear(@x_scale, @x_zero_point); +} +>>> [0, 6, 250, 254] +``` diff --git a/docs/framework/operators/tensor/tensor.quantize_linear.md b/docs/framework/operators/tensor/tensor.quantize_linear.md new file mode 100644 index 000000000..717a5b1d4 --- /dev/null +++ b/docs/framework/operators/tensor/tensor.quantize_linear.md @@ -0,0 +1,70 @@ +# tensor.quantize_linear + +```rust +fn quantize_linear(self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor) -> Tensor::; +``` + +Quantizes a Tensor using linear quantization. + +The linear quantization operator. It consumes a high precision tensor, a scale, and a zero point +to compute the low precision / quantized tensor. The scale factor and zero point must have same shape, +and can be either a scalar for per-tensor / per layer quantization, or a 1-D tensor for per-axis quantization. +The quantization formula is `y = saturate ((x / y_scale) + y_zero_point)`. For saturation, it saturates to `[-128, 127]`. +For (x / y_scale), it's rounding to the nearest even. + +## Args + +* `self`(`@Tensor`) - The input tensor. +* `y_scale`(`@Tensor`) - Scale for doing quantization to get `y`. +* `y_zero_point`(`@Tensor`) - Zero point for doing quantization to get `y`. + +## Returns + +A new `Tensor` with the same shape as the input tensor, containing the quantized values. + +## Examples + +```rust +use array::{ArrayTrait, SpanTrait}; + +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; +use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; +use orion::numbers::signed_integer::i8::i8; +use orion::performance::core::PerfomanceTrait; +use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; + +fn quantize_linear_example() -> Tensor { + // We instantiate a 1D Tensor here. + let x = TensorTrait::::new( + shape: array![6].span(), + data: array![ + IntegerTrait::new(0, false), + IntegerTrait::new(2, false), + IntegerTrait::new(3, false), + IntegerTrait::new(1000, false), + IntegerTrait::new(254, true), + IntegerTrait::new(1000, true), + ] + .span(), + extra: Option::None(()) + ); + + // We instantiate the y_scale here. + let y_scale = TensorTrait::::new( + shape: array![1].span(), + data: array![IntegerTrait::new(2, false)].span(), + extra: Option::None(()) + ); + + // We instantiate the y_zero_point here. + let y_zero_point = TensorTrait::::new( + shape: array![1].span(), + data: array![IntegerTrait::new(1, false)].span(), + extra: Option::None(()) + ); + + return x.quantize_linear(@y_scale, @y_zero_point); +} +>>> [1, 2, 2, 127, -126, -128] +``` diff --git a/src/numbers/fixed_point/core.cairo b/src/numbers/fixed_point/core.cairo index fcc33d934..5b9f76c9b 100644 --- a/src/numbers/fixed_point/core.cairo +++ b/src/numbers/fixed_point/core.cairo @@ -44,14 +44,14 @@ trait FixedTrait { /// # FixedTrait::new /// /// ```rust - /// fn new(mag: u32, sign: bool) -> FixedType; + /// fn new(mag: MAG, sign: bool) -> T; /// ``` /// /// Constructs a new fixed point instance. /// /// ## Args /// - /// * `mag`(`u32`) - The magnitude of the fixed point. + /// * `mag`(`MAG`) - The magnitude of the fixed point. /// * `sign`(`bool`) - The sign of the fixed point, where `true` represents a negative number. /// /// ## Returns @@ -61,10 +61,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - /// - /// fn new_fp_example() -> FixedType { + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; + /// + /// fn new_fp_example() -> FP16x16 { /// // We can call `new` function as follows. /// FixedTrait::new(65536, false) /// } @@ -75,14 +74,14 @@ trait FixedTrait { /// # FixedTrait::new\_unscaled /// /// ```rust - /// fn new_unscaled(mag: u32, sign: bool) -> FixedType; + /// fn new_unscaled(mag: MAG, sign: bool) -> T; /// ``` /// /// Creates a new fixed point instance with the specified unscaled magnitude and sign. /// /// ## Args /// - /// `mag`(`u32`) - The unscaled magnitude of the fixed point. + /// `mag`(`MAG`) - The unscaled magnitude of the fixed point. /// `sign`(`bool`) - The sign of the fixed point, where `true` represents a negative number. /// /// ## Returns @@ -92,10 +91,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn new_unscaled_example() -> FixedType { + /// fn new_unscaled_example() -> FP16x16 { /// // We can call `new_unscaled` function as follows. /// FixedTrait::new_unscaled(1, false) /// } @@ -107,14 +105,14 @@ trait FixedTrait { /// /// /// ```rust - /// fn from_felt(val: felt252) -> FixedType; + /// fn from_felt(val: felt252) -> T; /// ``` /// /// Creates a new fixed point instance from a felt252 value. /// /// ## Args /// - /// * `val`(`felt252`) - `felt252` value to convert in FixedType + /// * `val`(`felt252`) - `felt252` value to convert in fixed point. /// /// ## Returns /// @@ -123,9 +121,11 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// fn from_felt_example() -> FixedType { + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; + /// + /// fn from_felt_example() -> FP16x16 { /// // We can call `from_felt` function as follows . - /// FixedTrait::from_felt(190054); + /// FixedTrait::from_felt(190054) /// } /// >>> {mag: 190054, sign: false} // = 2.9 /// ``` @@ -134,14 +134,14 @@ trait FixedTrait { /// # fp.abs /// /// ```rust - /// fn abs(self: FixedType) -> FixedType; + /// fn abs(self: T) -> T; /// ``` /// /// Returns the absolute value of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -150,10 +150,10 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; + /// /// - /// fn abs_fp_example() -> FixedType { + /// fn abs_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, true); /// @@ -167,14 +167,14 @@ trait FixedTrait { /// # fp.ceil /// /// ```rust - /// fn ceil(self: FixedType) -> FixedType; + /// fn ceil(self: T) -> T; /// ``` /// /// Returns the smallest integer greater than or equal to the fixed point number. /// /// ## Args /// - /// *`self`(`FixedType`) - The input fixed point + /// *`self`(`T`) - The input fixed point /// /// ## Returns /// @@ -183,10 +183,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn ceil_fp_example() -> FixedType { + /// fn ceil_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::from_felt(190054); // 2.9 /// @@ -200,14 +199,14 @@ trait FixedTrait { /// # fp.exp /// /// ```rust - /// fn exp(self: FixedType) -> FixedType; + /// fn exp(self: T) -> T; /// ``` /// /// Returns the value of e raised to the power of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -216,10 +215,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn exp_fp_example() -> FixedType { + /// fn exp_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -233,14 +231,14 @@ trait FixedTrait { /// # fp.exp2 /// /// ```rust - /// fn exp2(self: FixedType) -> FixedType; + /// fn exp2(self: T) -> T; /// ``` /// /// Returns the value of 2 raised to the power of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -249,10 +247,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn exp2_fp_example() -> FixedType { + /// fn exp2_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -266,14 +263,14 @@ trait FixedTrait { /// # fp.floor /// /// ```rust - /// fn floor(self: FixedType) -> FixedType; + /// fn floor(self: T) -> T; /// ``` /// /// Returns the largest integer less than or equal to the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -282,10 +279,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn floor_fp_example() -> FixedType { + /// fn floor_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::from_felt(190054); // 2.9 /// @@ -300,14 +296,14 @@ trait FixedTrait { /// /// /// ```rust - /// fn ln(self: FixedType) -> FixedType; + /// fn ln(self: T) -> T; /// ``` /// /// Returns the natural logarithm of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -316,10 +312,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn ln_fp_example() -> FixedType { + /// fn ln_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, false); /// @@ -333,14 +328,14 @@ trait FixedTrait { /// # fp.log2 /// /// ```rust - /// fn log2(self: FixedType) -> FixedType; + /// fn log2(self: T) -> T; /// ``` /// /// Returns the base-2 logarithm of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Panics /// @@ -353,10 +348,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn log2_fp_example() -> FixedType { + /// fn log2_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(3, false); /// @@ -370,14 +364,14 @@ trait FixedTrait { /// # fp.log10 /// /// ```rust - /// fn log10(self: FixedType) -> FixedType; + /// fn log10(self: T) -> T; /// ``` /// /// Returns the base-10 logarithm of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -386,10 +380,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn log10_fp_example() -> FixedType { + /// fn log10_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(3, false); /// @@ -403,15 +396,15 @@ trait FixedTrait { /// # fp.pow /// /// ```rust - /// fn pow(self: FixedType, b: FixedType) -> FixedType; + /// fn pow(self: T, b: T) -> T; /// ``` /// /// Returns the result of raising the fixed point number to the power of another fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point. - /// * `b`(`FixedType`) - The exponent fixed point number. + /// * `self`(`T`) - The input fixed point. + /// * `b`(`T`) - The exponent fixed point number. /// /// ## Returns /// @@ -420,10 +413,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn pow_fp_example() -> FixedType { + /// fn pow_fp_example() -> FP16x16 { /// // We instantiate FixedTrait points here. /// let a = FixedTrait::new_unscaled(3, false); /// let b = FixedTrait::new_unscaled(4, false); @@ -438,14 +430,14 @@ trait FixedTrait { /// # fp.round /// /// ```rust - /// fn round(self: FixedType) -> FixedType; + /// fn round(self: T) -> T; /// ``` /// /// Rounds the fixed point number to the nearest whole number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -455,10 +447,9 @@ trait FixedTrait { /// /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn round_fp_example() -> FixedType { + /// fn round_fp_example() -> FP16x16 { /// // We instantiate FixedTrait points here. /// let a = FixedTrait::from_felt(190054); // 2.9 /// @@ -472,14 +463,14 @@ trait FixedTrait { /// # fp.sqrt /// /// ```rust - /// fn sqrt(self: FixedType) -> FixedType; + /// fn sqrt(self: T) -> T; /// ``` /// /// Returns the square root of the fixed point number. /// /// ## Args /// - /// `self`(`FixedType`) - The input fixed point + /// `self`(`T`) - The input fixed point /// /// ## Panics /// @@ -492,10 +483,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn sqrt_fp_example() -> FixedType { + /// fn sqrt_fp_example() -> FP16x16 { /// // We instantiate FixedTrait points here. /// let a = FixedTrait::new_unscaled(9, false); /// @@ -509,14 +499,14 @@ trait FixedTrait { /// # fp.acos /// /// ```rust - /// fn acos(self: FixedType) -> FixedType; + /// fn acos(self: T) -> T; /// ``` /// /// Returns the arccosine (inverse of cosine) of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -525,10 +515,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn acos_fp_example() -> FixedType { + /// fn acos_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, true); /// @@ -542,14 +531,14 @@ trait FixedTrait { /// # fp.acos_fast /// /// ```rust - /// fn acos_fast(self: FixedType) -> FixedType; + /// fn acos_fast(self: T) -> T; /// ``` /// /// Returns the arccosine (inverse of cosine) of the fixed point number faster with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -558,10 +547,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn acos_fast_fp_example() -> FixedType { + /// fn acos_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, true); /// @@ -575,14 +563,14 @@ trait FixedTrait { /// # fp.asin /// /// ```rust - /// fn asin(self: FixedType) -> FixedType; + /// fn asin(self: T) -> T; /// ``` /// /// Returns the arcsine (inverse of sine) of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -591,10 +579,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn asin_fp_example() -> FixedType { + /// fn asin_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, false); /// @@ -608,14 +595,14 @@ trait FixedTrait { /// # fp.asin_fast /// /// ```rust - /// fn asin_fast(self: FixedType) -> FixedType; + /// fn asin_fast(self: T) -> T; /// ``` /// /// Returns the arcsine (inverse of sine) of the fixed point number faster with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -624,10 +611,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn asin_fast_fp_example() -> FixedType { + /// fn asin_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(1, false); /// @@ -641,14 +627,14 @@ trait FixedTrait { /// # fp.atan /// /// ```rust - /// fn atan(self: FixedType) -> FixedType; + /// fn atan(self: T) -> T; /// ``` /// /// Returns the arctangent (inverse of tangent) of the input fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -657,10 +643,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn atan_fp_example() -> FixedType { + /// fn atan_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -674,14 +659,14 @@ trait FixedTrait { /// # fp.atan_fast /// /// ```rust - /// fn atan_fast(self: FixedType) -> FixedType; + /// fn atan_fast(self: T) -> T; /// ``` /// /// Returns the arctangent (inverse of tangent) of the input fixed point number faster with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -690,10 +675,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn atan_fast_fp_example() -> FixedType { + /// fn atan_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -707,14 +691,14 @@ trait FixedTrait { /// # fp.cos /// /// ```rust - /// fn cos(self: FixedType) -> FixedType; + /// fn cos(self: T) -> T; /// ``` /// /// Returns the cosine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -723,10 +707,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn cos_fp_example() -> FixedType { + /// fn cos_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -740,14 +723,14 @@ trait FixedTrait { /// # fp.cos_fast /// /// ```rust - /// fn cos_fast(self: FixedType) -> FixedType; + /// fn cos_fast(self: T) -> T; /// ``` /// /// Returns the cosine of the fixed point number fast with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -756,10 +739,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn cos_fast_fp_example() -> FixedType { + /// fn cos_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -773,14 +755,14 @@ trait FixedTrait { /// # fp.sin /// /// ```rust - /// fn sin(self: FixedType) -> FixedType; + /// fn sin(self: T) -> T; /// ``` /// /// Returns the sine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -789,10 +771,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn sin_fp_example() -> FixedType { + /// fn sin_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -806,14 +787,14 @@ trait FixedTrait { /// # fp.sin_fast /// /// ```rust - /// fn sin_fast(self: FixedType) -> FixedType; + /// fn sin_fast(self: T) -> T; /// ``` /// /// Returns the sine of the fixed point number faster with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -822,10 +803,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn sin_fast_fp_example() -> FixedType { + /// fn sin_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -839,14 +819,14 @@ trait FixedTrait { /// # fp.tan /// /// ```rust - /// fn tan(self: FixedType) -> FixedType; + /// fn tan(self: T) -> T; /// ``` /// /// Returns the tangent of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -855,10 +835,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn tan_fp_example() -> FixedType { + /// fn tan_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -872,14 +851,14 @@ trait FixedTrait { /// # fp.tan_fast /// /// ```rust - /// fn tan_fast(self: FixedType) -> FixedType; + /// fn tan_fast(self: T) -> T; /// ``` /// /// Returns the tangent of the fixed point number faster with LUT. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -888,10 +867,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn tan_fast_fp_example() -> FixedType { + /// fn tan_fast_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -905,14 +883,14 @@ trait FixedTrait { /// # fp.acosh /// /// ```rust - /// fn acosh(self: FixedType) -> FixedType; + /// fn acosh(self: T) -> T; /// ``` /// /// Returns the value of the inverse hyperbolic cosine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -921,10 +899,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn acosh_fp_example() -> FixedType { + /// fn acosh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -938,14 +915,14 @@ trait FixedTrait { /// # fp.asinh /// /// ```rust - /// fn asinh(self: FixedType) -> FixedType; + /// fn asinh(self: T) -> T; /// ``` /// /// Returns the value of the inverse hyperbolic sine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -954,10 +931,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn asinh_fp_example() -> FixedType { + /// fn asinh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -971,14 +947,14 @@ trait FixedTrait { /// # fp.atanh /// /// ```rust - /// fn atanh(self: FixedType) -> FixedType; + /// fn atanh(self: T) -> T; /// ``` /// /// Returns the value of the inverse hyperbolic tangent of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -987,10 +963,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn atanh_fp_example() -> FixedType { + /// fn atanh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::from_felt(32768); // 0.5 /// @@ -1004,14 +979,14 @@ trait FixedTrait { /// # fp.cosh /// /// ```rust - /// fn cosh(self: FixedType) -> FixedType; + /// fn cosh(self: T) -> T; /// ``` /// /// Returns the value of the hyperbolic cosine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -1020,10 +995,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn cosh_fp_example() -> FixedType { + /// fn cosh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -1037,14 +1011,14 @@ trait FixedTrait { /// # fp.sinh /// /// ```rust - /// fn sinh(self: FixedType) -> FixedType; + /// fn sinh(self: T) -> T; /// ``` /// /// Returns the value of the hyperbolic sine of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -1053,10 +1027,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn sinh_fp_example() -> FixedType { + /// fn sinh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// @@ -1070,14 +1043,14 @@ trait FixedTrait { /// # fp.tanh /// /// ```rust - /// fn tanh(self: FixedType) -> FixedType; + /// fn tanh(self: T) -> T; /// ``` /// /// Returns the value of the hyperbolic tangent of the fixed point number. /// /// ## Args /// - /// * `self`(`FixedType`) - The input fixed point + /// * `self`(`T`) - The input fixed point /// /// ## Returns /// @@ -1086,10 +1059,9 @@ trait FixedTrait { /// ## Examples /// /// ```rust - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; + /// use orion::numbers::{FP16x16, FP16x16Impl, FixedTrait}; /// - /// fn tanh_fp_example() -> FixedType { + /// fn tanh_fp_example() -> FP16x16 { /// // We instantiate fixed point here. /// let fp = FixedTrait::new_unscaled(2, false); /// From 4a2de490fef0e0db616d52b9df56abf112a42262 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Thu, 31 Aug 2023 19:12:41 +0300 Subject: [PATCH 094/179] update signed int doc --- docs/framework/numbers/signed-integer/int.new.md | 6 +++--- src/numbers/signed_integer/integer_trait.cairo | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/framework/numbers/signed-integer/int.new.md b/docs/framework/numbers/signed-integer/int.new.md index f4425b0a9..24fc1dc6e 100644 --- a/docs/framework/numbers/signed-integer/int.new.md +++ b/docs/framework/numbers/signed-integer/int.new.md @@ -1,17 +1,17 @@ # IntegerTrait::new ```rust -fn new(mag: U, sign: bool) -> T; +fn new(mag: MAG, sign: bool) -> T; ``` Returns a new signed integer. ## Args -* `mag`(`U`) - The magnitude of the integer. +* `mag`(`MAG`) - The magnitude of the integer. * `sign`(`bool`) - The sign of the integer, where `true` represents a negative number. -> _`` generic type depends on the uint type (u8, u16, u32, u64, u128)._ +> _`` generic type depends on the uint type (u8, u16, u32, u64, u128)._ ## Panics diff --git a/src/numbers/signed_integer/integer_trait.cairo b/src/numbers/signed_integer/integer_trait.cairo index 8757313bb..5f56bc363 100644 --- a/src/numbers/signed_integer/integer_trait.cairo +++ b/src/numbers/signed_integer/integer_trait.cairo @@ -5,21 +5,21 @@ /// abs - Computes the absolute value of the given `signed_integer` /// max - Returns the maximum between two `signed_integer` /// min - Returns the minimum between two `signed_integer` -trait IntegerTrait { +trait IntegerTrait { /// # IntegerTrait::new /// /// ```rust - /// fn new(mag: U, sign: bool) -> T; + /// fn new(mag: MAG, sign: bool) -> T; /// ``` /// /// Returns a new signed integer. /// /// ## Args /// - /// * `mag`(`U`) - The magnitude of the integer. + /// * `mag`(`MAG`) - The magnitude of the integer. /// * `sign`(`bool`) - The sign of the integer, where `true` represents a negative number. /// - /// > _`` generic type depends on the uint type (u8, u16, u32, u64, u128)._ + /// > _`` generic type depends on the uint type (u8, u16, u32, u64, u128)._ /// /// ## Panics /// @@ -45,7 +45,7 @@ trait IntegerTrait { /// >>> panics with "int: out of range" /// ``` /// - fn new(mag: U, sign: bool) -> T; + fn new(mag: MAG, sign: bool) -> T; /// # int.div_rem /// /// ```rust From 68e40beaacb829132bba8dc201ab0485b92e203a Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 08:42:11 +0300 Subject: [PATCH 095/179] remove tensor extra param --- src/numbers/fixed_point/core.cairo | 6 - src/operators/nn/core.cairo | 30 +-- src/operators/nn/functional/leaky_relu.cairo | 4 +- src/operators/nn/functional/relu.cairo | 2 +- src/operators/nn/functional/sigmoid.cairo | 4 +- src/operators/nn/functional/softplus.cairo | 4 +- src/operators/nn/functional/softsign.cairo | 4 +- src/operators/tensor.cairo | 2 +- src/operators/tensor/core.cairo | 213 +++++++++--------- .../implementations/tensor_fp16x16.cairo | 8 +- .../implementations/tensor_fp8x23.cairo | 12 +- .../implementations/tensor_i32_fp16x16.cairo | 9 +- .../implementations/tensor_i32_fp8x23.cairo | 9 +- .../implementations/tensor_i8_fp16x16.cairo | 11 +- .../implementations/tensor_i8_fp8x23.cairo | 11 +- .../implementations/tensor_u32_fp16x16.cairo | 12 +- .../implementations/tensor_u32_fp8x23.cairo | 12 +- src/operators/tensor/linalg/matmul.cairo | 8 +- src/operators/tensor/linalg/transpose.cairo | 10 +- src/operators/tensor/math/abs.cairo | 2 +- src/operators/tensor/math/acos.cairo | 2 +- src/operators/tensor/math/acosh.cairo | 4 +- src/operators/tensor/math/argmax.cairo | 6 +- src/operators/tensor/math/argmin.cairo | 8 +- src/operators/tensor/math/arithmetic.cairo | 16 +- src/operators/tensor/math/asin.cairo | 2 +- src/operators/tensor/math/asinh.cairo | 4 +- src/operators/tensor/math/atan.cairo | 4 +- src/operators/tensor/math/ceil.cairo | 2 +- src/operators/tensor/math/concat.cairo | 4 +- src/operators/tensor/math/cos.cairo | 4 +- src/operators/tensor/math/cosh.cairo | 4 +- src/operators/tensor/math/cumsum.cairo | 4 +- src/operators/tensor/math/equal.cairo | 2 +- src/operators/tensor/math/exp.cairo | 4 +- src/operators/tensor/math/greater.cairo | 2 +- src/operators/tensor/math/greater_equal.cairo | 2 +- src/operators/tensor/math/less.cairo | 2 +- src/operators/tensor/math/less_equal.cairo | 2 +- src/operators/tensor/math/log.cairo | 4 +- src/operators/tensor/math/onehot.cairo | 10 +- src/operators/tensor/math/or.cairo | 2 +- src/operators/tensor/math/reduce_sum.cairo | 6 +- src/operators/tensor/math/sin.cairo | 4 +- src/operators/tensor/math/sinh.cairo | 4 +- src/operators/tensor/math/sqrt.cairo | 4 +- src/operators/tensor/math/tanh.cairo | 4 +- src/operators/tensor/math/xor.cairo | 2 +- .../quantization/dequantize_linear.cairo | 2 +- .../tensor/quantization/quantize_linear.cairo | 2 +- .../helpers/tensor/fixed_point/fp16x16.cairo | 76 +++---- .../helpers/tensor/fixed_point/fp8x23.cairo | 76 +++---- src/tests/helpers/tensor/i32.cairo | 74 +++--- src/tests/helpers/tensor/i8.cairo | 74 +++--- src/tests/helpers/tensor/u32.cairo | 38 ++-- src/tests/nodes/abs_fp16x16/input_0.cairo | 8 +- src/tests/nodes/abs_fp16x16/output_0.cairo | 8 +- src/tests/nodes/abs_fp8x23/input_0.cairo | 8 +- src/tests/nodes/abs_fp8x23/output_0.cairo | 8 +- src/tests/nodes/abs_i32/input_0.cairo | 8 +- src/tests/nodes/abs_i32/output_0.cairo | 8 +- src/tests/nodes/abs_i8/input_0.cairo | 8 +- src/tests/nodes/abs_i8/output_0.cairo | 8 +- src/tests/nodes/acos_fp16x16/input_0.cairo | 8 +- src/tests/nodes/acos_fp16x16/output_0.cairo | 8 +- src/tests/nodes/acos_fp8x23/input_0.cairo | 8 +- src/tests/nodes/acos_fp8x23/output_0.cairo | 8 +- src/tests/nodes/acosh_fp16x16/input_0.cairo | 8 +- src/tests/nodes/acosh_fp16x16/output_0.cairo | 8 +- src/tests/nodes/acosh_fp8x23/input_0.cairo | 8 +- src/tests/nodes/acosh_fp8x23/output_0.cairo | 8 +- .../nodes/acosh_i32_fp16x16/input_0.cairo | 8 +- .../nodes/acosh_i32_fp16x16/output_0.cairo | 8 +- .../nodes/acosh_i32_fp8x23/input_0.cairo | 8 +- .../nodes/acosh_i32_fp8x23/output_0.cairo | 8 +- .../nodes/acosh_i8_fp16x16/input_0.cairo | 8 +- .../nodes/acosh_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/acosh_i8_fp8x23/input_0.cairo | 8 +- .../nodes/acosh_i8_fp8x23/output_0.cairo | 8 +- .../nodes/acosh_u32_fp16x16/input_0.cairo | 8 +- .../nodes/acosh_u32_fp16x16/output_0.cairo | 8 +- .../nodes/acosh_u32_fp8x23/input_0.cairo | 8 +- .../nodes/acosh_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/add_fp16x16/input_0.cairo | 8 +- src/tests/nodes/add_fp16x16/input_1.cairo | 8 +- src/tests/nodes/add_fp16x16/output_0.cairo | 8 +- .../nodes/add_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/add_fp16x16_broadcast/input_1.cairo | 8 +- .../add_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/add_fp8x23/input_0.cairo | 8 +- src/tests/nodes/add_fp8x23/input_1.cairo | 8 +- src/tests/nodes/add_fp8x23/output_0.cairo | 8 +- .../nodes/add_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/add_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/add_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/add_i32/input_0.cairo | 8 +- src/tests/nodes/add_i32/input_1.cairo | 8 +- src/tests/nodes/add_i32/output_0.cairo | 8 +- .../nodes/add_i32_broadcast/input_0.cairo | 8 +- .../nodes/add_i32_broadcast/input_1.cairo | 8 +- .../nodes/add_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/add_i8/input_0.cairo | 8 +- src/tests/nodes/add_i8/input_1.cairo | 8 +- src/tests/nodes/add_i8/output_0.cairo | 8 +- .../nodes/add_i8_broadcast/input_0.cairo | 8 +- .../nodes/add_i8_broadcast/input_1.cairo | 8 +- .../nodes/add_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/add_u32/input_0.cairo | 8 +- src/tests/nodes/add_u32/input_1.cairo | 8 +- src/tests/nodes/add_u32/output_0.cairo | 8 +- .../nodes/add_u32_broadcast/input_0.cairo | 8 +- .../nodes/add_u32_broadcast/input_1.cairo | 8 +- .../nodes/add_u32_broadcast/output_0.cairo | 8 +- .../argmax_fp16x16_1D_default/input_0.cairo | 8 +- .../argmax_fp16x16_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp16x16_2D_default/input_0.cairo | 8 +- .../argmax_fp16x16_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp16x16_3D_default/input_0.cairo | 8 +- .../argmax_fp16x16_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_1D_default/input_0.cairo | 8 +- .../argmax_fp8x23_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_1D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_2D_default/input_0.cairo | 8 +- .../argmax_fp8x23_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_2D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_3D_default/input_0.cairo | 8 +- .../argmax_fp8x23_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_fp8x23_3D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/argmax_i32_1D_default/input_0.cairo | 8 +- .../argmax_i32_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i32_1D_last_index/input_0.cairo | 8 +- .../argmax_i32_1D_last_index/output_0.cairo | 8 +- .../nodes/argmax_i32_2D_default/input_0.cairo | 8 +- .../argmax_i32_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i32_2D_last_index/input_0.cairo | 8 +- .../argmax_i32_2D_last_index/output_0.cairo | 8 +- .../nodes/argmax_i32_3D_default/input_0.cairo | 8 +- .../argmax_i32_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i32_3D_last_index/input_0.cairo | 8 +- .../argmax_i32_3D_last_index/output_0.cairo | 8 +- .../nodes/argmax_i8_1D_default/input_0.cairo | 8 +- .../nodes/argmax_i8_1D_default/output_0.cairo | 8 +- .../argmax_i8_1D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i8_1D_last_index/input_0.cairo | 8 +- .../argmax_i8_1D_last_index/output_0.cairo | 8 +- .../nodes/argmax_i8_2D_default/input_0.cairo | 8 +- .../nodes/argmax_i8_2D_default/output_0.cairo | 8 +- .../argmax_i8_2D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i8_2D_last_index/input_0.cairo | 8 +- .../argmax_i8_2D_last_index/output_0.cairo | 8 +- .../nodes/argmax_i8_3D_default/input_0.cairo | 8 +- .../nodes/argmax_i8_3D_default/output_0.cairo | 8 +- .../argmax_i8_3D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_i8_3D_last_index/input_0.cairo | 8 +- .../argmax_i8_3D_last_index/output_0.cairo | 8 +- .../nodes/argmax_u32_1D_default/input_0.cairo | 8 +- .../argmax_u32_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_u32_1D_last_index/input_0.cairo | 8 +- .../argmax_u32_1D_last_index/output_0.cairo | 8 +- .../nodes/argmax_u32_2D_default/input_0.cairo | 8 +- .../argmax_u32_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_u32_2D_last_index/input_0.cairo | 8 +- .../argmax_u32_2D_last_index/output_0.cairo | 8 +- .../nodes/argmax_u32_3D_default/input_0.cairo | 8 +- .../argmax_u32_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmax_u32_3D_last_index/input_0.cairo | 8 +- .../argmax_u32_3D_last_index/output_0.cairo | 8 +- .../argmin_fp16x16_1D_default/input_0.cairo | 8 +- .../argmin_fp16x16_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp16x16_2D_default/input_0.cairo | 8 +- .../argmin_fp16x16_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp16x16_3D_default/input_0.cairo | 8 +- .../argmin_fp16x16_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_1D_default/input_0.cairo | 8 +- .../argmin_fp8x23_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_1D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_2D_default/input_0.cairo | 8 +- .../argmin_fp8x23_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_2D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_3D_default/input_0.cairo | 8 +- .../argmin_fp8x23_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_fp8x23_3D_last_index/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/argmin_i32_1D_default/input_0.cairo | 8 +- .../argmin_i32_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i32_1D_last_index/input_0.cairo | 8 +- .../argmin_i32_1D_last_index/output_0.cairo | 8 +- .../nodes/argmin_i32_2D_default/input_0.cairo | 8 +- .../argmin_i32_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i32_2D_last_index/input_0.cairo | 8 +- .../argmin_i32_2D_last_index/output_0.cairo | 8 +- .../nodes/argmin_i32_3D_default/input_0.cairo | 8 +- .../argmin_i32_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i32_3D_last_index/input_0.cairo | 8 +- .../argmin_i32_3D_last_index/output_0.cairo | 8 +- .../nodes/argmin_i8_1D_default/input_0.cairo | 8 +- .../nodes/argmin_i8_1D_default/output_0.cairo | 8 +- .../argmin_i8_1D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i8_1D_last_index/input_0.cairo | 8 +- .../argmin_i8_1D_last_index/output_0.cairo | 8 +- .../nodes/argmin_i8_2D_default/input_0.cairo | 8 +- .../nodes/argmin_i8_2D_default/output_0.cairo | 8 +- .../argmin_i8_2D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i8_2D_last_index/input_0.cairo | 8 +- .../argmin_i8_2D_last_index/output_0.cairo | 8 +- .../nodes/argmin_i8_3D_default/input_0.cairo | 8 +- .../nodes/argmin_i8_3D_default/output_0.cairo | 8 +- .../argmin_i8_3D_keepdims_false/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_i8_3D_last_index/input_0.cairo | 8 +- .../argmin_i8_3D_last_index/output_0.cairo | 8 +- .../nodes/argmin_u32_1D_default/input_0.cairo | 8 +- .../argmin_u32_1D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_u32_1D_last_index/input_0.cairo | 8 +- .../argmin_u32_1D_last_index/output_0.cairo | 8 +- .../nodes/argmin_u32_2D_default/input_0.cairo | 8 +- .../argmin_u32_2D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_u32_2D_last_index/input_0.cairo | 8 +- .../argmin_u32_2D_last_index/output_0.cairo | 8 +- .../nodes/argmin_u32_3D_default/input_0.cairo | 8 +- .../argmin_u32_3D_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../argmin_u32_3D_last_index/input_0.cairo | 8 +- .../argmin_u32_3D_last_index/output_0.cairo | 8 +- src/tests/nodes/asin_fp16x16/input_0.cairo | 8 +- src/tests/nodes/asin_fp16x16/output_0.cairo | 8 +- src/tests/nodes/asin_fp8x23/input_0.cairo | 8 +- src/tests/nodes/asin_fp8x23/output_0.cairo | 8 +- src/tests/nodes/asinh_fp16x16/input_0.cairo | 8 +- src/tests/nodes/asinh_fp16x16/output_0.cairo | 8 +- src/tests/nodes/asinh_fp8x23/input_0.cairo | 8 +- src/tests/nodes/asinh_fp8x23/output_0.cairo | 8 +- .../nodes/asinh_i32_fp16x16/input_0.cairo | 8 +- .../nodes/asinh_i32_fp16x16/output_0.cairo | 8 +- .../nodes/asinh_i32_fp8x23/input_0.cairo | 8 +- .../nodes/asinh_i32_fp8x23/output_0.cairo | 8 +- .../nodes/asinh_i8_fp16x16/input_0.cairo | 8 +- .../nodes/asinh_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/asinh_i8_fp8x23/input_0.cairo | 8 +- .../nodes/asinh_i8_fp8x23/output_0.cairo | 8 +- .../nodes/asinh_u32_fp16x16/input_0.cairo | 8 +- .../nodes/asinh_u32_fp16x16/output_0.cairo | 8 +- .../nodes/asinh_u32_fp8x23/input_0.cairo | 8 +- .../nodes/asinh_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/atan_fp16x16/input_0.cairo | 8 +- src/tests/nodes/atan_fp16x16/output_0.cairo | 8 +- src/tests/nodes/atan_fp8x23/input_0.cairo | 8 +- src/tests/nodes/atan_fp8x23/output_0.cairo | 8 +- .../nodes/atan_i32_fp16x16/input_0.cairo | 8 +- .../nodes/atan_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/atan_i32_fp8x23/input_0.cairo | 8 +- .../nodes/atan_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/atan_i8_fp16x16/input_0.cairo | 8 +- .../nodes/atan_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/atan_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/atan_i8_fp8x23/output_0.cairo | 8 +- .../nodes/atan_u32_fp16x16/input_0.cairo | 8 +- .../nodes/atan_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/atan_u32_fp8x23/input_0.cairo | 8 +- .../nodes/atan_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/ceil_fp16x16/input_0.cairo | 8 +- src/tests/nodes/ceil_fp16x16/output_0.cairo | 8 +- src/tests/nodes/ceil_fp8x23/input_0.cairo | 8 +- src/tests/nodes/ceil_fp8x23/output_0.cairo | 8 +- .../nodes/concat_fp16x16_1d/input_0.cairo | 8 +- .../nodes/concat_fp16x16_1d/input_1.cairo | 8 +- .../nodes/concat_fp16x16_1d/output_0.cairo | 8 +- .../nodes/concat_fp16x16_2d/input_0.cairo | 8 +- .../nodes/concat_fp16x16_2d/input_1.cairo | 8 +- .../nodes/concat_fp16x16_2d/output_0.cairo | 8 +- .../concat_fp16x16_3d_axis_1/input_0.cairo | 8 +- .../concat_fp16x16_3d_axis_1/input_1.cairo | 8 +- .../concat_fp16x16_3d_axis_1/output_0.cairo | 8 +- .../concat_fp16x16_3d_axis_2/input_0.cairo | 8 +- .../concat_fp16x16_3d_axis_2/input_1.cairo | 8 +- .../concat_fp16x16_3d_axis_2/output_0.cairo | 8 +- .../concat_fp16x16_3d_default/input_0.cairo | 8 +- .../concat_fp16x16_3d_default/input_1.cairo | 8 +- .../concat_fp16x16_3d_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/concat_fp8x23_1d/input_0.cairo | 8 +- .../nodes/concat_fp8x23_1d/input_1.cairo | 8 +- .../nodes/concat_fp8x23_1d/output_0.cairo | 8 +- .../nodes/concat_fp8x23_2d/input_0.cairo | 8 +- .../nodes/concat_fp8x23_2d/input_1.cairo | 8 +- .../nodes/concat_fp8x23_2d/output_0.cairo | 8 +- .../concat_fp8x23_3d_axis_1/input_0.cairo | 8 +- .../concat_fp8x23_3d_axis_1/input_1.cairo | 8 +- .../concat_fp8x23_3d_axis_1/output_0.cairo | 8 +- .../concat_fp8x23_3d_axis_2/input_0.cairo | 8 +- .../concat_fp8x23_3d_axis_2/input_1.cairo | 8 +- .../concat_fp8x23_3d_axis_2/output_0.cairo | 8 +- .../concat_fp8x23_3d_default/input_0.cairo | 8 +- .../concat_fp8x23_3d_default/input_1.cairo | 8 +- .../concat_fp8x23_3d_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- src/tests/nodes/concat_i32_1d/input_0.cairo | 8 +- src/tests/nodes/concat_i32_1d/input_1.cairo | 8 +- src/tests/nodes/concat_i32_1d/output_0.cairo | 8 +- src/tests/nodes/concat_i32_2d/input_0.cairo | 8 +- src/tests/nodes/concat_i32_2d/input_1.cairo | 8 +- src/tests/nodes/concat_i32_2d/output_0.cairo | 8 +- .../nodes/concat_i32_3d_axis_1/input_0.cairo | 8 +- .../nodes/concat_i32_3d_axis_1/input_1.cairo | 8 +- .../nodes/concat_i32_3d_axis_1/output_0.cairo | 8 +- .../nodes/concat_i32_3d_axis_2/input_0.cairo | 8 +- .../nodes/concat_i32_3d_axis_2/input_1.cairo | 8 +- .../nodes/concat_i32_3d_axis_2/output_0.cairo | 8 +- .../nodes/concat_i32_3d_default/input_0.cairo | 8 +- .../nodes/concat_i32_3d_default/input_1.cairo | 8 +- .../concat_i32_3d_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- src/tests/nodes/concat_u32_1d/input_0.cairo | 8 +- src/tests/nodes/concat_u32_1d/input_1.cairo | 8 +- src/tests/nodes/concat_u32_1d/output_0.cairo | 8 +- src/tests/nodes/concat_u32_2d/input_0.cairo | 8 +- src/tests/nodes/concat_u32_2d/input_1.cairo | 8 +- src/tests/nodes/concat_u32_2d/output_0.cairo | 8 +- .../nodes/concat_u32_3d_axis_1/input_0.cairo | 8 +- .../nodes/concat_u32_3d_axis_1/input_1.cairo | 8 +- .../nodes/concat_u32_3d_axis_1/output_0.cairo | 8 +- .../nodes/concat_u32_3d_axis_2/input_0.cairo | 8 +- .../nodes/concat_u32_3d_axis_2/input_1.cairo | 8 +- .../nodes/concat_u32_3d_axis_2/output_0.cairo | 8 +- .../nodes/concat_u32_3d_default/input_0.cairo | 8 +- .../nodes/concat_u32_3d_default/input_1.cairo | 8 +- .../concat_u32_3d_default/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../input_2.cairo | 8 +- .../output_0.cairo | 8 +- src/tests/nodes/cos_fp16x16/input_0.cairo | 8 +- src/tests/nodes/cos_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cos_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cos_fp8x23/output_0.cairo | 8 +- src/tests/nodes/cos_i32_fp16x16/input_0.cairo | 8 +- .../nodes/cos_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cos_i32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cos_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/cos_i8_fp16x16/input_0.cairo | 8 +- src/tests/nodes/cos_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cos_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cos_i8_fp8x23/output_0.cairo | 8 +- src/tests/nodes/cos_u32_fp16x16/input_0.cairo | 8 +- .../nodes/cos_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cos_u32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cos_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/cosh_fp16x16/input_0.cairo | 8 +- src/tests/nodes/cosh_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cosh_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cosh_fp8x23/output_0.cairo | 8 +- .../nodes/cosh_i32_fp16x16/input_0.cairo | 8 +- .../nodes/cosh_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cosh_i32_fp8x23/input_0.cairo | 8 +- .../nodes/cosh_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/cosh_i8_fp16x16/input_0.cairo | 8 +- .../nodes/cosh_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cosh_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/cosh_i8_fp8x23/output_0.cairo | 8 +- .../nodes/cosh_u32_fp16x16/input_0.cairo | 8 +- .../nodes/cosh_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/cosh_u32_fp8x23/input_0.cairo | 8 +- .../nodes/cosh_u32_fp8x23/output_0.cairo | 8 +- .../cumsum_fp16x16_1d_default/input_0.cairo | 8 +- .../cumsum_fp16x16_1d_default/output_0.cairo | 8 +- .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../cumsum_fp16x16_1d_reverse/input_0.cairo | 8 +- .../cumsum_fp16x16_1d_reverse/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 8 +- .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 8 +- .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 8 +- .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 8 +- .../cumsum_fp8x23_1d_default/input_0.cairo | 8 +- .../cumsum_fp8x23_1d_default/output_0.cairo | 8 +- .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 8 +- .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 8 +- .../cumsum_fp8x23_1d_reverse/input_0.cairo | 8 +- .../cumsum_fp8x23_1d_reverse/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 8 +- .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 8 +- .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 8 +- .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 8 +- .../nodes/cumsum_i32_1d_default/input_0.cairo | 8 +- .../cumsum_i32_1d_default/output_0.cairo | 8 +- .../cumsum_i32_1d_exclusive/input_0.cairo | 8 +- .../cumsum_i32_1d_exclusive/output_0.cairo | 8 +- .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 8 +- .../cumsum_i32_1d_reverse/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 8 +- .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 8 +- .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 8 +- .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 8 +- .../nodes/cumsum_i8_1d_default/input_0.cairo | 8 +- .../nodes/cumsum_i8_1d_default/output_0.cairo | 8 +- .../cumsum_i8_1d_exclusive/input_0.cairo | 8 +- .../cumsum_i8_1d_exclusive/output_0.cairo | 8 +- .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 8 +- .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 8 +- .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 8 +- .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 8 +- .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 8 +- .../nodes/cumsum_u32_1d_default/input_0.cairo | 8 +- .../cumsum_u32_1d_default/output_0.cairo | 8 +- .../cumsum_u32_1d_exclusive/input_0.cairo | 8 +- .../cumsum_u32_1d_exclusive/output_0.cairo | 8 +- .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 8 +- .../cumsum_u32_1d_reverse/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 8 +- src/tests/nodes/div_fp16x16/input_0.cairo | 8 +- src/tests/nodes/div_fp16x16/input_1.cairo | 8 +- src/tests/nodes/div_fp16x16/output_0.cairo | 8 +- .../nodes/div_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/div_fp16x16_broadcast/input_1.cairo | 8 +- .../div_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/div_fp8x23/input_0.cairo | 8 +- src/tests/nodes/div_fp8x23/input_1.cairo | 8 +- src/tests/nodes/div_fp8x23/output_0.cairo | 8 +- .../nodes/div_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/div_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/div_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/div_i32/input_0.cairo | 8 +- src/tests/nodes/div_i32/input_1.cairo | 8 +- src/tests/nodes/div_i32/output_0.cairo | 8 +- .../nodes/div_i32_broadcast/input_0.cairo | 8 +- .../nodes/div_i32_broadcast/input_1.cairo | 8 +- .../nodes/div_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/div_i8/input_0.cairo | 8 +- src/tests/nodes/div_i8/input_1.cairo | 8 +- src/tests/nodes/div_i8/output_0.cairo | 8 +- .../nodes/div_i8_broadcast/input_0.cairo | 8 +- .../nodes/div_i8_broadcast/input_1.cairo | 8 +- .../nodes/div_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/div_u32/input_0.cairo | 8 +- src/tests/nodes/div_u32/input_1.cairo | 8 +- src/tests/nodes/div_u32/output_0.cairo | 8 +- .../nodes/div_u32_broadcast/input_0.cairo | 8 +- .../nodes/div_u32_broadcast/input_1.cairo | 8 +- .../nodes/div_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/equal_fp16x16/input_0.cairo | 8 +- src/tests/nodes/equal_fp16x16/input_1.cairo | 8 +- src/tests/nodes/equal_fp16x16/output_0.cairo | 8 +- .../equal_fp16x16_broadcast/input_0.cairo | 8 +- .../equal_fp16x16_broadcast/input_1.cairo | 8 +- .../equal_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/equal_fp8x23/input_0.cairo | 8 +- src/tests/nodes/equal_fp8x23/input_1.cairo | 8 +- src/tests/nodes/equal_fp8x23/output_0.cairo | 8 +- .../equal_fp8x23_broadcast/input_0.cairo | 8 +- .../equal_fp8x23_broadcast/input_1.cairo | 8 +- .../equal_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/equal_i32/input_0.cairo | 8 +- src/tests/nodes/equal_i32/input_1.cairo | 8 +- src/tests/nodes/equal_i32/output_0.cairo | 8 +- .../nodes/equal_i32_broadcast/input_0.cairo | 8 +- .../nodes/equal_i32_broadcast/input_1.cairo | 8 +- .../nodes/equal_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/equal_i8/input_0.cairo | 8 +- src/tests/nodes/equal_i8/input_1.cairo | 8 +- src/tests/nodes/equal_i8/output_0.cairo | 8 +- .../nodes/equal_i8_broadcast/input_0.cairo | 8 +- .../nodes/equal_i8_broadcast/input_1.cairo | 8 +- .../nodes/equal_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/equal_u32/input_0.cairo | 8 +- src/tests/nodes/equal_u32/input_1.cairo | 8 +- src/tests/nodes/equal_u32/output_0.cairo | 8 +- .../nodes/equal_u32_broadcast/input_0.cairo | 8 +- .../nodes/equal_u32_broadcast/input_1.cairo | 8 +- .../nodes/equal_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/exp_fp16x16/input_0.cairo | 8 +- src/tests/nodes/exp_fp16x16/output_0.cairo | 8 +- src/tests/nodes/exp_fp8x23/input_0.cairo | 8 +- src/tests/nodes/exp_fp8x23/output_0.cairo | 8 +- src/tests/nodes/exp_i32_fp16x16/input_0.cairo | 8 +- .../nodes/exp_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/exp_i32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/exp_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/exp_i8_fp16x16/input_0.cairo | 8 +- src/tests/nodes/exp_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/exp_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/exp_i8_fp8x23/output_0.cairo | 8 +- src/tests/nodes/exp_u32_fp16x16/input_0.cairo | 8 +- .../nodes/exp_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/exp_u32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/exp_u32_fp8x23/output_0.cairo | 8 +- .../nodes/greater_equal_fp16x16/input_0.cairo | 8 +- .../nodes/greater_equal_fp16x16/input_1.cairo | 8 +- .../greater_equal_fp16x16/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/greater_equal_fp8x23/input_0.cairo | 8 +- .../nodes/greater_equal_fp8x23/input_1.cairo | 8 +- .../nodes/greater_equal_fp8x23/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/greater_equal_i32/input_0.cairo | 8 +- .../nodes/greater_equal_i32/input_1.cairo | 8 +- .../nodes/greater_equal_i32/output_0.cairo | 8 +- .../greater_equal_i32_broadcast/input_0.cairo | 8 +- .../greater_equal_i32_broadcast/input_1.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/greater_equal_i8/input_0.cairo | 8 +- .../nodes/greater_equal_i8/input_1.cairo | 8 +- .../nodes/greater_equal_i8/output_0.cairo | 8 +- .../greater_equal_i8_broadcast/input_0.cairo | 8 +- .../greater_equal_i8_broadcast/input_1.cairo | 8 +- .../greater_equal_i8_broadcast/output_0.cairo | 8 +- .../nodes/greater_equal_u32/input_0.cairo | 8 +- .../nodes/greater_equal_u32/input_1.cairo | 8 +- .../nodes/greater_equal_u32/output_0.cairo | 8 +- .../greater_equal_u32_broadcast/input_0.cairo | 8 +- .../greater_equal_u32_broadcast/input_1.cairo | 8 +- .../output_0.cairo | 8 +- src/tests/nodes/greater_fp16x16/input_0.cairo | 8 +- src/tests/nodes/greater_fp16x16/input_1.cairo | 8 +- .../nodes/greater_fp16x16/output_0.cairo | 8 +- .../greater_fp16x16_broadcast/input_0.cairo | 8 +- .../greater_fp16x16_broadcast/input_1.cairo | 8 +- .../greater_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/greater_fp8x23/input_0.cairo | 8 +- src/tests/nodes/greater_fp8x23/input_1.cairo | 8 +- src/tests/nodes/greater_fp8x23/output_0.cairo | 8 +- .../greater_fp8x23_broadcast/input_0.cairo | 8 +- .../greater_fp8x23_broadcast/input_1.cairo | 8 +- .../greater_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/greater_i32/input_0.cairo | 8 +- src/tests/nodes/greater_i32/input_1.cairo | 8 +- src/tests/nodes/greater_i32/output_0.cairo | 8 +- .../nodes/greater_i32_broadcast/input_0.cairo | 8 +- .../nodes/greater_i32_broadcast/input_1.cairo | 8 +- .../greater_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/greater_i8/input_0.cairo | 8 +- src/tests/nodes/greater_i8/input_1.cairo | 8 +- src/tests/nodes/greater_i8/output_0.cairo | 8 +- .../nodes/greater_i8_broadcast/input_0.cairo | 8 +- .../nodes/greater_i8_broadcast/input_1.cairo | 8 +- .../nodes/greater_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/greater_u32/input_0.cairo | 8 +- src/tests/nodes/greater_u32/input_1.cairo | 8 +- src/tests/nodes/greater_u32/output_0.cairo | 8 +- .../nodes/greater_u32_broadcast/input_0.cairo | 8 +- .../nodes/greater_u32_broadcast/input_1.cairo | 8 +- .../greater_u32_broadcast/output_0.cairo | 8 +- .../nodes/leaky_relu_fp16x16/input_0.cairo | 8 +- .../nodes/leaky_relu_fp16x16/output_0.cairo | 8 +- .../nodes/leaky_relu_fp8x23/input_0.cairo | 8 +- .../nodes/leaky_relu_fp8x23/output_0.cairo | 8 +- .../leaky_relu_i32_fp16x16/input_0.cairo | 8 +- .../leaky_relu_i32_fp16x16/output_0.cairo | 8 +- .../nodes/leaky_relu_i32_fp8x23/input_0.cairo | 8 +- .../leaky_relu_i32_fp8x23/output_0.cairo | 8 +- .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 8 +- .../leaky_relu_i8_fp16x16/output_0.cairo | 8 +- .../nodes/leaky_relu_i8_fp8x23/input_0.cairo | 8 +- .../nodes/leaky_relu_i8_fp8x23/output_0.cairo | 8 +- .../nodes/less_equal_fp16x16/input_0.cairo | 8 +- .../nodes/less_equal_fp16x16/input_1.cairo | 8 +- .../nodes/less_equal_fp16x16/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../input_1.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/less_equal_fp8x23/input_0.cairo | 8 +- .../nodes/less_equal_fp8x23/input_1.cairo | 8 +- .../nodes/less_equal_fp8x23/output_0.cairo | 8 +- .../less_equal_fp8x23_broadcast/input_0.cairo | 8 +- .../less_equal_fp8x23_broadcast/input_1.cairo | 8 +- .../output_0.cairo | 8 +- src/tests/nodes/less_equal_i32/input_0.cairo | 8 +- src/tests/nodes/less_equal_i32/input_1.cairo | 8 +- src/tests/nodes/less_equal_i32/output_0.cairo | 8 +- .../less_equal_i32_broadcast/input_0.cairo | 8 +- .../less_equal_i32_broadcast/input_1.cairo | 8 +- .../less_equal_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_equal_i8/input_0.cairo | 8 +- src/tests/nodes/less_equal_i8/input_1.cairo | 8 +- src/tests/nodes/less_equal_i8/output_0.cairo | 8 +- .../less_equal_i8_broadcast/input_0.cairo | 8 +- .../less_equal_i8_broadcast/input_1.cairo | 8 +- .../less_equal_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_equal_u32/input_0.cairo | 8 +- src/tests/nodes/less_equal_u32/input_1.cairo | 8 +- src/tests/nodes/less_equal_u32/output_0.cairo | 8 +- .../less_equal_u32_broadcast/input_0.cairo | 8 +- .../less_equal_u32_broadcast/input_1.cairo | 8 +- .../less_equal_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_fp16x16/input_0.cairo | 8 +- src/tests/nodes/less_fp16x16/input_1.cairo | 8 +- src/tests/nodes/less_fp16x16/output_0.cairo | 8 +- .../less_fp16x16_broadcast/input_0.cairo | 8 +- .../less_fp16x16_broadcast/input_1.cairo | 8 +- .../less_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_fp8x23/input_0.cairo | 8 +- src/tests/nodes/less_fp8x23/input_1.cairo | 8 +- src/tests/nodes/less_fp8x23/output_0.cairo | 8 +- .../nodes/less_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/less_fp8x23_broadcast/input_1.cairo | 8 +- .../less_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_i32/input_0.cairo | 8 +- src/tests/nodes/less_i32/input_1.cairo | 8 +- src/tests/nodes/less_i32/output_0.cairo | 8 +- .../nodes/less_i32_broadcast/input_0.cairo | 8 +- .../nodes/less_i32_broadcast/input_1.cairo | 8 +- .../nodes/less_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_i8/input_0.cairo | 8 +- src/tests/nodes/less_i8/input_1.cairo | 8 +- src/tests/nodes/less_i8/output_0.cairo | 8 +- .../nodes/less_i8_broadcast/input_0.cairo | 8 +- .../nodes/less_i8_broadcast/input_1.cairo | 8 +- .../nodes/less_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/less_u32/input_0.cairo | 8 +- src/tests/nodes/less_u32/input_1.cairo | 8 +- src/tests/nodes/less_u32/output_0.cairo | 8 +- .../nodes/less_u32_broadcast/input_0.cairo | 8 +- .../nodes/less_u32_broadcast/input_1.cairo | 8 +- .../nodes/less_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/linear_fp16x16/input_0.cairo | 8 +- src/tests/nodes/linear_fp16x16/input_1.cairo | 8 +- src/tests/nodes/linear_fp16x16/input_2.cairo | 8 +- src/tests/nodes/linear_fp16x16/output_0.cairo | 8 +- src/tests/nodes/linear_fp8x23/input_0.cairo | 8 +- src/tests/nodes/linear_fp8x23/input_1.cairo | 8 +- src/tests/nodes/linear_fp8x23/input_2.cairo | 8 +- src/tests/nodes/linear_fp8x23/output_0.cairo | 8 +- src/tests/nodes/linear_i32/input_0.cairo | 8 +- src/tests/nodes/linear_i32/input_1.cairo | 8 +- src/tests/nodes/linear_i32/input_2.cairo | 8 +- src/tests/nodes/linear_i32/output_0.cairo | 8 +- src/tests/nodes/linear_i8/input_0.cairo | 8 +- src/tests/nodes/linear_i8/input_1.cairo | 8 +- src/tests/nodes/linear_i8/input_2.cairo | 8 +- src/tests/nodes/linear_i8/output_0.cairo | 8 +- src/tests/nodes/linear_u32/input_0.cairo | 8 +- src/tests/nodes/linear_u32/input_1.cairo | 8 +- src/tests/nodes/linear_u32/input_2.cairo | 8 +- src/tests/nodes/linear_u32/output_0.cairo | 8 +- src/tests/nodes/log_fp16x16/input_0.cairo | 8 +- src/tests/nodes/log_fp16x16/output_0.cairo | 8 +- src/tests/nodes/log_fp8x23/input_0.cairo | 8 +- src/tests/nodes/log_fp8x23/output_0.cairo | 8 +- src/tests/nodes/log_i32_fp16x16/input_0.cairo | 8 +- .../nodes/log_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/log_i32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/log_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/log_i8_fp16x16/input_0.cairo | 8 +- src/tests/nodes/log_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/log_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/log_i8_fp8x23/output_0.cairo | 8 +- src/tests/nodes/log_u32_fp16x16/input_0.cairo | 8 +- .../nodes/log_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/log_u32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/log_u32_fp8x23/output_0.cairo | 8 +- .../logsoftmax_fp16x16_axis_0/input_0.cairo | 8 +- .../logsoftmax_fp16x16_axis_0/output_0.cairo | 8 +- .../logsoftmax_fp16x16_axis_1/input_0.cairo | 8 +- .../logsoftmax_fp16x16_axis_1/output_0.cairo | 8 +- .../logsoftmax_fp8x23_axis_0/input_0.cairo | 8 +- .../logsoftmax_fp8x23_axis_0/output_0.cairo | 8 +- .../logsoftmax_fp8x23_axis_1/input_0.cairo | 8 +- .../logsoftmax_fp8x23_axis_1/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../logsoftmax_i8_fp8x23_axis_0/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../logsoftmax_i8_fp8x23_axis_1/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/matmul_fp16x16_1d/input_0.cairo | 8 +- .../nodes/matmul_fp16x16_1d/input_1.cairo | 8 +- .../nodes/matmul_fp16x16_1d/output_0.cairo | 8 +- .../nodes/matmul_fp16x16_1x2/input_0.cairo | 8 +- .../nodes/matmul_fp16x16_1x2/input_1.cairo | 8 +- .../nodes/matmul_fp16x16_1x2/output_0.cairo | 8 +- .../nodes/matmul_fp16x16_2x1/input_0.cairo | 8 +- .../nodes/matmul_fp16x16_2x1/input_1.cairo | 8 +- .../nodes/matmul_fp16x16_2x1/output_0.cairo | 8 +- .../nodes/matmul_fp16x16_2x2/input_0.cairo | 8 +- .../nodes/matmul_fp16x16_2x2/input_1.cairo | 8 +- .../nodes/matmul_fp16x16_2x2/output_0.cairo | 8 +- .../nodes/matmul_fp8x23_1d/input_0.cairo | 8 +- .../nodes/matmul_fp8x23_1d/input_1.cairo | 8 +- .../nodes/matmul_fp8x23_1d/output_0.cairo | 8 +- .../nodes/matmul_fp8x23_1x2/input_0.cairo | 8 +- .../nodes/matmul_fp8x23_1x2/input_1.cairo | 8 +- .../nodes/matmul_fp8x23_1x2/output_0.cairo | 8 +- .../nodes/matmul_fp8x23_2x1/input_0.cairo | 8 +- .../nodes/matmul_fp8x23_2x1/input_1.cairo | 8 +- .../nodes/matmul_fp8x23_2x1/output_0.cairo | 8 +- .../nodes/matmul_fp8x23_2x2/input_0.cairo | 8 +- .../nodes/matmul_fp8x23_2x2/input_1.cairo | 8 +- .../nodes/matmul_fp8x23_2x2/output_0.cairo | 8 +- src/tests/nodes/matmul_i32_1d/input_0.cairo | 8 +- src/tests/nodes/matmul_i32_1d/input_1.cairo | 8 +- src/tests/nodes/matmul_i32_1d/output_0.cairo | 8 +- src/tests/nodes/matmul_i32_1x2/input_0.cairo | 8 +- src/tests/nodes/matmul_i32_1x2/input_1.cairo | 8 +- src/tests/nodes/matmul_i32_1x2/output_0.cairo | 8 +- src/tests/nodes/matmul_i32_2x1/input_0.cairo | 8 +- src/tests/nodes/matmul_i32_2x1/input_1.cairo | 8 +- src/tests/nodes/matmul_i32_2x1/output_0.cairo | 8 +- src/tests/nodes/matmul_i32_2x2/input_0.cairo | 8 +- src/tests/nodes/matmul_i32_2x2/input_1.cairo | 8 +- src/tests/nodes/matmul_i32_2x2/output_0.cairo | 8 +- src/tests/nodes/matmul_i8_1d/input_0.cairo | 8 +- src/tests/nodes/matmul_i8_1d/input_1.cairo | 8 +- src/tests/nodes/matmul_i8_1d/output_0.cairo | 8 +- src/tests/nodes/matmul_i8_1x2/input_0.cairo | 8 +- src/tests/nodes/matmul_i8_1x2/input_1.cairo | 8 +- src/tests/nodes/matmul_i8_1x2/output_0.cairo | 8 +- src/tests/nodes/matmul_i8_2x1/input_0.cairo | 8 +- src/tests/nodes/matmul_i8_2x1/input_1.cairo | 8 +- src/tests/nodes/matmul_i8_2x1/output_0.cairo | 8 +- src/tests/nodes/matmul_i8_2x2/input_0.cairo | 8 +- src/tests/nodes/matmul_i8_2x2/input_1.cairo | 8 +- src/tests/nodes/matmul_i8_2x2/output_0.cairo | 8 +- src/tests/nodes/matmul_u32_1d/input_0.cairo | 8 +- src/tests/nodes/matmul_u32_1d/input_1.cairo | 8 +- src/tests/nodes/matmul_u32_1d/output_0.cairo | 8 +- src/tests/nodes/matmul_u32_1x2/input_0.cairo | 8 +- src/tests/nodes/matmul_u32_1x2/input_1.cairo | 8 +- src/tests/nodes/matmul_u32_1x2/output_0.cairo | 8 +- src/tests/nodes/matmul_u32_2x1/input_0.cairo | 8 +- src/tests/nodes/matmul_u32_2x1/input_1.cairo | 8 +- src/tests/nodes/matmul_u32_2x1/output_0.cairo | 8 +- src/tests/nodes/matmul_u32_2x2/input_0.cairo | 8 +- src/tests/nodes/matmul_u32_2x2/input_1.cairo | 8 +- src/tests/nodes/matmul_u32_2x2/output_0.cairo | 8 +- src/tests/nodes/mul_fp16x16/input_0.cairo | 8 +- src/tests/nodes/mul_fp16x16/input_1.cairo | 8 +- src/tests/nodes/mul_fp16x16/output_0.cairo | 8 +- .../nodes/mul_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/mul_fp16x16_broadcast/input_1.cairo | 8 +- .../mul_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/mul_fp8x23/input_0.cairo | 8 +- src/tests/nodes/mul_fp8x23/input_1.cairo | 8 +- src/tests/nodes/mul_fp8x23/output_0.cairo | 8 +- .../nodes/mul_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/mul_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/mul_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/mul_i32/input_0.cairo | 8 +- src/tests/nodes/mul_i32/input_1.cairo | 8 +- src/tests/nodes/mul_i32/output_0.cairo | 8 +- .../nodes/mul_i32_broadcast/input_0.cairo | 8 +- .../nodes/mul_i32_broadcast/input_1.cairo | 8 +- .../nodes/mul_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/mul_i8/input_0.cairo | 8 +- src/tests/nodes/mul_i8/input_1.cairo | 8 +- src/tests/nodes/mul_i8/output_0.cairo | 8 +- .../nodes/mul_i8_broadcast/input_0.cairo | 8 +- .../nodes/mul_i8_broadcast/input_1.cairo | 8 +- .../nodes/mul_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/mul_u32/input_0.cairo | 8 +- src/tests/nodes/mul_u32/input_1.cairo | 8 +- src/tests/nodes/mul_u32/output_0.cairo | 8 +- .../nodes/mul_u32_broadcast/input_0.cairo | 8 +- .../nodes/mul_u32_broadcast/input_1.cairo | 8 +- .../nodes/mul_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/or_fp16x16/input_0.cairo | 8 +- src/tests/nodes/or_fp16x16/input_1.cairo | 8 +- src/tests/nodes/or_fp16x16/output_0.cairo | 8 +- .../nodes/or_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/or_fp16x16_broadcast/input_1.cairo | 8 +- .../nodes/or_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/or_fp8x23/input_0.cairo | 8 +- src/tests/nodes/or_fp8x23/input_1.cairo | 8 +- src/tests/nodes/or_fp8x23/output_0.cairo | 8 +- .../nodes/or_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/or_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/or_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/or_i32/input_0.cairo | 8 +- src/tests/nodes/or_i32/input_1.cairo | 8 +- src/tests/nodes/or_i32/output_0.cairo | 8 +- .../nodes/or_i32_broadcast/input_0.cairo | 8 +- .../nodes/or_i32_broadcast/input_1.cairo | 8 +- .../nodes/or_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/or_i8/input_0.cairo | 8 +- src/tests/nodes/or_i8/input_1.cairo | 8 +- src/tests/nodes/or_i8/output_0.cairo | 8 +- src/tests/nodes/or_i8_broadcast/input_0.cairo | 8 +- src/tests/nodes/or_i8_broadcast/input_1.cairo | 8 +- .../nodes/or_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/or_u32/input_0.cairo | 8 +- src/tests/nodes/or_u32/input_1.cairo | 8 +- src/tests/nodes/or_u32/output_0.cairo | 8 +- .../nodes/or_u32_broadcast/input_0.cairo | 8 +- .../nodes/or_u32_broadcast/input_1.cairo | 8 +- .../nodes/or_u32_broadcast/output_0.cairo | 8 +- .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 8 +- .../reduce_sum_fp16x16_1D/output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 8 +- .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 8 +- .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../input_0.cairo | 8 +- .../output_0.cairo | 8 +- .../nodes/reduce_sum_i32_1D/input_0.cairo | 8 +- .../nodes/reduce_sum_i32_1D/output_0.cairo | 8 +- .../reduce_sum_i32_2D_axis_1/input_0.cairo | 8 +- .../reduce_sum_i32_2D_axis_1/output_0.cairo | 8 +- .../reduce_sum_i32_2D_default/input_0.cairo | 8 +- .../reduce_sum_i32_2D_default/output_0.cairo | 8 +- .../reduce_sum_i32_2D_keepdims/input_0.cairo | 8 +- .../reduce_sum_i32_2D_keepdims/output_0.cairo | 8 +- .../nodes/reduce_sum_i8_1D/input_0.cairo | 8 +- .../nodes/reduce_sum_i8_1D/output_0.cairo | 8 +- .../reduce_sum_i8_2D_axis_1/input_0.cairo | 8 +- .../reduce_sum_i8_2D_axis_1/output_0.cairo | 8 +- .../reduce_sum_i8_2D_default/input_0.cairo | 8 +- .../reduce_sum_i8_2D_default/output_0.cairo | 8 +- .../reduce_sum_i8_2D_keepdims/input_0.cairo | 8 +- .../reduce_sum_i8_2D_keepdims/output_0.cairo | 8 +- .../nodes/reduce_sum_u32_1D/input_0.cairo | 8 +- .../nodes/reduce_sum_u32_1D/output_0.cairo | 8 +- .../reduce_sum_u32_2D_axis_1/input_0.cairo | 8 +- .../reduce_sum_u32_2D_axis_1/output_0.cairo | 8 +- .../reduce_sum_u32_2D_default/input_0.cairo | 8 +- .../reduce_sum_u32_2D_default/output_0.cairo | 8 +- .../reduce_sum_u32_2D_keepdims/input_0.cairo | 8 +- .../reduce_sum_u32_2D_keepdims/output_0.cairo | 8 +- src/tests/nodes/relu_fp16x16/input_0.cairo | 8 +- src/tests/nodes/relu_fp16x16/output_0.cairo | 8 +- src/tests/nodes/relu_fp8x23/input_0.cairo | 8 +- src/tests/nodes/relu_fp8x23/output_0.cairo | 8 +- src/tests/nodes/relu_i32/input_0.cairo | 8 +- src/tests/nodes/relu_i32/output_0.cairo | 8 +- src/tests/nodes/relu_i8/input_0.cairo | 8 +- src/tests/nodes/relu_i8/output_0.cairo | 8 +- src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 8 +- .../nodes/sigmoid_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 8 +- .../nodes/sigmoid_i32_fp16x16/input_0.cairo | 8 +- .../nodes/sigmoid_i32_fp16x16/output_0.cairo | 8 +- .../nodes/sigmoid_i32_fp8x23/input_0.cairo | 8 +- .../nodes/sigmoid_i32_fp8x23/output_0.cairo | 8 +- .../nodes/sigmoid_i8_fp16x16/input_0.cairo | 8 +- .../nodes/sigmoid_i8_fp16x16/output_0.cairo | 8 +- .../nodes/sigmoid_i8_fp8x23/input_0.cairo | 8 +- .../nodes/sigmoid_i8_fp8x23/output_0.cairo | 8 +- .../nodes/sigmoid_u32_fp16x16/input_0.cairo | 8 +- .../nodes/sigmoid_u32_fp16x16/output_0.cairo | 8 +- .../nodes/sigmoid_u32_fp8x23/input_0.cairo | 8 +- .../nodes/sigmoid_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sin_fp16x16/input_0.cairo | 8 +- src/tests/nodes/sin_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sin_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sin_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sin_i32_fp16x16/input_0.cairo | 8 +- .../nodes/sin_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sin_i32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sin_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sin_i8_fp16x16/input_0.cairo | 8 +- src/tests/nodes/sin_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sin_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sin_i8_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sin_u32_fp16x16/input_0.cairo | 8 +- .../nodes/sin_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sin_u32_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sin_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sinh_fp16x16/input_0.cairo | 8 +- src/tests/nodes/sinh_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sinh_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sinh_fp8x23/output_0.cairo | 8 +- .../nodes/sinh_i32_fp16x16/input_0.cairo | 8 +- .../nodes/sinh_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sinh_i32_fp8x23/input_0.cairo | 8 +- .../nodes/sinh_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sinh_i8_fp16x16/input_0.cairo | 8 +- .../nodes/sinh_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sinh_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sinh_i8_fp8x23/output_0.cairo | 8 +- .../nodes/sinh_u32_fp16x16/input_0.cairo | 8 +- .../nodes/sinh_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sinh_u32_fp8x23/input_0.cairo | 8 +- .../nodes/sinh_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/softmax_fp16x16/input_0.cairo | 8 +- .../nodes/softmax_fp16x16/output_0.cairo | 8 +- src/tests/nodes/softmax_fp8x23/input_0.cairo | 8 +- src/tests/nodes/softmax_fp8x23/output_0.cairo | 8 +- .../nodes/softmax_i32_fp16x16/input_0.cairo | 8 +- .../nodes/softmax_i32_fp16x16/output_0.cairo | 8 +- .../nodes/softmax_i32_fp8x23/input_0.cairo | 8 +- .../nodes/softmax_i32_fp8x23/output_0.cairo | 8 +- .../nodes/softmax_i8_fp16x16/input_0.cairo | 8 +- .../nodes/softmax_i8_fp16x16/output_0.cairo | 8 +- .../nodes/softmax_i8_fp8x23/input_0.cairo | 8 +- .../nodes/softmax_i8_fp8x23/output_0.cairo | 8 +- .../nodes/softmax_u32_fp16x16/input_0.cairo | 8 +- .../nodes/softmax_u32_fp16x16/output_0.cairo | 8 +- .../nodes/softmax_u32_fp8x23/input_0.cairo | 8 +- .../nodes/softmax_u32_fp8x23/output_0.cairo | 8 +- .../nodes/softplus_fp16x16/input_0.cairo | 8 +- .../nodes/softplus_fp16x16/output_0.cairo | 8 +- src/tests/nodes/softplus_fp8x23/input_0.cairo | 8 +- .../nodes/softplus_fp8x23/output_0.cairo | 8 +- .../nodes/softplus_i32_fp16x16/input_0.cairo | 8 +- .../nodes/softplus_i32_fp16x16/output_0.cairo | 8 +- .../nodes/softplus_i32_fp8x23/input_0.cairo | 8 +- .../nodes/softplus_i32_fp8x23/output_0.cairo | 8 +- .../nodes/softplus_i8_fp16x16/input_0.cairo | 8 +- .../nodes/softplus_i8_fp16x16/output_0.cairo | 8 +- .../nodes/softplus_i8_fp8x23/input_0.cairo | 8 +- .../nodes/softplus_i8_fp8x23/output_0.cairo | 8 +- .../nodes/softplus_u32_fp16x16/input_0.cairo | 8 +- .../nodes/softplus_u32_fp16x16/output_0.cairo | 8 +- .../nodes/softplus_u32_fp8x23/input_0.cairo | 8 +- .../nodes/softplus_u32_fp8x23/output_0.cairo | 8 +- .../nodes/softsign_fp16x16/input_0.cairo | 8 +- .../nodes/softsign_fp16x16/output_0.cairo | 8 +- src/tests/nodes/softsign_fp8x23/input_0.cairo | 8 +- .../nodes/softsign_fp8x23/output_0.cairo | 8 +- .../nodes/softsign_i32_fp16x16/input_0.cairo | 8 +- .../nodes/softsign_i32_fp16x16/output_0.cairo | 8 +- .../nodes/softsign_i32_fp8x23/input_0.cairo | 8 +- .../nodes/softsign_i32_fp8x23/output_0.cairo | 8 +- .../nodes/softsign_i8_fp16x16/input_0.cairo | 8 +- .../nodes/softsign_i8_fp16x16/output_0.cairo | 8 +- .../nodes/softsign_i8_fp8x23/input_0.cairo | 8 +- .../nodes/softsign_i8_fp8x23/output_0.cairo | 8 +- .../nodes/softsign_u32_fp16x16/input_0.cairo | 8 +- .../nodes/softsign_u32_fp16x16/output_0.cairo | 8 +- .../nodes/softsign_u32_fp8x23/input_0.cairo | 8 +- .../nodes/softsign_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sqrt_fp16x16/input_0.cairo | 8 +- src/tests/nodes/sqrt_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sqrt_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sqrt_fp8x23/output_0.cairo | 8 +- .../nodes/sqrt_i32_fp16x16/input_0.cairo | 8 +- .../nodes/sqrt_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo | 8 +- .../nodes/sqrt_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo | 8 +- .../nodes/sqrt_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo | 8 +- .../nodes/sqrt_u32_fp16x16/input_0.cairo | 8 +- .../nodes/sqrt_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo | 8 +- .../nodes/sqrt_u32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/sub_fp16x16/input_0.cairo | 8 +- src/tests/nodes/sub_fp16x16/input_1.cairo | 8 +- src/tests/nodes/sub_fp16x16/output_0.cairo | 8 +- .../nodes/sub_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/sub_fp16x16_broadcast/input_1.cairo | 8 +- .../sub_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/sub_fp8x23/input_0.cairo | 8 +- src/tests/nodes/sub_fp8x23/input_1.cairo | 8 +- src/tests/nodes/sub_fp8x23/output_0.cairo | 8 +- .../nodes/sub_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/sub_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/sub_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/sub_i32/input_0.cairo | 8 +- src/tests/nodes/sub_i32/input_1.cairo | 8 +- src/tests/nodes/sub_i32/output_0.cairo | 8 +- .../nodes/sub_i32_broadcast/input_0.cairo | 8 +- .../nodes/sub_i32_broadcast/input_1.cairo | 8 +- .../nodes/sub_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/sub_i8/input_0.cairo | 8 +- src/tests/nodes/sub_i8/input_1.cairo | 8 +- src/tests/nodes/sub_i8/output_0.cairo | 8 +- .../nodes/sub_i8_broadcast/input_0.cairo | 8 +- .../nodes/sub_i8_broadcast/input_1.cairo | 8 +- .../nodes/sub_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/sub_u32/input_0.cairo | 8 +- src/tests/nodes/sub_u32/input_1.cairo | 8 +- src/tests/nodes/sub_u32/output_0.cairo | 8 +- .../nodes/sub_u32_broadcast/input_0.cairo | 8 +- .../nodes/sub_u32_broadcast/input_1.cairo | 8 +- .../nodes/sub_u32_broadcast/output_0.cairo | 8 +- src/tests/nodes/tanh_fp16x16/input_0.cairo | 8 +- src/tests/nodes/tanh_fp16x16/output_0.cairo | 8 +- src/tests/nodes/tanh_fp8x23/input_0.cairo | 8 +- src/tests/nodes/tanh_fp8x23/output_0.cairo | 8 +- .../nodes/tanh_i32_fp16x16/input_0.cairo | 8 +- .../nodes/tanh_i32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/tanh_i32_fp8x23/input_0.cairo | 8 +- .../nodes/tanh_i32_fp8x23/output_0.cairo | 8 +- src/tests/nodes/tanh_i8_fp16x16/input_0.cairo | 8 +- .../nodes/tanh_i8_fp16x16/output_0.cairo | 8 +- src/tests/nodes/tanh_i8_fp8x23/input_0.cairo | 8 +- src/tests/nodes/tanh_i8_fp8x23/output_0.cairo | 8 +- .../nodes/tanh_u32_fp16x16/input_0.cairo | 8 +- .../nodes/tanh_u32_fp16x16/output_0.cairo | 8 +- src/tests/nodes/tanh_u32_fp8x23/input_0.cairo | 8 +- .../nodes/tanh_u32_fp8x23/output_0.cairo | 8 +- .../nodes/transpose_fp16x16_2d/input_0.cairo | 8 +- .../nodes/transpose_fp16x16_2d/output_0.cairo | 8 +- .../nodes/transpose_fp16x16_3d/input_0.cairo | 8 +- .../nodes/transpose_fp16x16_3d/output_0.cairo | 8 +- .../nodes/transpose_fp8x23_2d/input_0.cairo | 8 +- .../nodes/transpose_fp8x23_2d/output_0.cairo | 8 +- .../nodes/transpose_fp8x23_3d/input_0.cairo | 8 +- .../nodes/transpose_fp8x23_3d/output_0.cairo | 8 +- .../nodes/transpose_i32_2d/input_0.cairo | 8 +- .../nodes/transpose_i32_2d/output_0.cairo | 8 +- .../nodes/transpose_i32_3d/input_0.cairo | 8 +- .../nodes/transpose_i32_3d/output_0.cairo | 8 +- src/tests/nodes/transpose_i8_2d/input_0.cairo | 8 +- .../nodes/transpose_i8_2d/output_0.cairo | 8 +- src/tests/nodes/transpose_i8_3d/input_0.cairo | 8 +- .../nodes/transpose_i8_3d/output_0.cairo | 8 +- .../nodes/transpose_u32_2d/input_0.cairo | 8 +- .../nodes/transpose_u32_2d/output_0.cairo | 8 +- .../nodes/transpose_u32_3d/input_0.cairo | 8 +- .../nodes/transpose_u32_3d/output_0.cairo | 8 +- src/tests/nodes/xor_fp16x16/input_0.cairo | 8 +- src/tests/nodes/xor_fp16x16/input_1.cairo | 8 +- src/tests/nodes/xor_fp16x16/output_0.cairo | 8 +- .../nodes/xor_fp16x16_broadcast/input_0.cairo | 8 +- .../nodes/xor_fp16x16_broadcast/input_1.cairo | 8 +- .../xor_fp16x16_broadcast/output_0.cairo | 8 +- src/tests/nodes/xor_fp8x23/input_0.cairo | 8 +- src/tests/nodes/xor_fp8x23/input_1.cairo | 8 +- src/tests/nodes/xor_fp8x23/output_0.cairo | 8 +- .../nodes/xor_fp8x23_broadcast/input_0.cairo | 8 +- .../nodes/xor_fp8x23_broadcast/input_1.cairo | 8 +- .../nodes/xor_fp8x23_broadcast/output_0.cairo | 8 +- src/tests/nodes/xor_i32/input_0.cairo | 8 +- src/tests/nodes/xor_i32/input_1.cairo | 8 +- src/tests/nodes/xor_i32/output_0.cairo | 8 +- .../nodes/xor_i32_broadcast/input_0.cairo | 8 +- .../nodes/xor_i32_broadcast/input_1.cairo | 8 +- .../nodes/xor_i32_broadcast/output_0.cairo | 8 +- src/tests/nodes/xor_i8/input_0.cairo | 8 +- src/tests/nodes/xor_i8/input_1.cairo | 8 +- src/tests/nodes/xor_i8/output_0.cairo | 8 +- .../nodes/xor_i8_broadcast/input_0.cairo | 8 +- .../nodes/xor_i8_broadcast/input_1.cairo | 8 +- .../nodes/xor_i8_broadcast/output_0.cairo | 8 +- src/tests/nodes/xor_u32/input_0.cairo | 8 +- src/tests/nodes/xor_u32/input_1.cairo | 8 +- src/tests/nodes/xor_u32/output_0.cairo | 8 +- .../nodes/xor_u32_broadcast/input_0.cairo | 8 +- .../nodes/xor_u32_broadcast/input_1.cairo | 8 +- .../nodes/xor_u32_broadcast/output_0.cairo | 8 +- .../fp_i8_test.cairo | 56 ++--- .../dequantize_linear_i32_test.cairo | 28 +-- .../quantize_linear_fp_test/fp_i8_test.cairo | 56 ++--- .../quantize_linear_i32_test.cairo | 28 +-- .../at/at_fp_test/at_fp16x16_test.cairo | 6 +- .../at/at_fp_test/at_fp8x23_test.cairo | 6 +- src/tests/tensor_core/at/at_i32_test.cairo | 6 +- src/tests/tensor_core/at/at_u32_test.cairo | 6 +- .../flatten/flatten_i32_test.cairo | 6 +- .../flatten/flatten_u32_test.cairo | 6 +- .../onehot_fp_test/onehot_fp16x16_test.cairo | 12 +- .../onehot_fp_test/onehot_fp8x23_test.cairo | 12 +- .../tensor_core/onehot/onehot_i32_test.cairo | 10 +- .../tensor_core/onehot/onehot_i8_test.cairo | 12 +- .../tensor_core/onehot/onehot_u32_test.cairo | 6 +- .../stride_fp_test/stride_fp16x16_test.cairo | 6 +- .../stride_fp_test/stride_fp8x23_test.cairo | 6 +- .../tensor_core/stride/stride_i32_test.cairo | 6 +- .../tensor_core/stride/stride_u32_test.cairo | 6 +- 1188 files changed, 4999 insertions(+), 5026 deletions(-) diff --git a/src/numbers/fixed_point/core.cairo b/src/numbers/fixed_point/core.cairo index 5b9f76c9b..166389a16 100644 --- a/src/numbers/fixed_point/core.cairo +++ b/src/numbers/fixed_point/core.cairo @@ -1,9 +1,3 @@ -/// A struct listing fixed point implementations. -#[derive(Serde, Copy, Drop)] -enum FixedImpl { - FP8x23: (), - FP16x16: () -} /// Trait /// diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index aee233592..1ad4e0847 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -36,7 +36,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -86,7 +86,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -94,7 +94,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn softmax_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -140,7 +140,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -148,7 +148,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn logsoftmax_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -199,7 +199,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -207,7 +207,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn sigmoid_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -253,7 +253,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -261,7 +261,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn softsign_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -307,7 +307,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -315,7 +315,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn softplus_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -363,7 +363,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -371,7 +371,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; /// /// fn linear_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// /// // We instantiate inputs here. /// let inputs = TensorTrait::::new( @@ -435,7 +435,7 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::operators::nn::core::NNTrait; /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; @@ -444,7 +444,7 @@ trait NNTrait { /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn leaky_relu_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 3].span(), /// data: array![ diff --git a/src/operators/nn/functional/leaky_relu.cairo b/src/operators/nn/functional/leaky_relu.cairo index 06b24e468..5fdcd46a1 100644 --- a/src/operators/nn/functional/leaky_relu.cairo +++ b/src/operators/nn/functional/leaky_relu.cairo @@ -50,7 +50,7 @@ fn leaky_relu_from_int< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } /// Cf: NNTrait::leaky_relu docstring @@ -85,5 +85,5 @@ fn leaky_relu_from_fp< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/nn/functional/relu.cairo b/src/operators/nn/functional/relu.cairo index e8a53b66b..de487d8fa 100644 --- a/src/operators/nn/functional/relu.cairo +++ b/src/operators/nn/functional/relu.cairo @@ -35,5 +35,5 @@ fn relu< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/nn/functional/sigmoid.cairo b/src/operators/nn/functional/sigmoid.cairo index 9371d87aa..577393974 100644 --- a/src/operators/nn/functional/sigmoid.cairo +++ b/src/operators/nn/functional/sigmoid.cairo @@ -44,7 +44,7 @@ fn sigmoid_from_int< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } /// Cf: NNTrait::sigmoid docstring @@ -78,6 +78,6 @@ fn sigmoid_from_fp< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/nn/functional/softplus.cairo b/src/operators/nn/functional/softplus.cairo index 78c621704..b65150bcc 100644 --- a/src/operators/nn/functional/softplus.cairo +++ b/src/operators/nn/functional/softplus.cairo @@ -41,7 +41,7 @@ fn softplus_from_int< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } @@ -73,5 +73,5 @@ fn softplus_from_fp< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/nn/functional/softsign.cairo b/src/operators/nn/functional/softsign.cairo index 789a1ad0c..f2dda6c2e 100644 --- a/src/operators/nn/functional/softsign.cairo +++ b/src/operators/nn/functional/softsign.cairo @@ -43,7 +43,7 @@ fn softsign_from_int< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } /// Cf: NNTrait::softsign docstring @@ -74,5 +74,5 @@ fn softsign_from_fp< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 10e597dff..2ac87e32b 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -5,7 +5,7 @@ mod linalg; mod quantization; mod implementations; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorSerde, TensorTrait}; +use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::{ Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index cb316414b..c7f7a064d 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -1,22 +1,13 @@ use array::{ArrayTrait, SpanTrait}; use serde::Serde; -use option::OptionTrait; - use orion::operators::tensor::helpers::{len_from_shape, check_shape}; -use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::i8; #[derive(Copy, Drop)] struct Tensor { shape: Span, data: Span, - extra: Option -} - -#[derive(Serde, Copy, Drop)] -struct ExtraParams { - fixed_point: Option } //Implement TensorSerde @@ -24,15 +15,13 @@ impl TensorSerde, impl TDrop: Drop> of Serde, ref output: Array) { self.shape.serialize(ref output); self.data.serialize(ref output); - self.extra.serialize(ref output); } fn deserialize(ref serialized: Span) -> Option> { let shape: Span = Serde::>::deserialize(ref serialized)?; let data: Span = Serde::>::deserialize(ref serialized)?; - let extra: Option = Serde::>::deserialize(ref serialized)?; - Option::Some(Tensor { shape, data, extra }) + Option::Some(Tensor { shape, data }) } } @@ -82,7 +71,7 @@ trait TensorTrait { /// # tensor.new /// /// ```rust - /// fn new(shape: Span, data: Span, extra: Option) -> Tensor; + /// fn new(shape: Span, data: Span: Option) -> Tensor; /// ``` /// /// Returns a new tensor with the given shape and data. @@ -108,7 +97,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// // 1D TENSOR @@ -145,7 +134,7 @@ trait TensorTrait { /// } /// ``` /// - fn new(shape: Span, data: Span, extra: Option) -> Tensor; + fn new(shape: Span, data: Span) -> Tensor; /// # tensor.at /// /// ```rust @@ -172,7 +161,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -213,7 +202,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -252,7 +241,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -290,7 +279,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -334,7 +323,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -382,7 +371,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -428,7 +417,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -474,7 +463,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -521,7 +510,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// @@ -572,7 +561,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmax_example() -> Tensor { @@ -596,7 +585,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmax_example() -> Tensor { @@ -621,7 +610,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmax_example() -> Tensor { @@ -674,7 +663,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmin_example() -> Tensor { @@ -699,7 +688,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmin_example() -> Tensor { @@ -724,7 +713,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn argmin_example() -> Tensor { @@ -780,7 +769,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn dot_product_example() -> Tensor { @@ -807,7 +796,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn matrix_mul_example() -> Tensor { @@ -834,7 +823,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn matrix_vec_mul_example() -> Tensor { @@ -881,12 +870,12 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::numbers::fixed_point::core::{FixedType}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn exp_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![0, 1, 2, 3].span(), @@ -926,12 +915,12 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::numbers::fixed_point::core::{FixedType}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn log_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![1, 2, 3, 100].span(), @@ -978,7 +967,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn eq_example() -> Tensor { @@ -1005,7 +994,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn eq_example() -> Tensor { @@ -1059,7 +1048,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn greater_example() -> Tensor { @@ -1086,7 +1075,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn greater_example() -> Tensor { @@ -1140,7 +1129,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn greater_equal_example() -> Tensor { @@ -1167,7 +1156,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn greater_equal_example() -> Tensor { @@ -1221,7 +1210,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn less_example() -> Tensor { @@ -1248,7 +1237,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn less_example() -> Tensor { @@ -1302,7 +1291,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn less_equal_example() -> Tensor { @@ -1329,7 +1318,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; /// /// fn less_equal_example() -> Tensor { @@ -1375,7 +1364,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; /// @@ -1419,13 +1408,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn ceil_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ @@ -1465,13 +1454,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn sin_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ @@ -1514,13 +1503,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn cos_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ @@ -1570,9 +1559,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1595,9 +1584,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1620,9 +1609,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1673,9 +1662,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1694,9 +1683,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1715,9 +1704,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1756,13 +1745,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn sinh_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2,2].span(), /// data: array![ @@ -1806,13 +1795,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn tanh_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2,2].span(), /// data: array![ @@ -1856,13 +1845,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn cosh_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2,2].span(), /// data: array![ @@ -1906,13 +1895,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn asinh_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2,2].span(), /// data: array![ @@ -1956,13 +1945,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn acosh_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2,2].span(), /// data: array![ @@ -2005,13 +1994,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn atan_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ @@ -2053,13 +2042,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn asin_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2].span(), /// data: array![ @@ -2108,9 +2097,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -2135,9 +2124,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -2189,9 +2178,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -2216,9 +2205,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -2262,13 +2251,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn acos_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![2].span(), /// data: array![ @@ -2314,9 +2303,9 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// /// fn onehot_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -2362,13 +2351,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; + /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; /// /// fn sqrt_example() -> Tensor { - /// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; + /// /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ @@ -2414,7 +2403,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + /// use orion::operators::tensor::core::{TensorTrait, Tensor}; /// /// fn concat_example() -> Tensor { /// let tensor1 = TensorTrait::::new( @@ -2600,9 +2589,9 @@ trait TensorTrait { /// Cf: TensorTrait::new docstring -fn new_tensor(shape: Span, data: Span, extra: Option) -> Tensor { +fn new_tensor(shape: Span, data: Span) -> Tensor { check_shape::(shape, data); - Tensor:: { shape, data, extra } + Tensor:: { shape, data } } /// Cf: TensorTrait::ravel_index docstring @@ -2682,7 +2671,7 @@ fn stride(mut shape: Span) -> Span { /// Cf: TensorTrait::reshape docstring fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - new_tensor(target_shape, *self.data, *self.extra) + new_tensor(target_shape, *self.data) } /// Cf: TensorTrait::at docstring diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 267f7fdd5..0b2e43023 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -5,10 +5,10 @@ use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor }; use orion::operators::tensor::{math, linalg, quantization}; @@ -19,8 +19,8 @@ use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ use orion::numbers::i8; impl Tensor_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> FP16x16 { diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index ed20b4734..8ff83d9e4 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -5,20 +5,22 @@ use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{Tensor_i8_fp8x23, TensorI8IntoTensorFP8x23}; +use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ + Tensor_i8_fp8x23, TensorI8IntoTensorFP8x23 +}; use orion::numbers::i8; impl Tensor_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> FP8x23 { diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo index 0f1b726ca..d176dcf1f 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo @@ -6,11 +6,10 @@ use option::OptionTrait; use traits::{Into, TryInto}; use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, + tensor_eq }; use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; @@ -21,8 +20,8 @@ use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ use orion::numbers::i8; impl Tensor_i32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span,) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> i32 { diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo index bb9a3006e..09d9c5121 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo @@ -6,11 +6,10 @@ use option::OptionTrait; use traits::{Into, TryInto}; use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, + tensor_eq }; use orion::operators::tensor::{math, linalg, quantization}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; @@ -21,8 +20,8 @@ use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ use orion::numbers::i8; impl Tensor_i32_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> i32 { diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo index d1f1f0962..0eac14104 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo @@ -7,10 +7,9 @@ use traits::{Into, TryInto}; use orion::numbers::signed_integer::{i8::i8, i32::i32}; use orion::numbers::signed_integer::i8::{i8_to_fp16x16}; -use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; use orion::operators::tensor::{math, linalg}; @@ -19,8 +18,8 @@ use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; impl Tensor_i8_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> i8 { @@ -281,7 +280,7 @@ fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { }; }; - return TensorTrait::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::new(*x.shape, result_data.span()); } @@ -297,7 +296,7 @@ fn tensor_i8_to_fp16x16(x: @Tensor) -> Tensor { }; }; - return TensorTrait::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::new(*x.shape, result_data.span()); } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo index 5bf2ca605..9638a4a4b 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo @@ -7,10 +7,9 @@ use traits::{Into, TryInto}; use orion::numbers::signed_integer::{i8::i8, i32::i32}; use orion::numbers::signed_integer::i8::{i8_to_fp8x23}; -use orion::numbers::fixed_point::core::{FixedImpl}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, tensor_eq }; use orion::operators::tensor::{math, linalg}; @@ -19,8 +18,8 @@ use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8 use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; impl Tensor_i8_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> i8 { @@ -281,7 +280,7 @@ fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { }; }; - return TensorTrait::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::new(*x.shape, result_data.span()); } @@ -297,7 +296,7 @@ fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { }; }; - return TensorTrait::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::new(*x.shape, result_data.span()); } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo index 6606bc274..c694d10e3 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo @@ -5,11 +5,11 @@ use array::SpanTrait; use option::OptionTrait; use traits::Into; -use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, + tensor_eq }; use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; @@ -17,8 +17,8 @@ use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp use orion::numbers::i8; impl Tensor_u32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> u32 { @@ -275,7 +275,7 @@ fn tensor_u32_to_fp16x16(x: @Tensor) -> Tensor { }; }; - return TensorTrait::::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::::new(*x.shape, result_data.span()); } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo index 320d72bbe..ec660cf0e 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo @@ -5,11 +5,11 @@ use array::SpanTrait; use option::OptionTrait; use traits::Into; -use orion::numbers::fixed_point::core::{FixedImpl, FixedTrait}; +use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, ExtraParams, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, + tensor_eq }; use orion::operators::tensor::{math, linalg}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -17,8 +17,8 @@ use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8 use orion::numbers::i8; impl Tensor_u32_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span, extra: Option) -> Tensor { - new_tensor(shape, data, extra) + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) } fn at(self: @Tensor, indices: Span) -> u32 { @@ -275,7 +275,7 @@ fn tensor_u32_to_fp8x23(x: @Tensor) -> Tensor { }; }; - return TensorTrait::::new(*x.shape, result_data.span(), *x.extra); + return TensorTrait::::new(*x.shape, result_data.span()); } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. diff --git a/src/operators/tensor/linalg/matmul.cairo b/src/operators/tensor/linalg/matmul.cairo index 1fcc83c64..3259ce1a8 100644 --- a/src/operators/tensor/linalg/matmul.cairo +++ b/src/operators/tensor/linalg/matmul.cairo @@ -3,7 +3,7 @@ use array::SpanTrait; use option::OptionTrait; use orion::numbers::NumberTrait; -use orion::operators::tensor::core::{Tensor, ExtraParams, TensorTrait}; +use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::matmul docstring fn matmul< @@ -33,7 +33,7 @@ fn matmul< let mut result_data = ArrayTrait::new(); result_shape.append(1); result_data.append(dot); - return TensorTrait::new(result_shape.span(), result_data.span(), *self.extra); + return TensorTrait::new(result_shape.span(), result_data.span()); } let self_shape = prepare_shape_for_matmul(self_shape, true); @@ -43,7 +43,7 @@ fn matmul< let result_shape = adjust_output_shape_after_matmul(result.shape, self_ndim, other_ndim); - return TensorTrait::new(result_shape, result.data, *self.extra); + return TensorTrait::new(result_shape, result.data); } /// Computes the dot product of two 1-dimensional i32 tensors. @@ -158,7 +158,7 @@ fn matrix_multiply< i += 1; }; - return TensorTrait::new(result_shape.span(), result_data.span(), Option::None(())); + return TensorTrait::new(result_shape.span(), result_data.span()); } /// Prepares the shape of a tensor for matrix multiplication. diff --git a/src/operators/tensor/linalg/transpose.cairo b/src/operators/tensor/linalg/transpose.cairo index 80efecd6f..52cb22ea6 100644 --- a/src/operators/tensor/linalg/transpose.cairo +++ b/src/operators/tensor/linalg/transpose.cairo @@ -8,13 +8,7 @@ use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_o use orion::numbers::NumberTrait; /// Cf: TensorTrait::transpose docstring -fn transpose< - T, - F, - impl TTensor: TensorTrait, - impl TCopy: Copy, - impl TDrop: Drop ->( +fn transpose, impl TCopy: Copy, impl TDrop: Drop>( self: @Tensor, axes: Span ) -> Tensor { assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); @@ -51,5 +45,5 @@ fn transpose< output_index += 1; }; - return TensorTrait::new(output_shape, output_data.span(), *self.extra); + return TensorTrait::new(output_shape, output_data.span()); } diff --git a/src/operators/tensor/math/abs.cairo b/src/operators/tensor/math/abs.cairo index aa2d64806..1e47109db 100644 --- a/src/operators/tensor/math/abs.cairo +++ b/src/operators/tensor/math/abs.cairo @@ -29,5 +29,5 @@ fn abs< }; }; - return TensorTrait::::new(z.shape, data_result.span(), z.extra); + return TensorTrait::::new(z.shape, data_result.span()); } diff --git a/src/operators/tensor/math/acos.cairo b/src/operators/tensor/math/acos.cairo index dfe9899ae..0bedc919c 100644 --- a/src/operators/tensor/math/acos.cairo +++ b/src/operators/tensor/math/acos.cairo @@ -28,6 +28,6 @@ fn acos< }; }; - return TensorTrait::::new(self.shape, result.span(), self.extra); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/acosh.cairo b/src/operators/tensor/math/acosh.cairo index 85e40c075..030a50222 100644 --- a/src/operators/tensor/math/acosh.cairo +++ b/src/operators/tensor/math/acosh.cairo @@ -42,7 +42,7 @@ fn acosh_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::acosh docstring @@ -69,5 +69,5 @@ fn acosh_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/argmax.cairo b/src/operators/tensor/math/argmax.cairo index 0d643a33a..5a76b9802 100644 --- a/src/operators/tensor/math/argmax.cairo +++ b/src/operators/tensor/math/argmax.cairo @@ -58,7 +58,7 @@ fn argmax< }; return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra + reduce_output_shape(*self.shape, axis, keepdims), output_data.span() ); } @@ -93,7 +93,7 @@ fn find_argmax_1D< Option::None(_) => { return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra + reduce_output_shape(input.shape, axis, keepdims), output_data.span() ); } }; @@ -123,7 +123,7 @@ fn find_argmax_1D< output_data.append(max_index); return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra); + F>::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); } diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index 2c7668ae2..fd9c26fff 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -58,7 +58,7 @@ fn argmin< }; return TensorTrait::::new( - reduce_output_shape(*self.shape, axis, keepdims), output_data.span(), *self.extra + reduce_output_shape(*self.shape, axis, keepdims), output_data.span() ); } @@ -93,9 +93,7 @@ fn find_argmin_1D< Option::Some(item) => *item, Option::None(_) => { return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra - ); + F>::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); } }; let mut min_index = 0; @@ -124,7 +122,7 @@ fn find_argmin_1D< output_data.append(min_index); return TensorTrait::::new( - reduce_output_shape(input.shape, axis, keepdims), output_data.span(), input.extra + reduce_output_shape(input.shape, axis, keepdims), output_data.span() ); } diff --git a/src/operators/tensor/math/arithmetic.cairo b/src/operators/tensor/math/arithmetic.cairo index 4015aaaf6..cc7592d4e 100644 --- a/src/operators/tensor/math/arithmetic.cairo +++ b/src/operators/tensor/math/arithmetic.cairo @@ -39,7 +39,7 @@ fn add< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn saturated_add< @@ -86,7 +86,7 @@ fn saturated_add< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn sub< @@ -119,7 +119,7 @@ fn sub< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn saturated_sub< @@ -166,7 +166,7 @@ fn saturated_sub< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn mul< @@ -199,7 +199,7 @@ fn mul< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn saturated_mul< @@ -246,7 +246,7 @@ fn saturated_mul< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn div< @@ -279,7 +279,7 @@ fn div< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn saturated_div< @@ -326,5 +326,5 @@ fn saturated_div< }; }; - return TensorTrait::::new(broadcasted_shape, result.span(), *self.extra); + return TensorTrait::::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/asin.cairo b/src/operators/tensor/math/asin.cairo index 4a14e988b..3e2b8ec95 100644 --- a/src/operators/tensor/math/asin.cairo +++ b/src/operators/tensor/math/asin.cairo @@ -29,5 +29,5 @@ fn asin< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/asinh.cairo b/src/operators/tensor/math/asinh.cairo index 2b26c8613..182086281 100644 --- a/src/operators/tensor/math/asinh.cairo +++ b/src/operators/tensor/math/asinh.cairo @@ -42,7 +42,7 @@ fn asinh_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::asinh docstring @@ -69,6 +69,6 @@ fn asinh_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/atan.cairo b/src/operators/tensor/math/atan.cairo index 0d823be89..d93649fa3 100644 --- a/src/operators/tensor/math/atan.cairo +++ b/src/operators/tensor/math/atan.cairo @@ -42,7 +42,7 @@ fn atan_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } fn atan_from_fp< @@ -68,5 +68,5 @@ fn atan_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/ceil.cairo b/src/operators/tensor/math/ceil.cairo index 3e83ea605..ea61b2ba4 100644 --- a/src/operators/tensor/math/ceil.cairo +++ b/src/operators/tensor/math/ceil.cairo @@ -29,6 +29,6 @@ fn ceil< }; }; - return TensorTrait::new(z.shape, data_result.span(), z.extra); + return TensorTrait::new(z.shape, data_result.span()); } diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo index 43f1721e1..61d9867ff 100644 --- a/src/operators/tensor/math/concat.cairo +++ b/src/operators/tensor/math/concat.cairo @@ -5,7 +5,7 @@ use debug::PrintTrait; use core::traits::Into; use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; fn concat, impl TCopy: Copy, impl TDrop: Drop,>( @@ -26,7 +26,7 @@ fn concat, impl TCopy: Copy, impl // Concatenate tensor data let output_data: Array = concatenate_data(tensors, axis, base_shape); - TensorTrait::::new(output_size.span(), output_data.span(), base_tensor.extra) + TensorTrait::::new(output_size.span(), output_data.span()) } fn validate_shapes(mut tensors: Span>, mut base_shape: Span, axis: usize) { diff --git a/src/operators/tensor/math/cos.cairo b/src/operators/tensor/math/cos.cairo index aab2ecfe2..15a3cdb5d 100644 --- a/src/operators/tensor/math/cos.cairo +++ b/src/operators/tensor/math/cos.cairo @@ -43,7 +43,7 @@ fn cos_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::cos docstring @@ -70,5 +70,5 @@ fn cos_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/cosh.cairo b/src/operators/tensor/math/cosh.cairo index 97790ec78..4a1eef5a9 100644 --- a/src/operators/tensor/math/cosh.cairo +++ b/src/operators/tensor/math/cosh.cairo @@ -43,7 +43,7 @@ fn cosh_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::cosh docstring @@ -70,5 +70,5 @@ fn cosh_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/cumsum.cairo b/src/operators/tensor/math/cumsum.cairo index 5c172585e..062506305 100644 --- a/src/operators/tensor/math/cumsum.cairo +++ b/src/operators/tensor/math/cumsum.cairo @@ -93,7 +93,7 @@ fn cumsum_forward< index += 1; }; - return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); + return TensorTrait::::new(*self.shape, output_data.span()); } @@ -172,5 +172,5 @@ fn cumsum_reverse< index += 1; }; - return TensorTrait::::new(*self.shape, output_data.span(), *self.extra); + return TensorTrait::::new(*self.shape, output_data.span()); } diff --git a/src/operators/tensor/math/equal.cairo b/src/operators/tensor/math/equal.cairo index 7adf487ab..3ad337372 100644 --- a/src/operators/tensor/math/equal.cairo +++ b/src/operators/tensor/math/equal.cairo @@ -46,5 +46,5 @@ fn equal< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index f6338e167..b0f1b8fff 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -42,7 +42,7 @@ fn exp_from_int< }; }; - return TensorTrait::::new(self.shape, result.span(), self.extra); + return TensorTrait::::new(self.shape, result.span()); } /// Cf: TensorTrait::exp docstring @@ -69,5 +69,5 @@ fn exp_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/greater.cairo b/src/operators/tensor/math/greater.cairo index ac20b6d09..bf2e0096f 100644 --- a/src/operators/tensor/math/greater.cairo +++ b/src/operators/tensor/math/greater.cairo @@ -52,5 +52,5 @@ fn greater< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/greater_equal.cairo b/src/operators/tensor/math/greater_equal.cairo index 582760204..2897a4dbb 100644 --- a/src/operators/tensor/math/greater_equal.cairo +++ b/src/operators/tensor/math/greater_equal.cairo @@ -52,5 +52,5 @@ fn greater_equal< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/less.cairo b/src/operators/tensor/math/less.cairo index 2f2733888..423ed1152 100644 --- a/src/operators/tensor/math/less.cairo +++ b/src/operators/tensor/math/less.cairo @@ -53,5 +53,5 @@ fn less< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/less_equal.cairo b/src/operators/tensor/math/less_equal.cairo index 86c06a7f8..49d3354c2 100644 --- a/src/operators/tensor/math/less_equal.cairo +++ b/src/operators/tensor/math/less_equal.cairo @@ -52,5 +52,5 @@ fn less_equal< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/log.cairo b/src/operators/tensor/math/log.cairo index d98b6820c..34c2258fe 100644 --- a/src/operators/tensor/math/log.cairo +++ b/src/operators/tensor/math/log.cairo @@ -43,7 +43,7 @@ fn log_from_int< }; }; - return TensorTrait::::new(self.shape, result.span(), self.extra); + return TensorTrait::::new(self.shape, result.span()); } /// Cf: TensorTrait::log docstring @@ -70,5 +70,5 @@ fn log_from_fp< }; }; - return TensorTrait::::new(self.shape, result.span(), self.extra); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index dff03b81e..7803efe1c 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -10,7 +10,7 @@ use option::OptionTrait; use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; /// Cf: TensorTrait::onehot docstring fn onehot_encode_from_int< @@ -88,7 +88,7 @@ fn onehot_encode_from_int< outer_index += 1; }; - let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), *self.extra); + let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span()); let mut tranpose_axes = ArrayTrait::new(); // Get New shape is axis is not last dimension if (axis != 999) & (axis.into() != rank) { @@ -140,7 +140,7 @@ fn onehot_from_int< data.append(NumberTrait::new(first.try_into().unwrap(), false)); data.append(NumberTrait::new(second.try_into().unwrap(), false)); - let values = TensorTrait::new(sizes.span(), data.span(), *self.extra); + let values = TensorTrait::new(sizes.span(), data.span()); onehot_encode_from_int(self, depth, axis, values) } @@ -221,7 +221,7 @@ fn onehot_encode_from_fp< outer_index += 1; }; - let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span(), *self.extra); + let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span()); let mut tranpose_axes = ArrayTrait::new(); // Get New shape is axis is not last dimension if (axis != 999) & (axis.into() != rank) { @@ -273,6 +273,6 @@ fn onehot_from_fp< data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); - let values = TensorTrait::new(sizes.span(), data.span(), *self.extra); + let values = TensorTrait::new(sizes.span(), data.span()); onehot_encode_from_fp(self, depth, axis, values) } diff --git a/src/operators/tensor/math/or.cairo b/src/operators/tensor/math/or.cairo index 70f49394d..1cb4bdf8d 100644 --- a/src/operators/tensor/math/or.cairo +++ b/src/operators/tensor/math/or.cairo @@ -54,5 +54,5 @@ fn or< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index d487c92ce..ee4e9af9a 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -30,7 +30,7 @@ fn reduce_sum< let mut output_shape = ArrayTrait::new(); output_shape.append(1); - return TensorTrait::new(output_shape.span(), output_data.span(), *self.extra); + return TensorTrait::new(output_shape.span(), output_data.span()); } else { assert(axis <= (*self.shape).len(), 'axis out of dimensions'); let output_shape = reduce_output_shape(*self.shape, axis, false); @@ -50,9 +50,9 @@ fn reduce_sum< if keepdims { let output_shape = reduce_output_shape(*self.shape, axis, true); - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); + return TensorTrait::::new(output_shape, output_data.span()); } else { - return TensorTrait::::new(output_shape, output_data.span(), *self.extra); + return TensorTrait::::new(output_shape, output_data.span()); } } } diff --git a/src/operators/tensor/math/sin.cairo b/src/operators/tensor/math/sin.cairo index a94b35d0f..4f28285fd 100644 --- a/src/operators/tensor/math/sin.cairo +++ b/src/operators/tensor/math/sin.cairo @@ -42,7 +42,7 @@ fn sin_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::sin docstring @@ -69,6 +69,6 @@ fn sin_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/sinh.cairo b/src/operators/tensor/math/sinh.cairo index 92349643a..719dd2a29 100644 --- a/src/operators/tensor/math/sinh.cairo +++ b/src/operators/tensor/math/sinh.cairo @@ -42,7 +42,7 @@ fn sinh_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::sinh docstring @@ -69,5 +69,5 @@ fn sinh_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/sqrt.cairo b/src/operators/tensor/math/sqrt.cairo index 0b6e8bcb8..b67bab792 100644 --- a/src/operators/tensor/math/sqrt.cairo +++ b/src/operators/tensor/math/sqrt.cairo @@ -41,7 +41,7 @@ fn sqrt_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } fn sqrt_from_fp< @@ -67,5 +67,5 @@ fn sqrt_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/tanh.cairo b/src/operators/tensor/math/tanh.cairo index 6d5b0b540..36fb7f385 100644 --- a/src/operators/tensor/math/tanh.cairo +++ b/src/operators/tensor/math/tanh.cairo @@ -43,7 +43,7 @@ fn tanh_from_int< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } /// Cf: TensorTrait::tanh docstring @@ -70,5 +70,5 @@ fn tanh_from_fp< }; }; - return TensorTrait::new(self.shape, result.span(), self.extra); + return TensorTrait::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/xor.cairo b/src/operators/tensor/math/xor.cairo index bf71d9dc6..3c7b5999b 100644 --- a/src/operators/tensor/math/xor.cairo +++ b/src/operators/tensor/math/xor.cairo @@ -53,5 +53,5 @@ fn xor< smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span(), *y.extra); + return TensorTrait::::new(*bigger.shape, data_result.span()); } diff --git a/src/operators/tensor/quantization/dequantize_linear.cairo b/src/operators/tensor/quantization/dequantize_linear.cairo index c62cc561e..dc558ae6d 100644 --- a/src/operators/tensor/quantization/dequantize_linear.cairo +++ b/src/operators/tensor/quantization/dequantize_linear.cairo @@ -81,7 +81,7 @@ fn dequantize_element_wise< }; }; - return TensorTrait::new(x.shape, result_data.span(), x.extra); + return TensorTrait::new(x.shape, result_data.span()); } fn dequantize< diff --git a/src/operators/tensor/quantization/quantize_linear.cairo b/src/operators/tensor/quantization/quantize_linear.cairo index d1a0cffa8..a91b405db 100644 --- a/src/operators/tensor/quantization/quantize_linear.cairo +++ b/src/operators/tensor/quantization/quantize_linear.cairo @@ -87,7 +87,7 @@ fn quantize_element_wise< }; }; - return TensorTrait::new(x.shape, result_data.span(), x.extra); + return TensorTrait::new(x.shape, result_data.span()); } fn quantize< diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index 800b70cf3..92658c5d0 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -1,9 +1,9 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { @@ -14,9 +14,9 @@ fn fp_tensor_1x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -29,9 +29,9 @@ fn fp_tensor_1x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -48,9 +48,9 @@ fn fp_tensor_2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -65,9 +65,9 @@ fn fp_tensor_2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); data.append(FixedTrait::new_unscaled(3, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -88,9 +88,9 @@ fn fp_tensor_3x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(7, false)); data.append(FixedTrait::new_unscaled(8, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -111,9 +111,9 @@ fn fp_tensor_3x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(7, true)); data.append(FixedTrait::new_unscaled(8, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -131,9 +131,9 @@ fn fp_tensor_3x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -151,9 +151,9 @@ fn fp_tensor_3x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, true)); data.append(FixedTrait::new_unscaled(5, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -168,9 +168,9 @@ fn fp_tensor_3x1_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -185,9 +185,9 @@ fn fp_tensor_3x1_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -205,9 +205,9 @@ fn fp_tensor_2x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -225,9 +225,9 @@ fn fp_tensor_2x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, true)); data.append(FixedTrait::new_unscaled(5, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -250,9 +250,9 @@ fn fp_tensor_2x2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(6, false)); data.append(FixedTrait::new_unscaled(7, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -273,9 +273,9 @@ fn fp_tensor_2x2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(6, true)); data.append(FixedTrait::new_unscaled(7, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -300,9 +300,9 @@ fn fp_tensor_3x2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(10, false)); data.append(FixedTrait::new_unscaled(11, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -327,9 +327,9 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(10, true)); data.append(FixedTrait::new_unscaled(11, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -369,9 +369,9 @@ fn fp_tensor_3x3x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(25, false)); data.append(FixedTrait::new_unscaled(26, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -411,9 +411,9 @@ fn fp_tensor_3x3x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(25, true)); data.append(FixedTrait::new_unscaled(26, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo index 58415ba7f..0d60fa651 100644 --- a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo @@ -1,9 +1,9 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { @@ -14,9 +14,9 @@ fn fp_tensor_1x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -29,9 +29,9 @@ fn fp_tensor_1x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(0, false)); data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -48,9 +48,9 @@ fn fp_tensor_2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -65,9 +65,9 @@ fn fp_tensor_2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); data.append(FixedTrait::new_unscaled(3, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -88,9 +88,9 @@ fn fp_tensor_3x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(7, false)); data.append(FixedTrait::new_unscaled(8, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -111,9 +111,9 @@ fn fp_tensor_3x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(7, true)); data.append(FixedTrait::new_unscaled(8, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -131,9 +131,9 @@ fn fp_tensor_3x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -151,9 +151,9 @@ fn fp_tensor_3x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, true)); data.append(FixedTrait::new_unscaled(5, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -168,9 +168,9 @@ fn fp_tensor_3x1_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -185,9 +185,9 @@ fn fp_tensor_3x1_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(1, true)); data.append(FixedTrait::new_unscaled(2, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -205,9 +205,9 @@ fn fp_tensor_2x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -225,9 +225,9 @@ fn fp_tensor_2x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(4, true)); data.append(FixedTrait::new_unscaled(5, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -250,9 +250,9 @@ fn fp_tensor_2x2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(6, false)); data.append(FixedTrait::new_unscaled(7, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -273,9 +273,9 @@ fn fp_tensor_2x2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(6, true)); data.append(FixedTrait::new_unscaled(7, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -300,9 +300,9 @@ fn fp_tensor_3x2x2_helper() -> Tensor { data.append(FixedTrait::new_unscaled(10, false)); data.append(FixedTrait::new_unscaled(11, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -327,9 +327,9 @@ fn fp_tensor_3x2x2_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(10, true)); data.append(FixedTrait::new_unscaled(11, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; + - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -370,9 +370,9 @@ fn fp_tensor_3x3x3_helper() -> Tensor { data.append(FixedTrait::new_unscaled(25, false)); data.append(FixedTrait::new_unscaled(26, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -412,9 +412,9 @@ fn fp_tensor_3x3x3_neg_helper() -> Tensor { data.append(FixedTrait::new_unscaled(25, true)); data.append(FixedTrait::new_unscaled(26, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/helpers/tensor/i32.cairo b/src/tests/helpers/tensor/i32.cairo index 4506e66ee..28e51857c 100644 --- a/src/tests/helpers/tensor/i32.cairo +++ b/src/tests/helpers/tensor/i32.cairo @@ -4,7 +4,7 @@ use array::SpanTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; // 1D fn i32_tensor_1x3_helper() -> Tensor { @@ -15,9 +15,9 @@ fn i32_tensor_1x3_helper() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -30,9 +30,9 @@ fn i32_tensor_1x3_neg_helper() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -49,9 +49,9 @@ fn i32_tensor_2x2_helper() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -66,9 +66,9 @@ fn i32_tensor_2x2_neg_helper() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -89,9 +89,9 @@ fn i32_tensor_3x3_helper() -> Tensor { data.append(i32 { mag: 7, sign: false }); data.append(i32 { mag: 8, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -112,9 +112,9 @@ fn i32_tensor_3x3_neg_helper() -> Tensor { data.append(i32 { mag: 7_u32, sign: true }); data.append(i32 { mag: 8_u32, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -132,9 +132,9 @@ fn i32_tensor_3x2_helper() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -152,9 +152,9 @@ fn i32_tensor_3x2_neg_helper() -> Tensor { data.append(i32 { mag: 4, sign: true }); data.append(i32 { mag: 5, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -169,9 +169,9 @@ fn i32_tensor_3x1_helper() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -186,9 +186,9 @@ fn i32_tensor_3x1_neg_helper() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -206,9 +206,9 @@ fn i32_tensor_2x3_helper() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -226,9 +226,9 @@ fn i32_tensor_2x3_neg_helper() -> Tensor { data.append(i32 { mag: 4, sign: true }); data.append(i32 { mag: 5, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -251,9 +251,9 @@ fn i32_tensor_2x2x2_helper() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 7, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -274,9 +274,9 @@ fn i32_tensor_2x2x2_neg_helper() -> Tensor { data.append(i32 { mag: 6_u32, sign: true }); data.append(i32 { mag: 7_u32, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -301,9 +301,9 @@ fn i32_tensor_3x2x2_helper() -> Tensor { data.append(i32 { mag: 10, sign: false }); data.append(i32 { mag: 11, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -328,9 +328,9 @@ fn i32_tensor_3x2x2_neg_helper() -> Tensor { data.append(i32 { mag: 10, sign: true }); data.append(i32 { mag: 11, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -370,9 +370,9 @@ fn i32_tensor_3x3x3_helper() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -412,9 +412,9 @@ fn i32_tensor_3x3x3_neg_helper() -> Tensor { data.append(i32 { mag: 25, sign: true }); data.append(i32 { mag: 26, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/helpers/tensor/i8.cairo b/src/tests/helpers/tensor/i8.cairo index c06f37732..14693ae94 100644 --- a/src/tests/helpers/tensor/i8.cairo +++ b/src/tests/helpers/tensor/i8.cairo @@ -2,7 +2,7 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -16,8 +16,8 @@ fn i8_tensor_1x3_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = Option::::None(()); - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -28,8 +28,8 @@ fn i8_tensor_1x3_neg_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = Option::::None(()); - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -45,9 +45,9 @@ fn i8_tensor_2x2_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -62,9 +62,9 @@ fn i8_tensor_2x2_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -85,9 +85,9 @@ fn i8_tensor_3x3_helper() -> Tensor { data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 8, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -108,9 +108,9 @@ fn i8_tensor_3x3_neg_helper() -> Tensor { data.append(i8 { mag: 7, sign: true }); data.append(i8 { mag: 8, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -128,9 +128,9 @@ fn i8_tensor_3x2_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -148,9 +148,9 @@ fn i8_tensor_3x2_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -165,9 +165,9 @@ fn i8_tensor_3x1_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -182,9 +182,9 @@ fn i8_tensor_3x1_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -202,9 +202,9 @@ fn i8_tensor_2x3_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -222,9 +222,9 @@ fn i8_tensor_2x3_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -247,9 +247,9 @@ fn i8_tensor_2x2x2_helper() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 7, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -270,9 +270,9 @@ fn i8_tensor_2x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 7, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -297,9 +297,9 @@ fn i8_tensor_3x2x2_helper() -> Tensor { data.append(i8 { mag: 10, sign: false }); data.append(i8 { mag: 11, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -324,9 +324,9 @@ fn i8_tensor_3x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 10, sign: true }); data.append(i8 { mag: 11, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -366,9 +366,9 @@ fn i8_tensor_3x3x3_helper() -> Tensor { data.append(i8 { mag: 25, sign: false }); data.append(i8 { mag: 26, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -408,9 +408,9 @@ fn i8_tensor_3x3x3_neg_helper() -> Tensor { data.append(i8 { mag: 25, sign: true }); data.append(i8 { mag: 26, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/helpers/tensor/u32.cairo b/src/tests/helpers/tensor/u32.cairo index 50e9b093d..bcdd70f71 100644 --- a/src/tests/helpers/tensor/u32.cairo +++ b/src/tests/helpers/tensor/u32.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use array::SpanTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; // 1D fn u32_tensor_1x3_helper() -> Tensor { @@ -12,9 +12,9 @@ fn u32_tensor_1x3_helper() -> Tensor { data.append(0); data.append(1); data.append(2); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -31,9 +31,9 @@ fn u32_tensor_2x2_helper() -> Tensor { data.append(1); data.append(2); data.append(3); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -54,9 +54,9 @@ fn u32_tensor_3x3_helper() -> Tensor { data.append(7); data.append(8); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -74,9 +74,9 @@ fn u32_tensor_3x2_helper() -> Tensor { data.append(4); data.append(5); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -91,9 +91,9 @@ fn u32_tensor_3x1_helper() -> Tensor { data.append(1); data.append(2); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -111,9 +111,9 @@ fn u32_tensor_2x3_helper() -> Tensor { data.append(4); data.append(5); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -136,9 +136,9 @@ fn u32_tensor_2x2x2_helper() -> Tensor { data.append(6); data.append(7); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -163,9 +163,9 @@ fn u32_tensor_3x2x2_helper() -> Tensor { data.append(10); data.append(11); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -205,9 +205,9 @@ fn u32_tensor_3x3x3_helper() -> Tensor { data.append(25); data.append(26); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo index c82f75cce..6a45ab1ef 100644 --- a/src/tests/nodes/abs_fp16x16/input_0.cairo +++ b/src/tests/nodes/abs_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 7536640, sign: true }); data.append(FP16x16 { mag: 7929856, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo index 985f06031..f78d1b2ce 100644 --- a/src/tests/nodes/abs_fp16x16/output_0.cairo +++ b/src/tests/nodes/abs_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 7536640, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo index 4a633b7a4..9e7694db9 100644 --- a/src/tests/nodes/abs_fp8x23/input_0.cairo +++ b/src/tests/nodes/abs_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 612368384, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo index d872b3ac7..9001ec514 100644 --- a/src/tests/nodes/abs_fp8x23/output_0.cairo +++ b/src/tests/nodes/abs_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 612368384, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo index 135f23528..479de4311 100644 --- a/src/tests/nodes/abs_i32/input_0.cairo +++ b/src/tests/nodes/abs_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 81, sign: false }); data.append(i32 { mag: 101, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo index 16e0cc92b..45c2a40f9 100644 --- a/src/tests/nodes/abs_i32/output_0.cairo +++ b/src/tests/nodes/abs_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 81, sign: false }); data.append(i32 { mag: 101, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo index 1d796713e..51c28093e 100644 --- a/src/tests/nodes/abs_i8/input_0.cairo +++ b/src/tests/nodes/abs_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 67, sign: false }); data.append(i8 { mag: 41, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo index 1542c9bf0..195ec686f 100644 --- a/src/tests/nodes/abs_i8/output_0.cairo +++ b/src/tests/nodes/abs_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 67, sign: false }); data.append(i8 { mag: 41, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo index f1adfe6b4..17e0d5e64 100644 --- a/src/tests/nodes/acos_fp16x16/input_0.cairo +++ b/src/tests/nodes/acos_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 47892, sign: false }); data.append(FP16x16 { mag: 52526, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo index a770ab90c..0b39ad9e7 100644 --- a/src/tests/nodes/acos_fp16x16/output_0.cairo +++ b/src/tests/nodes/acos_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 49239, sign: false }); data.append(FP16x16 { mag: 42008, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo index 6f4eab036..9ffdabbb0 100644 --- a/src/tests/nodes/acos_fp8x23/input_0.cairo +++ b/src/tests/nodes/acos_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 190013, sign: true }); data.append(FP8x23 { mag: 8257919, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo index 0d4601181..950b70ab0 100644 --- a/src/tests/nodes/acos_fp8x23/output_0.cairo +++ b/src/tests/nodes/acos_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 13366824, sign: false }); data.append(FP8x23 { mag: 24870922, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo index 0aed04ac0..00ca0f127 100644 --- a/src/tests/nodes/acosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 119042, sign: false }); data.append(FP16x16 { mag: 312767, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo index da55eb07d..e51f2e0c5 100644 --- a/src/tests/nodes/acosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 78893, sign: false }); data.append(FP16x16 { mag: 147118, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo index 151db66a7..4313439c1 100644 --- a/src/tests/nodes/acosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 20607627, sign: false }); data.append(FP8x23 { mag: 39982645, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo index 778ce925a..96806d869 100644 --- a/src/tests/nodes/acosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 12982783, sign: false }); data.append(FP8x23 { mag: 18820070, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo index f327fcebd..ea52e85fb 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo index e5d75f5f0..6e3a187ca 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 86308, sign: false }); data.append(FP16x16 { mag: 86308, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo index d8eaeef3f..d4a204e87 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo index b3c1b2680..1e1b3ce52 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 14786995, sign: false }); data.append(FP8x23 { mag: 14786995, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo index ed0d81aca..9779ebd97 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo index ad1cdd118..247adde60 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 86308, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo index b51f40cc1..fceca83ea 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo index 8716954f5..a369ec21d 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 17301504, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo index a4792605e..841f732bd 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo index c5d7249e2..429d6ad18 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo index 24550cef8..f988508a8 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo index 080eecccc..dd6ddf580 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 11047443, sign: false }); data.append(FP8x23 { mag: 11047443, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo index 00649b235..205d8e20b 100644 --- a/src/tests/nodes/add_fp16x16/input_0.cairo +++ b/src/tests/nodes/add_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo index 46d28d789..883fa3f37 100644 --- a/src/tests/nodes/add_fp16x16/input_1.cairo +++ b/src/tests/nodes/add_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo index c6a823845..c408ca8e3 100644 --- a/src/tests/nodes/add_fp16x16/output_0.cairo +++ b/src/tests/nodes/add_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo index 678714b1b..a211d0266 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo index 8a24fc147..c56726c2e 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo index 9682d5bd8..88d53d94d 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo index 0af93b756..0fbf9553c 100644 --- a/src/tests/nodes/add_fp8x23/input_0.cairo +++ b/src/tests/nodes/add_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo index 5dc71a528..b2c352a25 100644 --- a/src/tests/nodes/add_fp8x23/input_1.cairo +++ b/src/tests/nodes/add_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo index bbcaa34fe..5c1b047e5 100644 --- a/src/tests/nodes/add_fp8x23/output_0.cairo +++ b/src/tests/nodes/add_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 33554432, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo index 68bf08d42..cbb8f7e30 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo index eff38c6ae..ae39bb3f7 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo index 1fd0f0823..bf4926eea 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo index 5c9fff738..546cf7f35 100644 --- a/src/tests/nodes/add_i32/input_0.cairo +++ b/src/tests/nodes/add_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo index f785cc7c9..6b4b147a3 100644 --- a/src/tests/nodes/add_i32/input_1.cairo +++ b/src/tests/nodes/add_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo index c4dbf3b78..4b84bd019 100644 --- a/src/tests/nodes/add_i32/output_0.cairo +++ b/src/tests/nodes/add_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo index 9c981df62..9d1d930e9 100644 --- a/src/tests/nodes/add_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo index 5661e125f..22b8002f2 100644 --- a/src/tests/nodes/add_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo index 552c28cbd..0e49d8977 100644 --- a/src/tests/nodes/add_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: true }); data.append(i32 { mag: 6, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo index 973832901..01bc9d830 100644 --- a/src/tests/nodes/add_i8/input_0.cairo +++ b/src/tests/nodes/add_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo index 9911019b8..10b07ea72 100644 --- a/src/tests/nodes/add_i8/input_1.cairo +++ b/src/tests/nodes/add_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo index e54ae979a..7e472ce6e 100644 --- a/src/tests/nodes/add_i8/output_0.cairo +++ b/src/tests/nodes/add_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo index a7394039c..b15bb5310 100644 --- a/src/tests/nodes/add_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo index 0c106143b..eca978b79 100644 --- a/src/tests/nodes/add_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo index 21bff3737..589b11227 100644 --- a/src/tests/nodes/add_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo index 23e97d7e5..07d7d0368 100644 --- a/src/tests/nodes/add_u32/input_0.cairo +++ b/src/tests/nodes/add_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo index 97a7be5ad..de25d58f4 100644 --- a/src/tests/nodes/add_u32/input_1.cairo +++ b/src/tests/nodes/add_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo index 3db1eb432..b93e7079c 100644 --- a/src/tests/nodes/add_u32/output_0.cairo +++ b/src/tests/nodes/add_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo index ac854949d..d6bc759d4 100644 --- a/src/tests/nodes/add_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(0); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo index 128f81eed..10e87537e 100644 --- a/src/tests/nodes/add_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo index 2d4312522..86f417ba8 100644 --- a/src/tests/nodes/add_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo index 74854aa43..ad46362cd 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 3997696, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo index f9f6ba017..5d92f7e12 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 6684672, sign: true }); data.append(FP16x16 { mag: 7733248, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo index 0f6c7ce26..8acfeb912 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 1245184, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo index 712f4ed5f..749ba2419 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 3473408, sign: true }); data.append(FP16x16 { mag: 5505024, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo index 0f8f1e3e1..6e219e889 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 7405568, sign: true }); data.append(FP16x16 { mag: 7340032, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo index 5628a9e01..b17cecf19 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo index f72936a53..5ab75d2a6 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 6619136, sign: false }); data.append(FP16x16 { mag: 6488064, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo index 2e396e09c..7e478c01d 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 3145728, sign: true }); data.append(FP16x16 { mag: 4521984, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo index 4fbe6df06..195c9348f 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo index b42bbea7e..ddc37f740 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 6553600, sign: true }); data.append(FP16x16 { mag: 3407872, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo index 64d68bd99..a5785e938 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo index 4e3ede230..20a3579b6 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 3932160, sign: true }); data.append(FP16x16 { mag: 8257536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo index 6a4b255ba..51e873382 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo index 244e6a7d2..30fd5f2fa 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::numbers::FP8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 763363328, sign: false }); data.append(FP8x23 { mag: 427819008, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo index 1fbc2f10f..27813c347 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo index d84eb0e40..7f8e487d8 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 989855744, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo index e719a8feb..677e4493a 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo index 76e2b935e..011789634 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 1056964608, sign: true }); data.append(FP8x23 { mag: 109051904, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo index 2fe6c7cbc..33352224c 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo index 69f234a6c..83d905d82 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 956301312, sign: false }); data.append(FP8x23 { mag: 385875968, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo index 846cfb099..7678d6def 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo index aae42cae5..37f0ee7e6 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: true }); data.append(FP8x23 { mag: 662700032, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo index af12af7e0..f7e6d0630 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo index 2d2a3c9d9..6ea1d4345 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 754974720, sign: true }); data.append(FP8x23 { mag: 696254464, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo index cb934cb87..9436ef375 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo index 3e9bb10db..a0ed37e8b 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 268435456, sign: false }); data.append(FP8x23 { mag: 553648128, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo index cf3c78883..f3a503686 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo index ee6259699..07f1e22d1 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 360710144, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo index d94d93ca9..785b6f87b 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo index 05053f05d..f6b5ef345 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 377487360, sign: false }); data.append(FP8x23 { mag: 897581056, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo index c2e525057..2f36933a3 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo index da1d3d6e7..836d62c0e 100644 --- a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 56, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo index f68f70ac1..fdff564e7 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 26, sign: true }); data.append(i32 { mag: 62, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo index 9c3e6cea0..75fda421e 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 243, sign: false }); data.append(i32 { mag: 101, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo index deec7ab8a..c26192745 100644 --- a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 124, sign: true }); data.append(i32 { mag: 84, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo index 5e88177eb..4950d0ec3 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 28, sign: true }); data.append(i32 { mag: 119, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo index dc341aece..ffa5b8fca 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo index 821010d26..cb1a902fd 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 82, sign: false }); data.append(i32 { mag: 25, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo index 09d45d216..c7070452d 100644 --- a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 95, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo index 4efdb0bd0..172baa773 100644 --- a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo index 6b1436272..29f97de73 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 60, sign: true }); data.append(i32 { mag: 59, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo index cf300090b..352a5ae44 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo index a94190f64..d0e711e2c 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 12, sign: true }); data.append(i32 { mag: 77, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo index 67c8afb27..66a58ab2a 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo index 4d552b0a4..444222bb3 100644 --- a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 58, sign: true }); data.append(i8 { mag: 52, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo index 3abdd29be..02a5efda3 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 116, sign: false }); data.append(i8 { mag: 53, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo index b96dddedb..544307351 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 81, sign: true }); data.append(i8 { mag: 119, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo index 70bfe4e51..a67ee926d 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo index 6f0ce2f79..1710b0e18 100644 --- a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 17, sign: false }); data.append(i8 { mag: 118, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo index cf4c469df..41b4ab422 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 47, sign: false }); data.append(i8 { mag: 71, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo index dc341aece..ffa5b8fca 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo index 6494d111e..64e414805 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 100, sign: true }); data.append(i8 { mag: 115, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo index cac25e668..26d6eb5ac 100644 --- a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 57, sign: true }); data.append(i8 { mag: 61, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo index 995c6ecee..88365399e 100644 --- a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo index ffa6faa7c..ce37efb86 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 112, sign: true }); data.append(i8 { mag: 72, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo index a2c09b3b6..54020fa6e 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo index bebeac449..fbd780b20 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 79, sign: false }); data.append(i8 { mag: 61, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo index 3566e55b9..06984466e 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo index 4258d0c32..a808637e4 100644 --- a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(86); data.append(10); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo index fd41aaca6..6a7bc89d5 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(163); data.append(109); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo index aaa9f8324..8864e62dd 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(116); data.append(115); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo index 583e22204..f859375f9 100644 --- a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(145); data.append(211); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo index 9c30d3c1c..02d44a9af 100644 --- a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo index 1656fc9d1..622fbb162 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(8); data.append(59); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo index 5628a9e01..b17cecf19 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo index b6ed49b44..8b69b7475 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(102); data.append(202); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo index 24b3f9fa3..9c78877f7 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo index 3655cdd7f..d41551f38 100644 --- a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(60); data.append(73); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo index 4fbe6df06..195c9348f 100644 --- a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo index ae54c5383..b5b0e5571 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(103); data.append(89); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo index c89277282..0ff4ae4f1 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo index 0acf1deb1..56e8b7b10 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(43); data.append(25); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo index cc9f6c47e..f2789da70 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo index 05aba50c8..4d33fa09c 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 6029312, sign: false }); data.append(FP16x16 { mag: 7340032, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo index 70bfe4e51..a67ee926d 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo index 2520a43c3..054ef1f67 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 5242880, sign: true }); data.append(FP16x16 { mag: 2818048, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo index 1af1258d2..68852809c 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 7471104, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo index 70bfe4e51..a67ee926d 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo index 5d1b04510..945591c1a 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 7208960, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo index 36148bb0e..073496918 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 4980736, sign: true }); data.append(FP16x16 { mag: 2686976, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo index dc341aece..ffa5b8fca 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo index e887a41de..11fa1e517 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 4259840, sign: false }); data.append(FP16x16 { mag: 4784128, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo index 9130e88d3..c68d5b943 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 4456448, sign: true }); data.append(FP16x16 { mag: 5570560, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo index 0eda89876..f7502c1f3 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo index 93718af3a..963ea1a0c 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 2162688, sign: true }); data.append(FP16x16 { mag: 3080192, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo index 179e54137..4d79b7b34 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo index 8b848003d..e19a9a2d3 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 7405568, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo index cc9f6c47e..f2789da70 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo index 12dcaa585..f11ecf26e 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 914358272, sign: true }); data.append(FP8x23 { mag: 570425344, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo index 1fbc2f10f..27813c347 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo index c5e7b567a..4a8c148eb 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 360710144, sign: true }); data.append(FP8x23 { mag: 956301312, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo index e719a8feb..677e4493a 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo index 22d17c888..064313e33 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 159383552, sign: true }); data.append(FP8x23 { mag: 335544320, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo index e719a8feb..677e4493a 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo index feb6f4a77..111f0c5ba 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 595591168, sign: false }); data.append(FP8x23 { mag: 570425344, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo index 4a1111423..55682a53f 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo index 9c01b4676..936fc7424 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 75497472, sign: true }); data.append(FP8x23 { mag: 360710144, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo index b8f0186b5..8ddfaae45 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo index cf30b88a6..66c0551f9 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 679477248, sign: false }); data.append(FP8x23 { mag: 343932928, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo index cb934cb87..9436ef375 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo index a296fe46c..079ed090c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 461373440, sign: true }); data.append(FP8x23 { mag: 402653184, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo index 2e5998b1d..18a497632 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo index c2571d270..563c7e76b 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 92274688, sign: true }); data.append(FP8x23 { mag: 654311424, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo index d94d93ca9..785b6f87b 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo index 211c21be8..f19286fe2 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 645922816, sign: false }); data.append(FP8x23 { mag: 880803840, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo index e047b17ed..64a6bc737 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo index e01edd8a8..17cabca29 100644 --- a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 34, sign: true }); data.append(i32 { mag: 18, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo index c06bbd1ab..6428d6fe0 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 6, sign: true }); data.append(i32 { mag: 80, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo index 70bfe4e51..a67ee926d 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo index d342bb780..005e8270f 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 32, sign: false }); data.append(i32 { mag: 149, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo index 8f1ced1f6..92af493ee 100644 --- a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 121, sign: true }); data.append(i32 { mag: 28, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo index c14e70167..377152f30 100644 --- a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo index cb88599c2..6f6f9297f 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 47, sign: false }); data.append(i32 { mag: 89, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo index dc341aece..ffa5b8fca 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo index 1934901e0..03eda0fdc 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 54, sign: true }); data.append(i32 { mag: 59, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo index 9c30d3c1c..02d44a9af 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo index 9c2553e98..e9a9fa2f7 100644 --- a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 117, sign: true }); data.append(i32 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo index 85509f0cd..be944a9d1 100644 --- a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo index 7c29f220d..af6b48d07 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 41, sign: true }); data.append(i32 { mag: 32, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo index 64d68bd99..a5785e938 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo index b19257f50..30476108c 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 41, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo index d65a812e2..7d611909b 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo index f3f312d20..05abc7998 100644 --- a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 122, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo index baf2de45d..adef9a836 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 76, sign: false }); data.append(i8 { mag: 116, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo index fcf74c49c..6875015e7 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 108, sign: true }); data.append(i8 { mag: 48, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo index f2e89bb9f..e0ebc90f2 100644 --- a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 14, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo index 6f4b0a75b..750cdcda2 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 70, sign: true }); data.append(i8 { mag: 43, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo index dc341aece..ffa5b8fca 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo index 8ab9fd899..543f7c5f2 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 13, sign: false }); data.append(i8 { mag: 91, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo index 3c5542c75..416b77545 100644 --- a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 26, sign: false }); data.append(i8 { mag: 14, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo index cc9f6c47e..f2789da70 100644 --- a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo index fb69edd37..9fbf341db 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 112, sign: true }); data.append(i8 { mag: 78, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo index 64d68bd99..a5785e938 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo index 8399bd339..1444a2d05 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 74, sign: false }); data.append(i8 { mag: 73, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo index f1679745a..a4bc0e46d 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo index 246f3620a..9e248f9c8 100644 --- a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(218); data.append(115); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo index 8b8e29945..959707ae7 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(212); data.append(167); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo index 47b1c9786..02af17401 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo index 2a3711136..001dfdbde 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(37); data.append(139); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo index a89e1d5c0..da7c37eb4 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo index c9e758723..ade11e51c 100644 --- a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(65); data.append(136); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo index ef4e50cae..13835338e 100644 --- a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo index dfacca945..c27fbf9a5 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(247); data.append(85); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo index 5628a9e01..b17cecf19 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo index 62514e570..e7e4c7404 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(94); data.append(35); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo index 9c30d3c1c..02d44a9af 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo index a25f80d7c..5362c67a3 100644 --- a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(96); data.append(150); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo index 3566e55b9..06984466e 100644 --- a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo index ce0a40120..c81364173 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(38); data.append(211); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo index 3ee386bf4..8b96ad6d7 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo index 89f8df364..46fcc91d1 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(128); data.append(113); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo index 64607a296..20893c6f6 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo index 2a981d85f..1109f01df 100644 --- a/src/tests/nodes/asin_fp16x16/input_0.cairo +++ b/src/tests/nodes/asin_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 30205, sign: true }); data.append(FP16x16 { mag: 13386, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo index 8c3b5c947..b7a5453f3 100644 --- a/src/tests/nodes/asin_fp16x16/output_0.cairo +++ b/src/tests/nodes/asin_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 31391, sign: true }); data.append(FP16x16 { mag: 13480, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo index f49fd866d..00a785abc 100644 --- a/src/tests/nodes/asin_fp8x23/input_0.cairo +++ b/src/tests/nodes/asin_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 1184830, sign: true }); data.append(FP8x23 { mag: 2276088, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo index 8f71678e8..e799677ee 100644 --- a/src/tests/nodes/asin_fp8x23/output_0.cairo +++ b/src/tests/nodes/asin_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 1188806, sign: true }); data.append(FP8x23 { mag: 2304984, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo index 1e918749d..e937ae9ef 100644 --- a/src/tests/nodes/asinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 249091, sign: false }); data.append(FP16x16 { mag: 241997, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo index 3bf27cbdd..8a06869b8 100644 --- a/src/tests/nodes/asinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 134037, sign: false }); data.append(FP16x16 { mag: 132207, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo index 1ec957967..d152e7f5c 100644 --- a/src/tests/nodes/asinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 28274183, sign: false }); data.append(FP8x23 { mag: 11950034, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo index b6bcad295..df65c9fa0 100644 --- a/src/tests/nodes/asinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16186111, sign: false }); data.append(FP8x23 { mag: 9665119, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo index c032790a7..460038553 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo index 6f14381fa..82b2ebf08 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 94610, sign: false }); data.append(FP16x16 { mag: 57761, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo index bbc4520bb..8913e07cd 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo index 136288999..030e6be33 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 17571722, sign: false }); data.append(FP8x23 { mag: 15254234, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo index 6b0a171be..0b4a1417b 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo index c62739f16..e32b27b55 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 137279, sign: false }); data.append(FP16x16 { mag: 137279, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo index 00a01774f..f012abb30 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo index e990be626..b3f140ef1 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 12107776, sign: false }); data.append(FP8x23 { mag: 17563648, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo index 4a406e3f6..dcce3c169 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo index 9e2babc7b..d423ace19 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 137279, sign: false }); data.append(FP16x16 { mag: 137279, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo index eee2af9c7..bd1bd7931 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo index 103c09a6f..ac58fc4b7 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7393497, sign: false }); data.append(FP8x23 { mag: 17571722, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo index f63bb3ff4..9bc95f034 100644 --- a/src/tests/nodes/atan_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 90137, sign: true }); data.append(FP16x16 { mag: 3857711, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo index 43d475ed2..250147b80 100644 --- a/src/tests/nodes/atan_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 61743, sign: true }); data.append(FP16x16 { mag: 101830, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo index abab3421e..ed1e35225 100644 --- a/src/tests/nodes/atan_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 35394242, sign: true }); data.append(FP8x23 { mag: 977878458, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo index cf87a7ff6..7e51ef6f4 100644 --- a/src/tests/nodes/atan_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 11224672, sign: true }); data.append(FP8x23 { mag: 13104835, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo index 1fccaf112..d6ba29844 100644 --- a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 14, sign: false }); data.append(i32 { mag: 48, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo index 02f1c4e24..103bb5fea 100644 --- a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 98270, sign: false }); data.append(FP16x16 { mag: 101578, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo index 3555f56d3..988bdae06 100644 --- a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 88, sign: false }); data.append(i32 { mag: 120, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo index d7f078fd0..c62213ed4 100644 --- a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 13081473, sign: false }); data.append(FP8x23 { mag: 13106891, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo index 11d94991e..18e53424f 100644 --- a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 81, sign: false }); data.append(i8 { mag: 40, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo index d112fab35..3e7e5748d 100644 --- a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 102134, sign: false }); data.append(FP16x16 { mag: 101305, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo index cf2a80623..bd77e4920 100644 --- a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 9, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo index aaa29617b..87dfe59f0 100644 --- a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 12247040, sign: true }); data.append(FP8x23 { mag: 10477568, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo index 001f59ff3..8f63b12a7 100644 --- a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(66); data.append(123); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo index 9c3700df4..f74f0cb17 100644 --- a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 101950, sign: false }); data.append(FP16x16 { mag: 102410, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo index f23193640..9f2960112 100644 --- a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(119); data.append(93); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo index 02ecc9281..b9394f904 100644 --- a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 13106303, sign: false }); data.append(FP8x23 { mag: 13086598, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo index 60ce98712..253460137 100644 --- a/src/tests/nodes/ceil_fp16x16/input_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 31610, sign: false }); data.append(FP16x16 { mag: 1040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo index f038d2989..b75ca726c 100644 --- a/src/tests/nodes/ceil_fp16x16/output_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo index a66dd51c5..4008a5b79 100644 --- a/src/tests/nodes/ceil_fp8x23/input_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 7324851, sign: false }); data.append(FP8x23 { mag: 1964182, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo index d512906e4..ba8c25372 100644 --- a/src/tests/nodes/ceil_fp8x23/output_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo index e6c15e949..fe673e49f 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo index 0322a1207..c46b70c37 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo index 00682602f..534bce1f4 100644 --- a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -18,6 +18,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo index b72cf44a0..ab66a57c5 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo index 83d03a972..a70d8ad82 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo index e5f0f3af9..4229624bb 100644 --- a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -21,6 +21,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo index a6324b9b9..62f5c0c10 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo index 6e1aa8c4b..659703dbf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo index 788ca8d78..298534a32 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -68,6 +68,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo index a6324b9b9..62f5c0c10 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo index 6e1aa8c4b..659703dbf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo index 35e289c6c..00a914a6f 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -68,6 +68,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo index a6324b9b9..62f5c0c10 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo index 6e1aa8c4b..659703dbf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo index 003d7fa16..85b380441 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -68,6 +68,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo index a6324b9b9..62f5c0c10 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo index 6e1aa8c4b..659703dbf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo index 49724c332..b86c6b754 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_2() -> Tensor { data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo index be91e5d71..9eef2491a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -95,6 +95,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo index a6324b9b9..62f5c0c10 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo index 6e1aa8c4b..659703dbf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo index 49724c332..b86c6b754 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_2() -> Tensor { data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo index f79cf1ee1..18d73421b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -95,6 +95,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo index 4b43fc107..70f856b7b 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo index e1d7975cb..9940d8904 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo index 122c10560..c749e3416 100644 --- a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo index 02ffc5ed0..a864bb8cd 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo index 49b1169ff..057e3e4dc 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 58720256, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo index b4ce1bd73..5a7a25a0b 100644 --- a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -20,6 +20,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 58720256, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo index 75cc860f9..9f3390a22 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo index 2cbe2bcc6..452e70970 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo index c541e93f8..c2b79bef3 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -67,6 +67,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo index 75cc860f9..9f3390a22 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo index 2cbe2bcc6..452e70970 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo index 3a7341503..3dc43ac7f 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -67,6 +67,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo index 75cc860f9..9f3390a22 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo index 2cbe2bcc6..452e70970 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo index c288dbaee..e69bc4196 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -67,6 +67,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo index 75cc860f9..9f3390a22 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo index 2cbe2bcc6..452e70970 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo index 78223dda7..36c8e320b 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_2() -> Tensor { data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo index a443aab6a..f67a3f7b1 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -94,6 +94,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo index 75cc860f9..9f3390a22 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo index 2cbe2bcc6..452e70970 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo index 78223dda7..36c8e320b 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_2() -> Tensor { data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo index 40d5eb1d1..e41d95a88 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -94,6 +94,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo index c4d5d09d6..c00a2d702 100644 --- a/src/tests/nodes/concat_i32_1d/input_0.cairo +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo index 854f38626..e1650050d 100644 --- a/src/tests/nodes/concat_i32_1d/input_1.cairo +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo index 7f7d8cfd5..23d89eb46 100644 --- a/src/tests/nodes/concat_i32_1d/output_0.cairo +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo index 4efbd7b9f..b98f20165 100644 --- a/src/tests/nodes/concat_i32_2d/input_0.cairo +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo index cd4373041..96a8d3e2d 100644 --- a/src/tests/nodes/concat_i32_2d/input_1.cairo +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 7, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo index 659c42a3d..5b676d07e 100644 --- a/src/tests/nodes/concat_i32_2d/output_0.cairo +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -19,6 +19,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 7, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo index bfffa0607..8a3e3213d 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo index 0dc0e6bae..0ea0eec3f 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo index 76f7a1f94..8c18ca2d5 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -66,6 +66,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo index bfffa0607..8a3e3213d 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo index 0dc0e6bae..0ea0eec3f 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo index ca81a8391..6927c5a4a 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -66,6 +66,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo index bfffa0607..8a3e3213d 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo index 0dc0e6bae..0ea0eec3f 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo index 800cab510..60dc21bd3 100644 --- a/src/tests/nodes/concat_i32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -66,6 +66,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo index bfffa0607..8a3e3213d 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo index 0dc0e6bae..0ea0eec3f 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo index 6ca90c0d9..fe57b4d80 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_2() -> Tensor { data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo index 1c591df1b..91d9fe8ea 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -93,6 +93,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo index bfffa0607..8a3e3213d 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo index 0dc0e6bae..0ea0eec3f 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo index 6ca90c0d9..fe57b4d80 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_2() -> Tensor { data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo index 60e452271..f218cc354 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -93,6 +93,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo index feeadd48a..f5f32b096 100644 --- a/src/tests/nodes/concat_u32_1d/input_0.cairo +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo index 33a977590..8f746063d 100644 --- a/src/tests/nodes/concat_u32_1d/input_1.cairo +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo index 080650b5c..cac406506 100644 --- a/src/tests/nodes/concat_u32_1d/output_0.cairo +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo index 0c0d8f018..a45833125 100644 --- a/src/tests/nodes/concat_u32_2d/input_0.cairo +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo index 521455e40..4bbdd1760 100644 --- a/src/tests/nodes/concat_u32_2d/input_1.cairo +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(6); data.append(7); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo index 195fa5f13..9f7b2dfed 100644 --- a/src/tests/nodes/concat_u32_2d/output_0.cairo +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -18,6 +18,6 @@ fn output_0() -> Tensor { data.append(6); data.append(7); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo index d341ca7d6..616831948 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(25); data.append(26); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo index aaf40af80..0bca198d7 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo index d345781f0..3268695e8 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -65,6 +65,6 @@ fn output_0() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo index d341ca7d6..616831948 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(25); data.append(26); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo index aaf40af80..0bca198d7 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo index 6eb78be99..85c516beb 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -65,6 +65,6 @@ fn output_0() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo index d341ca7d6..616831948 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(25); data.append(26); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo index aaf40af80..0bca198d7 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo index c38227d92..327af1fd4 100644 --- a/src/tests/nodes/concat_u32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -65,6 +65,6 @@ fn output_0() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo index d341ca7d6..616831948 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(25); data.append(26); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo index aaf40af80..0bca198d7 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo index 548506503..55ab7d447 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { @@ -38,6 +38,6 @@ fn input_2() -> Tensor { data.append(79); data.append(80); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo index c9436e96a..4171de88e 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -92,6 +92,6 @@ fn output_0() -> Tensor { data.append(79); data.append(80); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo index d341ca7d6..616831948 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(25); data.append(26); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo index aaf40af80..0bca198d7 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(52); data.append(53); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo index 548506503..55ab7d447 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { @@ -38,6 +38,6 @@ fn input_2() -> Tensor { data.append(79); data.append(80); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo index c6ad118b3..032de4f77 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -92,6 +92,6 @@ fn output_0() -> Tensor { data.append(79); data.append(80); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo index c43a41a2c..1d32f6c03 100644 --- a/src/tests/nodes/cos_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1101252, sign: false }); data.append(FP16x16 { mag: 3797411, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo index 4c7b30f03..d2466f6e2 100644 --- a/src/tests/nodes/cos_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 29970, sign: true }); data.append(FP16x16 { mag: 11446, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo index 08acf3723..09db416db 100644 --- a/src/tests/nodes/cos_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 215345765, sign: false }); data.append(FP8x23 { mag: 592758692, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo index 6954cc5f5..1409351e1 100644 --- a/src/tests/nodes/cos_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7201553, sign: false }); data.append(FP8x23 { mag: 197048, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo index 10e972fb8..c466d583f 100644 --- a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo index b34aa4ec0..0bacfec01 100644 --- a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 64880, sign: true }); data.append(FP16x16 { mag: 49786, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo index c082497b0..48e320a73 100644 --- a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 124, sign: false }); data.append(i32 { mag: 95, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo index 04db8766a..37b8f89ee 100644 --- a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 778263, sign: true }); data.append(FP8x23 { mag: 6125139, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo index b6ffb4d97..a41f5b68b 100644 --- a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 31, sign: false }); data.append(i8 { mag: 55, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo index 70a85beee..ff86a5034 100644 --- a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 59948, sign: false }); data.append(FP16x16 { mag: 1450, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo index 714579c9c..5cc3e913a 100644 --- a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 4, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo index 55497998e..857f19768 100644 --- a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 5484544, sign: true }); data.append(FP8x23 { mag: 5484544, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo index 2f367e4e3..480b9d527 100644 --- a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(56); data.append(7); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo index 19216a22d..00cb9e8fc 100644 --- a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 55916, sign: false }); data.append(FP16x16 { mag: 49407, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo index 5565a0614..4e242ade3 100644 --- a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(61); data.append(114); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo index edd0c9bbc..6890334dc 100644 --- a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 2165113, sign: true }); data.append(FP8x23 { mag: 5196915, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo index 971d96736..7b6076506 100644 --- a/src/tests/nodes/cosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 19618, sign: true }); data.append(FP16x16 { mag: 34591, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo index b6e1b0ef1..1e223f76c 100644 --- a/src/tests/nodes/cosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 68494, sign: false }); data.append(FP16x16 { mag: 74879, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo index 953eb145e..f7da429c1 100644 --- a/src/tests/nodes/cosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 12450493, sign: true }); data.append(FP8x23 { mag: 6511071, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo index bd1678ae7..0453f74ac 100644 --- a/src/tests/nodes/cosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 19453932, sign: false }); data.append(FP8x23 { mag: 11044927, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo index b4e104980..4fbbfd4c1 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo index 4025b1982..7950a2d11 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 659794, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo index 8cc3d6832..90b330149 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo index 4c731b36a..c2e2eb616 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 12944298, sign: false }); data.append(FP8x23 { mag: 12944298, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo index b4b653e0c..473ba7e65 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo index fce816cdd..55af66e71 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 101127, sign: false }); data.append(FP16x16 { mag: 246559, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo index 86cd6975f..bea77b274 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo index f7b36788e..e19ddb17a 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 31555584, sign: false }); data.append(FP8x23 { mag: 31555584, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo index 9c320d6b2..d8184661c 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(5); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo index ce6ed4fa6..acb38e7ab 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 4863423, sign: false }); data.append(FP16x16 { mag: 101127, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo index 8344cf914..68993312c 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo index 6dae4ec6b..5e570ad94 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 12944298, sign: false }); data.append(FP8x23 { mag: 84453669, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo index 36e268da9..3009292c2 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo index bdeac83e2..f7b448590 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo index 36e268da9..3009292c2 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo index 73b3e5b2a..04f5e9b62 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo index 36e268da9..3009292c2 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo index 5c58bda46..ff141c51b 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo index 36e268da9..3009292c2 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo index 7f1e7c992..01c2749bb 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo index 06e8230f6..4369e0e11 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo index 3b181fc24..7e1ea29d1 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -19,6 +19,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo index 06e8230f6..4369e0e11 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo index acdc86f97..7abe9e587 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -19,6 +19,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo index 3f26a62a8..8441eb7e5 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo index 655c3f3a9..21b3ad380 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 83886080, sign: false }); data.append(FP8x23 { mag: 125829120, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo index 3f26a62a8..8441eb7e5 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo index 7a6b7de04..fec948eae 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 83886080, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo index 3f26a62a8..8441eb7e5 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo index 92a2664a9..0e624aa83 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo index 3f26a62a8..8441eb7e5 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo index 4f50a8541..249049c13 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo index 895dc915d..62272c00b 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -18,6 +18,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo index 2364b1ba3..9e25de000 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -18,6 +18,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 58720256, sign: false }); data.append(FP8x23 { mag: 75497472, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo index 895dc915d..62272c00b 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -18,6 +18,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo index 0ffb2fe54..fa9b5ece3 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -18,6 +18,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 125829120, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo index 059d2f71e..20a7c3317 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo index a421bc5a5..2bd621824 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 10, sign: false }); data.append(i32 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo index 059d2f71e..20a7c3317 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo index ce921a7ac..3c47044cf 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 10, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo index 059d2f71e..20a7c3317 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo index 2122f05c5..f6283b984 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo index 059d2f71e..20a7c3317 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo index cfba5ea0a..9b71025f4 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo index 7cdc9b110..9d9583581 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo index 59af3dd09..57265935b 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 7, sign: false }); data.append(i32 { mag: 9, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo index 7cdc9b110..9d9583581 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo index 1047edc62..84c181b29 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo index ba947893b..78d4fffb9 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo index 032f55e6a..76f19885e 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 10, sign: false }); data.append(i8 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo index ba947893b..78d4fffb9 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo index 6ce6d46d8..335a5304b 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 10, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo index ba947893b..78d4fffb9 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo index 69fad8719..82a160735 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo index ba947893b..78d4fffb9 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo index 7723f2b2b..6d6dbef0d 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo index 4e738a854..9754f22b4 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo index 9d00dbf25..483dfcbbc 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 9, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo index 4e738a854..9754f22b4 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo index 953143823..6998388b5 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo index 8b3128d2b..3bd45b22f 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo index 583489bb2..bd69e9099 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(10); data.append(15); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo index 8b3128d2b..3bd45b22f 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo index 61bf945c0..4bbc3d658 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(6); data.append(10); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo index 8b3128d2b..3bd45b22f 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo index df10e9544..a8cb0db1a 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(9); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo index 8b3128d2b..3bd45b22f 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo index d5e9ee038..f7293e101 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(5); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo index 4be76d2f8..88daf2320 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(5); data.append(6); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo index 131e0ab9d..d60af45c6 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(7); data.append(9); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo index 4be76d2f8..88daf2320 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(5); data.append(6); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo index f1311954e..eb1fbb901 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(9); data.append(15); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo index 032dea6a1..a6464c245 100644 --- a/src/tests/nodes/div_fp16x16/input_0.cairo +++ b/src/tests/nodes/div_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo index b870f3bea..335ab82ed 100644 --- a/src/tests/nodes/div_fp16x16/input_1.cairo +++ b/src/tests/nodes/div_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo index 59ec293bf..ba90c325b 100644 --- a/src/tests/nodes/div_fp16x16/output_0.cairo +++ b/src/tests/nodes/div_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo index e1a8ca2e9..ca1bce5d4 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo index d1d87a8e3..1b1eaed9b 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo index 9bad84ff8..8423b3373 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo index e9d395d58..cb9dc3f35 100644 --- a/src/tests/nodes/div_fp8x23/input_0.cairo +++ b/src/tests/nodes/div_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo index 136ad340b..f7bb7a0ea 100644 --- a/src/tests/nodes/div_fp8x23/input_1.cairo +++ b/src/tests/nodes/div_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo index f6e3a7a4c..f69910b00 100644 --- a/src/tests/nodes/div_fp8x23/output_0.cairo +++ b/src/tests/nodes/div_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 4194304, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo index e105bb36a..7d114bc30 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo index b4c56849b..1fc93e061 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo index c68ada97e..6d4db2fee 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo index 8ffb9d99f..8c3c1bd42 100644 --- a/src/tests/nodes/div_i32/input_0.cairo +++ b/src/tests/nodes/div_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo index d62d13f23..8c77b13bb 100644 --- a/src/tests/nodes/div_i32/input_1.cairo +++ b/src/tests/nodes/div_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo index 216867b65..b1b679cf7 100644 --- a/src/tests/nodes/div_i32/output_0.cairo +++ b/src/tests/nodes/div_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo index 3af6f52fd..d4966ec7a 100644 --- a/src/tests/nodes/div_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo index c616bc783..49b270924 100644 --- a/src/tests/nodes/div_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo index fe56ec3c9..bbfa64a39 100644 --- a/src/tests/nodes/div_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo index 16b961104..f62a547b2 100644 --- a/src/tests/nodes/div_i8/input_0.cairo +++ b/src/tests/nodes/div_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo index b3f055063..b7f1810ae 100644 --- a/src/tests/nodes/div_i8/input_1.cairo +++ b/src/tests/nodes/div_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo index 19e02c41e..bdacfb241 100644 --- a/src/tests/nodes/div_i8/output_0.cairo +++ b/src/tests/nodes/div_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo index 1759ddebb..092dca5bc 100644 --- a/src/tests/nodes/div_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo index 9574970a3..2d9c5deae 100644 --- a/src/tests/nodes/div_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo index e1d9d16da..41c9c8961 100644 --- a/src/tests/nodes/div_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo index ae1626487..bfb873711 100644 --- a/src/tests/nodes/div_u32/input_0.cairo +++ b/src/tests/nodes/div_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo index 9b49dd3ca..16041b3a4 100644 --- a/src/tests/nodes/div_u32/input_1.cairo +++ b/src/tests/nodes/div_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo index 778726418..a80f991cc 100644 --- a/src/tests/nodes/div_u32/output_0.cairo +++ b/src/tests/nodes/div_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(3); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo index 5fea73d14..c3b09c057 100644 --- a/src/tests/nodes/div_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo index f7bcd13c5..ad72dc172 100644 --- a/src/tests/nodes/div_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo index ed57217a4..a2245f819 100644 --- a/src/tests/nodes/div_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo index 554f871ea..4781e0447 100644 --- a/src/tests/nodes/equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo index c68797ba1..431f47ac8 100644 --- a/src/tests/nodes/equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo index 35ebc097d..29b80c686 100644 --- a/src/tests/nodes/equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo index 95e61e77a..4425c2779 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo index 1b66a2527..b2e478356 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo index ed5d697ef..43b0cb52e 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo index a1e5d37e8..eb8db3def 100644 --- a/src/tests/nodes/equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo index 8908792fb..e39dbe926 100644 --- a/src/tests/nodes/equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo index fae3ee323..5c3751443 100644 --- a/src/tests/nodes/equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo index 3903cea81..5bb0c90e0 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo index f9ee5626c..296b06c77 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo index daf390cd2..b596f2262 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo index 6d32ad9e0..ac17d19e8 100644 --- a/src/tests/nodes/equal_i32/input_0.cairo +++ b/src/tests/nodes/equal_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo index 11308fbe0..4a2e8f239 100644 --- a/src/tests/nodes/equal_i32/input_1.cairo +++ b/src/tests/nodes/equal_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo index 3351cc095..caa1d538a 100644 --- a/src/tests/nodes/equal_i32/output_0.cairo +++ b/src/tests/nodes/equal_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo index 03090f5cf..b9c41cea1 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo index 21b181f11..1e127e19f 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo index baabeb9ba..10a574f2b 100644 --- a/src/tests/nodes/equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo index 2a836708b..db2bf7b2e 100644 --- a/src/tests/nodes/equal_i8/input_0.cairo +++ b/src/tests/nodes/equal_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo index c0754b018..da60cb9f9 100644 --- a/src/tests/nodes/equal_i8/input_1.cairo +++ b/src/tests/nodes/equal_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo index e5f623de7..9348d938e 100644 --- a/src/tests/nodes/equal_i8/output_0.cairo +++ b/src/tests/nodes/equal_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo index 6b967e8de..9775e54cb 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo index 4dd5ab43a..92f479de2 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo index c89277282..0ff4ae4f1 100644 --- a/src/tests/nodes/equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo index 5f5f77f65..1c4b0a4f4 100644 --- a/src/tests/nodes/equal_u32/input_0.cairo +++ b/src/tests/nodes/equal_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(5); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo index 8f5e492e3..e2e310a7a 100644 --- a/src/tests/nodes/equal_u32/input_1.cairo +++ b/src/tests/nodes/equal_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo index dc3d7cb16..a355bd6a4 100644 --- a/src/tests/nodes/equal_u32/output_0.cairo +++ b/src/tests/nodes/equal_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo index 10a38778a..84acaec5c 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo index 054de24cd..f5fa620f7 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo index ed5d697ef..43b0cb52e 100644 --- a/src/tests/nodes/equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo index 5ccdaf443..43dfc7796 100644 --- a/src/tests/nodes/exp_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196163, sign: true }); data.append(FP16x16 { mag: 10079, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo index a1e585907..73f606ddb 100644 --- a/src/tests/nodes/exp_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3285, sign: false }); data.append(FP16x16 { mag: 76431, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo index 713776298..aa1580331 100644 --- a/src/tests/nodes/exp_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 23575455, sign: true }); data.append(FP8x23 { mag: 2203079, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo index ebe70457b..cd691cfc2 100644 --- a/src/tests/nodes/exp_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 504827, sign: false }); data.append(FP8x23 { mag: 10908061, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo index a80766579..a19d14650 100644 --- a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo index dcb337952..35b276e20 100644 --- a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 8869, sign: false }); data.append(FP16x16 { mag: 8869, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo index ddb587b4f..85688121c 100644 --- a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo index 80d213b46..291f9707e 100644 --- a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 22802600, sign: false }); data.append(FP8x23 { mag: 61983895, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo index b2c890307..f39a4c6a9 100644 --- a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo index b158fa4b3..3a23fe7e8 100644 --- a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3262, sign: false }); data.append(FP16x16 { mag: 8869, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo index 0b646e740..b6c6dfe1d 100644 --- a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo index 60e8a4085..ceb3112f3 100644 --- a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 1135616, sign: false }); data.append(FP8x23 { mag: 22806528, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo index a50c29454..81da859b5 100644 --- a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo index 0e9eae179..91e547189 100644 --- a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 484249, sign: false }); data.append(FP16x16 { mag: 3578144, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo index eb39cd3fc..82f46d49b 100644 --- a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo index d39129a32..244b753aa 100644 --- a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 61983895, sign: false }); data.append(FP8x23 { mag: 458002478, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo index da9700e80..ad8e7159f 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo index b339598a4..cf2a4ec9b 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo index 2ea45d853..25ccb257d 100644 --- a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo index 81348f7a3..df03abce9 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo index 6c499da94..597dddf23 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo index d3a4faa4c..df61a6440 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo index 80387ee95..c9a6125ad 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo index 933a5b548..85b993ba9 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo index 5e7562453..8ff181507 100644 --- a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo index 19003d437..349d1099f 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo index d122c90ea..e9aafdf08 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo index 69d42f156..d9a0db6c5 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo index d819ac07c..2497849a7 100644 --- a/src/tests/nodes/greater_equal_i32/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo index dec6c51df..eb3eb55c5 100644 --- a/src/tests/nodes/greater_equal_i32/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo index bd22c4286..7513a27aa 100644 --- a/src/tests/nodes/greater_equal_i32/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo index cffa3097e..137296f4b 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo index 6310fdb08..569f48feb 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo index 7a50cd4d3..5d34c92b8 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo index 8b00d0377..0b8e88bdf 100644 --- a/src/tests/nodes/greater_equal_i8/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo index 029e0a06a..68082c9fd 100644 --- a/src/tests/nodes/greater_equal_i8/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo index 2f644d8e2..da861d8c1 100644 --- a/src/tests/nodes/greater_equal_i8/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo index 96de7cd5e..63b8fddf6 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo index bbd53d77e..7d9a07861 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo index 5c8e3392d..3787cdd6b 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo index 47eba4acd..17b8e19bc 100644 --- a/src/tests/nodes/greater_equal_u32/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo index 877e50f39..aa419737a 100644 --- a/src/tests/nodes/greater_equal_u32/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo index f0bdb6d3d..4fbd2de10 100644 --- a/src/tests/nodes/greater_equal_u32/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo index 86622fb45..b0f52dc50 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(4); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo index 65148fac5..e436903f2 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(4); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo index 1bf9dba11..1d7599271 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo index 7f31666da..8b2369a0f 100644 --- a/src/tests/nodes/greater_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo index 71587e964..c63c51509 100644 --- a/src/tests/nodes/greater_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo index 0ce144e01..65887af29 100644 --- a/src/tests/nodes/greater_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo index f0c60de70..be9405c7e 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo index 189776f8c..b25ce3265 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo index 92592db3b..27e8bec3b 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo index 725b60408..160308e9a 100644 --- a/src/tests/nodes/greater_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo index 5c337650e..b89e44dd8 100644 --- a/src/tests/nodes/greater_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo index 348947aa0..e79b7cdb1 100644 --- a/src/tests/nodes/greater_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo index dd36095bc..b5180501b 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo index d63d4240f..54bae4b76 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo index ada51d8ee..88acc4f8f 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo index 829e41a1a..4ad6a9e53 100644 --- a/src/tests/nodes/greater_i32/input_0.cairo +++ b/src/tests/nodes/greater_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo index a9d9a2ce1..ba1790c2c 100644 --- a/src/tests/nodes/greater_i32/input_1.cairo +++ b/src/tests/nodes/greater_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo index 0a3dd7bef..b09996d78 100644 --- a/src/tests/nodes/greater_i32/output_0.cairo +++ b/src/tests/nodes/greater_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo index 5edad3e99..08f8d3646 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo index b54c18931..d03dc85f0 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo index 92592db3b..27e8bec3b 100644 --- a/src/tests/nodes/greater_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo index 52dff264e..c4f8b552b 100644 --- a/src/tests/nodes/greater_i8/input_0.cairo +++ b/src/tests/nodes/greater_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo index 0fe087b98..f78b8477a 100644 --- a/src/tests/nodes/greater_i8/input_1.cairo +++ b/src/tests/nodes/greater_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo index e26f8bc17..83a9fc93c 100644 --- a/src/tests/nodes/greater_i8/output_0.cairo +++ b/src/tests/nodes/greater_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo index 2724db76a..099874646 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo index 3546c5d14..b27826cf0 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo index b694105e3..a5e4f8529 100644 --- a/src/tests/nodes/greater_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo index 430c9ed91..d87a8a860 100644 --- a/src/tests/nodes/greater_u32/input_0.cairo +++ b/src/tests/nodes/greater_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo index 1063bf1a5..8376bd1db 100644 --- a/src/tests/nodes/greater_u32/input_1.cairo +++ b/src/tests/nodes/greater_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo index 0376c67b5..eb506897d 100644 --- a/src/tests/nodes/greater_u32/output_0.cairo +++ b/src/tests/nodes/greater_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo index a385a2e73..8ca296287 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo index 519189a99..6a8045306 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(2); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo index d579c33bd..42b65c16e 100644 --- a/src/tests/nodes/greater_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo index b24355e98..61a62e2d3 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 90437, sign: true }); data.append(FP16x16 { mag: 316640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo index ccf6d55b7..28955f8d9 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 9043, sign: true }); data.append(FP16x16 { mag: 316640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo index afc75957d..eb1f0e91e 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 13888927, sign: false }); data.append(FP8x23 { mag: 6576321, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo index 1efd1ac94..01b06acb5 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 13888927, sign: false }); data.append(FP8x23 { mag: 657632, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo index 95e32be68..057b3047f 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo index 1ed7f7042..7a184935f 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo index f4bab4e4f..845416092 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo index 176e3161c..973a1ed7f 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo index 445c26e86..50367146a 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::{i8, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo index bf6e6e77e..23ff596c7 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo index fff6b9424..48d2c9017 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo index 0bee17901..a67107781 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 2516582, sign: true }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo index 1ec2ca8f6..ed8db7d25 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo index e834f2b72..88c276fc5 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/less_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo index 1720a5d8d..4fdf18635 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo index 1b66a2527..b2e478356 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo index 0e87a0335..c1fc9ff84 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo index beb3e5c00..62fb02fd0 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo index eeaf60706..8aa8d9b02 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo index 1b9555329..269e60640 100644 --- a/src/tests/nodes/less_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo index 27b4984f2..0ba99e7df 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo index d63d4240f..54bae4b76 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo index f68321df5..7843f1bd6 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo index 495c61d75..7ae23200d 100644 --- a/src/tests/nodes/less_equal_i32/input_0.cairo +++ b/src/tests/nodes/less_equal_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo index cb0872f59..f70335877 100644 --- a/src/tests/nodes/less_equal_i32/input_1.cairo +++ b/src/tests/nodes/less_equal_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo index cf300090b..352a5ae44 100644 --- a/src/tests/nodes/less_equal_i32/output_0.cairo +++ b/src/tests/nodes/less_equal_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo index cd982b5f4..fe7f59be6 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo index 54fcf41bd..1272e68e6 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo index 8362d672a..34e792936 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo index e925fe88c..3673e03dc 100644 --- a/src/tests/nodes/less_equal_i8/input_0.cairo +++ b/src/tests/nodes/less_equal_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo index d2e2b6393..03ff7cfc5 100644 --- a/src/tests/nodes/less_equal_i8/input_1.cairo +++ b/src/tests/nodes/less_equal_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo index 3ee386bf4..8b96ad6d7 100644 --- a/src/tests/nodes/less_equal_i8/output_0.cairo +++ b/src/tests/nodes/less_equal_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo index f1354ce2d..d7859c33d 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo index 3546c5d14..b27826cf0 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo index 7f603cfdb..d47a2506a 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo index 332a9f4a4..76cb25b81 100644 --- a/src/tests/nodes/less_equal_u32/input_0.cairo +++ b/src/tests/nodes/less_equal_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo index bfe6e86dd..34981c2a5 100644 --- a/src/tests/nodes/less_equal_u32/input_1.cairo +++ b/src/tests/nodes/less_equal_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(2); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/less_equal_u32/output_0.cairo +++ b/src/tests/nodes/less_equal_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo index 076055214..709c45a1f 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo index 6e9c27c6a..09704395b 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(1); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo index 7f603cfdb..d47a2506a 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo index fa9f444aa..a7a1eef9a 100644 --- a/src/tests/nodes/less_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo index be03401ae..5baee07ce 100644 --- a/src/tests/nodes/less_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo index f48af64b0..35383d32d 100644 --- a/src/tests/nodes/less_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo index b8e5b46a4..e1c3654c8 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo index 9aa7657e4..310195ab0 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo index 3b711e2d2..0abc35cbc 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo index 4c2559510..bb2f52e02 100644 --- a/src/tests/nodes/less_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo index e63fee09c..37db5d9a0 100644 --- a/src/tests/nodes/less_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo index 888522763..560b1a86e 100644 --- a/src/tests/nodes/less_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo index acd50be4c..78c5f553c 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo index dfb50ad81..544dee9db 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo index 8eefe642d..45770ecc0 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo index fa7ed5b21..f0c2e5f3a 100644 --- a/src/tests/nodes/less_i32/input_0.cairo +++ b/src/tests/nodes/less_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo index de0c9fd8f..2a3e754fd 100644 --- a/src/tests/nodes/less_i32/input_1.cairo +++ b/src/tests/nodes/less_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo index f20a1aed1..0ba1ef43f 100644 --- a/src/tests/nodes/less_i32/output_0.cairo +++ b/src/tests/nodes/less_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo index e68279114..4ddf966f2 100644 --- a/src/tests/nodes/less_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo index 7dc657e23..e9117838b 100644 --- a/src/tests/nodes/less_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo index 9cb3dff1e..620953ab7 100644 --- a/src/tests/nodes/less_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo index 1a9617ac8..d065e3e09 100644 --- a/src/tests/nodes/less_i8/input_0.cairo +++ b/src/tests/nodes/less_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo index 717dbdd50..cde5c4c3b 100644 --- a/src/tests/nodes/less_i8/input_1.cairo +++ b/src/tests/nodes/less_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo index ad103523e..64e5f523a 100644 --- a/src/tests/nodes/less_i8/output_0.cairo +++ b/src/tests/nodes/less_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo index 3f95cc3af..399841593 100644 --- a/src/tests/nodes/less_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo index 0c108af1b..6d46a96d7 100644 --- a/src/tests/nodes/less_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo index 527718e3a..08c091389 100644 --- a/src/tests/nodes/less_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo index f665f5e0a..247f83da5 100644 --- a/src/tests/nodes/less_u32/input_0.cairo +++ b/src/tests/nodes/less_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(2); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo index 1e55f1fe7..79fd95c92 100644 --- a/src/tests/nodes/less_u32/input_1.cairo +++ b/src/tests/nodes/less_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo index 4fc9afb84..307ab7582 100644 --- a/src/tests/nodes/less_u32/output_0.cairo +++ b/src/tests/nodes/less_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo index b7f1853ea..84ec9d8fd 100644 --- a/src/tests/nodes/less_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo index d1dfb571b..5af96453a 100644 --- a/src/tests/nodes/less_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(3); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo index 463f7a2f3..ef89940d1 100644 --- a/src/tests/nodes/less_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo index 3e0723ac7..41ae699ce 100644 --- a/src/tests/nodes/linear_fp16x16/input_0.cairo +++ b/src/tests/nodes/linear_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 81530, sign: false }); data.append(FP16x16 { mag: 33568, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo index 07adaaebc..6b37bd16b 100644 --- a/src/tests/nodes/linear_fp16x16/input_1.cairo +++ b/src/tests/nodes/linear_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -19,6 +19,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 320888, sign: true }); data.append(FP16x16 { mag: 186065, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo index 76af7785d..1d39acf99 100644 --- a/src/tests/nodes/linear_fp16x16/input_2.cairo +++ b/src/tests/nodes/linear_fp16x16/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn input_2() -> Tensor { data.append(FP16x16 { mag: 17100, sign: true }); data.append(FP16x16 { mag: 360167, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo index e1d0bbd44..70959dbae 100644 --- a/src/tests/nodes/linear_fp16x16/output_0.cairo +++ b/src/tests/nodes/linear_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 1134904, sign: false }); data.append(FP16x16 { mag: 939012, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo index 402bee9ba..777eb9f09 100644 --- a/src/tests/nodes/linear_fp8x23/input_0.cairo +++ b/src/tests/nodes/linear_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 41797636, sign: false }); data.append(FP8x23 { mag: 10487655, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo index 2c8843b63..dcb16d515 100644 --- a/src/tests/nodes/linear_fp8x23/input_1.cairo +++ b/src/tests/nodes/linear_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 34768195, sign: false }); data.append(FP8x23 { mag: 2858178, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo index 809bcdee8..37a11a04b 100644 --- a/src/tests/nodes/linear_fp8x23/input_2.cairo +++ b/src/tests/nodes/linear_fp8x23/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -12,6 +12,6 @@ fn input_2() -> Tensor { data.append(FP8x23 { mag: 34671437, sign: true }); data.append(FP8x23 { mag: 27817938, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo index 1ab90af2c..a8d973435 100644 --- a/src/tests/nodes/linear_fp8x23/output_0.cairo +++ b/src/tests/nodes/linear_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 18946433, sign: true }); data.append(FP8x23 { mag: 125100432, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo index 3163bf0fd..4c0ffaec1 100644 --- a/src/tests/nodes/linear_i32/input_0.cairo +++ b/src/tests/nodes/linear_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 7, sign: false }); data.append(i32 { mag: 5, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo index 37b56e612..566971bd0 100644 --- a/src/tests/nodes/linear_i32/input_1.cairo +++ b/src/tests/nodes/linear_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo index a7c88121e..86937a12a 100644 --- a/src/tests/nodes/linear_i32/input_2.cairo +++ b/src/tests/nodes/linear_i32/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -12,6 +12,6 @@ fn input_2() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo index 9fdbc8764..1d367affa 100644 --- a/src/tests/nodes/linear_i32/output_0.cairo +++ b/src/tests/nodes/linear_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 79, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo index 397f8f06b..1778478d8 100644 --- a/src/tests/nodes/linear_i8/input_0.cairo +++ b/src/tests/nodes/linear_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo index ef3ff4b98..3e919ffad 100644 --- a/src/tests/nodes/linear_i8/input_1.cairo +++ b/src/tests/nodes/linear_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo index 8eefe1645..fac27ceaf 100644 --- a/src/tests/nodes/linear_i8/input_2.cairo +++ b/src/tests/nodes/linear_i8/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -12,6 +12,6 @@ fn input_2() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo index 074f2e650..702ed6ba6 100644 --- a/src/tests/nodes/linear_i8/output_0.cairo +++ b/src/tests/nodes/linear_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo index e8b0ea650..ff0cb4baf 100644 --- a/src/tests/nodes/linear_u32/input_0.cairo +++ b/src/tests/nodes/linear_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo index 215a9a4a0..a75ff38bd 100644 --- a/src/tests/nodes/linear_u32/input_1.cairo +++ b/src/tests/nodes/linear_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(0); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo index 05c6a214d..2b0b51c1f 100644 --- a/src/tests/nodes/linear_u32/input_2.cairo +++ b/src/tests/nodes/linear_u32/input_2.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_2() -> Tensor { @@ -11,6 +11,6 @@ fn input_2() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo index 77417cf00..9f6a8d887 100644 --- a/src/tests/nodes/linear_u32/output_0.cairo +++ b/src/tests/nodes/linear_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(24); data.append(21); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo index 158888ff7..ad8331684 100644 --- a/src/tests/nodes/log_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 920075, sign: false }); data.append(FP16x16 { mag: 7713567, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo index a624803f0..d9c7772ce 100644 --- a/src/tests/nodes/log_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 173136, sign: false }); data.append(FP16x16 { mag: 312484, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo index 601e628d4..0b8b833ff 100644 --- a/src/tests/nodes/log_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 920206991, sign: false }); data.append(FP8x23 { mag: 949171945, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo index 05627353d..b77950618 100644 --- a/src/tests/nodes/log_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 39407365, sign: false }); data.append(FP8x23 { mag: 39667339, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/input_0.cairo b/src/tests/nodes/log_i32_fp16x16/input_0.cairo index 4431fcbed..0e5e22245 100644 --- a/src/tests/nodes/log_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 85, sign: false }); data.append(i32 { mag: 94, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/output_0.cairo b/src/tests/nodes/log_i32_fp16x16/output_0.cairo index 6169d068c..63f8c4561 100644 --- a/src/tests/nodes/log_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 291153, sign: false }); data.append(FP16x16 { mag: 297749, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/input_0.cairo b/src/tests/nodes/log_i32_fp8x23/input_0.cairo index e84cd50ae..9695faf4d 100644 --- a/src/tests/nodes/log_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 59, sign: false }); data.append(i32 { mag: 85, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/output_0.cairo b/src/tests/nodes/log_i32_fp8x23/output_0.cairo index 1bc06e995..b16b930e7 100644 --- a/src/tests/nodes/log_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 34204863, sign: false }); data.append(FP8x23 { mag: 37267659, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/input_0.cairo b/src/tests/nodes/log_i8_fp16x16/input_0.cairo index cbd67b08e..6ca968ddc 100644 --- a/src/tests/nodes/log_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 37, sign: false }); data.append(i8 { mag: 68, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/output_0.cairo b/src/tests/nodes/log_i8_fp16x16/output_0.cairo index afd0a818a..6478dd7c2 100644 --- a/src/tests/nodes/log_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 236645, sign: false }); data.append(FP16x16 { mag: 276529, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/input_0.cairo b/src/tests/nodes/log_i8_fp8x23/input_0.cairo index f007b97e2..3b3477959 100644 --- a/src/tests/nodes/log_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/output_0.cairo b/src/tests/nodes/log_i8_fp8x23/output_0.cairo index 8bb36ab58..fb069c2f9 100644 --- a/src/tests/nodes/log_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 9216000, sign: false }); data.append(FP8x23 { mag: 11632640, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/input_0.cairo b/src/tests/nodes/log_u32_fp16x16/input_0.cairo index 172eeb973..4b672b683 100644 --- a/src/tests/nodes/log_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(41); data.append(31); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/output_0.cairo b/src/tests/nodes/log_u32_fp16x16/output_0.cairo index 9631424e1..85880be30 100644 --- a/src/tests/nodes/log_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 243372, sign: false }); data.append(FP16x16 { mag: 225049, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/input_0.cairo b/src/tests/nodes/log_u32_fp8x23/input_0.cairo index 4ab1fd1d9..70dff11d8 100644 --- a/src/tests/nodes/log_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(35); data.append(111); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/output_0.cairo b/src/tests/nodes/log_u32_fp8x23/output_0.cairo index 3831a0a5b..f694761a1 100644 --- a/src/tests/nodes/log_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 29824421, sign: false }); data.append(FP8x23 { mag: 39506402, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo index f4fa0e327..d64727cba 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 182052, sign: false }); data.append(FP16x16 { mag: 91686, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo index 09ad22edd..fe4dee981 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 20401, sign: true }); data.append(FP16x16 { mag: 189836, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo index 0f8213491..d80451237 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 74078, sign: true }); data.append(FP16x16 { mag: 43388, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo index 6a4ee686e..88584f65e 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 127562, sign: true }); data.append(FP16x16 { mag: 10096, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo index 90adb0eef..5679a22d4 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8701053, sign: false }); data.append(FP8x23 { mag: 11846800, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo index 6f93f83ec..979d89612 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 6190632, sign: true }); data.append(FP8x23 { mag: 1744548, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo index d313d65c3..c9a98f76d 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 20034366, sign: true }); data.append(FP8x23 { mag: 4664398, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo index 21b6019ef..431cbef7a 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 25129093, sign: true }); data.append(FP8x23 { mag: 430328, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo index 2658b6500..6796c6ff3 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo index ecc6fd592..47c6038a2 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 8318, sign: true }); data.append(FP16x16 { mag: 86065, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo index dfddb91ec..c44ef7976 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo index a4c8377e2..8c8141bd6 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 139390, sign: true }); data.append(FP16x16 { mag: 8318, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo index 08d271d93..ada1f98d4 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo index 2d4a7f7fd..2573b0103 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 2627829, sign: true }); data.append(FP8x23 { mag: 1064749, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo index f1ddaed73..103394aa0 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo index e01014a15..c0d35d60b 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 11016437, sign: true }); data.append(FP8x23 { mag: 2627829, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo index 74eb0e682..bbe626e9a 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo index 4e271b11c..52e5d50ca 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 86065, sign: true }); data.append(FP16x16 { mag: 199792, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo index a407cde3a..f30b47e16 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo index 68f37c2f9..80997966d 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 139390, sign: true }); data.append(FP16x16 { mag: 8318, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo index 9af37e8b8..27757ec9d 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo index 27dfaffa9..399779e5a 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 11016437, sign: true }); data.append(FP8x23 { mag: 1064749, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo index 33eed4b2f..ec2bcaa17 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo index 965528a81..1c5b631ab 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 33706684, sign: true }); data.append(FP8x23 { mag: 152252, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo index 1b59d186c..e3cc04b8b 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo index 499bc8a6b..28441a9ab 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 20529, sign: true }); data.append(FP16x16 { mag: 139390, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo index 607befe0f..bdde8723a 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo index d55104567..7747097a7 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 86065, sign: true }); data.append(FP16x16 { mag: 20529, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo index de599902c..b8b640838 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo index 973d837b2..b75d7144f 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 2627829, sign: true }); data.append(FP8x23 { mag: 5814539, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo index e1376d359..496e5236a 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo index b7191f8e3..a848c657d 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 1064749, sign: true }); data.append(FP8x23 { mag: 17841965, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo index 4ac93ee24..e457f2400 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo index 3ede4c21a..ce3be0260 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo index 40d692728..e0d232829 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 262144, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo index d9cdca32b..83ebb437e 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo index 09a805f0f..b00823fe0 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo index cda85ed45..50c08ef45 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 262144, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo index 7e63a087a..40a99440c 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo index 01342f019..d7358673f 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo index c9bb1a245..5379ce7e7 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 262144, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo index ba2e6c42a..f15b988e5 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo index 8e90eef42..b5a08db5d 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo index e88b59e77..cbeea8289 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 655360, sign: true }); data.append(FP16x16 { mag: 720896, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo index f976bdd37..356cebe63 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo index 515f3156e..8b87951e5 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo index fb952c269..c8c026db1 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo index 731c9e3f3..9638a9b28 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo index b1456ceff..076a1e8d9 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo index 915d5de47..1f808122c 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 75497472, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo index b1ded0973..f338b9e61 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo index a75b983d6..596fa477b 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo index a8807084a..482847fbd 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo index 8e7ea3af6..aec8407c3 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo index c6d785cb2..8903cb66d 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo index 49e3b9899..ff42753be 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 67108864, sign: true }); data.append(FP8x23 { mag: 50331648, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo index dd4574c25..edda7ffa1 100644 --- a/src/tests/nodes/matmul_i32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 61, sign: true }); data.append(i32 { mag: 113, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo index 26a296908..4ab755f55 100644 --- a/src/tests/nodes/matmul_i32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 81, sign: true }); data.append(i32 { mag: 97, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo index 8db80a5f9..45b6a348d 100644 --- a/src/tests/nodes/matmul_i32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -11,6 +11,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 774, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo index 55431cfcf..e8080c314 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 113, sign: false }); data.append(i32 { mag: 116, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo index 90fdd9fe4..ba83c444a 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 81, sign: true }); data.append(i32 { mag: 49, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo index e80bafe99..89a9ef013 100644 --- a/src/tests/nodes/matmul_i32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 14837, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo index 34392a378..c12a05491 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 126, sign: true }); data.append(i32 { mag: 29, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo index e6f0d9311..0646139d6 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 18, sign: true }); data.append(i32 { mag: 22, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo index 0e3c74f4f..e6c52c5d6 100644 --- a/src/tests/nodes/matmul_i32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 522, sign: true }); data.append(i32 { mag: 638, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo index 86c90bf36..dfff10927 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 44, sign: false }); data.append(i32 { mag: 8, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo index aecf6859d..f51acded1 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 105, sign: false }); data.append(i32 { mag: 15, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo index 6d369d3e2..dc2f0862d 100644 --- a/src/tests/nodes/matmul_i32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 1236, sign: true }); data.append(i32 { mag: 3356, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo index 7aee90e6b..6d5bc94cd 100644 --- a/src/tests/nodes/matmul_i8_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo index b2938ac91..600081ca3 100644 --- a/src/tests/nodes/matmul_i8_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo index 7410cc7b3..79c16c618 100644 --- a/src/tests/nodes/matmul_i8_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -11,6 +11,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 9, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo index 162f7e310..bcf19b13e 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo index 5b24352ec..180041466 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo index 4ddcd4c38..35bfed041 100644 --- a/src/tests/nodes/matmul_i8_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 8, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo index 81fd42711..ad35318e8 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo index ce128beb9..e3a372fd7 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo index 23c547b57..8dc1b2214 100644 --- a/src/tests/nodes/matmul_i8_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo index 71cc52da5..d45ba7592 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 4, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo index 890a5fc11..67c925552 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo index ad847fc1b..a93ee6dc0 100644 --- a/src/tests/nodes/matmul_i8_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 14, sign: true }); data.append(i8 { mag: 20, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo index 81ddb339c..fe0751134 100644 --- a/src/tests/nodes/matmul_u32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(41); data.append(143); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo index c6c19b6e6..bc70c2261 100644 --- a/src/tests/nodes/matmul_u32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(153); data.append(86); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo index d283d1d2f..9d4279854 100644 --- a/src/tests/nodes/matmul_u32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(32377); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo index 7368adfd7..3c5d74d63 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(8); data.append(229); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo index f29068842..31a497675 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(230); data.append(197); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo index ad622fe22..f777727f8 100644 --- a/src/tests/nodes/matmul_u32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(46953); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo index 66a2b2ef3..f375cf383 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(238); data.append(25); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo index cfdf18021..48db9f3c9 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(50); data.append(113); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo index 712b72b34..8287e8b57 100644 --- a/src/tests/nodes/matmul_u32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1250); data.append(2825); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo index bc34fd299..275c99dc1 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(109); data.append(162); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo index ccf2e4ba3..1ae8c0cf8 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(121); data.append(170); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo index dfc982d0b..c3e31c352 100644 --- a/src/tests/nodes/matmul_u32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(36061); data.append(34952); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo index a350b27a5..f2761da22 100644 --- a/src/tests/nodes/mul_fp16x16/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo index 6042fe5d6..3888b1ef8 100644 --- a/src/tests/nodes/mul_fp16x16/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo index 80deb06ef..00fc300c7 100644 --- a/src/tests/nodes/mul_fp16x16/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo index c0ca8cae8..cf95219b7 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo index 769a2eb1b..cbcf7a5c2 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo index fb4085593..139a145d8 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 393216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo index 9e150961b..49129df26 100644 --- a/src/tests/nodes/mul_fp8x23/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo index 27d439cfa..33f3f3658 100644 --- a/src/tests/nodes/mul_fp8x23/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo index 07370e555..8be8f074c 100644 --- a/src/tests/nodes/mul_fp8x23/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo index a5d6252c8..31700f184 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo index b8e620fa6..1e94f288f 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo index 4afda4508..60aac83eb 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo index e0b9c456b..83f22160e 100644 --- a/src/tests/nodes/mul_i32/input_0.cairo +++ b/src/tests/nodes/mul_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo index e36551863..b3d06c8b0 100644 --- a/src/tests/nodes/mul_i32/input_1.cairo +++ b/src/tests/nodes/mul_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo index 612059eb1..2f755ebf5 100644 --- a/src/tests/nodes/mul_i32/output_0.cairo +++ b/src/tests/nodes/mul_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo index d320d7185..a79a32c78 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo index 7d1fab06b..b982bc597 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo index 2a9b1c676..165772efc 100644 --- a/src/tests/nodes/mul_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo index 718387b61..bdcfe6842 100644 --- a/src/tests/nodes/mul_i8/input_0.cairo +++ b/src/tests/nodes/mul_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo index fdce64ea4..52fbbef13 100644 --- a/src/tests/nodes/mul_i8/input_1.cairo +++ b/src/tests/nodes/mul_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo index a8f08ae22..ce231aa7c 100644 --- a/src/tests/nodes/mul_i8/output_0.cairo +++ b/src/tests/nodes/mul_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo index 70fd25950..e2eaef2cd 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo index ba40fd3ba..5f33477b6 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo index 8e812757a..5bbabf463 100644 --- a/src/tests/nodes/mul_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo index 53c37d620..8b52be464 100644 --- a/src/tests/nodes/mul_u32/input_0.cairo +++ b/src/tests/nodes/mul_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo index ad9b31183..902b12de2 100644 --- a/src/tests/nodes/mul_u32/input_1.cairo +++ b/src/tests/nodes/mul_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo index d477ab5ae..1bc016684 100644 --- a/src/tests/nodes/mul_u32/output_0.cairo +++ b/src/tests/nodes/mul_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo index 282bc725e..030c12aa6 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(4); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo index cae8b86d4..7328c5086 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(0); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo index b91e0cd4a..c468c14e2 100644 --- a/src/tests/nodes/mul_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(8); data.append(6); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo index dc24df617..5fbe47970 100644 --- a/src/tests/nodes/or_fp16x16/input_0.cairo +++ b/src/tests/nodes/or_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo index bde54b025..f3cdb3adc 100644 --- a/src/tests/nodes/or_fp16x16/input_1.cairo +++ b/src/tests/nodes/or_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo index 509dbb5fd..f900f0c86 100644 --- a/src/tests/nodes/or_fp16x16/output_0.cairo +++ b/src/tests/nodes/or_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo index 508921ff9..21395111c 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo index 5cbc0152a..229688c01 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo index 25de5d29f..379c8ec0f 100644 --- a/src/tests/nodes/or_fp8x23/input_0.cairo +++ b/src/tests/nodes/or_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo index 0dfa2dabe..0b329c9a1 100644 --- a/src/tests/nodes/or_fp8x23/input_1.cairo +++ b/src/tests/nodes/or_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo index 0f4da52cc..279670f33 100644 --- a/src/tests/nodes/or_fp8x23/output_0.cairo +++ b/src/tests/nodes/or_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo index a825e3d1b..072e92225 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo index 08a4f54b8..408bdeebe 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo index a8f8d4661..1c49a2028 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo index 653c0201e..a527933d9 100644 --- a/src/tests/nodes/or_i32/input_0.cairo +++ b/src/tests/nodes/or_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo index 5a820aa75..00872f8c5 100644 --- a/src/tests/nodes/or_i32/input_1.cairo +++ b/src/tests/nodes/or_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo index 92ca575f2..ac6fe54ab 100644 --- a/src/tests/nodes/or_i32/output_0.cairo +++ b/src/tests/nodes/or_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo index ff1fc1586..e0abc538c 100644 --- a/src/tests/nodes/or_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo index c3e67973c..88a30bf1b 100644 --- a/src/tests/nodes/or_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo index decfb3ba3..536420238 100644 --- a/src/tests/nodes/or_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo index f5caf222b..e8a5f2bf1 100644 --- a/src/tests/nodes/or_i8/input_0.cairo +++ b/src/tests/nodes/or_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo index 49f9ecd53..5927a61ab 100644 --- a/src/tests/nodes/or_i8/input_1.cairo +++ b/src/tests/nodes/or_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo index 650067d5b..aa3ff0688 100644 --- a/src/tests/nodes/or_i8/output_0.cairo +++ b/src/tests/nodes/or_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo index ce70faf4c..b09781cf9 100644 --- a/src/tests/nodes/or_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo index 7d5f95eec..1cb2ca5fd 100644 --- a/src/tests/nodes/or_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/or_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo index 2229ee706..ff2c70f78 100644 --- a/src/tests/nodes/or_u32/input_0.cairo +++ b/src/tests/nodes/or_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(3); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo index 6da046232..c74ce9ed6 100644 --- a/src/tests/nodes/or_u32/input_1.cairo +++ b/src/tests/nodes/or_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(2); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo index edca1d919..1bc0eb6b0 100644 --- a/src/tests/nodes/or_u32/output_0.cairo +++ b/src/tests/nodes/or_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo index 7306ef746..130926076 100644 --- a/src/tests/nodes/or_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(3); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo index dfe6c239f..b6728b30d 100644 --- a/src/tests/nodes/or_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(5); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/or_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo index e6c15e949..fe673e49f 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo index 894e237bd..ac46d462a 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo index b72cf44a0..ab66a57c5 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo index 617344a16..4ccc0cafa 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo index b72cf44a0..ab66a57c5 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo index 378c3699f..4c892df31 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo index b72cf44a0..ab66a57c5 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo index 8c2464d42..5e34e8228 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo index 4b43fc107..70f856b7b 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo index 6b1fe6f84..55a4baaf3 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo index 02ffc5ed0..a864bb8cd 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo index 3d5f5375f..3efde36fd 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo index 02ffc5ed0..a864bb8cd 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo index ae6d069f3..c84576a4a 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo index 02ffc5ed0..a864bb8cd 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo index 3bddbcf57..cf168a51d 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo index c4d5d09d6..c00a2d702 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo index 50bb8cfe5..9f423af2f 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -11,6 +11,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo index 4efbd7b9f..b98f20165 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo index 797a84b82..00dfde57c 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo index 4efbd7b9f..b98f20165 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo index 7c958388c..c114c8e8d 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo index 4efbd7b9f..b98f20165 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo index 13e100f9b..ea6bb49b3 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo index 91472d590..84690570b 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1, sign: false }); data.append(FP16x16 { mag: 2, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo index 482737baa..db7c35cbf 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -11,6 +11,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo index b627482d8..bff6f9ba5 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 2, sign: false }); data.append(FP16x16 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo index 768474ce0..fddad70f8 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 1, sign: false }); data.append(FP16x16 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo index b627482d8..bff6f9ba5 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 2, sign: false }); data.append(FP16x16 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo index 0d98a368d..c902e8d36 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 2, sign: false }); data.append(FP16x16 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo index b627482d8..bff6f9ba5 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 2, sign: false }); data.append(FP16x16 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo index e251549ac..1be0ea24e 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -13,6 +13,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 2, sign: false }); data.append(FP16x16 { mag: 4, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo index feeadd48a..f5f32b096 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -12,6 +12,6 @@ fn input_0() -> Tensor { data.append(1); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo index 68b76f079..a6f2d5b2c 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -10,6 +10,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo index 0c0d8f018..a45833125 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo index 1e73f6ce1..528c34455 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo index 0c0d8f018..a45833125 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo index 3f45ca315..250ff6bdd 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -11,6 +11,6 @@ fn output_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo index 0c0d8f018..a45833125 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo index 79ed51638..557258418 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -12,6 +12,6 @@ fn output_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo index d3211ecb3..954a9866e 100644 --- a/src/tests/nodes/relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/relu_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 91618, sign: true }); data.append(FP16x16 { mag: 52199, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo index 97721c5fb..be3b200c5 100644 --- a/src/tests/nodes/relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/relu_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 52199, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo index d54cf7c11..2fa238075 100644 --- a/src/tests/nodes/relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/relu_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 34211188, sign: true }); data.append(FP8x23 { mag: 16610226, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo index ec1e3eabe..d280171a3 100644 --- a/src/tests/nodes/relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/relu_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo index 339f35663..0e949dc63 100644 --- a/src/tests/nodes/relu_i32/input_0.cairo +++ b/src/tests/nodes/relu_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo index 4321c6348..46f6f9b7c 100644 --- a/src/tests/nodes/relu_i32/output_0.cairo +++ b/src/tests/nodes/relu_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 6, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo index 18c508a1c..6b3b4b416 100644 --- a/src/tests/nodes/relu_i8/input_0.cairo +++ b/src/tests/nodes/relu_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo index f38ba50a0..c0001110e 100644 --- a/src/tests/nodes/relu_i8/output_0.cairo +++ b/src/tests/nodes/relu_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo index 3af41e097..dc3c21c90 100644 --- a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 97672, sign: true }); data.append(FP16x16 { mag: 73532, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo index 7997629b3..cda29c4e2 100644 --- a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 12049, sign: false }); data.append(FP16x16 { mag: 49437, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo index 475a6d739..eaa32b3c3 100644 --- a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 21105010, sign: true }); data.append(FP8x23 { mag: 17882688, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo index 2dbafbebf..00bff969a 100644 --- a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 627049, sign: false }); data.append(FP8x23 { mag: 889577, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo index d8fbf19ac..28375dcb8 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo index f25a90622..034a85cc0 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 17625, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo index a47fcfdf7..d5b451252 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo index 384318237..2e90dbfea 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 397837, sign: false }); data.append(FP8x23 { mag: 4194304, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo index d88f8c98c..e5d32a7e6 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo index 0403db2e3..9fc9a2c45 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 47910, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo index dceb33939..e725132ad 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo index 1510fe8bc..df5f9fcc9 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7388661, sign: false }); data.append(FP8x23 { mag: 2256044, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo index 4a4343217..d5256abb0 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo index 84cfc50b5..63b440ede 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 47910, sign: false }); data.append(FP16x16 { mag: 47910, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo index d0958248a..272bebf66 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo index 952393037..cdd194ff5 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 6132564, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo index 42710bebf..bb21fc2ec 100644 --- a/src/tests/nodes/sin_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 59844, sign: true }); data.append(FP16x16 { mag: 76013, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo index af0533d9e..837c8627c 100644 --- a/src/tests/nodes/sin_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 51867, sign: true }); data.append(FP16x16 { mag: 60080, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo index a8b56b545..7abb7b273 100644 --- a/src/tests/nodes/sin_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 11223653, sign: true }); data.append(FP8x23 { mag: 30290440, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo index 449c438f2..451c5ad91 100644 --- a/src/tests/nodes/sin_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8162255, sign: true }); data.append(FP8x23 { mag: 3793918, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo index 6a503d5fa..1d8d2b6d4 100644 --- a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 90, sign: false }); data.append(i32 { mag: 109, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo index 6c1716fd1..e1ecc6bf0 100644 --- a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 58588, sign: false }); data.append(FP16x16 { mag: 53526, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo index 98e9409ba..9e643a7f7 100644 --- a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 111, sign: false }); data.append(i32 { mag: 96, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo index cb66abf65..2251b359a 100644 --- a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7252383, sign: true }); data.append(FP8x23 { mag: 8250932, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo index 8bcf9c317..2d8dc3d6f 100644 --- a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 64, sign: false }); data.append(i8 { mag: 75, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo index 1848e692e..6944beed7 100644 --- a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 60294, sign: false }); data.append(FP16x16 { mag: 25413, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo index afcc4964f..e23a3e87c 100644 --- a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo index 50e7bd044..861f4a5ad 100644 --- a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7626752, sign: false }); data.append(FP8x23 { mag: 1183744, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo index 9ab659a5e..2b246d306 100644 --- a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(55); data.append(91); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo index 2472b3966..fb4290c09 100644 --- a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65519, sign: true }); data.append(FP16x16 { mag: 6945, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo index ccea0ee45..6c6286bce 100644 --- a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(86); data.append(80); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo index d8a1a9a79..098e758e8 100644 --- a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 7746530, sign: true }); data.append(FP8x23 { mag: 8337342, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo index d2d153d17..9d68def2a 100644 --- a/src/tests/nodes/sinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 179634, sign: false }); data.append(FP16x16 { mag: 177006, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo index 53329cec1..0d1281edd 100644 --- a/src/tests/nodes/sinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 505875, sign: false }); data.append(FP16x16 { mag: 485818, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo index bac7d0d77..e3205cce0 100644 --- a/src/tests/nodes/sinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 21037695, sign: false }); data.append(FP8x23 { mag: 20483758, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo index c604ea056..8417ffb0c 100644 --- a/src/tests/nodes/sinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 51160183, sign: false }); data.append(FP8x23 { mag: 47845830, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo index 1066956d5..6c2240a90 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo index 1b2b20e97..7ebb9b63a 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 237689, sign: true }); data.append(FP16x16 { mag: 656531, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo index b29945dd6..20e864acb 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo index 62986d36f..be70c4855 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 84036025, sign: true }); data.append(FP8x23 { mag: 9858302, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo index 97437e820..80bc98e82 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo index 45ecb3cfb..0f76bda00 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 656531, sign: true }); data.append(FP16x16 { mag: 77017, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo index 86fc4a41c..04b050e31 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo index c01a9a8d3..e455e8802 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 30425088, sign: false }); data.append(FP8x23 { mag: 9854976, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo index 3f240aaef..883bb6a93 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(5); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo index 1c3e6f70c..d0d134a33 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 4862981, sign: false }); data.append(FP16x16 { mag: 237689, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo index b64e76062..d80e4683d 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo index bf17e79d9..728706456 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 9858302, sign: false }); data.append(FP8x23 { mag: 9858302, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo index 782af0fe2..558a0f6e5 100644 --- a/src/tests/nodes/softmax_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 147644, sign: false }); data.append(FP16x16 { mag: 123955, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo index eb1630ba8..85f7d502d 100644 --- a/src/tests/nodes/softmax_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 64513, sign: false }); data.append(FP16x16 { mag: 1022, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo index f68de8fc1..6324ce49a 100644 --- a/src/tests/nodes/softmax_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 4760436, sign: true }); data.append(FP8x23 { mag: 15132412, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo index 39e64a783..098bd78be 100644 --- a/src/tests/nodes/softmax_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 470776, sign: false }); data.append(FP8x23 { mag: 75394, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo index f2358fe12..5bbe6f705 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo index 0c12f35cc..b70151038 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 57723, sign: false }); data.append(FP16x16 { mag: 7812, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo index 087758daf..22880cbd8 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo index fd2129785..146ecab7c 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 4194304, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo index d32debe1b..e28064280 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo index 70efefb2f..79db189c8 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 57696, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo index 7a1c8656d..5d4607c74 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo index 71ae09980..49347042a 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 150784, sign: false }); data.append(FP8x23 { mag: 8237056, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo index 2438aa1b6..a104b89a0 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo index a662f4309..a41a5e1f1 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 47910, sign: false }); data.append(FP16x16 { mag: 32768, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo index a31ae48f1..074554b20 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(0); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo index ebe053930..eb2b75f6f 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 999946, sign: false }); data.append(FP8x23 { mag: 7388661, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo index 8b2ea5fcf..0576a6f28 100644 --- a/src/tests/nodes/softplus_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 98498, sign: false }); data.append(FP16x16 { mag: 52313, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo index 176d7438d..603010455 100644 --- a/src/tests/nodes/softplus_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 111662, sign: false }); data.append(FP16x16 { mag: 76669, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo index 18144bb39..8195309c8 100644 --- a/src/tests/nodes/softplus_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 20577317, sign: false }); data.append(FP8x23 { mag: 12791075, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo index 442364f8a..9239c5c29 100644 --- a/src/tests/nodes/softplus_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 21269654, sign: false }); data.append(FP8x23 { mag: 1651985, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo index a45c6427a..0855cfdcc 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo index 807260eb9..570da7532 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 8318, sign: false }); data.append(FP16x16 { mag: 8318, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo index 226f0934f..45e73ad92 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo index 87ceed6ef..422ca58ca 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 407580, sign: false }); data.append(FP8x23 { mag: 11016437, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo index 9f96c126c..e486e4786 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo index 3d00a8454..98294135a 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 45440, sign: false }); data.append(FP16x16 { mag: 8344, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo index 2d3ab96bb..0d44cb8f0 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo index f77189ed2..773ca19f3 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 407808, sign: false }); data.append(FP8x23 { mag: 2629632, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo index a4792605e..841f732bd 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo index e65854624..e3ebe8eeb 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 86065, sign: false }); data.append(FP16x16 { mag: 86065, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo index fd19490e4..030c5137b 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(2); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo index 5227313df..a733efcc1 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 17841965, sign: false }); data.append(FP8x23 { mag: 41999372, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo index 0cdab8f95..23161c684 100644 --- a/src/tests/nodes/softsign_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 153455, sign: false }); data.append(FP16x16 { mag: 269993, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo index ec0782f18..2fa140cf6 100644 --- a/src/tests/nodes/softsign_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 45923, sign: false }); data.append(FP16x16 { mag: 52735, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo index 398a2b3aa..2cba2580b 100644 --- a/src/tests/nodes/softsign_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 7575559, sign: false }); data.append(FP8x23 { mag: 22798419, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo index 21bceb883..7d7ab76b3 100644 --- a/src/tests/nodes/softsign_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 3980689, sign: false }); data.append(FP8x23 { mag: 6132261, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo index ee7ba4b7a..c6d36ec05 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 5, sign: true }); data.append(i32 { mag: 5, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo index 29a5a8990..015f4f896 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 54613, sign: true }); data.append(FP16x16 { mag: 54613, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo index 7fa71f49a..c32016fda 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo index 8ca3e1ace..de4499dde 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 6291456, sign: false }); data.append(FP8x23 { mag: 6710886, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo index eb3a77973..7fb7c23f9 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo index fb320119d..76c6b6be7 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 43690, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo index d517f044d..d93386027 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 4, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo index 1cc783795..aabc4beb0 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 6990506, sign: false }); data.append(FP8x23 { mag: 6710886, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo index 445d2ac01..b41c79bb9 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(6); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo index ea1516ca6..4d9f52d15 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 56173, sign: false }); data.append(FP16x16 { mag: 49152, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo index 2cde3ab72..f5a92dfdb 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(0); data.append(7); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo index 915194935..ba4d6a2ff 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 7340032, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo index 47828ca81..283473ea6 100644 --- a/src/tests/nodes/sqrt_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 172145, sign: false }); data.append(FP16x16 { mag: 5219, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo index 41b339a10..f9d2ce19a 100644 --- a/src/tests/nodes/sqrt_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 106215, sign: false }); data.append(FP16x16 { mag: 18494, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo index 871e1994e..075f80d1c 100644 --- a/src/tests/nodes/sqrt_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 48823512, sign: false }); data.append(FP8x23 { mag: 48128484, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo index 879f630b8..6f4eea042 100644 --- a/src/tests/nodes/sqrt_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 20237621, sign: false }); data.append(FP8x23 { mag: 20093058, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo index 5355fb982..0bb7f7e0d 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo index 1d34ad781..ee9a45a04 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 146542, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo index 8d9b4b795..61ccf69f2 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo index 152aa8cbd..afbd74e79 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo index fc9b37119..8cf5067b5 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 5, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo index b4c4b8a2a..4c8851444 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 113511, sign: false }); data.append(FP16x16 { mag: 146542, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo index 75a51f2ca..93812389b 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo index 08484a3f1..148f71d24 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo index ac69c9843..5d1b496a9 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(3); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo index f32b2d60e..c8db481bb 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 113511, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo index 495bfd379..69f4bdbaf 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo index 6d4783cb1..9320b1c07 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 14529495, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo index 8d3eca335..d4b9d9e8c 100644 --- a/src/tests/nodes/sub_fp16x16/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo index 5b1cc4223..87742d9ef 100644 --- a/src/tests/nodes/sub_fp16x16/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo index 34d6f5990..a1cf2b5a7 100644 --- a/src/tests/nodes/sub_fp16x16/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo index de87668ac..9df55dd26 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo index cd986b406..43aa6c5d2 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo index ef050be39..0b7991ac0 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -41,6 +41,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo index d9b2e2515..37e7b15e2 100644 --- a/src/tests/nodes/sub_fp8x23/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo index 214ec2ddd..d27d2ef4b 100644 --- a/src/tests/nodes/sub_fp8x23/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo index 0f31d02fd..192194bf8 100644 --- a/src/tests/nodes/sub_fp8x23/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo index 7e52cead5..a0ddecc2c 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo index d5cf7dee7..bea4fe381 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo index d8ccbc0ea..61ed91a14 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -40,6 +40,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo index 932a94606..6065c319f 100644 --- a/src/tests/nodes/sub_i32/input_0.cairo +++ b/src/tests/nodes/sub_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo index 378caa8ae..6bc170c44 100644 --- a/src/tests/nodes/sub_i32/input_1.cairo +++ b/src/tests/nodes/sub_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo index 3024fb566..a7ddc02f2 100644 --- a/src/tests/nodes/sub_i32/output_0.cairo +++ b/src/tests/nodes/sub_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo index cac235016..99c9e7e3b 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo index c10dadec2..b5a40313b 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo index 907a17d99..bc31e9f74 100644 --- a/src/tests/nodes/sub_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo index 8dd412c5b..5ba41119e 100644 --- a/src/tests/nodes/sub_i8/input_0.cairo +++ b/src/tests/nodes/sub_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo index 49b2ad719..facd54cc3 100644 --- a/src/tests/nodes/sub_i8/input_1.cairo +++ b/src/tests/nodes/sub_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo index c8743dd67..bb99a41cf 100644 --- a/src/tests/nodes/sub_i8/output_0.cairo +++ b/src/tests/nodes/sub_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo index 9cc0dfb58..f557477fc 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo index a3ae12a0b..c822a8c92 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo index d49f7a084..e4cfd4133 100644 --- a/src/tests/nodes/sub_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo index fc1ae3264..bd4360457 100644 --- a/src/tests/nodes/sub_u32/input_0.cairo +++ b/src/tests/nodes/sub_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(4); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo index 939329aaf..5649516b9 100644 --- a/src/tests/nodes/sub_u32/input_1.cairo +++ b/src/tests/nodes/sub_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo index 75e259684..2a769133a 100644 --- a/src/tests/nodes/sub_u32/output_0.cairo +++ b/src/tests/nodes/sub_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(4); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo index 36d2257ce..6b25dfce3 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(3); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo index f5ccdb999..5a223f6bd 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo index 9bea88418..b8e4302a2 100644 --- a/src/tests/nodes/sub_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(2); data.append(4); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo index c7ed05802..a1ad0a3fa 100644 --- a/src/tests/nodes/tanh_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 145036, sign: false }); data.append(FP16x16 { mag: 81100, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo index 12ae50db7..aba3df85e 100644 --- a/src/tests/nodes/tanh_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 63986, sign: false }); data.append(FP16x16 { mag: 55360, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo index 2be03e573..e4520d387 100644 --- a/src/tests/nodes/tanh_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 24711252, sign: true }); data.append(FP8x23 { mag: 1922655, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo index 04886c42b..f902c3081 100644 --- a/src/tests/nodes/tanh_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8342388, sign: true }); data.append(FP8x23 { mag: 1889681, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo index 8e27c27f7..351f3ec63 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo index 0ef94e1ad..b745c3913 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 63178, sign: false }); data.append(FP16x16 { mag: 49911, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo index de711fda6..8e01c6ea3 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::numbers::{i32, FP8x23}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo index 31ece9062..ca9a4210e 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8086849, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo index 015ab4022..1f7b6aca2 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo index 3499bd196..0c780358f 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 49911, sign: true }); data.append(FP16x16 { mag: 49911, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo index 4fe068d78..fe5d442e0 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo index 6f32f2c7b..9338458ae 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 6389760, sign: false }); data.append(FP8x23 { mag: 6389760, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo index 72799798f..9d0f08d73 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(2); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo index 35ee58fad..3c1f4a4c3 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65492, sign: false }); data.append(FP16x16 { mag: 63178, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo index 651358e69..cc05e1538 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(4); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo index db144d35e..dfaf4ae2c 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 8382981, sign: false }); data.append(FP8x23 { mag: 8347124, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo index 27ee7660f..fe3c461ae 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 7864320, sign: true }); data.append(FP16x16 { mag: 4587520, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo index 2210452ec..33139bf13 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 4325376, sign: true }); data.append(FP16x16 { mag: 4587520, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo index cb127a83a..eaac156cd 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo index 5bacafeeb..6fdaeb53c 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -22,6 +22,6 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 5111808, sign: true }); data.append(FP16x16 { mag: 2686976, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo index 54e1d1add..a8ade95c4 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 889192448, sign: false }); data.append(FP8x23 { mag: 402653184, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo index 6a6ec9a47..64a9f2e69 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 117440512, sign: false }); data.append(FP8x23 { mag: 402653184, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo index 44d45deba..97ec416c1 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 226492416, sign: false }); data.append(FP8x23 { mag: 629145600, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo index 92c038b59..37c16b6e0 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -21,6 +21,6 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 159383552, sign: false }); data.append(FP8x23 { mag: 629145600, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo index 2397586e0..bccc13819 100644 --- a/src/tests/nodes/transpose_i32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 104, sign: true }); data.append(i32 { mag: 99, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo index 9e04947d5..95d9d474f 100644 --- a/src/tests/nodes/transpose_i32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 89, sign: true }); data.append(i32 { mag: 99, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo index 7890318a1..76b614373 100644 --- a/src/tests/nodes/transpose_i32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 92, sign: false }); data.append(i32 { mag: 70, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo index d955745cf..64b474367 100644 --- a/src/tests/nodes/transpose_i32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -20,6 +20,6 @@ fn output_0() -> Tensor { data.append(i32 { mag: 89, sign: true }); data.append(i32 { mag: 70, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo index cee347f73..02347830e 100644 --- a/src/tests/nodes/transpose_i8_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 60, sign: true }); data.append(i8 { mag: 41, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo index 7f592693b..a91937334 100644 --- a/src/tests/nodes/transpose_i8_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 117, sign: true }); data.append(i8 { mag: 41, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo index 9d1625fb1..36e20af83 100644 --- a/src/tests/nodes/transpose_i8_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 92, sign: false }); data.append(i8 { mag: 28, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo index d150b8448..bfd18dd5f 100644 --- a/src/tests/nodes/transpose_i8_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -20,6 +20,6 @@ fn output_0() -> Tensor { data.append(i8 { mag: 124, sign: false }); data.append(i8 { mag: 28, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo index 6f1193a80..7af200cb9 100644 --- a/src/tests/nodes/transpose_u32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(203); data.append(125); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo index 2b0681388..26e4cc71d 100644 --- a/src/tests/nodes/transpose_u32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(13); data.append(125); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo index 07bdac7b5..521e242be 100644 --- a/src/tests/nodes/transpose_u32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -19,6 +19,6 @@ fn input_0() -> Tensor { data.append(165); data.append(75); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo index 5edd6d45f..aedc1e8b5 100644 --- a/src/tests/nodes/transpose_u32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -19,6 +19,6 @@ fn output_0() -> Tensor { data.append(208); data.append(75); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo index bc215fceb..fc920912c 100644 --- a/src/tests/nodes/xor_fp16x16/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo index 36599572f..c4b2c6891 100644 --- a/src/tests/nodes/xor_fp16x16/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo index a2c09b3b6..54020fa6e 100644 --- a/src/tests/nodes/xor_fp16x16/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo index fa2826408..5553168da 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -17,6 +17,6 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo index ef8b072bd..9b21e0dac 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; use orion::numbers::FP16x16; @@ -15,6 +15,6 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo index b6ecc85e4..0606e6413 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo index 8279876d1..7dee15971 100644 --- a/src/tests/nodes/xor_fp8x23/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo index 2a32a9dd2..b0aa5fe8c 100644 --- a/src/tests/nodes/xor_fp8x23/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo index 3dceca203..bfe4ee4ac 100644 --- a/src/tests/nodes/xor_fp8x23/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo index 5182972b8..df287636b 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -16,6 +16,6 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo index 40d59a3e9..ba5d490de 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; @@ -14,6 +14,6 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo index 41280a50f..1046ea885 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo index 770a893af..fec3113a1 100644 --- a/src/tests/nodes/xor_i32/input_0.cairo +++ b/src/tests/nodes/xor_i32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo index c4c3f2700..fa846a694 100644 --- a/src/tests/nodes/xor_i32/input_1.cairo +++ b/src/tests/nodes/xor_i32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo index bc7facc81..9217e1d12 100644 --- a/src/tests/nodes/xor_i32/output_0.cairo +++ b/src/tests/nodes/xor_i32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo index 0146c7528..23ab56b38 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo index 83617a805..0b7673a46 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::numbers::{i32, FP16x16}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo index a2c09b3b6..54020fa6e 100644 --- a/src/tests/nodes/xor_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo index f386a6e63..6c5b2e301 100644 --- a/src/tests/nodes/xor_i8/input_0.cairo +++ b/src/tests/nodes/xor_i8/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo index 17eec7efc..bd76c437b 100644 --- a/src/tests/nodes/xor_i8/input_1.cairo +++ b/src/tests/nodes/xor_i8/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -39,6 +39,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo index cde4f15f9..ca73ef6fc 100644 --- a/src/tests/nodes/xor_i8/output_0.cairo +++ b/src/tests/nodes/xor_i8/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo index ca71cf0d8..11de9ced1 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -15,6 +15,6 @@ fn input_0() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo index b6fa11124..676db0ca8 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -13,6 +13,6 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo index a2c09b3b6..54020fa6e 100644 --- a/src/tests/nodes/xor_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo index d1e32f93b..6dcfd699e 100644 --- a/src/tests/nodes/xor_u32/input_0.cairo +++ b/src/tests/nodes/xor_u32/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -38,6 +38,6 @@ fn input_0() -> Tensor { data.append(4); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo index 0d44c8c70..9416ab8e8 100644 --- a/src/tests/nodes/xor_u32/input_1.cairo +++ b/src/tests/nodes/xor_u32/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -38,6 +38,6 @@ fn input_1() -> Tensor { data.append(2); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo index 468d6f6a8..85a04b2b6 100644 --- a/src/tests/nodes/xor_u32/output_0.cairo +++ b/src/tests/nodes/xor_u32/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -38,6 +38,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo index 64341062f..00a9967f1 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_0() -> Tensor { @@ -14,6 +14,6 @@ fn input_0() -> Tensor { data.append(3); data.append(5); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo index 37b8b24b9..41db35e5b 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_1.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn input_1() -> Tensor { @@ -12,6 +12,6 @@ fn input_1() -> Tensor { data.append(5); data.append(3); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo index a2c09b3b6..54020fa6e 100644 --- a/src/tests/nodes/xor_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/output_0.cairo @@ -1,6 +1,6 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; +use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; fn output_0() -> Tensor { @@ -14,6 +14,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo index bc8d9bb8a..38303ee30 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo @@ -6,11 +6,11 @@ mod fp8x23 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -24,24 +24,24 @@ mod fp8x23 { data.append(IntegerTrait::new(3, false)); data.append(IntegerTrait::new(125, false)); data.append(IntegerTrait::new(127, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // XSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); @@ -91,8 +91,8 @@ mod fp8x23 { // data.append(IntegerTrait::new(127, false)); // data.append(IntegerTrait::new(121, false)); // data.append(IntegerTrait::new(102, false)); -// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; -// let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); +// +// let x = TensorTrait::new(shape.span(), data.span()); // // XSCALE // let mut shape = ArrayTrait::::new(); @@ -104,8 +104,8 @@ mod fp8x23 { // data.append(FixedTrait::new_unscaled(2, false)); // data.append(FixedTrait::new_unscaled(4, false)); // data.append(FixedTrait::new_unscaled(5, false)); -// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; -// let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); +// +// let x_scale = TensorTrait::new(shape.span(), data.span()); // // ZEROPOINT // let mut shape = ArrayTrait::::new(); @@ -117,8 +117,8 @@ mod fp8x23 { // data.append(FixedTrait::new_unscaled(1, false)); // data.append(FixedTrait::new_unscaled(2, false)); // data.append(FixedTrait::new_unscaled(3, false)); -// let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; -// let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); +// +// let x_zero_point = TensorTrait::new(shape.span(), data.span()); // let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); @@ -152,13 +152,13 @@ mod fp16x16 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] @@ -172,24 +172,24 @@ mod fp16x16 { data.append(IntegerTrait::new(3, false)); data.append(IntegerTrait::new(125, false)); data.append(IntegerTrait::new(127, false)); - let extra = Option::::None(()); - let x = TensorTrait::new(shape.span(), data.span(), extra); + + let x = TensorTrait::new(shape.span(), data.span()); // XSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); - let extra = Option::::None(()); - let x_scale = TensorTrait::new(shape.span(), data.span(), extra); + + let x_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(0, false)); - let extra = Option::::None(()); - let x_zero_point = TensorTrait::new(shape.span(), data.span(), extra); + + let x_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); @@ -239,8 +239,8 @@ mod fp16x16 { data.append(IntegerTrait::new(127, false)); data.append(IntegerTrait::new(121, false)); data.append(IntegerTrait::new(102, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // XSCALE let mut shape = ArrayTrait::::new(); @@ -252,8 +252,8 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let x_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); @@ -265,8 +265,8 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(1, false)); data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let x_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo index 762b4c4ea..7592c06b1 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo @@ -4,10 +4,10 @@ use array::SpanTrait; use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] @@ -20,24 +20,24 @@ fn dequantize_linear() { data.append(IntegerTrait::new(3, false)); data.append(IntegerTrait::new(125, false)); data.append(IntegerTrait::new(127, false)); - let extra = Option::::None(()); - let x = TensorTrait::new(shape.span(), data.span(), extra); + + let x = TensorTrait::new(shape.span(), data.span()); // XSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(IntegerTrait::new(2, false)); - let extra = Option::::None(()); - let x_scale = TensorTrait::new(shape.span(), data.span(), extra); + + let x_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(IntegerTrait::new(0, false)); - let extra = Option::::None(()); - let x_zero_point = TensorTrait::new(shape.span(), data.span(), extra); + + let x_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); @@ -75,8 +75,8 @@ fn per_axis() { data.append(IntegerTrait::new(127, false)); data.append(IntegerTrait::new(121, false)); data.append(IntegerTrait::new(102, false)); - let extra = Option::::None(()); - let x = TensorTrait::new(shape.span(), data.span(), extra); + + let x = TensorTrait::new(shape.span(), data.span()); // XSCALE let mut shape = ArrayTrait::::new(); @@ -88,8 +88,8 @@ fn per_axis() { data.append(IntegerTrait::new(2, false)); data.append(IntegerTrait::new(4, false)); data.append(IntegerTrait::new(5, false)); - let extra = Option::::None(()); - let x_scale = TensorTrait::new(shape.span(), data.span(), extra); + + let x_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); @@ -101,8 +101,8 @@ fn per_axis() { data.append(IntegerTrait::new(1, false)); data.append(IntegerTrait::new(2, false)); data.append(IntegerTrait::new(3, false)); - let extra = Option::::None(()); - let x_zero_point = TensorTrait::new(shape.span(), data.span(), extra); + + let x_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.dequantize_linear(@x_scale, @x_zero_point); diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo index a38fcb51f..afe12a4e8 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo @@ -6,11 +6,11 @@ mod fp8x23 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -26,24 +26,24 @@ mod fp8x23 { data.append(FixedTrait::new_unscaled(200, false)); data.append(FixedTrait::new_unscaled(250, true)); data.append(FixedTrait::new_unscaled(100, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(1, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); @@ -83,8 +83,8 @@ mod fp8x23 { data.append(FixedTrait::new_unscaled(210, true)); data.append(FixedTrait::new_unscaled(200, true)); data.append(FixedTrait::new_unscaled(120, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); @@ -96,8 +96,8 @@ mod fp8x23 { data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); @@ -109,8 +109,8 @@ mod fp8x23 { data.append(FixedTrait::new_unscaled(84, false)); data.append(FixedTrait::new_unscaled(24, false)); data.append(FixedTrait::new_unscaled(196, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); @@ -144,11 +144,11 @@ mod fp16x16 { use debug::PrintTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] @@ -164,24 +164,24 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(1000, false)); data.append(FixedTrait::new_unscaled(254, true)); data.append(FixedTrait::new_unscaled(1000, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(2, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(FixedTrait::new_unscaled(1, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); @@ -221,8 +221,8 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(270, true)); data.append(FixedTrait::new_unscaled(375, true)); data.append(FixedTrait::new_unscaled(470, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let x = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); @@ -234,8 +234,8 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(4, false)); data.append(FixedTrait::new_unscaled(5, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let y_scale = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); @@ -247,8 +247,8 @@ mod fp16x16 { data.append(FixedTrait::new_unscaled(84, false)); data.append(FixedTrait::new_unscaled(24, false)); data.append(FixedTrait::new_unscaled(196, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16(())) }; - let y_zero_point = TensorTrait::new(shape.span(), data.span(), Option::Some(extra)); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 2ddd3149f..99511bef3 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -4,9 +4,9 @@ use array::SpanTrait; use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; +use orion::numbers::fixed_point::core::{FixedTrait}; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; +use orion::operators::tensor::core::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] @@ -21,24 +21,24 @@ fn quantize_linear() { data.append(IntegerTrait::new(1000, false)); data.append(IntegerTrait::new(254, true)); data.append(IntegerTrait::new(1000, true)); - let extra = Option::::None(()); - let x = TensorTrait::new(shape.span(), data.span(), extra); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(IntegerTrait::new(2, false)); - let extra = Option::::None(()); - let y_scale = TensorTrait::new(shape.span(), data.span(), extra); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::::new(); data.append(IntegerTrait::new(1, false)); - let extra = Option::::None(()); - let y_zero_point = TensorTrait::new(shape.span(), data.span(), extra); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); @@ -81,8 +81,8 @@ fn per_axis() { data.append(IntegerTrait::new(270, true)); data.append(IntegerTrait::new(375, true)); data.append(IntegerTrait::new(470, true)); - let extra = Option::::None(()); - let x = TensorTrait::new(shape.span(), data.span(), extra); + + let x = TensorTrait::new(shape.span(), data.span()); // YSCALE let mut shape = ArrayTrait::::new(); @@ -94,8 +94,8 @@ fn per_axis() { data.append(IntegerTrait::new(2, false)); data.append(IntegerTrait::new(4, false)); data.append(IntegerTrait::new(5, false)); - let extra = Option::::None(()); - let y_scale = TensorTrait::new(shape.span(), data.span(), extra); + + let y_scale = TensorTrait::new(shape.span(), data.span()); // ZEROPOINT let mut shape = ArrayTrait::::new(); @@ -107,8 +107,8 @@ fn per_axis() { data.append(IntegerTrait::new(84, false)); data.append(IntegerTrait::new(24, false)); data.append(IntegerTrait::new(196, false)); - let extra = Option::::None(()); - let y_zero_point = TensorTrait::new(shape.span(), data.span(), extra); + + let y_zero_point = TensorTrait::new(shape.span(), data.span()); let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo index 82813db49..8f286cf77 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo @@ -4,7 +4,7 @@ mod tensor_1D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16PartialEq}; @@ -28,7 +28,7 @@ mod tensor_1D { mod tensor_2D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16PartialEq}; @@ -55,7 +55,7 @@ mod tensor_2D { mod tensor_3D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp16x16::core::{FP16x16Impl, FP16x16PartialEq}; diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo index 7aac4c105..27651820e 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo @@ -4,7 +4,7 @@ mod tensor_1D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; @@ -28,7 +28,7 @@ mod tensor_1D { mod tensor_2D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; @@ -55,7 +55,7 @@ mod tensor_2D { mod tensor_3D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; diff --git a/src/tests/tensor_core/at/at_i32_test.cairo b/src/tests/tensor_core/at/at_i32_test.cairo index 050358154..a5f841670 100644 --- a/src/tests/tensor_core/at/at_i32_test.cairo +++ b/src/tests/tensor_core/at/at_i32_test.cairo @@ -4,7 +4,7 @@ mod tensor_1D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_1D { mod tensor_2D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -52,7 +52,7 @@ mod tensor_2D { mod tensor_3D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/at/at_u32_test.cairo b/src/tests/tensor_core/at/at_u32_test.cairo index 97002062e..c7461c674 100644 --- a/src/tests/tensor_core/at/at_u32_test.cairo +++ b/src/tests/tensor_core/at/at_u32_test.cairo @@ -4,7 +4,7 @@ mod tensor_1D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_1D { mod tensor_2D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -52,7 +52,7 @@ mod tensor_2D { mod tensor_3D { use array::ArrayTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_i32_test.cairo b/src/tests/tensor_core/flatten/flatten_i32_test.cairo index 3277e7060..a9c7ec2b5 100644 --- a/src/tests/tensor_core/flatten/flatten_i32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_i32_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; #[test] @@ -28,7 +28,7 @@ mod tensor_2D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; #[test] @@ -59,7 +59,7 @@ mod tensor_3D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_u32_test.cairo b/src/tests/tensor_core/flatten/flatten_u32_test.cairo index 86a423830..ab2114e61 100644 --- a/src/tests/tensor_core/flatten/flatten_u32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_u32_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; #[test] @@ -28,7 +28,7 @@ mod tensor_2D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; #[test] @@ -59,7 +59,7 @@ mod tensor_3D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo index cd8176782..0997b2e53 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedTrait; mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16, FP16x16PartialEq }; @@ -25,7 +25,7 @@ mod tensor_1D { // use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::operators::tensor::core::{Tensor, ExtraParams}; + use orion::operators::tensor::core::{Tensor}; fn fp_tensor_3x2x2_new() -> Tensor { let mut sizes = ArrayTrait::new(); @@ -47,9 +47,9 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -65,9 +65,9 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(2, true)); data.append(FixedTrait::new_unscaled(1, true)); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo index b5d16905c..37b6d05e4 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedTrait; mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23, FP8x23PartialEq}; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; use orion::operators::tensor::core::TensorTrait; @@ -21,7 +21,7 @@ mod tensor_1D { use core::option::OptionTrait; use serde::Serde; - use orion::operators::tensor::core::{Tensor, ExtraParams}; + use orion::operators::tensor::core::{Tensor}; fn fp_tensor_3x2x2_new() -> Tensor { let mut sizes = ArrayTrait::new(); @@ -43,8 +43,8 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(2, false)); data.append(FixedTrait::new_unscaled(3, false)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -60,8 +60,8 @@ mod tensor_1D { data.append(FixedTrait::new_unscaled(2, true)); data.append(FixedTrait::new_unscaled(1, true)); - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23(())) }; - let tensor = TensorTrait::::new(sizes.span(), data.span(), Option::Some(extra)); + + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_i32_test.cairo b/src/tests/tensor_core/onehot/onehot_i32_test.cairo index 22cf8a7f2..1b5e2cef9 100644 --- a/src/tests/tensor_core/onehot/onehot_i32_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_i32_test.cairo @@ -11,7 +11,7 @@ mod tensor_1D { use serde::Serde; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::tests::helpers::tensor::i32::{ i32_tensor_1x3_helper, i32_tensor_1x3_neg_helper, i32_tensor_2x2_helper, @@ -39,9 +39,9 @@ mod tensor_1D { data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -57,9 +57,9 @@ mod tensor_1D { data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_i8_test.cairo b/src/tests/tensor_core/onehot/onehot_i8_test.cairo index 502e958d4..30ab6600d 100644 --- a/src/tests/tensor_core/onehot/onehot_i8_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_i8_test.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedTrait; mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait, FixedImpl}; + use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; @@ -28,7 +28,7 @@ mod tensor_1D { // use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::operators::tensor::core::{Tensor, ExtraParams}; + use orion::operators::tensor::core::{Tensor}; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; @@ -42,8 +42,8 @@ mod tensor_1D { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } @@ -54,8 +54,8 @@ mod tensor_1D { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - let extra = Option::::None(()); - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/tensor_core/onehot/onehot_u32_test.cairo b/src/tests/tensor_core/onehot/onehot_u32_test.cairo index f719f3a5c..5d412a6bb 100644 --- a/src/tests/tensor_core/onehot/onehot_u32_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_u32_test.cairo @@ -9,7 +9,7 @@ mod tensor_1D { use core::traits::Into; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams, Tensor}; + use orion::operators::tensor::core::{TensorTrait, Tensor}; use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x2_helper}; @@ -33,9 +33,9 @@ mod tensor_1D { data.append(2); data.append(3); - let extra = Option::::None(()); + - let tensor = TensorTrait::::new(sizes.span(), data.span(), extra); + let tensor = TensorTrait::::new(sizes.span(), data.span()); return tensor; } diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo index 536740aa2..e17084489 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; @@ -28,7 +28,7 @@ mod tensor_2D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_3D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo index 03732751c..3f3d6cd84 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; @@ -28,7 +28,7 @@ mod tensor_2D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_3D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_i32_test.cairo b/src/tests/tensor_core/stride/stride_i32_test.cairo index d8319f5ce..ff59feddc 100644 --- a/src/tests/tensor_core/stride/stride_i32_test.cairo +++ b/src/tests/tensor_core/stride/stride_i32_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -28,7 +28,7 @@ mod tensor_2D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_3D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_u32_test.cairo b/src/tests/tensor_core/stride/stride_u32_test.cairo index b941084ee..0d3cf39e8 100644 --- a/src/tests/tensor_core/stride/stride_u32_test.cairo +++ b/src/tests/tensor_core/stride/stride_u32_test.cairo @@ -6,7 +6,7 @@ mod tensor_1D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -28,7 +28,7 @@ mod tensor_2D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_3D { use array::SpanTrait; use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, ExtraParams}; + use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From a01d659d27104d202d5843654e1ee4abf6625ef0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 10:19:38 +0300 Subject: [PATCH 096/179] Update numbers.cairo --- src/numbers.cairo | 1 + 1 file changed, 1 insertion(+) diff --git a/src/numbers.cairo b/src/numbers.cairo index 9b8a1757b..b7732951f 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -1,6 +1,7 @@ mod fixed_point; mod signed_integer; +use orion::numbers::signed_integer::integer_trait::IntegerTrait; use orion::numbers::fixed_point::core::FixedTrait; // Common methods from Fixed Point and Signed Integers. From 7fe4e176394d0065433e4b37efd82f40d71526a9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 10:55:24 +0300 Subject: [PATCH 097/179] udpate tensor docstring --- src/operators/tensor/core.cairo | 870 ++++++++++---------------------- 1 file changed, 273 insertions(+), 597 deletions(-) diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index c7f7a064d..2c9e2d696 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -66,12 +66,14 @@ impl TensorSerde, impl TDrop: Drop> of Serde { /// # tensor.new /// /// ```rust - /// fn new(shape: Span, data: Span: Option) -> Tensor; + /// fn new(shape: Span, data: Span) -> Tensor; /// ``` /// /// Returns a new tensor with the given shape and data. @@ -80,7 +82,6 @@ trait TensorTrait { /// /// * `shape`(`Span`) - A span representing the shape of the tensor. /// * `data` (`Span`) - A span containing the array of elements. - /// * `extra` (`Option`) - A parameter for extra tensor options. /// /// ## Panics /// @@ -97,27 +98,23 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{ + /// TensorTrait, // we import the trait + /// Tensor, // we import the type + /// Tensor_u32_fp16x16 // we import the implementation. + /// //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). + /// }; /// /// // 1D TENSOR /// fn tensor_1D() -> Tensor { - /// let tensor = TensorTrait::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor = TensorTrait::new(shape: array![3].span(), data: array![0, 1, 2].span()); /// /// return tensor; /// } /// /// // 2D TENSOR /// fn tensor_2D() -> Tensor { - /// let tensor = TensorTrait::new( - /// shape: array![2, 2].span(), - /// data: array![0, 1, 2, 3].span(), - /// extra: Option::None(()) - /// ); + /// let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span()); /// /// return tensor; /// } @@ -125,9 +122,7 @@ trait TensorTrait { /// // 3D TENSOR /// fn tensor_3D() -> Tensor { /// let tensor = TensorTrait::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// return tensor; @@ -161,21 +156,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// /// fn at_example() -> u32 { /// let tensor = TensorTrait::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `at` function as follows. - /// return tensor.at( - /// indices: array![0, 1, 1].span() - /// ); + /// return tensor.at(indices: array![0, 1, 1].span()); /// } /// >>> 3 /// ``` @@ -202,15 +192,12 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn min_example() -> u32 { /// let tensor = TensorTrait::new( /// shape: array![2, 2, 2].span(), /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) /// ); /// /// // We can call `min` function as follows. @@ -241,15 +228,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn max_example() -> u32 { /// let tensor = TensorTrait::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `max` function as follows. @@ -279,15 +262,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn stride_example() -> Span { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `stride` function as follows. @@ -323,21 +302,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn ravel_index_example() -> usize { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `ravel_index` function as follows. - /// return tensor.ravel_index( - /// indices: array![1, 3, 0].span() - /// ); + /// return tensor.ravel_index(indices: array![1, 3, 0].span()); /// } /// >>> 10 /// // This means that the value of indices [1,3,0] @@ -371,15 +344,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn unravel_index_example() -> Span { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `unravel_index` function as follows. @@ -417,21 +386,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn reshape_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `reshape` function as follows. - /// return tensor.reshape( - /// target_shape: array![2,4].span() - /// ); + /// return tensor.reshape(target_shape: array![2, 4].span()); /// } /// >>> [[0,1,2,3], [4,5,6,7]] /// ``` @@ -463,21 +426,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn transpose_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `transpose` function as follows. - /// return tensor.transpose( - /// axes: array![1, 2, 0].span() - /// ); + /// return tensor.transpose(axes: array![1, 2, 0].span()); /// } /// >>> [[[0,4],[1,5]],[[2,6],[3,7]]] /// ``` @@ -510,22 +467,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn reduce_sum_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// // We can call `reduce_sum` function as follows. - /// return tensor.reduce_sum( - /// axis: 0, - /// keepdims: false - /// ); + /// return tensor.reduce_sum(axis: 0, keepdims: false); /// } /// >>> [[4,6],[8,10]] /// ``` @@ -561,22 +511,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmax` function as follows. - /// return tensor.argmax( - /// axis: 2, - /// keepdims: Option::None(()), - /// select_last_index: Option::None(()) - /// ); + /// return tensor.argmax(axis: 2, keepdims: Option::None(()), select_last_index: Option::None(())); /// } /// >>> [[[1,1],[0,0]]] /// ``` @@ -585,22 +528,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmax` function as follows. - /// return tensor.argmax( - /// axis: 2, - /// keepdims: Option::Some(false), - /// select_last_index: Option::None(()) - /// ); + /// return tensor + /// .argmax(axis: 2, keepdims: Option::Some(false), select_last_index: Option::None(())); /// } /// >>> [[1,1],[0,0]] /// ``` @@ -610,22 +547,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmax` function as follows. - /// return tensor.argmax( - /// axis: 2, - /// keepdims: Option::None(()), - /// select_last_index: Option::Some(true) - /// ); + /// return tensor + /// .argmax(axis: 2, keepdims: Option::None(()), select_last_index: Option::Some(true)); /// } /// >>> [[[1,1],[1,1]]] /// ``` @@ -663,22 +594,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmin` function as follows. - /// return tensor.argmin( - /// axis: 2, - /// keepdims: Option::None(()), - /// select_last_index: Option::None(()) - /// ); + /// return tensor.argmin(axis: 2, keepdims: Option::None(()), select_last_index: Option::None(())); /// } /// >>> [[[0,0],[0,0]]] /// @@ -688,22 +612,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmin` function as follows. - /// return tensor.argmin( - /// axis: 2, - /// keepdims: Option::Some(false), - /// select_last_index: Option::None(()) - /// ); + /// return tensor + /// .argmin(axis: 2, keepdims: Option::Some(false), select_last_index: Option::None(())); /// } /// >>> [[0,0],[0,0]] /// ``` @@ -713,22 +631,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), /// ); /// /// // We can call `argmin` function as follows. - /// return tensor.argmin( - /// axis: 2, - /// keepdims: Option::None(()), - /// select_last_index: Option::None(true) - /// ); + /// return tensor + /// .argmin(axis: 2, keepdims: Option::None(()), select_last_index: Option::Some(true)); /// } /// >>> [[[0,0],[1,1]]] /// ``` @@ -769,21 +681,12 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn dot_product_example() -> Tensor { - /// let tensor_1 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `matmul` function as follows. /// return tensor_1.matmul(@tensor_2); @@ -796,20 +699,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn matrix_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![244, 99, 109, 162].span(), - /// extra: Option::None(()) + /// shape: array![2, 2].span(), data: array![244, 99, 109, 162].span() /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![151, 68, 121, 170].span(), - /// extra: Option::None(()) + /// shape: array![2, 2].span(), data: array![151, 68, 121, 170].span() /// ); /// /// // We can call `matmul` function as follows. @@ -823,21 +721,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; /// /// fn matrix_vec_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `matmul` function as follows. /// return tensor_1.matmul(@tensor_2); @@ -849,7 +740,7 @@ trait TensorTrait { /// # tensor.exp /// /// ```rust - /// fn exp(self: @Tensor) -> Tensor; + /// fn exp(self: @Tensor) -> Tensor; /// ``` /// /// Computes the exponential of all elements of the input tensor. @@ -863,23 +754,19 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the exponential of the elements of the input tensor. + /// Returns a new tensor in `F` with the exponential of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::numbers::fixed_point::core::{FixedType}; - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::numbers::FP8x23; /// - /// fn exp_example() -> Tensor { - /// + /// fn exp_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![0, 1, 2, 3].span(), - /// extra: Option::Some(extra) + /// shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), /// ); /// /// // We can call `exp` function as follows. @@ -894,7 +781,7 @@ trait TensorTrait { /// # tensor.log /// /// ```rust - /// fn log(self: @Tensor) -> Tensor; + /// fn log(self: @Tensor) -> Tensor; /// ``` /// /// Computes the natural log of all elements of the input tensor. @@ -908,23 +795,19 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the natural log of the elements of the input tensor. + /// Returns a new tensor in `F` with the natural log of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::numbers::fixed_point::core::{FixedType}; - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::numbers::FP8x23; /// - /// fn log_example() -> Tensor { - /// + /// fn log_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![1, 2, 3, 100].span(), - /// extra: Option::Some(extra) + /// shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), /// ); /// /// // We can call `log` function as follows. @@ -967,20 +850,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// // We can call `equal` function as follows. @@ -994,21 +872,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `equal` function as follows. /// return tensor_1.equal(@tensor_2); @@ -1048,20 +919,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// // We can call `greater` function as follows. @@ -1075,21 +941,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `greater` function as follows. /// return tensor_1.greater(@tensor_2); @@ -1129,20 +988,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// // We can call `greater_equal` function as follows. @@ -1156,21 +1010,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `greater_equal` function as follows. /// return tensor_1.greater_equal(@tensor_2); @@ -1210,20 +1057,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// // We can call `less` function as follows. @@ -1237,21 +1079,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `less` function as follows. /// return tensor_1.less(@tensor_2); @@ -1291,20 +1126,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// // We can call `less_equal` function as follows. @@ -1318,21 +1148,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3, 3].span(), - /// data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// - /// let tensor_2 = TensorTrait::::new( - /// shape: array![3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) - /// ); + /// let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); /// /// // We can call `less_equal` function as follows. /// return tensor_1.less_equal(@tensor_2); @@ -1364,19 +1187,16 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::numbers::{i32, IntegerTrait}; /// /// fn abs_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::new( /// shape: array![3].span(), /// data: array![ - /// IntegerTrait::new(1, true), - /// IntegerTrait::new(2, true), - /// IntegerTrait::new(3, false) - /// ].span(), - /// extra: Option::None(()) + /// IntegerTrait::new(1, true), IntegerTrait::new(2, true), IntegerTrait::new(3, false) + /// ] + /// .span(), /// ); /// /// return tensor.abs(); @@ -1408,21 +1228,18 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn ceil_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn ceil_example() -> Tensor { + /// let tensor = TensorTrait::new( /// shape: array![3].span(), /// data: array![ /// FixedTrait::new(29998, false), // 0.003576 /// FixedTrait::new(100663252, false), // 11.9999947548 /// FixedTrait::new(100663252, true) // -11.9999947548 - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// /// return tensor.ceil(); @@ -1454,14 +1271,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn sin_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn sin_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), @@ -1469,7 +1283,6 @@ trait TensorTrait { /// FixedTrait::new_unscaled(2, false) /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// return tensor.sin(); @@ -1503,14 +1316,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn cos_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn cos_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), @@ -1518,7 +1328,6 @@ trait TensorTrait { /// FixedTrait::new_unscaled(2, false) /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// return tensor.cos(); @@ -1559,22 +1368,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// - /// return tensor.cumsum( - /// axis: 2, - /// exclusive: Option::None(()), - /// reverse: Option::None(()) - /// ); + /// return tensor.cumsum(axis: 2, exclusive: Option::None(()), reverse: Option::None(())); /// } /// >>> [[[0,1],[2,5]],[[4,9],[6,13]]] /// ``` @@ -1584,22 +1385,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// - /// return tensor.cumsum( - /// axis: 2, - /// exclusive: Option::Some(true), - /// reverse: Option::None(()) - /// ); + /// return tensor.cumsum(axis: 2, exclusive: Option::Some(true), reverse: Option::None(())); /// } /// >>> [[[0,0],[0,2]],[[0,4],[0,6]]] /// ``` @@ -1609,22 +1402,14 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// - /// return tensor.cumsum( - /// axis: 2, - /// exclusive: Option::Some(true), - /// reverse: Option::Some(true) - /// ); + /// return tensor.cumsum(axis: 2, exclusive: Option::Some(true), reverse: Option::Some(true)); /// } /// >>> [[[1,0],[3,0]],[[5,0],[7,0]]] /// ``` @@ -1660,12 +1445,6 @@ trait TensorTrait { /// Case 1: flatten with axis 0 /// /// ```rust - /// use array::{ArrayTrait, SpanTrait}; - /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2, 2].span(), @@ -1683,15 +1462,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// return tensor.flatten(1); // equivalent to tensor.reshape(2,4) @@ -1704,15 +1479,11 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2, 2].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - /// extra: Option::None(()) + /// shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), /// ); /// /// return tensor.flatten(2); // equivalent to tensor.reshape(4,2) @@ -1724,7 +1495,7 @@ trait TensorTrait { /// # tensor.sinh /// /// ```rust - /// fn sinh(self: @Tensor) -> Tensor; + /// fn sinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic sine of all elements of the input tensor. @@ -1738,32 +1509,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the hyperbolic sine of the elements of the input tensor. + /// Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn sinh_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( - /// shape: array![2,2].span(), + /// fn sinh_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 2].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), /// FixedTrait::new_unscaled(3, false) - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.sinh(); + /// return tensor.sinh(); /// } /// >>> [[0,9858303],[30424311,84036026]] /// // The fixed point representation of @@ -1774,7 +1542,7 @@ trait TensorTrait { /// # tensor.tanh /// /// ```rust - /// fn tanh(self: @Tensor) -> Tensor; + /// fn tanh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic tangent of all elements of the input tensor. @@ -1788,32 +1556,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the hyperbolic tangent of the elements of the input tensor. + /// Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn tanh_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( - /// shape: array![2,2].span(), + /// fn tanh_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 2].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), /// FixedTrait::new_unscaled(3, false) - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.tanh(); + /// return tensor.tanh(); /// } /// >>> [[0,6388715],[8086850,8347125]] /// // The fixed point representation of @@ -1824,7 +1589,7 @@ trait TensorTrait { /// # tensor.cosh /// /// ```rust - /// fn cosh(self: @Tensor) -> Tensor; + /// fn cosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic cosine of all elements of the input tensor. @@ -1838,32 +1603,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn cosh_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( - /// shape: array![2,2].span(), + /// fn cosh_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 2].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), /// FixedTrait::new_unscaled(3, false) - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.cosh(); + /// return tensor.cosh(); /// } /// >>> [[8388608,12944299],[31559585,84453670]] /// // The fixed point representation of @@ -1874,7 +1636,7 @@ trait TensorTrait { /// # tensor.asinh /// /// ```rust - /// fn asinh(self: @Tensor) -> Tensor; + /// fn asinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -1888,32 +1650,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the hyperblic sine of the elements of the input tensor. + /// Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn asinh_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( - /// shape: array![2,2].span(), + /// fn asinh_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 2].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), /// FixedTrait::new_unscaled(3, false) - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.asinh(); + /// return tensor.asinh(); /// } /// >>> [[0,7393498],[12110093,15254235]] /// // The fixed point representation of @@ -1924,7 +1683,7 @@ trait TensorTrait { /// # tensor.acosh /// /// ```rust - /// fn acosh(self: @Tensor) -> Tensor; + /// fn acosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -1938,32 +1697,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `FixedType` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn acosh_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( - /// shape: array![2,2].span(), + /// fn acosh_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2, 2].span(), /// data: array![ /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), /// FixedTrait::new_unscaled(3, false), /// FixedTrait::new_unscaled(4, false) - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.acosh(); + /// return tensor.acosh(); /// } /// >>> [[0,11047444],[14786996,17309365]] /// // The fixed point representation of @@ -1994,24 +1750,21 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn atan_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn atan_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// - /// return tensor.atan(); + /// return tensor.atan(); /// } /// >>> [0,6588397,9287028] /// // The fixed point representation of @@ -2042,23 +1795,17 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn asin_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn asin_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![2].span(), - /// data: array![ - /// FixedTrait::new_unscaled(0, false), - /// FixedTrait::new_unscaled(1, false), - /// ].span(), - /// extra: Option::Some(extra) + /// data: array![FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false),] + /// .span(), /// ); /// - /// return tensor.asin(); + /// return tensor.asin(); /// } /// >>> [0, 13176794] /// // The fixed point representation of @@ -2097,21 +1844,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// return tensor_1.or(@tensor_2); @@ -2124,21 +1865,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![1, 3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) + /// shape: array![1, 3].span(), data: array![0, 1, 2].span(), /// ); /// /// return tensor_1.or(@tensor_2); @@ -2178,21 +1913,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), /// ); /// /// return tensor_1.xor(@tensor_2); @@ -2205,21 +1934,15 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( - /// shape: array![3, 3].span(), - /// data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - /// extra: Option::None(()) + /// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), /// ); /// /// let tensor_2 = TensorTrait::::new( - /// shape: array![1, 3].span(), - /// data: array![0, 1, 2].span(), - /// extra: Option::None(()) + /// shape: array![1, 3].span(), data: array![0, 1, 2].span(), /// ); /// /// return tensor_1.xor(@tensor_2); @@ -2251,23 +1974,17 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn acos_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn acos_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![2].span(), - /// data: array![ - /// FixedTrait::new_unscaled(0, false), - /// FixedTrait::new_unscaled(1, false), - /// ].span(), - /// extra: Option::Some(extra) + /// data: array![FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false),] + /// .span(), /// ); /// - /// return tensor.acos(); + /// return tensor.acos(); /// } /// >>> [13176794, 0] /// // The fixed point representation of @@ -2303,22 +2020,12 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; /// /// fn onehot_example() -> Tensor { - /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![0, 1, 2, 3].span(), - /// extra: Option::None(()) - /// ); + /// let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); /// - /// return tensor.onehot( - /// depth: 3, - /// axis: Option::None(()), - /// values: array![0, 1].span() - /// ); + /// return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); /// } /// >>> [[1. 0. 0.] /// [0. 1. 0.] @@ -2351,21 +2058,18 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; - /// use orion::numbers::fixed_point::core::{FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::numbers::{FixedTrait, FP8x23}; /// - /// fn sqrt_example() -> Tensor { - /// - /// let tensor = TensorTrait::::new( + /// fn sqrt_example() -> Tensor { + /// let tensor = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ /// FixedTrait::new_unscaled(0, false), /// FixedTrait::new_unscaled(1, false), /// FixedTrait::new_unscaled(2, false), - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// /// return tensor.sqrt(); @@ -2403,23 +2107,13 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// - /// fn concat_example() -> Tensor { - /// let tensor1 = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![0, 1, 2, 3].span(), - /// extra: Option::None(()) - /// ); - /// - /// let tensor2 = TensorTrait::::new( - /// shape: array![2, 2].span(), - /// data: array![0, 1, 2, 3].span(), - /// extra: Option::None(()) - /// ); - /// - /// let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); - /// return result; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// + /// fn concat_example() -> Tensor { + /// let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + /// let tensor2 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + /// let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); + /// return result; /// } /// >>> [[0. 1.] /// [2. 3.], @@ -2469,12 +2163,8 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::signed_integer::i8::i8; - /// use orion::performance::core::PerfomanceTrait; - /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::numbers::{i8, i32, IntegerTrait}; /// /// fn quantize_linear_example() -> Tensor { /// // We instantiate a 1D Tensor here. @@ -2489,21 +2179,16 @@ trait TensorTrait { /// IntegerTrait::new(1000, true), /// ] /// .span(), - /// extra: Option::None(()) /// ); /// /// // We instantiate the y_scale here. /// let y_scale = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(2, false)].span(), - /// extra: Option::None(()) + /// shape: array![1].span(), data: array![IntegerTrait::new(2, false)].span(), /// ); /// /// // We instantiate the y_zero_point here. /// let y_zero_point = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(1, false)].span(), - /// extra: Option::None(()) + /// shape: array![1].span(), data: array![IntegerTrait::new(1, false)].span(), /// ); /// /// return x.quantize_linear(@y_scale, @y_zero_point); @@ -2540,45 +2225,36 @@ trait TensorTrait { /// ## Examples /// /// ```rust - /// use array::{ArrayTrait, SpanTrait}; - /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; - /// use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; - /// use orion::numbers::signed_integer::i32::i32; - /// use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; - /// use orion::performance::core::PerfomanceTrait; - /// use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - /// - /// fn dequantize_linear_example() -> Tensor { - /// // We instantiate a 1D Tensor here. - /// let x = TensorTrait::::new( - /// shape: array![4].span(), - /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(3, false), - /// IntegerTrait::new(125, false), - /// IntegerTrait::new(127, false), - /// ].span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the x_scale here. - /// let x_scale = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(2, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// // We instantiate the x_zero_point here. - /// let x_zero_point = TensorTrait::::new( - /// shape: array![1].span(), - /// data: array![IntegerTrait::new(0, false)].span(), - /// extra: Option::None(()) - /// ); - /// - /// return x.dequantize_linear(@x_scale, @x_zero_point); - /// } + /// use array::{ArrayTrait, SpanTrait}; + /// + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::numbers::{i8, i32, IntegerTrait}; + /// + /// fn dequantize_linear_example() -> Tensor { + /// // We instantiate a 1D Tensor here. + /// let x = TensorTrait::::new( + /// shape: array![4].span(), + /// data: array![ + /// IntegerTrait::new(0, false), + /// IntegerTrait::new(3, false), + /// IntegerTrait::new(125, false), + /// IntegerTrait::new(127, false), + /// ] + /// .span(), + /// ); + /// + /// // We instantiate the x_scale here. + /// let x_scale = TensorTrait::::new( + /// shape: array![1].span(), data: array![IntegerTrait::new(2, false)].span(), + /// ); + /// + /// // We instantiate the x_zero_point here. + /// let x_zero_point = TensorTrait::::new( + /// shape: array![1].span(), data: array![IntegerTrait::new(0, false)].span(), + /// ); + /// + /// return x.dequantize_linear(@x_scale, @x_zero_point); + /// } /// >>> [0, 6, 250, 254] /// ``` /// From b9f381337b0c7759f6733d21d9fd1ad5ccba5695 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 10:56:38 +0300 Subject: [PATCH 098/179] Update nn.cairo --- src/operators/nn.cairo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index 48729ebfd..f8c568447 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -1,3 +1,5 @@ mod core; mod implementations; mod functional; + +use orion::operators::nn::core::NNTrait; \ No newline at end of file From 940b48e3d9172a52418a698e9e351abf642dfebe Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 11:00:02 +0300 Subject: [PATCH 099/179] Update nn.cairo --- src/operators/nn.cairo | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index f8c568447..9d226494d 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -2,4 +2,16 @@ mod core; mod implementations; mod functional; -use orion::operators::nn::core::NNTrait; \ No newline at end of file +use orion::operators::nn::core::NNTrait; + +use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; +use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; + +use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; +use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; + +use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; + +use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; +use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; From d3937091cce626b13c2924efe0ee00c7b6495d93 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 11:17:12 +0300 Subject: [PATCH 100/179] update doc --- docs/SUMMARY.md | 5 +- docs/framework/compatibility.md | 10 +- .../operators/neural-network/nn.leaky_relu.md | 20 +-- .../operators/neural-network/nn.linear.md | 24 +-- .../operators/neural-network/nn.logsoftmax.md | 18 +-- .../operators/neural-network/nn.relu.md | 12 +- .../operators/neural-network/nn.sigmoid.md | 15 +- .../operators/neural-network/nn.softmax.md | 18 +-- .../operators/neural-network/nn.softplus.md | 15 +- .../operators/neural-network/nn.softsign.md | 15 +- docs/framework/operators/tensor/README.md | 2 + docs/framework/operators/tensor/tensor.abs.md | 15 +- .../framework/operators/tensor/tensor.acos.md | 22 +-- .../operators/tensor/tensor.acosh.md | 23 ++- .../operators/tensor/tensor.argmax.md | 41 ++---- .../operators/tensor/tensor.argmin.md | 41 ++---- .../framework/operators/tensor/tensor.asin.md | 22 +-- .../operators/tensor/tensor.asinh.md | 23 ++- docs/framework/operators/tensor/tensor.at.md | 11 +- .../framework/operators/tensor/tensor.atan.md | 19 +-- .../framework/operators/tensor/tensor.ceil.md | 17 +-- .../operators/tensor/tensor.concat.md | 24 +-- docs/framework/operators/tensor/tensor.cos.md | 14 +- .../framework/operators/tensor/tensor.cosh.md | 23 ++- .../operators/tensor/tensor.cumsum.md | 42 ++---- .../tensor/tensor.dequantize_linear.md | 69 ++++----- .../operators/tensor/tensor.equal.md | 24 +-- docs/framework/operators/tensor/tensor.exp.md | 16 +- .../operators/tensor/tensor.flatten.md | 22 +-- .../operators/tensor/tensor.greater.md | 24 +-- .../operators/tensor/tensor.greater_equal.md | 24 +-- .../framework/operators/tensor/tensor.less.md | 24 +-- .../operators/tensor/tensor.less_equal.md | 24 +-- docs/framework/operators/tensor/tensor.log.md | 16 +- .../operators/tensor/tensor.matmul.md | 39 ++--- docs/framework/operators/tensor/tensor.max.md | 8 +- docs/framework/operators/tensor/tensor.min.md | 5 +- docs/framework/operators/tensor/tensor.new.md | 27 ++-- .../operators/tensor/tensor.onehot.md | 18 +-- docs/framework/operators/tensor/tensor.or.md | 24 +-- .../tensor/tensor.quantize_linear.md | 17 +-- .../operators/tensor/tensor.ravel_index.md | 12 +- .../operators/tensor/tensor.reduce_sum.md | 13 +- .../operators/tensor/tensor.reshape.md | 12 +- docs/framework/operators/tensor/tensor.sin.md | 14 +- .../framework/operators/tensor/tensor.sinh.md | 23 ++- .../framework/operators/tensor/tensor.sqrt.md | 17 +-- .../operators/tensor/tensor.stride.md | 8 +- .../framework/operators/tensor/tensor.tanh.md | 23 ++- .../operators/tensor/tensor.transpose.md | 12 +- .../operators/tensor/tensor.unravel_index.md | 8 +- docs/framework/operators/tensor/tensor.xor.md | 24 +-- docs/framework/performance/README.md | 22 --- .../performance.dequantize_linear.md | 67 --------- .../performance.quantize_linear.md | 70 --------- src/operators/nn/core.cairo | 137 ++++++------------ 56 files changed, 381 insertions(+), 953 deletions(-) delete mode 100644 docs/framework/performance/README.md delete mode 100644 docs/framework/performance/performance.dequantize_linear.md delete mode 100644 docs/framework/performance/performance.quantize_linear.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index f95d5eb7f..686921452 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -76,6 +76,8 @@ * [tensor.xor](framework/operators/tensor/tensor.xor.md) * [tensor.onehot](framework/operators/tensor/tensor.onehot.md) * [tensor.concat](framework/operators/tensor/tensor.concat.md) + * [tensor.quantize\_linear](framework/operators/tensor/tensor.quantize\_linear.md) + * [tensor.dequantize\_linear](framework/operators/tensor/tensor.dequantize\_linear.md) * [Neural Network](framework/operators/neural-network/README.md) * [nn.relu](framework/operators/neural-network/nn.relu.md) * [nn.leaky\_relu](framework/operators/neural-network/nn.leaky\_relu.md) @@ -85,9 +87,6 @@ * [nn.softsign](framework/operators/neural-network/nn.softsign.md) * [nn.softplus](framework/operators/neural-network/nn.softplus.md) * [nn.linear](framework/operators/neural-network/nn.linear.md) -* [Performance](framework/performance/README.md) - * [performance.quantize\_linear](framework/performance/performance.quantize\_linear.md) - * [performance.dequantize\_linear](framework/performance/performance.dequantize\_linear.md) ## 🏛 Hub diff --git a/docs/framework/compatibility.md b/docs/framework/compatibility.md index 98d210c7f..4e96a414a 100644 --- a/docs/framework/compatibility.md +++ b/docs/framework/compatibility.md @@ -48,14 +48,8 @@ You can see below the list of current supported ONNX Operators: | [Sqrt](operators/tensor/tensor.sqrt.md) | :white\_check\_mark: | | [Onehot](operators/tensor/tensor.onehot.md) | :white\_check\_mark: | | [Concat](operators/tensor/tensor.concat.md) | :white\_check\_mark: | -| [QuantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | -| [DequantizeLinear](performance/performance.quantize\_linear.md) | :white\_check\_mark: | +| [QuantizeLinear](operators/tensor/tensor.quantize\_linear.md) | :white\_check\_mark: | +| [DequantizeLinear](operators/tensor/tensor.quantize\_linear.md) | :white\_check\_mark: | -Performance optimizations: - -| Optimization | Implemented | -| :----------------: | :------------------: | -| 8-bit quantization | :white\_check\_mark: | - Current Operators support: **43/156 (27%)** diff --git a/docs/framework/operators/neural-network/nn.leaky_relu.md b/docs/framework/operators/neural-network/nn.leaky_relu.md index 6b8199a8f..4b1e8f4fc 100644 --- a/docs/framework/operators/neural-network/nn.leaky_relu.md +++ b/docs/framework/operators/neural-network/nn.leaky_relu.md @@ -1,7 +1,7 @@ # NNTrait::leaky_relu ```rust - fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor + fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor ``` Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -10,26 +10,21 @@ The Leaky ReLU function is defined as f(x) = alpha * x if x < 0, f(x) = x otherw ## Args * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. -* `alpha`(`@FixedType`) - A snapshot of a FixedType scalar that defines the alpha value of the Leaky ReLU function. +* `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. ## Returns -A new FixedType tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. +A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType, FixedTrait}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; -fn leaky_relu_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn leaky_relu_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 3].span(), data: array![ @@ -41,7 +36,6 @@ fn leaky_relu_example() -> Tensor { IntegerTrait::new(0, false), ] .span(), - extra: Option::Some(extra) ); let alpha = FixedTrait::from_felt(838861); // 0.1 diff --git a/docs/framework/operators/neural-network/nn.linear.md b/docs/framework/operators/neural-network/nn.linear.md index 26d158af0..539daa863 100644 --- a/docs/framework/operators/neural-network/nn.linear.md +++ b/docs/framework/operators/neural-network/nn.linear.md @@ -25,24 +25,18 @@ A `Tensor` representing the result of the linear transformation. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, IntegerTrait}; fn linear_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - // We instantiate inputs here. let inputs = TensorTrait::::new( shape: array![3].span(), data: array![ - IntegerTrait::new(71, true), IntegerTrait::new(38, false), IntegerTrait::new(62, false), + IntegerTrait::new(71, true), IntegerTrait::new(38, false), IntegerTrait::new(62, false), ] .span(), - extra: Option::Some(extra) ); // We instantiate weights here. @@ -55,18 +49,14 @@ fn linear_example() -> Tensor { IntegerTrait::new(33, true), IntegerTrait::new(34, true), IntegerTrait::new(20, true), - ].span(), - extra: Option::Some(extra) + ] + .span(), ); // We instantiate bias here. let bias = TensorTrait::::new( shape: array![2].span(), - data: array![ - IntegerTrait::new(61, false), - IntegerTrait::new(61, true), - ].span(), - extra: Option::Some(extra) + data: array![IntegerTrait::new(61, false), IntegerTrait::new(61, true),].span(), ); return NNTrait::linear(inputs, weights, bias); diff --git a/docs/framework/operators/neural-network/nn.logsoftmax.md b/docs/framework/operators/neural-network/nn.logsoftmax.md index 781301a8e..d9555f994 100644 --- a/docs/framework/operators/neural-network/nn.logsoftmax.md +++ b/docs/framework/operators/neural-network/nn.logsoftmax.md @@ -1,7 +1,7 @@ # NNTrait::logsoftmax ```rust - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor ``` Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -24,15 +24,11 @@ A Tensor of fixed point numbers with the same shape than the input Tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait}; -fn logsoftmax_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn logsoftmax_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ @@ -40,8 +36,8 @@ fn logsoftmax_example() -> Tensor { IntegerTrait::new(1, false), IntegerTrait::new(2, false), IntegerTrait::new(3, false), - ].span(), - extra: Option::Some(extra) + ] + .span(), ); return NNTrait::logsoftmax(@tensor, 1); diff --git a/docs/framework/operators/neural-network/nn.relu.md b/docs/framework/operators/neural-network/nn.relu.md index 0673e70d5..1e51ec1e2 100644 --- a/docs/framework/operators/neural-network/nn.relu.md +++ b/docs/framework/operators/neural-network/nn.relu.md @@ -23,11 +23,9 @@ A `Tensor` with the same shape as the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, IntegerTrait}; fn relu_example() -> Tensor { let tensor = TensorTrait::::new( @@ -37,8 +35,8 @@ fn relu_example() -> Tensor { IntegerTrait::new(2, false), IntegerTrait::new(1, true), IntegerTrait::new(2, true), - ].span(), - extra: Option::None(()) + ] + .span(), ); return NNTrait::relu(@tensor); diff --git a/docs/framework/operators/neural-network/nn.sigmoid.md b/docs/framework/operators/neural-network/nn.sigmoid.md index 86ebf279b..9e7f1f2b6 100644 --- a/docs/framework/operators/neural-network/nn.sigmoid.md +++ b/docs/framework/operators/neural-network/nn.sigmoid.md @@ -1,7 +1,7 @@ # NNTrait::sigmoid ```rust - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; ``` Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -23,15 +23,11 @@ A Tensor of fixed point numbers with the same shape than the input Tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait}; -fn sigmoid_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn sigmoid_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ @@ -41,7 +37,6 @@ fn sigmoid_example() -> Tensor { IntegerTrait::new(3, false), ] .span(), - extra: Option::Some(extra) ); return NNTrait::sigmoid(@tensor); diff --git a/docs/framework/operators/neural-network/nn.softmax.md b/docs/framework/operators/neural-network/nn.softmax.md index 0d2681721..d93f2c1b0 100644 --- a/docs/framework/operators/neural-network/nn.softmax.md +++ b/docs/framework/operators/neural-network/nn.softmax.md @@ -1,7 +1,7 @@ # NNTrait::softmax ```rust - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; ``` Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -24,15 +24,11 @@ A Tensor of fixed point numbers with the same shape than the input Tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait}; -fn softmax_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn softmax_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ @@ -40,8 +36,8 @@ fn softmax_example() -> Tensor { IntegerTrait::new(1, false), IntegerTrait::new(2, false), IntegerTrait::new(3, false), - ].span(), - extra: Option::Some(extra) + ] + .span(), ); return NNTrait::softmax(@tensor, 1); diff --git a/docs/framework/operators/neural-network/nn.softplus.md b/docs/framework/operators/neural-network/nn.softplus.md index be0077d11..fc336afcf 100644 --- a/docs/framework/operators/neural-network/nn.softplus.md +++ b/docs/framework/operators/neural-network/nn.softplus.md @@ -1,7 +1,7 @@ # NNTrait::softplus ```rust - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; ``` Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -23,15 +23,11 @@ A Tensor of fixed point numbers with the same shape than the input Tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait}; -fn softplus_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn softplus_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ @@ -41,7 +37,6 @@ fn softplus_example() -> Tensor { IntegerTrait::new(3, false), ] .span(), - extra: Option::Some(extra) ); return NNTrait::softplus(@tensor); diff --git a/docs/framework/operators/neural-network/nn.softsign.md b/docs/framework/operators/neural-network/nn.softsign.md index f79b28abe..856438bb4 100644 --- a/docs/framework/operators/neural-network/nn.softsign.md +++ b/docs/framework/operators/neural-network/nn.softsign.md @@ -1,7 +1,7 @@ # NNTrait::softsign ```rust - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; ``` Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -23,15 +23,11 @@ A Tensor of fixed point numbers with the same shape than the input Tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::impl_nn_i32::NN_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::numbers::{i32, FP8x23, IntegerTrait}; -fn softsign_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn softsign_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ @@ -41,7 +37,6 @@ fn softsign_example() -> Tensor { IntegerTrait::new(3, false), ] .span(), - extra: Option::Some(extra) ); return NNTrait::softsign(@tensor); diff --git a/docs/framework/operators/tensor/README.md b/docs/framework/operators/tensor/README.md index 2bfaa2d9e..220c72662 100644 --- a/docs/framework/operators/tensor/README.md +++ b/docs/framework/operators/tensor/README.md @@ -88,6 +88,8 @@ use orion::operators::tensor::core::TensorTrait; | [`tensor.asinh`](tensor.asinh.md) | Computes the inverse hyperbolic sine of all elements of the input tensor. | | [`tensor.acosh`](tensor.acosh.md) | Computes the inverse hyperbolic cosine of all elements of the input tensor. | | [`tensor.concat`](tensor.concat.md) | Concatenate a list of tensors into a single tensor. | +| [`tensor.quantize_linear`](tensor.quantize\_linear.md) | Quantizes a Tensor to i8 using linear quantization. | +| [`tensor.dequantize_linear`](tensor.dequantize\_linear.md) | Dequantizes an i8 Tensor using linear dequantization. | ### Arithmetic Operations diff --git a/docs/framework/operators/tensor/tensor.abs.md b/docs/framework/operators/tensor/tensor.abs.md index b141c5559..bba9ff097 100644 --- a/docs/framework/operators/tensor/tensor.abs.md +++ b/docs/framework/operators/tensor/tensor.abs.md @@ -21,19 +21,16 @@ the absolute value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::numbers::{i32, IntegerTrait}; fn abs_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::new( shape: array![3].span(), data: array![ - IntegerTrait::new(1, true), - IntegerTrait::new(2, true), - IntegerTrait::new(3, false) - ].span(), - extra: Option::None(()) + IntegerTrait::new(1, true), IntegerTrait::new(2, true), IntegerTrait::new(3, false) + ] + .span(), ); return tensor.abs(); diff --git a/docs/framework/operators/tensor/tensor.acos.md b/docs/framework/operators/tensor/tensor.acos.md index f05951f0a..5dc9ad59c 100644 --- a/docs/framework/operators/tensor/tensor.acos.md +++ b/docs/framework/operators/tensor/tensor.acos.md @@ -21,23 +21,17 @@ the arccosine value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn acos_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn acos_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![2].span(), - data: array![ - FixedTrait::new_unscaled(0, false), - FixedTrait::new_unscaled(1, false), - ].span(), - extra: Option::Some(extra) + data: array![FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false),] + .span(), ); - return tensor.acos(); + return tensor.acos(); } >>> [13176794, 0] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.acosh.md b/docs/framework/operators/tensor/tensor.acosh.md index a5134db70..4811bec00 100644 --- a/docs/framework/operators/tensor/tensor.acosh.md +++ b/docs/framework/operators/tensor/tensor.acosh.md @@ -1,7 +1,7 @@ # tensor.acosh ```rust - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -15,32 +15,29 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; -fn acosh_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( - shape: array![2,2].span(), +fn acosh_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 2].span(), data: array![ FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), FixedTrait::new_unscaled(3, false), FixedTrait::new_unscaled(4, false) - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.acosh(); + return tensor.acosh(); } >>> [[0,11047444],[14786996,17309365]] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.argmax.md b/docs/framework/operators/tensor/tensor.argmax.md index d661a2c77..8334d82a8 100644 --- a/docs/framework/operators/tensor/tensor.argmax.md +++ b/docs/framework/operators/tensor/tensor.argmax.md @@ -28,22 +28,15 @@ Case 1: argmax with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmax` function as follows. - return tensor.argmax( - axis: 2, - keepdims: Option::None(()), - select_last_index: Option::None(()) - ); + return tensor.argmax(axis: 2, keepdims: Option::None(()), select_last_index: Option::None(())); } >>> [[[1,1],[0,0]]] ``` @@ -52,22 +45,16 @@ Case 2: argmax with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmax` function as follows. - return tensor.argmax( - axis: 2, - keepdims: Option::Some(false), - select_last_index: Option::None(()) - ); + return tensor + .argmax(axis: 2, keepdims: Option::Some(false), select_last_index: Option::None(())); } >>> [[1,1],[0,0]] ``` @@ -77,22 +64,16 @@ Case 3: argmax with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmax` function as follows. - return tensor.argmax( - axis: 2, - keepdims: Option::None(()), - select_last_index: Option::Some(true) - ); + return tensor + .argmax(axis: 2, keepdims: Option::None(()), select_last_index: Option::Some(true)); } >>> [[[1,1],[1,1]]] ``` diff --git a/docs/framework/operators/tensor/tensor.argmin.md b/docs/framework/operators/tensor/tensor.argmin.md index aedbc82d9..398308e47 100644 --- a/docs/framework/operators/tensor/tensor.argmin.md +++ b/docs/framework/operators/tensor/tensor.argmin.md @@ -28,22 +28,15 @@ Case 1: argmin with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmin` function as follows. - return tensor.argmin( - axis: 2, - keepdims: Option::None(()), - select_last_index: Option::None(()) - ); + return tensor.argmin(axis: 2, keepdims: Option::None(()), select_last_index: Option::None(())); } >>> [[[0,0],[0,0]]] @@ -53,22 +46,16 @@ Case 2: argmin with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmin` function as follows. - return tensor.argmin( - axis: 2, - keepdims: Option::Some(false), - select_last_index: Option::None(()) - ); + return tensor + .argmin(axis: 2, keepdims: Option::Some(false), select_last_index: Option::None(())); } >>> [[0,0],[0,0]] ``` @@ -78,22 +65,16 @@ Case 3: argmin with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 4, 5, 5].span(), ); // We can call `argmin` function as follows. - return tensor.argmin( - axis: 2, - keepdims: Option::None(()), - select_last_index: Option::None(true) - ); + return tensor + .argmin(axis: 2, keepdims: Option::None(()), select_last_index: Option::Some(true)); } >>> [[[0,0],[1,1]]] ``` diff --git a/docs/framework/operators/tensor/tensor.asin.md b/docs/framework/operators/tensor/tensor.asin.md index 054965aa3..0a3ed6c39 100644 --- a/docs/framework/operators/tensor/tensor.asin.md +++ b/docs/framework/operators/tensor/tensor.asin.md @@ -21,23 +21,17 @@ the arcsine value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn asin_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; + +fn asin_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![2].span(), - data: array![ - FixedTrait::new_unscaled(0, false), - FixedTrait::new_unscaled(1, false), - ].span(), - extra: Option::Some(extra) + data: array![FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false),] + .span(), ); - return tensor.asin(); + return tensor.asin(); } >>> [0, 13176794] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.asinh.md b/docs/framework/operators/tensor/tensor.asinh.md index c1fe50bb9..a447fc8e0 100644 --- a/docs/framework/operators/tensor/tensor.asinh.md +++ b/docs/framework/operators/tensor/tensor.asinh.md @@ -1,7 +1,7 @@ # tensor.asinh ```rust - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -15,32 +15,29 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the hyperblic sine of the elements of the input tensor. +Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; -fn asinh_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( - shape: array![2,2].span(), +fn asinh_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 2].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), FixedTrait::new_unscaled(3, false) - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.asinh(); + return tensor.asinh(); } >>> [[0,7393498],[12110093,15254235]] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.at.md b/docs/framework/operators/tensor/tensor.at.md index 68d6bf254..1dc48cf57 100644 --- a/docs/framework/operators/tensor/tensor.at.md +++ b/docs/framework/operators/tensor/tensor.at.md @@ -24,21 +24,16 @@ The `T` value at the specified indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn at_example() -> u32 { let tensor = TensorTrait::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `at` function as follows. - return tensor.at( - indices: array![0, 1, 1].span() - ); + return tensor.at(indices: array![0, 1, 1].span()); } >>> 3 ``` diff --git a/docs/framework/operators/tensor/tensor.atan.md b/docs/framework/operators/tensor/tensor.atan.md index e6a402ac7..942a40d1a 100644 --- a/docs/framework/operators/tensor/tensor.atan.md +++ b/docs/framework/operators/tensor/tensor.atan.md @@ -21,24 +21,21 @@ the arctangent (inverse of tangent) value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn atan_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; + +fn atan_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![3].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.atan(); + return tensor.atan(); } >>> [0,6588397,9287028] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.ceil.md b/docs/framework/operators/tensor/tensor.ceil.md index 90e8abb12..3186b16fa 100644 --- a/docs/framework/operators/tensor/tensor.ceil.md +++ b/docs/framework/operators/tensor/tensor.ceil.md @@ -21,21 +21,18 @@ the rounded up value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn ceil_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn ceil_example() -> Tensor { + let tensor = TensorTrait::new( shape: array![3].span(), data: array![ FixedTrait::new(29998, false), // 0.003576 FixedTrait::new(100663252, false), // 11.9999947548 FixedTrait::new(100663252, true) // -11.9999947548 - ].span(), - extra: Option::Some(extra) + ] + .span(), ); return tensor.ceil(); diff --git a/docs/framework/operators/tensor/tensor.concat.md b/docs/framework/operators/tensor/tensor.concat.md index 7d50e0297..3383a13fa 100644 --- a/docs/framework/operators/tensor/tensor.concat.md +++ b/docs/framework/operators/tensor/tensor.concat.md @@ -25,23 +25,13 @@ A new `Tensor` concatenated tensor of the input tensors. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; - -fn concat_example() -> Tensor { - let tensor1 = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![0, 1, 2, 3].span(), - extra: Option::None(()) - ); - - let tensor2 = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![0, 1, 2, 3].span(), - extra: Option::None(()) - ); - - let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); - return result; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + +fn concat_example() -> Tensor { + let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + let tensor2 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + let result = TensorTrait::concat(tensors: array![tensor1, tensor2].span(), axis: 0); + return result; } >>> [[0. 1.] [2. 3.], diff --git a/docs/framework/operators/tensor/tensor.cos.md b/docs/framework/operators/tensor/tensor.cos.md index 3e33fb38c..9118d1ab9 100644 --- a/docs/framework/operators/tensor/tensor.cos.md +++ b/docs/framework/operators/tensor/tensor.cos.md @@ -21,14 +21,11 @@ the cosine value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn cos_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn cos_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![3].span(), data: array![ FixedTrait::new_unscaled(0, false), @@ -36,7 +33,6 @@ fn cos_example() -> Tensor { FixedTrait::new_unscaled(2, false) ] .span(), - extra: Option::Some(extra) ); return tensor.cos(); diff --git a/docs/framework/operators/tensor/tensor.cosh.md b/docs/framework/operators/tensor/tensor.cosh.md index 3995b09d2..754c300da 100644 --- a/docs/framework/operators/tensor/tensor.cosh.md +++ b/docs/framework/operators/tensor/tensor.cosh.md @@ -1,7 +1,7 @@ # tensor.cosh ```rust - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic cosine of all elements of the input tensor. @@ -15,32 +15,29 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; -fn cosh_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( - shape: array![2,2].span(), +fn cosh_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 2].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), FixedTrait::new_unscaled(3, false) - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.cosh(); + return tensor.cosh(); } >>> [[8388608,12944299],[31559585,84453670]] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.cumsum.md b/docs/framework/operators/tensor/tensor.cumsum.md index 1e56431e8..c48dc08cc 100644 --- a/docs/framework/operators/tensor/tensor.cumsum.md +++ b/docs/framework/operators/tensor/tensor.cumsum.md @@ -28,22 +28,14 @@ Case 1: cumsum with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); - return tensor.cumsum( - axis: 2, - exclusive: Option::None(()), - reverse: Option::None(()) - ); + return tensor.cumsum(axis: 2, exclusive: Option::None(()), reverse: Option::None(())); } >>> [[[0,1],[2,5]],[[4,9],[6,13]]] ``` @@ -53,22 +45,14 @@ Case 2: cumsum with exclusive = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); - return tensor.cumsum( - axis: 2, - exclusive: Option::Some(true), - reverse: Option::None(()) - ); + return tensor.cumsum(axis: 2, exclusive: Option::Some(true), reverse: Option::None(())); } >>> [[[0,0],[0,2]],[[0,4],[0,6]]] ``` @@ -78,22 +62,14 @@ Case 3: cumsum with exclusive = true and reverse = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); - return tensor.cumsum( - axis: 2, - exclusive: Option::Some(true), - reverse: Option::Some(true) - ); + return tensor.cumsum(axis: 2, exclusive: Option::Some(true), reverse: Option::Some(true)); } >>> [[[1,0],[3,0]],[[5,0],[7,0]]] ``` diff --git a/docs/framework/operators/tensor/tensor.dequantize_linear.md b/docs/framework/operators/tensor/tensor.dequantize_linear.md index 420338330..c1bdecf36 100644 --- a/docs/framework/operators/tensor/tensor.dequantize_linear.md +++ b/docs/framework/operators/tensor/tensor.dequantize_linear.md @@ -24,44 +24,35 @@ A new `Tensor` with the same shape as the input tensor, containing the dequan ## Examples ```rust -use array::{ArrayTrait, SpanTrait}; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; -use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - -fn dequantize_linear_example() -> Tensor { - // We instantiate a 1D Tensor here. - let x = TensorTrait::::new( - shape: array![4].span(), - data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(3, false), - IntegerTrait::new(125, false), - IntegerTrait::new(127, false), - ].span(), - extra: Option::None(()) - ); - - // We instantiate the x_scale here. - let x_scale = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(2, false)].span(), - extra: Option::None(()) - ); - - // We instantiate the x_zero_point here. - let x_zero_point = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(0, false)].span(), - extra: Option::None(()) - ); - - return x.dequantize_linear(@x_scale, @x_zero_point); -} + use array::{ArrayTrait, SpanTrait}; + + use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + use orion::numbers::{i8, i32, IntegerTrait}; + + fn dequantize_linear_example() -> Tensor { + // We instantiate a 1D Tensor here. + let x = TensorTrait::::new( + shape: array![4].span(), + data: array![ + IntegerTrait::new(0, false), + IntegerTrait::new(3, false), + IntegerTrait::new(125, false), + IntegerTrait::new(127, false), + ] + .span(), + ); + + // We instantiate the x_scale here. + let x_scale = TensorTrait::::new( + shape: array![1].span(), data: array![IntegerTrait::new(2, false)].span(), + ); + + // We instantiate the x_zero_point here. + let x_zero_point = TensorTrait::::new( + shape: array![1].span(), data: array![IntegerTrait::new(0, false)].span(), + ); + + return x.dequantize_linear(@x_scale, @x_zero_point); + } >>> [0, 6, 250, 254] ``` diff --git a/docs/framework/operators/tensor/tensor.equal.md b/docs/framework/operators/tensor/tensor.equal.md index 990ce33b4..740eee776 100644 --- a/docs/framework/operators/tensor/tensor.equal.md +++ b/docs/framework/operators/tensor/tensor.equal.md @@ -29,20 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); // We can call `equal` function as follows. @@ -56,21 +51,14 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `equal` function as follows. return tensor_1.equal(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.exp.md b/docs/framework/operators/tensor/tensor.exp.md index 65d8e1ab0..959dc7924 100644 --- a/docs/framework/operators/tensor/tensor.exp.md +++ b/docs/framework/operators/tensor/tensor.exp.md @@ -1,7 +1,7 @@ # tensor.exp ```rust - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; ``` Computes the exponential of all elements of the input tensor. @@ -15,23 +15,19 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the exponential of the elements of the input tensor. +Returns a new tensor in `F` with the exponential of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::numbers::FP8x23; -fn exp_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn exp_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![0, 1, 2, 3].span(), - extra: Option::Some(extra) + shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), ); // We can call `exp` function as follows. diff --git a/docs/framework/operators/tensor/tensor.flatten.md b/docs/framework/operators/tensor/tensor.flatten.md index 78ee6240b..506101077 100644 --- a/docs/framework/operators/tensor/tensor.flatten.md +++ b/docs/framework/operators/tensor/tensor.flatten.md @@ -26,12 +26,6 @@ A new `Tensor` instance containing the flattened version of the input tensor. Case 1: flatten with axis 0 ```rust -use array::{ArrayTrait, SpanTrait}; - -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; - fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 2, 2].span(), @@ -49,15 +43,11 @@ Case 2: flatten with axis 1 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); return tensor.flatten(1); // equivalent to tensor.reshape(2,4) @@ -70,15 +60,11 @@ Case 3: flatten with axis 2 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); return tensor.flatten(2); // equivalent to tensor.reshape(4,2) diff --git a/docs/framework/operators/tensor/tensor.greater.md b/docs/framework/operators/tensor/tensor.greater.md index f1c17b02a..477cb229c 100644 --- a/docs/framework/operators/tensor/tensor.greater.md +++ b/docs/framework/operators/tensor/tensor.greater.md @@ -29,20 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); // We can call `greater` function as follows. @@ -56,21 +51,14 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `greater` function as follows. return tensor_1.greater(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.greater_equal.md b/docs/framework/operators/tensor/tensor.greater_equal.md index 8eb47ab75..128368ec7 100644 --- a/docs/framework/operators/tensor/tensor.greater_equal.md +++ b/docs/framework/operators/tensor/tensor.greater_equal.md @@ -29,20 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); // We can call `greater_equal` function as follows. @@ -56,21 +51,14 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `greater_equal` function as follows. return tensor_1.greater_equal(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.less.md b/docs/framework/operators/tensor/tensor.less.md index 805c4121a..04ab98a66 100644 --- a/docs/framework/operators/tensor/tensor.less.md +++ b/docs/framework/operators/tensor/tensor.less.md @@ -29,20 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); // We can call `less` function as follows. @@ -56,21 +51,14 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `less` function as follows. return tensor_1.less(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.less_equal.md b/docs/framework/operators/tensor/tensor.less_equal.md index 7dc8f20cc..6c22ebc61 100644 --- a/docs/framework/operators/tensor/tensor.less_equal.md +++ b/docs/framework/operators/tensor/tensor.less_equal.md @@ -29,20 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); // We can call `less_equal` function as follows. @@ -56,21 +51,14 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3, 3].span(), - data: array![0,1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `less_equal` function as follows. return tensor_1.less_equal(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.log.md b/docs/framework/operators/tensor/tensor.log.md index 546e0ccfd..82ebe3304 100644 --- a/docs/framework/operators/tensor/tensor.log.md +++ b/docs/framework/operators/tensor/tensor.log.md @@ -1,7 +1,7 @@ # tensor.log ```rust - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; ``` Computes the natural log of all elements of the input tensor. @@ -15,23 +15,19 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the natural log of the elements of the input tensor. +Returns a new tensor in `F` with the natural log of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::numbers::fixed_point::core::{FixedType, FixedImpl}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::numbers::FP8x23; -fn log_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; +fn log_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![1, 2, 3, 100].span(), - extra: Option::Some(extra) + shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), ); // We can call `log` function as follows. diff --git a/docs/framework/operators/tensor/tensor.matmul.md b/docs/framework/operators/tensor/tensor.matmul.md index 684061e0e..08f371bca 100644 --- a/docs/framework/operators/tensor/tensor.matmul.md +++ b/docs/framework/operators/tensor/tensor.matmul.md @@ -31,21 +31,12 @@ Case 1: Dot product of two vectors (1D \* 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn dot_product_example() -> Tensor { - let tensor_1 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `matmul` function as follows. return tensor_1.matmul(@tensor_2); @@ -58,20 +49,15 @@ Case 2: Matrix multiplication (2D \* 2D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn matrix_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![244, 99, 109, 162].span(), - extra: Option::None(()) + shape: array![2, 2].span(), data: array![244, 99, 109, 162].span() ); let tensor_2 = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![151, 68, 121, 170].span(), - extra: Option::None(()) + shape: array![2, 2].span(), data: array![151, 68, 121, 170].span() ); // We can call `matmul` function as follows. @@ -85,21 +71,14 @@ Case 3: Matrix-Vector multiplication (2D x 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn matrix_vec_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); - let tensor_2 = TensorTrait::::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor_2 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); // We can call `matmul` function as follows. return tensor_1.matmul(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.max.md b/docs/framework/operators/tensor/tensor.max.md index 19061fdeb..74a63d6e6 100644 --- a/docs/framework/operators/tensor/tensor.max.md +++ b/docs/framework/operators/tensor/tensor.max.md @@ -19,15 +19,11 @@ Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn max_example() -> u32 { let tensor = TensorTrait::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `max` function as follows. diff --git a/docs/framework/operators/tensor/tensor.min.md b/docs/framework/operators/tensor/tensor.min.md index ff0af7ee0..2569168dc 100644 --- a/docs/framework/operators/tensor/tensor.min.md +++ b/docs/framework/operators/tensor/tensor.min.md @@ -19,15 +19,12 @@ The minimum `T` value in the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn min_example() -> u32 { let tensor = TensorTrait::new( shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) ); // We can call `min` function as follows. diff --git a/docs/framework/operators/tensor/tensor.new.md b/docs/framework/operators/tensor/tensor.new.md index 59e96a96a..80e0f5179 100644 --- a/docs/framework/operators/tensor/tensor.new.md +++ b/docs/framework/operators/tensor/tensor.new.md @@ -1,7 +1,7 @@ # tensor.new ```rust - fn new(shape: Span, data: Span, extra: Option) -> Tensor; + fn new(shape: Span, data: Span) -> Tensor; ``` Returns a new tensor with the given shape and data. @@ -10,7 +10,6 @@ Returns a new tensor with the given shape and data. * `shape`(`Span`) - A span representing the shape of the tensor. * `data` (`Span`) - A span containing the array of elements. -* `extra` (`Option`) - A parameter for extra tensor options. ## Panics @@ -27,27 +26,23 @@ Let's create new u32 Tensors. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; +use orion::operators::tensor::{ + TensorTrait, // we import the trait + Tensor, // we import the type + Tensor_u32_fp16x16 // we import the implementation. + //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). +}; // 1D TENSOR fn tensor_1D() -> Tensor { - let tensor = TensorTrait::new( - shape: array![3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) - ); + let tensor = TensorTrait::new(shape: array![3].span(), data: array![0, 1, 2].span()); return tensor; } // 2D TENSOR fn tensor_2D() -> Tensor { - let tensor = TensorTrait::new( - shape: array![2, 2].span(), - data: array![0, 1, 2, 3].span(), - extra: Option::None(()) - ); + let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span()); return tensor; } @@ -55,9 +50,7 @@ fn tensor_2D() -> Tensor { // 3D TENSOR fn tensor_3D() -> Tensor { let tensor = TensorTrait::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); return tensor; diff --git a/docs/framework/operators/tensor/tensor.onehot.md b/docs/framework/operators/tensor/tensor.onehot.md index 199c58cbf..031935a0e 100644 --- a/docs/framework/operators/tensor/tensor.onehot.md +++ b/docs/framework/operators/tensor/tensor.onehot.md @@ -26,22 +26,12 @@ A new `Tensor` one-hot encode of the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn onehot_example() -> Tensor { - let tensor = TensorTrait::::new( - shape: array![2, 2].span(), - data: array![0, 1, 2, 3].span(), - extra: Option::None(()) - ); - - return tensor.onehot( - depth: 3, - axis: Option::None(()), - values: array![0, 1].span() - ); + let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + + return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); } >>> [[1. 0. 0.] [0. 1. 0.] diff --git a/docs/framework/operators/tensor/tensor.or.md b/docs/framework/operators/tensor/tensor.or.md index 3143531a2..572a266d1 100644 --- a/docs/framework/operators/tensor/tensor.or.md +++ b/docs/framework/operators/tensor/tensor.or.md @@ -29,21 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); return tensor_1.or(@tensor_2); @@ -56,21 +50,15 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![1, 3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) + shape: array![1, 3].span(), data: array![0, 1, 2].span(), ); return tensor_1.or(@tensor_2); diff --git a/docs/framework/operators/tensor/tensor.quantize_linear.md b/docs/framework/operators/tensor/tensor.quantize_linear.md index 717a5b1d4..80e17f34e 100644 --- a/docs/framework/operators/tensor/tensor.quantize_linear.md +++ b/docs/framework/operators/tensor/tensor.quantize_linear.md @@ -27,12 +27,8 @@ A new `Tensor` with the same shape as the input tensor, containing the quanti ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; +use orion::numbers::{i8, i32, IntegerTrait}; fn quantize_linear_example() -> Tensor { // We instantiate a 1D Tensor here. @@ -47,21 +43,16 @@ fn quantize_linear_example() -> Tensor { IntegerTrait::new(1000, true), ] .span(), - extra: Option::None(()) ); // We instantiate the y_scale here. let y_scale = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(2, false)].span(), - extra: Option::None(()) + shape: array![1].span(), data: array![IntegerTrait::new(2, false)].span(), ); // We instantiate the y_zero_point here. let y_zero_point = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(1, false)].span(), - extra: Option::None(()) + shape: array![1].span(), data: array![IntegerTrait::new(1, false)].span(), ); return x.quantize_linear(@y_scale, @y_zero_point); diff --git a/docs/framework/operators/tensor/tensor.ravel_index.md b/docs/framework/operators/tensor/tensor.ravel_index.md index 40c0cf83d..916da0009 100644 --- a/docs/framework/operators/tensor/tensor.ravel_index.md +++ b/docs/framework/operators/tensor/tensor.ravel_index.md @@ -24,21 +24,15 @@ The index corresponding to the given indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn ravel_index_example() -> usize { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `ravel_index` function as follows. - return tensor.ravel_index( - indices: array![1, 3, 0].span() - ); + return tensor.ravel_index(indices: array![1, 3, 0].span()); } >>> 10 // This means that the value of indices [1,3,0] diff --git a/docs/framework/operators/tensor/tensor.reduce_sum.md b/docs/framework/operators/tensor/tensor.reduce_sum.md index a1a4bd67f..4e4b0b2a9 100644 --- a/docs/framework/operators/tensor/tensor.reduce_sum.md +++ b/docs/framework/operators/tensor/tensor.reduce_sum.md @@ -25,22 +25,15 @@ A new `Tensor` instance with the specified axis reduced by summing its elemen ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn reduce_sum_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `reduce_sum` function as follows. - return tensor.reduce_sum( - axis: 0, - keepdims: false - ); + return tensor.reduce_sum(axis: 0, keepdims: false); } >>> [[4,6],[8,10]] ``` diff --git a/docs/framework/operators/tensor/tensor.reshape.md b/docs/framework/operators/tensor/tensor.reshape.md index 8781a8f5d..48d8ccbd0 100644 --- a/docs/framework/operators/tensor/tensor.reshape.md +++ b/docs/framework/operators/tensor/tensor.reshape.md @@ -24,21 +24,15 @@ A new `Tensor` with the specified target shape and the same data. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn reshape_tensor_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `reshape` function as follows. - return tensor.reshape( - target_shape: array![2,4].span() - ); + return tensor.reshape(target_shape: array![2, 4].span()); } >>> [[0,1,2,3], [4,5,6,7]] ``` diff --git a/docs/framework/operators/tensor/tensor.sin.md b/docs/framework/operators/tensor/tensor.sin.md index b6c12ad29..0776cf0be 100644 --- a/docs/framework/operators/tensor/tensor.sin.md +++ b/docs/framework/operators/tensor/tensor.sin.md @@ -21,14 +21,11 @@ the sine value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn sin_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn sin_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![3].span(), data: array![ FixedTrait::new_unscaled(0, false), @@ -36,7 +33,6 @@ fn sin_example() -> Tensor { FixedTrait::new_unscaled(2, false) ] .span(), - extra: Option::Some(extra) ); return tensor.sin(); diff --git a/docs/framework/operators/tensor/tensor.sinh.md b/docs/framework/operators/tensor/tensor.sinh.md index d02ae627b..329e74aff 100644 --- a/docs/framework/operators/tensor/tensor.sinh.md +++ b/docs/framework/operators/tensor/tensor.sinh.md @@ -1,7 +1,7 @@ # tensor.sinh ```rust - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic sine of all elements of the input tensor. @@ -15,32 +15,29 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the hyperbolic sine of the elements of the input tensor. +Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; -fn sinh_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( - shape: array![2,2].span(), +fn sinh_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 2].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), FixedTrait::new_unscaled(3, false) - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.sinh(); + return tensor.sinh(); } >>> [[0,9858303],[30424311,84036026]] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.sqrt.md b/docs/framework/operators/tensor/tensor.sqrt.md index 6392730f6..2494d52a2 100644 --- a/docs/framework/operators/tensor/tensor.sqrt.md +++ b/docs/framework/operators/tensor/tensor.sqrt.md @@ -21,21 +21,18 @@ the arctangent (inverse of tangent) value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - -fn sqrt_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; + +fn sqrt_example() -> Tensor { + let tensor = TensorTrait::::new( shape: array![3].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), - ].span(), - extra: Option::Some(extra) + ] + .span(), ); return tensor.sqrt(); diff --git a/docs/framework/operators/tensor/tensor.stride.md b/docs/framework/operators/tensor/tensor.stride.md index 64d7a70cf..e17b35828 100644 --- a/docs/framework/operators/tensor/tensor.stride.md +++ b/docs/framework/operators/tensor/tensor.stride.md @@ -18,15 +18,11 @@ A span of usize representing the stride for each dimension of the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn stride_example() -> Span { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `stride` function as follows. diff --git a/docs/framework/operators/tensor/tensor.tanh.md b/docs/framework/operators/tensor/tensor.tanh.md index 96df26d85..9b818081e 100644 --- a/docs/framework/operators/tensor/tensor.tanh.md +++ b/docs/framework/operators/tensor/tensor.tanh.md @@ -1,7 +1,7 @@ # tensor.tanh ```rust - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic tangent of all elements of the input tensor. @@ -15,32 +15,29 @@ $$ ## Returns -Returns a new tensor in `FixedType` with the hyperbolic tangent of the elements of the input tensor. +Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_fp::{Tensor_fp}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::numbers::{FixedTrait, FP8x23}; -fn tanh_example() -> Tensor { - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - let tensor = TensorTrait::::new( - shape: array![2,2].span(), +fn tanh_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2, 2].span(), data: array![ FixedTrait::new_unscaled(0, false), FixedTrait::new_unscaled(1, false), FixedTrait::new_unscaled(2, false), FixedTrait::new_unscaled(3, false) - ].span(), - extra: Option::Some(extra) + ] + .span(), ); - return tensor.tanh(); + return tensor.tanh(); } >>> [[0,6388715],[8086850,8347125]] // The fixed point representation of diff --git a/docs/framework/operators/tensor/tensor.transpose.md b/docs/framework/operators/tensor/tensor.transpose.md index 2908ebef1..54f14bbaa 100644 --- a/docs/framework/operators/tensor/tensor.transpose.md +++ b/docs/framework/operators/tensor/tensor.transpose.md @@ -24,21 +24,15 @@ A `Tensor` instance with the axes reordered according to the given permutatio ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn transpose_tensor_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `transpose` function as follows. - return tensor.transpose( - axes: array![1, 2, 0].span() - ); + return tensor.transpose(axes: array![1, 2, 0].span()); } >>> [[[0,4],[1,5]],[[2,6],[3,7]]] ``` diff --git a/docs/framework/operators/tensor/tensor.unravel_index.md b/docs/framework/operators/tensor/tensor.unravel_index.md index 4a9bf516c..5ac532fff 100644 --- a/docs/framework/operators/tensor/tensor.unravel_index.md +++ b/docs/framework/operators/tensor/tensor.unravel_index.md @@ -24,15 +24,11 @@ The unraveled indices corresponding to the given index. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; - +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; fn unravel_index_example() -> Span { let tensor = TensorTrait::::new( - shape: array![2, 2, 2].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) + shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), ); // We can call `unravel_index` function as follows. diff --git a/docs/framework/operators/tensor/tensor.xor.md b/docs/framework/operators/tensor/tensor.xor.md index cfc725714..09f0bf011 100644 --- a/docs/framework/operators/tensor/tensor.xor.md +++ b/docs/framework/operators/tensor/tensor.xor.md @@ -29,21 +29,15 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 9, 1, 5].span(), ); return tensor_1.xor(@tensor_2); @@ -56,21 +50,15 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( - shape: array![3, 3].span(), - data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), - extra: Option::None(()) + shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(), ); let tensor_2 = TensorTrait::::new( - shape: array![1, 3].span(), - data: array![0, 1, 2].span(), - extra: Option::None(()) + shape: array![1, 3].span(), data: array![0, 1, 2].span(), ); return tensor_1.xor(@tensor_2); diff --git a/docs/framework/performance/README.md b/docs/framework/performance/README.md deleted file mode 100644 index 222fd5fcf..000000000 --- a/docs/framework/performance/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Performance - -This trait contains a set of functions to increase the performance of your model. Performance trait takes two generic parameters: - -* `T`, the type of the unquantized tensor. -* `Q`, the type of the quantized tensor. - -```rust -use orion::performance::core::PerfomanceTrait; -``` - -### Data types - -Orion supports currently these `performance` types. - -
T Data typeQ Data typedtype
32-bit integer (signed),8-bit integer (signed)PerformanceTrait<i32, i8>
Fixed point (signed)8-bit integer (signed)PerformanceTrait<FixedType, i8>
- -| function | description | -| --- | --- | -| [`performance.quantize_linear`](performance.quantize\_linear.md) | Quantizes a Tensor using linear quantization. | -| [`performance.dequantize_linear`](performance.dequantize\_linear.md) | Dequantizes a Tensor using linear dequantization. | - diff --git a/docs/framework/performance/performance.dequantize_linear.md b/docs/framework/performance/performance.dequantize_linear.md deleted file mode 100644 index a99a3831d..000000000 --- a/docs/framework/performance/performance.dequantize_linear.md +++ /dev/null @@ -1,67 +0,0 @@ -# performance.dequantize_linear - -```rust -fn dequantize_linear(self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor) -> Tensor::; -``` - -Dequantizes a Tensor using linear dequantization. - -The linear dequantization operator. It consumes a quantized tensor, a scale, and a zero point to compute -the full precision tensor. The dequantization formula is y = (x - x_zero_point) * x_scale. x_scale and -x_zero_point must have same shape, and can be either a scalar for per-tensor / per layer quantization, -or a 1-D tensor for per-axis quantization. - -## Args - -* `self`(`@Tensor`) - The input tensor. -* `x_scale`(`@Tensor`) - Scale for input `x`. -* `x_zero_point`(`@Tensor`) - Zero point for input `x`. - -## Returns - -A new `Tensor` with the same shape as the input tensor, containing the dequantized values. - -## Examples - -```rust -use array::{ArrayTrait, SpanTrait}; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::signed_integer::i8::{i8, IntegerTrait}; -use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - -fn dequantize_linear_example() -> Tensor { - // We instantiate a 1D Tensor here. - let x = TensorTrait::::new( - shape: array![4].span(), - data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(3, false), - IntegerTrait::new(125, false), - IntegerTrait::new(127, false), - ].span(), - extra: Option::None(()) - ); - - // We instantiate the x_scale here. - let x_scale = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(2, false)].span(), - extra: Option::None(()) - ); - - // We instantiate the x_zero_point here. - let x_zero_point = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(0, false)].span(), - extra: Option::None(()) - ); - - return x.dequantize_linear(@x_scale, @x_zero_point); -} ->>> [0, 6, 250, 254] -``` diff --git a/docs/framework/performance/performance.quantize_linear.md b/docs/framework/performance/performance.quantize_linear.md deleted file mode 100644 index 3e1909b51..000000000 --- a/docs/framework/performance/performance.quantize_linear.md +++ /dev/null @@ -1,70 +0,0 @@ -# performance.quantize_linear - -```rust -fn quantize_linear(self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor) -> Tensor::; -``` - -Quantizes a Tensor using linear quantization. - -The linear quantization operator. It consumes a high precision tensor, a scale, and a zero point -to compute the low precision / quantized tensor. The scale factor and zero point must have same shape, -and can be either a scalar for per-tensor / per layer quantization, or a 1-D tensor for per-axis quantization. -The quantization formula is `y = saturate ((x / y_scale) + y_zero_point)`. For saturation, it saturates to `[-128, 127]`. -For (x / y_scale), it's rounding to the nearest even. - -## Args - -* `self`(`@Tensor`) - The input tensor. -* `y_scale`(`@Tensor`) - Scale for doing quantization to get `y`. -* `y_zero_point`(`@Tensor`) - Zero point for doing quantization to get `y`. - -## Returns - -A new `Tensor` with the same shape as the input tensor, containing the quantized values. - -## Examples - -```rust -use array::{ArrayTrait, SpanTrait}; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; -use orion::numbers::signed_integer::i8::i8; -use orion::performance::core::PerfomanceTrait; -use orion::performance::implementations::impl_performance_i32::Performance_i32_i8; - -fn quantize_linear_example() -> Tensor { - // We instantiate a 1D Tensor here. - let x = TensorTrait::::new( - shape: array![6].span(), - data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), - IntegerTrait::new(1000, false), - IntegerTrait::new(254, true), - IntegerTrait::new(1000, true), - ] - .span(), - extra: Option::None(()) - ); - - // We instantiate the y_scale here. - let y_scale = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(2, false)].span(), - extra: Option::None(()) - ); - - // We instantiate the y_zero_point here. - let y_zero_point = TensorTrait::::new( - shape: array![1].span(), - data: array![IntegerTrait::new(1, false)].span(), - extra: Option::None(()) - ); - - return x.quantize_linear(@y_scale, @y_zero_point); -} ->>> [1, 2, 2, 127, -126, -128] -``` diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index 1ad4e0847..99e09f4da 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -36,11 +36,9 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, IntegerTrait}; /// /// fn relu_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -50,8 +48,8 @@ trait NNTrait { /// IntegerTrait::new(2, false), /// IntegerTrait::new(1, true), /// IntegerTrait::new(2, true), - /// ].span(), - /// extra: Option::None(()) + /// ] + /// .span(), /// ); /// /// return NNTrait::relu(@tensor); @@ -63,7 +61,7 @@ trait NNTrait { /// # NNTrait::softmax /// /// ```rust - /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// ``` /// /// Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -86,15 +84,11 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait}; /// - /// fn softmax_example() -> Tensor { - /// + /// fn softmax_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -102,8 +96,8 @@ trait NNTrait { /// IntegerTrait::new(1, false), /// IntegerTrait::new(2, false), /// IntegerTrait::new(3, false), - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// /// return NNTrait::softmax(@tensor, 1); @@ -117,7 +111,7 @@ trait NNTrait { /// # NNTrait::logsoftmax /// /// ```rust - /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor /// ``` /// /// Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -140,15 +134,11 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait}; /// - /// fn logsoftmax_example() -> Tensor { - /// + /// fn logsoftmax_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -156,8 +146,8 @@ trait NNTrait { /// IntegerTrait::new(1, false), /// IntegerTrait::new(2, false), /// IntegerTrait::new(3, false), - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// /// return NNTrait::logsoftmax(@tensor, 1); @@ -177,7 +167,7 @@ trait NNTrait { /// # NNTrait::sigmoid /// /// ```rust - /// fn sigmoid(tensor: @Tensor) -> Tensor; + /// fn sigmoid(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -199,15 +189,11 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait}; /// - /// fn sigmoid_example() -> Tensor { - /// + /// fn sigmoid_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -217,7 +203,6 @@ trait NNTrait { /// IntegerTrait::new(3, false), /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// return NNTrait::sigmoid(@tensor); @@ -231,7 +216,7 @@ trait NNTrait { /// # NNTrait::softsign /// /// ```rust - /// fn softsign(tensor: @Tensor) -> Tensor; + /// fn softsign(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -253,15 +238,11 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait}; /// - /// fn softsign_example() -> Tensor { - /// + /// fn softsign_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -271,7 +252,6 @@ trait NNTrait { /// IntegerTrait::new(3, false), /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// return NNTrait::softsign(@tensor); @@ -285,7 +265,7 @@ trait NNTrait { /// # NNTrait::softplus /// /// ```rust - /// fn softplus(tensor: @Tensor) -> Tensor; + /// fn softplus(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -307,15 +287,11 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait}; /// - /// fn softplus_example() -> Tensor { - /// + /// fn softplus_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ @@ -325,7 +301,6 @@ trait NNTrait { /// IntegerTrait::new(3, false), /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// return NNTrait::softplus(@tensor); @@ -363,24 +338,18 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType}; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, IntegerTrait}; /// /// fn linear_example() -> Tensor { - /// - /// /// // We instantiate inputs here. /// let inputs = TensorTrait::::new( /// shape: array![3].span(), /// data: array![ - /// IntegerTrait::new(71, true), IntegerTrait::new(38, false), IntegerTrait::new(62, false), + /// IntegerTrait::new(71, true), IntegerTrait::new(38, false), IntegerTrait::new(62, false), /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// /// // We instantiate weights here. @@ -393,18 +362,14 @@ trait NNTrait { /// IntegerTrait::new(33, true), /// IntegerTrait::new(34, true), /// IntegerTrait::new(20, true), - /// ].span(), - /// extra: Option::Some(extra) + /// ] + /// .span(), /// ); /// /// // We instantiate bias here. /// let bias = TensorTrait::::new( /// shape: array![2].span(), - /// data: array![ - /// IntegerTrait::new(61, false), - /// IntegerTrait::new(61, true), - /// ].span(), - /// extra: Option::Some(extra) + /// data: array![IntegerTrait::new(61, false), IntegerTrait::new(61, true),].span(), /// ); /// /// return NNTrait::linear(inputs, weights, bias); @@ -416,7 +381,7 @@ trait NNTrait { /// # NNTrait::leaky_relu /// /// ```rust - /// fn leaky_relu(inputs: @Tensor, alpha: @FixedType) -> Tensor + /// fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor /// ``` /// /// Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -425,26 +390,21 @@ trait NNTrait { /// /// ## Args /// * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. - /// * `alpha`(`@FixedType`) - A snapshot of a FixedType scalar that defines the alpha value of the Leaky ReLU function. + /// * `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. /// /// ## Returns - /// A new FixedType tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. + /// A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::core::{TensorTrait, Tensor}; - /// use orion::operators::tensor::implementations::impl_tensor_i32::{Tensor_i32}; - /// use orion::operators::nn::core::NNTrait; - /// use orion::operators::nn::implementations::impl_nn_i32::NN_i32; - /// use orion::numbers::signed_integer::i32::{i32, IntegerTrait}; - /// use orion::numbers::fixed_point::core::{FixedImpl, FixedType, FixedTrait}; - /// use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; + /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; /// - /// fn leaky_relu_example() -> Tensor { - /// + /// fn leaky_relu_example() -> Tensor { /// let tensor = TensorTrait::::new( /// shape: array![2, 3].span(), /// data: array![ @@ -456,7 +416,6 @@ trait NNTrait { /// IntegerTrait::new(0, false), /// ] /// .span(), - /// extra: Option::Some(extra) /// ); /// let alpha = FixedTrait::from_felt(838861); // 0.1 /// From 013f2428feb737c3f773ce9053fcd0c9246f0721 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 13:06:42 +0300 Subject: [PATCH 101/179] Update helpers.py --- nodegen/helpers.py | 202 +++++++++++++++++++++++++++++++++------------ 1 file changed, 148 insertions(+), 54 deletions(-) diff --git a/nodegen/helpers.py b/nodegen/helpers.py index f36b82f31..0020f8513 100644 --- a/nodegen/helpers.py +++ b/nodegen/helpers.py @@ -60,76 +60,142 @@ def make_test(inputs: [Tensor], output: Tensor, func_sig: str, file_name: str, t match trait_type: case Trait.TENSOR: - code.append("\n\nuse array::ArrayTrait;\n") - code.append("use orion::operators::tensor::core::TensorTrait;\n") + code.append("\n\nuse array::{ArrayTrait, SpanTrait};\n") + code.append("use orion::operators::tensor::TensorTrait;\n") match type_of_first_input: case Dtype.U32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::Tensor_u32_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::Tensor_u32_fp16x16;\n") case Dtype.I32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::Tensor_i32_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::Tensor_i32_fp16x16;\n") case Dtype.I8: + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::Tensor_i8_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::Tensor_i8_fp16x16;\n") + case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8;\n") - case Dtype.FP16x16 | Dtype.FP8x23: + "use orion::operators::tensor::Tensor_fp8x23;\n") + case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp;\n") + "use orion::operators::tensor::Tensor_fp16x16;\n") match type_of_output: case Dtype.U32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") case Dtype.I32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") case Dtype.I8: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq;\n") + "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq;\n") + "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") case Trait.NN: code.append("\n\nuse orion::operators::nn::core::NNTrait;\n") - code.append("use orion::numbers::fixed_point::core::FixedTrait;\n") + code.append("use orion::numbers::FixedTrait;\n") match type_of_first_input: case Dtype.I32: - code.append( - "use orion::operators::nn::implementations::impl_nn_i32::NN_i32;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::nn::NN_i32_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::nn::NN_i32_fp16x16;\n") case Dtype.I8: - code.append( - "use orion::operators::nn::implementations::impl_nn_i8::NN_i8;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::nn::NN_i8_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::nn::NN_i8_fp16x16;\n") case Dtype.U32: + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::nn::NN_u32_fp8x23;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::nn::NN_u32_fp16x16;\n") + case Dtype.FP8x23: code.append( - "use orion::operators::nn::implementations::impl_nn_u32::NN_u32;\n") - case Dtype.FP8x23 | Dtype.FP16x16: + "use orion::operators::nn::NN_fp8x23;\n") + case Dtype.FP16x16: code.append( - "use orion::operators::nn::implementations::impl_nn_fp::NN_fp;\n") + "use orion::operators::nn::NN_fp16x16;\n") match inputs[0].extra_fp: case FixedImpl.FP8x23: code.append( - "use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl;\n") + "use orion::numbers::FP8x23Impl;\n") case FixedImpl.FP16x16: code.append( - "use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl;\n") + "use orion::numbers::FP16x16Impl;\n") match type_of_output: case Dtype.U32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") case Dtype.I32: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") case Dtype.I8: - code.append( - "use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq;\n") + match inputs[0].extra_fp: + case FixedImpl.FP8x23: + code.append( + "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") + case FixedImpl.FP16x16: + code.append( + "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq;\n") + "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq;\n") + "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") code.append("use orion::utils::assert_eq;\n\n") code.append("#[test]\n") @@ -166,23 +232,53 @@ def to_fp(x: np.array, fp_impl: FixedImpl): def __build_tensor_code(tensor: Tensor, name: str, type_string: str, is_fixed: bool = False, is_signed_int: bool = False) -> []: result = [ - f"use array::ArrayTrait;\n", - f"use orion::operators::tensor::core::{{TensorTrait, Tensor, ExtraParams}};\n", + "use array::{ArrayTrait, SpanTrait};\n", + "use orion::operators::tensor::{TensorTrait, Tensor};\n", ] - if is_fixed: - result.append( - f"use orion::numbers::fixed_point::core::{{FixedTrait, FixedType, FixedImpl}};\n") - result.append( - f"use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp;\n") - else: - result.append( - f"use orion::numbers::fixed_point::core::FixedImpl;\n") - result.append( - f"use orion::operators::tensor::implementations::impl_tensor_{type_string.lower()}::Tensor_{type_string.lower()};\n") - if is_signed_int: + match tensor.dtype: + case Dtype.U32: + match tensor.extra_fp: + case FixedImpl.FP8x23: + result.append( + "use orion::operators::tensor::Tensor_u32_fp8x23;\n") + case FixedImpl.FP16x16: + result.append( + "use orion::operators::tensor::Tensor_u32_fp16x16;\n") + case Dtype.I32: + match tensor.extra_fp: + case FixedImpl.FP8x23: + result.append( + "use orion::operators::tensor::Tensor_i32_fp8x23;\n") + case FixedImpl.FP16x16: + result.append( + "use orion::operators::tensor::Tensor_i32_fp16x16;\n") + result.append( + "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32};\n") + case Dtype.I8: + match tensor.extra_fp: + case FixedImpl.FP8x23: + result.append( + "use orion::operators::tensor::Tensor_i8_fp8x23;\n") + case FixedImpl.FP16x16: + result.append( + "use orion::operators::tensor::Tensor_i8_fp16x16;\n") result.append( - f"use orion::numbers::signed_integer::{{integer_trait::IntegerTrait, {type_string}::{type_string}}};\n") + "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8};\n") + case Dtype.FP8x23: + result.append( + "use orion::operators::tensor::Tensor_fp8x23;\n") + result.append( + "use orion::numbers::fixed_point::core::{FixedTrait};\n") + result.append( + "use orion::numbers::FP8x23;\n") + case Dtype.FP16x16: + result.append( + "use orion::operators::tensor::Tensor_fp16x16;\n") + result.append( + "use orion::numbers::fixed_point::core::{FixedTrait};\n") + result.append( + "use orion::numbers::FP16x16;\n") result.append(f"\nfn {name}() -> Tensor<{type_string}> {{\n") result.append(" let mut shape = ArrayTrait::::new();\n") @@ -197,17 +293,15 @@ def __build_tensor_code(tensor: Tensor, name: str, type_string: str, is_fixed: b for val in tensor.data: result.append(f" data.append({abs(int(val))});\n") result.append( - f"\n let extra = ExtraParams {{ fixed_point: Option::Some(FixedImpl::{tensor.extra_fp.name}) }};\n") - result.append( - " TensorTrait::new(shape.span(), data.span(), Option::Some(extra))\n") + " TensorTrait::new(shape.span(), data.span())\n") result.append("}") return result def __convert_tensor_to_cairo(tensor: Tensor, name: str) -> []: dtype_mapping = { - Dtype.FP8x23: ('FixedType', True, False), - Dtype.FP16x16: ('FixedType', True, False), + Dtype.FP8x23: ('FP8x23', True, False), + Dtype.FP16x16: ('FP16x16', True, False), Dtype.I32: ('i32', False, True), Dtype.I8: ('i8', False, True), Dtype.U32: ('u32', False, False), From fc42f05251a343bfb111a336bd589783f3620985 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 13:14:16 +0300 Subject: [PATCH 102/179] Update CHANGELOG.md --- docs/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 125c9ac1c..3d74d00ea 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] - 2023-09-01 + +## Changed +Refactored Orion to support generic types. + ## [Unreleased] - 2023-08-24 ## Changed From d62d054da41bcf9c4dec4601ed1bbc2dd3f724b9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 13:22:32 +0300 Subject: [PATCH 103/179] update scarb version in github workflow --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3c3cdbcda..239d65b0a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,5 +9,5 @@ jobs: - uses: actions/checkout@v3 - uses: software-mansion/setup-scarb@v1 with: - scarb-version: "0.6.2" + scarb-version: "0.7.0" - run: scarb test \ No newline at end of file From 3720f680e8b46d597004d00fd678b8383af0a2a0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 13:24:22 +0300 Subject: [PATCH 104/179] remove .print() --- .../quantize_linear_test/quantize_linear_i32_test.cairo | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 99511bef3..26109222d 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -42,8 +42,6 @@ fn quantize_linear() { let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); - (*y.data.at(3).mag).print(); - assert((*y.data[0]).into() == 1, '*result[0] == 1'); assert((*y.data[1]).into() == 2, '*result[1] == 2'); assert((*y.data[2]).into() == 2, '*result[2] == 2'); From 2d10fca4995b3b2e2d7186bd32afff2a4f5eb2ad Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Fri, 1 Sep 2023 16:17:45 +0300 Subject: [PATCH 105/179] implement fp64x64 --- Scarb.toml | 3 +- src/numbers.cairo | 66 ++++ src/numbers/fixed_point/implementations.cairo | 1 + .../fixed_point/implementations/fp64x64.cairo | 2 + .../implementations/fp64x64/comp.cairo | 19 + .../implementations/fp64x64/core.cairo | 352 ++++++++++++++++++ 6 files changed, 442 insertions(+), 1 deletion(-) create mode 100644 src/numbers/fixed_point/implementations/fp64x64.cairo create mode 100644 src/numbers/fixed_point/implementations/fp64x64/comp.cairo create mode 100644 src/numbers/fixed_point/implementations/fp64x64/core.cairo diff --git a/Scarb.toml b/Scarb.toml index 3aa1fcb3c..a70ca0d59 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -7,8 +7,9 @@ homepage = "https://github.com/gizatechxyz/orion" [dependencies] alexandria_data_structures = { git = "https://github.com/keep-starknet-strange/alexandria.git" } +cubit = { git = "https://github.com/influenceth/cubit.git" } [scripts] sierra = "cairo-compile . -r" docgen = "cd docgen && cargo run" -nodegen = "python3 nodegen/node/__init__.py" \ No newline at end of file +nodegen = "python3 nodegen/node/__init__.py" diff --git a/src/numbers.cairo b/src/numbers.cairo index b7732951f..e2072fb4c 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -162,6 +162,72 @@ impl FP16x16Number of NumberTrait { } } +use orion::numbers::fixed_point::implementations::fp64x64::core::{FP64x64Impl, FP64x64}; +use orion::numbers::fixed_point::implementations::fp64x64::core as core_fp64x64; +use orion::numbers::fixed_point::implementations::fp64x64::comp as comp_fp64x64; +use cubit::f128 as fp64x64; + +impl FP64x64Number of NumberTrait { + fn new(mag: u128, sign: bool) -> FP64x64 { + FP64x64Impl::new(mag, sign) + } + + fn zero() -> FP64x64 { + FP64x64Impl::ZERO() + } + fn is_zero(self: FP64x64) -> bool { + fp64x64::core::eq(@self, @FP64x64Impl::ZERO()) + } + + fn one() -> FP64x64 { + FP64x64Impl::ONE() + } + + fn neg_one() -> FP64x64 { + FP64x64 { mag: core_fp64x64::ONE, sign: true } + } + + fn is_one(self: FP64x64) -> bool { + core_fp64x64::eq(@self, @FP64x64Impl::ONE()) + } + + fn abs(self: FP64x64) -> FP64x64 { + fp64x64::core::abs(self) + } + + fn min_value() -> FP64x64 { + FP64x64 { mag: core_fp64x64::MAX, sign: true } + } + + fn max_value() -> FP64x64 { + FP64x64 { mag: core_fp64x64::MAX, sign: false } + } + + fn min(self: FP64x64, other: FP64x64) -> FP64x64 { + fp64x64::comp::min(self, other) + } + + fn max(self: FP64x64, other: FP64x64) -> FP64x64 { + fp64x64::comp::max(self, other) + } + + fn mag(self: FP64x64) -> u128 { + self.mag + } + + fn is_neg(self: FP64x64) -> bool { + self.sign + } + + fn xor(lhs: FP64x64, rhs: FP64x64) -> bool { + comp_fp64x64::xor(lhs, rhs) + } + + fn or(lhs: FP64x64, rhs: FP64x64) -> bool { + comp_fp64x64::or(lhs, rhs) + } +} + use orion::numbers::signed_integer::i8 as i8_core; use orion::numbers::signed_integer::i8::i8; diff --git a/src/numbers/fixed_point/implementations.cairo b/src/numbers/fixed_point/implementations.cairo index 1d909f404..b4ab5140c 100644 --- a/src/numbers/fixed_point/implementations.cairo +++ b/src/numbers/fixed_point/implementations.cairo @@ -1,2 +1,3 @@ mod fp8x23; mod fp16x16; +mod fp64x64; \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp64x64.cairo b/src/numbers/fixed_point/implementations/fp64x64.cairo new file mode 100644 index 000000000..6e1271f5b --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp64x64.cairo @@ -0,0 +1,2 @@ +mod core; +mod comp; \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp64x64/comp.cairo b/src/numbers/fixed_point/implementations/fp64x64/comp.cairo new file mode 100644 index 000000000..d26a3180f --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp64x64/comp.cairo @@ -0,0 +1,19 @@ +use orion::numbers::{FP64x64, FixedTrait}; +use orion::numbers::FP64x64Impl; + +fn xor(a: FP64x64, b: FP64x64) -> bool { + if (a == FixedTrait::new(0, false) || b == FixedTrait::new(0, false)) && (a != b) { + return true; + } else { + return false; + } +} + +fn or(a: FP64x64, b: FP64x64) -> bool { + let zero = FixedTrait::new(0, false); + if a == zero && b == zero { + return false; + } else { + return true; + } +} diff --git a/src/numbers/fixed_point/implementations/fp64x64/core.cairo b/src/numbers/fixed_point/implementations/fp64x64/core.cairo new file mode 100644 index 000000000..e3a357a8b --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp64x64/core.cairo @@ -0,0 +1,352 @@ +use debug::PrintTrait; + +use option::OptionTrait; +use result::{ResultTrait, ResultTraitImpl}; +use traits::{TryInto, Into}; + +use cubit::f128 as fp64x64; +use cubit::f128::types::Fixed as FP64x64; +use cubit::f128::ONE_u128 as ONE; +use cubit::f128::core::MAX_u128 as MAX; + +use orion::numbers::fixed_point::core::{FixedTrait}; +use orion::numbers::fixed_point::utils; +use orion::numbers::{i32, i8}; + +impl FP64x64Impl of FixedTrait { + fn ZERO() -> FP64x64 { + return FP64x64 { mag: 0, sign: false }; + } + + fn ONE() -> FP64x64 { + return FP64x64 { mag: ONE, sign: false }; + } + + fn new(mag: u128, sign: bool) -> FP64x64 { + return FP64x64 { mag: mag, sign: sign }; + } + + fn new_unscaled(mag: u128, sign: bool) -> FP64x64 { + return FP64x64 { mag: mag * ONE, sign: sign }; + } + + fn from_felt(val: felt252) -> FP64x64 { + let mag = integer::u128_try_from_felt252(utils::felt_abs(val)).unwrap(); + return FixedTrait::new(mag, utils::felt_sign(val)); + } + + fn abs(self: FP64x64) -> FP64x64 { + return fp64x64::core::abs(self); + } + + fn acos(self: FP64x64) -> FP64x64 { + return fp64x64::trig::acos_fast(self); + } + + fn acos_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::acos_fast(self); + } + + fn acosh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::acosh(self); + } + + fn asin(self: FP64x64) -> FP64x64 { + return fp64x64::trig::asin_fast(self); + } + + fn asin_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::asin_fast(self); + } + + fn asinh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::asinh(self); + } + + fn atan(self: FP64x64) -> FP64x64 { + return fp64x64::trig::atan_fast(self); + } + + fn atan_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::atan_fast(self); + } + + fn atanh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::atanh(self); + } + + fn ceil(self: FP64x64) -> FP64x64 { + return fp64x64::core::ceil(self); + } + + fn cos(self: FP64x64) -> FP64x64 { + return fp64x64::trig::cos_fast(self); + } + + fn cos_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::cos_fast(self); + } + + fn cosh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::cosh(self); + } + + fn floor(self: FP64x64) -> FP64x64 { + return fp64x64::core::floor(self); + } + + // Calculates the natural exponent of x: e^x + fn exp(self: FP64x64) -> FP64x64 { + return fp64x64::core::exp(self); + } + + // Calculates the binary exponent of x: 2^x + fn exp2(self: FP64x64) -> FP64x64 { + return fp64x64::core::exp2(self); + } + + // Calculates the natural logarithm of x: ln(x) + // self must be greater than zero + fn ln(self: FP64x64) -> FP64x64 { + return fp64x64::core::ln(self); + } + + // Calculates the binary logarithm of x: log2(x) + // self must be greather than zero + fn log2(self: FP64x64) -> FP64x64 { + return fp64x64::core::log2(self); + } + + // Calculates the base 10 log of x: log10(x) + // self must be greater than zero + fn log10(self: FP64x64) -> FP64x64 { + return fp64x64::core::log10(self); + } + + // Calclates the value of x^y and checks for overflow before returning + // self is a fixed point value + // b is a fixed point value + fn pow(self: FP64x64, b: FP64x64) -> FP64x64 { + return fp64x64::core::pow(self, b); + } + + fn round(self: FP64x64) -> FP64x64 { + return fp64x64::core::round(self); + } + + fn sin(self: FP64x64) -> FP64x64 { + return fp64x64::trig::sin_fast(self); + } + + fn sin_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::sin_fast(self); + } + + fn sinh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::sinh(self); + } + + // Calculates the square root of a fixed point value + // x must be positive + fn sqrt(self: FP64x64) -> FP64x64 { + return fp64x64::core::sqrt(self); + } + + fn tan(self: FP64x64) -> FP64x64 { + return fp64x64::trig::tan_fast(self); + } + + fn tan_fast(self: FP64x64) -> FP64x64 { + return fp64x64::trig::tan_fast(self); + } + + fn tanh(self: FP64x64) -> FP64x64 { + return fp64x64::hyp::tanh(self); + } +} + + +impl FP64x64Print of PrintTrait { + fn print(self: FP64x64) { + self.sign.print(); + self.mag.print(); + } +} + +// Into a raw felt without unscaling +impl FP64x64IntoFelt252 of Into { + fn into(self: FP64x64) -> felt252 { + let mag_felt = self.mag.into(); + + if self.sign { + return mag_felt * -1; + } else { + return mag_felt * 1; + } + } +} + +impl FP64x64TryIntoU128 of TryInto { + fn try_into(self: FP64x64) -> Option { + if self.sign { + return Option::None(()); + } else { + // Unscale the magnitude and round down + return Option::Some((self.mag / ONE).into()); + } + } +} + +impl FP64x64TryIntoU16 of TryInto { + fn try_into(self: FP64x64) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP64x64TryIntoU32 of TryInto { + fn try_into(self: FP64x64) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP64x64TryIntoU8 of TryInto { + fn try_into(self: FP64x64) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP64x64TryIntoI8 of TryInto { + fn try_into(self: FP64x64) -> Option { + _i8_try_from_fp(self) + } +} + +impl FP64x64PartialEq of PartialEq { + #[inline(always)] + fn eq(lhs: @FP64x64, rhs: @FP64x64) -> bool { + return fp64x64::core::eq(lhs, rhs); + } + + #[inline(always)] + fn ne(lhs: @FP64x64, rhs: @FP64x64) -> bool { + return fp64x64::core::ne(lhs, rhs); + } +} + +impl FP64x64Add of Add { + fn add(lhs: FP64x64, rhs: FP64x64) -> FP64x64 { + return fp64x64::core::add(lhs, rhs); + } +} + +impl FP64x64AddEq of AddEq { + #[inline(always)] + fn add_eq(ref self: FP64x64, other: FP64x64) { + self = fp64x64::core::add(self, other); + } +} + +impl FP64x64Sub of Sub { + fn sub(lhs: FP64x64, rhs: FP64x64) -> FP64x64 { + return fp64x64::core::sub(lhs, rhs); + } +} + +impl FP64x64SubEq of SubEq { + #[inline(always)] + fn sub_eq(ref self: FP64x64, other: FP64x64) { + self = fp64x64::core::sub(self, other); + } +} + +impl FP64x64Mul of Mul { + fn mul(lhs: FP64x64, rhs: FP64x64) -> FP64x64 { + return fp64x64::core::mul(lhs, rhs); + } +} + +impl FP64x64MulEq of MulEq { + #[inline(always)] + fn mul_eq(ref self: FP64x64, other: FP64x64) { + self = fp64x64::core::mul(self, other); + } +} + +impl FP64x64Div of Div { + fn div(lhs: FP64x64, rhs: FP64x64) -> FP64x64 { + return fp64x64::core::div(lhs, rhs); + } +} + +impl FP64x64DivEq of DivEq { + #[inline(always)] + fn div_eq(ref self: FP64x64, other: FP64x64) { + self = fp64x64::core::div(self, other); + } +} + +impl FP64x64PartialOrd of PartialOrd { + #[inline(always)] + fn ge(lhs: FP64x64, rhs: FP64x64) -> bool { + return fp64x64::core::ge(lhs, rhs); + } + + #[inline(always)] + fn gt(lhs: FP64x64, rhs: FP64x64) -> bool { + return fp64x64::core::gt(lhs, rhs); + } + + #[inline(always)] + fn le(lhs: FP64x64, rhs: FP64x64) -> bool { + return fp64x64::core::le(lhs, rhs); + } + + #[inline(always)] + fn lt(lhs: FP64x64, rhs: FP64x64) -> bool { + return fp64x64::core::lt(lhs, rhs); + } +} + +impl FP64x64Neg of Neg { + #[inline(always)] + fn neg(a: FP64x64) -> FP64x64 { + return fp64x64::core::neg(a); + } +} + +impl FP64x64Rem of Rem { + #[inline(always)] + fn rem(lhs: FP64x64, rhs: FP64x64) -> FP64x64 { + return fp64x64::core::rem(lhs, rhs); + } +} + +fn eq(a: @FP64x64, b: @FP64x64) -> bool { + return (*a.mag == *b.mag) && (*a.sign == *b.sign); +} + +/// INTERNAL + +fn _i8_try_from_fp(x: FP64x64) -> Option { + let unscaled_mag: Option = (x.mag / ONE).try_into(); + + match unscaled_mag { + Option::Some(val) => Option::Some(i8 { mag: unscaled_mag.unwrap(), sign: x.sign }), + Option::None(_) => Option::None(()) + } +} From 1b500aaa54d161e203e8d29f22d34362a5ba2898 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sat, 2 Sep 2023 11:01:10 +0300 Subject: [PATCH 106/179] remove F generic --- src/lib.cairo | 2 +- src/operators.cairo | 2 +- src/operators/tensor.cairo | 100 ++++++++++++++++---------------- src/operators/tensor/core.cairo | 56 +++++++++--------- 4 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/lib.cairo b/src/lib.cairo index 7cc13d360..599a350a8 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,5 +1,5 @@ mod operators; mod numbers; -mod tests; +// mod tests; mod utils; diff --git a/src/operators.cairo b/src/operators.cairo index 989bc1209..d1bf082ac 100644 --- a/src/operators.cairo +++ b/src/operators.cairo @@ -1,3 +1,3 @@ mod tensor; -mod nn; +// mod nn; diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 2ac87e32b..7b5ea03ec 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -1,52 +1,52 @@ mod core; mod helpers; -mod math; -mod linalg; -mod quantization; -mod implementations; - -use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; - -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, - FP8x23TensorPartialEq, -}; - -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, - FP16x16TensorPartialEq, -}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, i8TensorAdd as i8FP8x23TensorAdd, i8TensorSub as i8FP8x23Sub, - i8TensorMul as i8FP8x23Mul, i8TensorDiv as i8FP8x23Div, - TensorI8IntoTensorI32 as TensorI8FP8x23IntoTensorI32, - TensorI8IntoTensorFP8x23 as TensorI8FP8x23IntoTensorFP8x23, -}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorAdd as i8FP16x16TensorAdd, i8TensorSub as i8FP16x16Sub, - i8TensorMul as i8FP16x16Mul, i8TensorDiv as i8FP16x16Div, - TensorI8IntoTensorI32 as TensorI8FP16x16IntoTensorI32, - TensorI8IntoTensorFP16x16 as TensorI8FP16x16IntoTensorFP16x16, -}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ - Tensor_i32_fp8x23, i32TensorAdd as i32FP8x23TensorAdd, i32TensorSub as i32FP8x23Sub, - i32TensorMul as i32FP8x23Mul, i32TensorDiv as i32FP8x23Div, -}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorAdd as i32FP16x16TensorAdd, i32TensorSub as i32FP16x16Sub, - i32TensorMul as i32FP16x16Mul, i32TensorDiv as i32FP16x16Div, -}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{ - Tensor_u32_fp8x23, u32TensorAdd as u32FP8x23TensorAdd, u32TensorSub as u32FP8x23Sub, - u32TensorMul as u32FP8x23Mul, u32TensorDiv as u32FP8x23Div, -}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_u32_fp16x16, u32TensorAdd as u32FP16x16TensorAdd, u32TensorSub as u32FP16x16Sub, - u32TensorMul as u32FP16x16Mul, u32TensorDiv as u32FP16x16Div, -}; +// mod math; +// mod linalg; +// mod quantization; +// mod implementations; + +// use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; + +// use orion::operators::tensor::implementations::tensor_fp8x23::{ +// Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, +// FP8x23TensorPartialEq, +// }; + +// use orion::operators::tensor::implementations::tensor_fp16x16::{ +// Tensor_fp16x16, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, +// FP16x16TensorPartialEq, +// }; + +// use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ +// Tensor_i8_fp8x23, i8TensorAdd as i8FP8x23TensorAdd, i8TensorSub as i8FP8x23Sub, +// i8TensorMul as i8FP8x23Mul, i8TensorDiv as i8FP8x23Div, +// TensorI8IntoTensorI32 as TensorI8FP8x23IntoTensorI32, +// TensorI8IntoTensorFP8x23 as TensorI8FP8x23IntoTensorFP8x23, +// }; + +// use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ +// Tensor_i8_fp16x16, i8TensorAdd as i8FP16x16TensorAdd, i8TensorSub as i8FP16x16Sub, +// i8TensorMul as i8FP16x16Mul, i8TensorDiv as i8FP16x16Div, +// TensorI8IntoTensorI32 as TensorI8FP16x16IntoTensorI32, +// TensorI8IntoTensorFP16x16 as TensorI8FP16x16IntoTensorFP16x16, +// }; + +// use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ +// Tensor_i32_fp8x23, i32TensorAdd as i32FP8x23TensorAdd, i32TensorSub as i32FP8x23Sub, +// i32TensorMul as i32FP8x23Mul, i32TensorDiv as i32FP8x23Div, +// }; + +// use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ +// Tensor_i32_fp16x16, i32TensorAdd as i32FP16x16TensorAdd, i32TensorSub as i32FP16x16Sub, +// i32TensorMul as i32FP16x16Mul, i32TensorDiv as i32FP16x16Div, +// }; + +// use orion::operators::tensor::implementations::tensor_u32_fp8x23::{ +// Tensor_u32_fp8x23, u32TensorAdd as u32FP8x23TensorAdd, u32TensorSub as u32FP8x23Sub, +// u32TensorMul as u32FP8x23Mul, u32TensorDiv as u32FP8x23Div, +// }; + +// use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ +// Tensor_u32_fp16x16, u32TensorAdd as u32FP16x16TensorAdd, u32TensorSub as u32FP16x16Sub, +// u32TensorMul as u32FP16x16Mul, u32TensorDiv as u32FP16x16Div, +// }; diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 2c9e2d696..934b4c753 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -69,7 +69,7 @@ impl TensorSerde, impl TDrop: Drop> of Serde { +trait TensorTrait { /// # tensor.new /// /// ```rust @@ -740,7 +740,7 @@ trait TensorTrait { /// # tensor.exp /// /// ```rust - /// fn exp(self: @Tensor) -> Tensor; + /// fn exp(self: @Tensor) -> Tensor; /// ``` /// /// Computes the exponential of all elements of the input tensor. @@ -754,7 +754,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the exponential of the elements of the input tensor. + /// Returns a new tensor in `T` with the exponential of the elements of the input tensor. /// /// ## Examples /// @@ -777,11 +777,11 @@ trait TensorTrait { /// // [[1, 2.718281],[7.38905, 20.085536]] /// ``` /// - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; /// # tensor.log /// /// ```rust - /// fn log(self: @Tensor) -> Tensor; + /// fn log(self: @Tensor) -> Tensor; /// ``` /// /// Computes the natural log of all elements of the input tensor. @@ -795,7 +795,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the natural log of the elements of the input tensor. + /// Returns a new tensor in `T` with the natural log of the elements of the input tensor. /// /// ## Examples /// @@ -818,7 +818,7 @@ trait TensorTrait { /// /// [[0, 0.693147, 1.098612, 4.605170]] /// ``` /// - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; /// #tensor.equal /// /// ```rust @@ -1292,7 +1292,7 @@ trait TensorTrait { /// // [0,0.8414...,0.9092...] /// ``` /// - fn sin(self: @Tensor) -> Tensor; + fn sin(self: @Tensor) -> Tensor; /// #tensor.cos /// /// ```rust @@ -1337,7 +1337,7 @@ trait TensorTrait { /// // [1, 0.5403...,-0.4161] /// ``` /// - fn cos(self: @Tensor) -> Tensor; + fn cos(self: @Tensor) -> Tensor; /// # tensor.cumsum /// /// ```rust @@ -1495,7 +1495,7 @@ trait TensorTrait { /// # tensor.sinh /// /// ```rust - /// fn sinh(self: @Tensor) -> Tensor; + /// fn sinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic sine of all elements of the input tensor. @@ -1509,7 +1509,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperbolic sine of the elements of the input tensor. /// /// ## Examples /// @@ -1538,11 +1538,11 @@ trait TensorTrait { /// // [[0, 1.175201],[3.62686, 10.0178749]] /// ``` /// - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; /// # tensor.tanh /// /// ```rust - /// fn tanh(self: @Tensor) -> Tensor; + /// fn tanh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic tangent of all elements of the input tensor. @@ -1556,7 +1556,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperbolic tangent of the elements of the input tensor. /// /// ## Examples /// @@ -1585,11 +1585,11 @@ trait TensorTrait { /// // [[0, 0.761594],[0.96403, 0.9951]] /// ``` /// - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; /// # tensor.cosh /// /// ```rust - /// fn cosh(self: @Tensor) -> Tensor; + /// fn cosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic cosine of all elements of the input tensor. @@ -1603,7 +1603,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. /// /// ## Examples /// @@ -1632,11 +1632,11 @@ trait TensorTrait { /// // [[, 1.54308],[3.762196, 10.067662]] /// ``` /// - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; /// # tensor.asinh /// /// ```rust - /// fn asinh(self: @Tensor) -> Tensor; + /// fn asinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -1650,7 +1650,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic sine of the elements of the input tensor. /// /// ## Examples /// @@ -1679,11 +1679,11 @@ trait TensorTrait { /// // [[0, 0.8814],[1.44364, 1.8185]] /// ``` /// - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; /// # tensor.acosh /// /// ```rust - /// fn acosh(self: @Tensor) -> Tensor; + /// fn acosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -1697,7 +1697,7 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. /// /// ## Examples /// @@ -1726,7 +1726,7 @@ trait TensorTrait { /// // [[0, 1.31696],[1.76275, 2.06344]] /// ``` /// - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; /// #tensor.atan /// /// ```rust @@ -1771,7 +1771,7 @@ trait TensorTrait { /// // [0,0.7853...,1.1071...] /// ``` /// - fn atan(self: @Tensor) -> Tensor; + fn atan(self: @Tensor) -> Tensor; /// #tensor.asin /// /// ```rust @@ -1812,7 +1812,7 @@ trait TensorTrait { /// // [0, 1.5707...] /// ``` /// - fn asin(self: @Tensor) -> Tensor; + fn asin(self: @Tensor) -> Tensor; /// #tensor.or /// /// ```rust @@ -1991,7 +1991,7 @@ trait TensorTrait { /// // [1.5707..., 0] /// ``` /// - fn acos(self: @Tensor) -> Tensor; + fn acos(self: @Tensor) -> Tensor; /// # tensor.onehot /// /// ```rust @@ -2079,7 +2079,7 @@ trait TensorTrait { /// // [0,1,1.4142...] /// ``` /// - fn sqrt(self: @Tensor) -> Tensor; + fn sqrt(self: @Tensor) -> Tensor; /// # tensor.concat /// /// ```rust From 6f50f6551c6d5a4742735497a599c72a1f51c366 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sat, 2 Sep 2023 11:50:48 +0300 Subject: [PATCH 107/179] Update numbers.cairo --- src/numbers.cairo | 801 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 791 insertions(+), 10 deletions(-) diff --git a/src/numbers.cairo b/src/numbers.cairo index b7732951f..9cf412ed5 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -7,28 +7,43 @@ use orion::numbers::fixed_point::core::FixedTrait; // Common methods from Fixed Point and Signed Integers. trait NumberTrait { fn new(mag: MAG, sign: bool) -> T; - + fn new_unscaled(mag: MAG, sign: bool) -> T; + fn from_felt(val: felt252) -> T; + fn abs(self: T) -> T; + fn ceil(self: T) -> T; + fn exp(self: T) -> T; + fn exp2(self: T) -> T; + fn floor(self: T) -> T; + fn ln(self: T) -> T; + fn log2(self: T) -> T; + fn log10(self: T) -> T; + fn pow(self: T, b: T) -> T; + fn round(self: T) -> T; + fn sqrt(self: T) -> T; + fn acos(self: T) -> T; + fn asin(self: T) -> T; + fn atan(self: T) -> T; + fn cos(self: T) -> T; + fn sin(self: T) -> T; + fn tan(self: T) -> T; + fn acosh(self: T) -> T; + fn asinh(self: T) -> T; + fn atanh(self: T) -> T; + fn cosh(self: T) -> T; + fn sinh(self: T) -> T; + fn tanh(self: T) -> T; fn zero() -> T; fn is_zero(self: T) -> bool; - fn one() -> T; fn is_one(self: T) -> bool; - fn neg_one() -> T; - - fn abs(self: T) -> T; - fn min_value() -> T; fn max_value() -> T; - fn min(self: T, other: T) -> T; fn max(self: T, other: T) -> T; - fn mag(self: T) -> MAG; fn is_neg(self: T) -> bool; - fn xor(lhs: T, rhs: T) -> bool; - fn or(lhs: T, rhs: T) -> bool; } @@ -41,6 +56,102 @@ impl FP8x23Number of NumberTrait { FP8x23Impl::new(mag, sign) } + fn new_unscaled(mag: u32, sign: bool) -> FP8x23 { + FP8x23Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP8x23 { + FP8x23Impl::from_felt(val) + } + + fn ceil(self: FP8x23) -> FP8x23 { + FP8x23Impl::ceil(self) + } + + fn exp(self: FP8x23) -> FP8x23 { + FP8x23Impl::exp(self) + } + + fn exp2(self: FP8x23) -> FP8x23 { + FP8x23Impl::exp2(self) + } + + fn floor(self: FP8x23) -> FP8x23 { + FP8x23Impl::floor(self) + } + + fn ln(self: FP8x23) -> FP8x23 { + FP8x23Impl::ln(self) + } + + fn log2(self: FP8x23) -> FP8x23 { + FP8x23Impl::log2(self) + } + + fn log10(self: FP8x23) -> FP8x23 { + FP8x23Impl::log10(self) + } + + fn pow(self: FP8x23, b: FP8x23) -> FP8x23 { + FP8x23Impl::pow(self, b) + } + + fn round(self: FP8x23) -> FP8x23 { + FP8x23Impl::round(self) + } + + fn sqrt(self: FP8x23) -> FP8x23 { + FP8x23Impl::sqrt(self) + } + + fn acos(self: FP8x23) -> FP8x23 { + FP8x23Impl::acos(self) + } + + fn asin(self: FP8x23) -> FP8x23 { + FP8x23Impl::asin(self) + } + + fn atan(self: FP8x23) -> FP8x23 { + FP8x23Impl::atan(self) + } + + fn cos(self: FP8x23) -> FP8x23 { + FP8x23Impl::cos(self) + } + + fn sin(self: FP8x23) -> FP8x23 { + FP8x23Impl::sin(self) + } + + fn tan(self: FP8x23) -> FP8x23 { + FP8x23Impl::tan(self) + } + + fn acosh(self: FP8x23) -> FP8x23 { + FP8x23Impl::acosh(self) + } + + fn asinh(self: FP8x23) -> FP8x23 { + FP8x23Impl::asinh(self) + } + + fn atanh(self: FP8x23) -> FP8x23 { + FP8x23Impl::atanh(self) + } + + fn cosh(self: FP8x23) -> FP8x23 { + FP8x23Impl::cosh(self) + } + + fn sinh(self: FP8x23) -> FP8x23 { + FP8x23Impl::sinh(self) + } + + fn tanh(self: FP8x23) -> FP8x23 { + FP8x23Impl::tanh(self) + } + fn zero() -> FP8x23 { FP8x23Impl::ZERO() } @@ -106,6 +217,102 @@ impl FP16x16Number of NumberTrait { FP16x16Impl::new(mag, sign) } + fn new_unscaled(mag: u32, sign: bool) -> FP16x16 { + FP16x16Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP16x16 { + FP16x16Impl::from_felt(val) + } + + fn ceil(self: FP16x16) -> FP16x16 { + FP16x16Impl::ceil(self) + } + + fn exp(self: FP16x16) -> FP16x16 { + FP16x16Impl::exp(self) + } + + fn exp2(self: FP16x16) -> FP16x16 { + FP16x16Impl::exp2(self) + } + + fn floor(self: FP16x16) -> FP16x16 { + FP16x16Impl::floor(self) + } + + fn ln(self: FP16x16) -> FP16x16 { + FP16x16Impl::ln(self) + } + + fn log2(self: FP16x16) -> FP16x16 { + FP16x16Impl::log2(self) + } + + fn log10(self: FP16x16) -> FP16x16 { + FP16x16Impl::log10(self) + } + + fn pow(self: FP16x16, b: FP16x16) -> FP16x16 { + FP16x16Impl::pow(self, b) + } + + fn round(self: FP16x16) -> FP16x16 { + FP16x16Impl::round(self) + } + + fn sqrt(self: FP16x16) -> FP16x16 { + FP16x16Impl::sqrt(self) + } + + fn acos(self: FP16x16) -> FP16x16 { + FP16x16Impl::acos(self) + } + + fn asin(self: FP16x16) -> FP16x16 { + FP16x16Impl::asin(self) + } + + fn atan(self: FP16x16) -> FP16x16 { + FP16x16Impl::atan(self) + } + + fn cos(self: FP16x16) -> FP16x16 { + FP16x16Impl::cos(self) + } + + fn sin(self: FP16x16) -> FP16x16 { + FP16x16Impl::sin(self) + } + + fn tan(self: FP16x16) -> FP16x16 { + FP16x16Impl::tan(self) + } + + fn acosh(self: FP16x16) -> FP16x16 { + FP16x16Impl::acosh(self) + } + + fn asinh(self: FP16x16) -> FP16x16 { + FP16x16Impl::asinh(self) + } + + fn atanh(self: FP16x16) -> FP16x16 { + FP16x16Impl::atanh(self) + } + + fn cosh(self: FP16x16) -> FP16x16 { + FP16x16Impl::cosh(self) + } + + fn sinh(self: FP16x16) -> FP16x16 { + FP16x16Impl::sinh(self) + } + + fn tanh(self: FP16x16) -> FP16x16 { + FP16x16Impl::tanh(self) + } + fn zero() -> FP16x16 { FP16x16Impl::ZERO() } @@ -170,6 +377,102 @@ impl I8Number of NumberTrait { i8 { mag: mag, sign: false } } + fn new_unscaled(mag: u8, sign: bool) -> i8 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> i8 { + panic(array!['not supported!']) + } + + fn ceil(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn exp(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn exp2(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn floor(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn ln(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn log2(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn log10(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn pow(self: i8, b: i8) -> i8 { + panic(array!['not supported!']) + } + + fn round(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sqrt(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn acos(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn asin(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn atan(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn cos(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sin(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn tan(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn acosh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn asinh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn atanh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn cosh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sinh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn tanh(self: i8) -> i8 { + panic(array!['not supported!']) + } + fn zero() -> i8 { i8 { mag: 0, sign: false } } @@ -242,6 +545,102 @@ impl i16Number of NumberTrait { i16 { mag: mag, sign: false } } + fn new_unscaled(mag: u16, sign: bool) -> i16 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> i16 { + panic(array!['not supported!']) + } + + fn ceil(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn exp(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn exp2(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn floor(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn ln(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn log2(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn log10(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn pow(self: i16, b: i16) -> i16 { + panic(array!['not supported!']) + } + + fn round(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sqrt(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn acos(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn asin(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn atan(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn cos(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sin(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn tan(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn acosh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn asinh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn atanh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn cosh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sinh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn tanh(self: i16) -> i16 { + panic(array!['not supported!']) + } + fn zero() -> i16 { i16 { mag: 0, sign: false } } @@ -314,6 +713,101 @@ impl i32Number of NumberTrait { i32 { mag: mag, sign: false } } + fn new_unscaled(mag: u32, sign: bool) -> i32 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> i32 { + panic(array!['not supported!']) + } + + fn ceil(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn exp(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn exp2(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn floor(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn ln(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn log2(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn log10(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn pow(self: i32, b: i32) -> i32 { + panic(array!['not supported!']) + } + + fn round(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn sqrt(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn acos(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn asin(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn atan(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn cos(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn sin(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn tan(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn acosh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn asinh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn atanh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn cosh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn sinh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn tanh(self: i32) -> i32 { + panic(array!['not supported!']) + } fn zero() -> i32 { i32 { mag: 0, sign: false } @@ -387,6 +881,101 @@ impl i64Number of NumberTrait { i64 { mag: mag, sign: false } } + fn new_unscaled(mag: u64, sign: bool) -> i64 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> i64 { + panic(array!['not supported!']) + } + + fn ceil(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn exp(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn exp2(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn floor(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn ln(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn log2(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn log10(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn pow(self: i64, b: i64) -> i64 { + panic(array!['not supported!']) + } + + fn round(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sqrt(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn acos(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn asin(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn atan(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn cos(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sin(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn tan(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn acosh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn asinh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn atanh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn cosh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sinh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn tanh(self: i64) -> i64 { + panic(array!['not supported!']) + } fn zero() -> i64 { i64 { mag: 0, sign: false } @@ -460,6 +1049,102 @@ impl i128Number of NumberTrait { i128 { mag: mag, sign: false } } + fn new_unscaled(mag: u128, sign: bool) -> i128 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> i128 { + panic(array!['not supported!']) + } + + fn ceil(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn exp(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn exp2(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn floor(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn ln(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn log2(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn log10(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn pow(self: i128, b: i128) -> i128 { + panic(array!['not supported!']) + } + + fn round(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sqrt(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn acos(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn asin(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn atan(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn cos(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sin(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn tan(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn acosh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn asinh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn atanh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn cosh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sinh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn tanh(self: i128) -> i128 { + panic(array!['not supported!']) + } + fn zero() -> i128 { i128 { mag: 0, sign: false } @@ -530,6 +1215,102 @@ impl u32Number of NumberTrait { mag } + fn new_unscaled(mag: u32, sign: bool) -> u32 { + panic(array!['not supported!']) + } + + fn from_felt(val: felt252) -> u32 { + panic(array!['not supported!']) + } + + fn ceil(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn exp(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn exp2(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn floor(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn ln(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn log2(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn log10(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn pow(self: u32, b: u32) -> u32 { + panic(array!['not supported!']) + } + + fn round(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sqrt(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn acos(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn asin(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn atan(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn cos(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sin(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn tan(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn acosh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn asinh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn atanh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn cosh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sinh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn tanh(self: u32) -> u32 { + panic(array!['not supported!']) + } + fn zero() -> u32 { 0 From 96ba095acb095dd0ae542b520cda12d0eeb0b285 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 07:34:09 +0300 Subject: [PATCH 108/179] Update functions --- src/operators/tensor.cairo | 6 +- src/operators/tensor/linalg/matmul.cairo | 6 +- src/operators/tensor/linalg/transpose.cairo | 2 +- src/operators/tensor/math/abs.cairo | 3 +- src/operators/tensor/math/acos.cairo | 16 +- src/operators/tensor/math/acosh.cairo | 52 +---- src/operators/tensor/math/argmax.cairo | 16 +- src/operators/tensor/math/argmin.cairo | 10 +- src/operators/tensor/math/arithmetic.cairo | 56 ++---- src/operators/tensor/math/asin.cairo | 14 +- src/operators/tensor/math/asinh.cairo | 53 +---- src/operators/tensor/math/atan.cairo | 51 +---- src/operators/tensor/math/ceil.cairo | 16 +- src/operators/tensor/math/concat.cairo | 2 +- src/operators/tensor/math/cos.cairo | 52 +---- src/operators/tensor/math/cosh.cairo | 52 +---- src/operators/tensor/math/cumsum.cairo | 13 +- src/operators/tensor/math/equal.cairo | 3 +- src/operators/tensor/math/exp.cairo | 53 +---- src/operators/tensor/math/flatten.cairo | 2 +- src/operators/tensor/math/greater.cairo | 3 +- src/operators/tensor/math/greater_equal.cairo | 3 +- src/operators/tensor/math/less.cairo | 3 +- src/operators/tensor/math/less_equal.cairo | 3 +- src/operators/tensor/math/log.cairo | 54 +----- src/operators/tensor/math/onehot.cairo | 181 +++--------------- src/operators/tensor/math/or.cairo | 3 +- src/operators/tensor/math/reduce_sum.cairo | 3 +- src/operators/tensor/math/sin.cairo | 53 +---- src/operators/tensor/math/sinh.cairo | 53 +---- src/operators/tensor/math/sqrt.cairo | 52 +---- src/operators/tensor/math/tanh.cairo | 52 +---- src/operators/tensor/math/xor.cairo | 3 +- .../quantization/dequantize_linear.cairo | 9 +- .../tensor/quantization/quantize_linear.cairo | 13 +- 35 files changed, 189 insertions(+), 777 deletions(-) diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 7b5ea03ec..eec33e384 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -1,8 +1,8 @@ mod core; mod helpers; -// mod math; -// mod linalg; -// mod quantization; +mod math; +mod linalg; +mod quantization; // mod implementations; // use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; diff --git a/src/operators/tensor/linalg/matmul.cairo b/src/operators/tensor/linalg/matmul.cairo index 3259ce1a8..ca72ba74a 100644 --- a/src/operators/tensor/linalg/matmul.cairo +++ b/src/operators/tensor/linalg/matmul.cairo @@ -8,9 +8,8 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::matmul docstring fn matmul< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TMul: Mul, impl TAddEq: AddEq, @@ -105,9 +104,8 @@ fn dot_product< /// * Returns the restulting i32 tensor. fn matrix_multiply< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TMul: Mul, impl TAddEq: AddEq, diff --git a/src/operators/tensor/linalg/transpose.cairo b/src/operators/tensor/linalg/transpose.cairo index 52cb22ea6..dc972e9a3 100644 --- a/src/operators/tensor/linalg/transpose.cairo +++ b/src/operators/tensor/linalg/transpose.cairo @@ -8,7 +8,7 @@ use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_o use orion::numbers::NumberTrait; /// Cf: TensorTrait::transpose docstring -fn transpose, impl TCopy: Copy, impl TDrop: Drop>( +fn transpose, impl TCopy: Copy, impl TDrop: Drop>( self: @Tensor, axes: Span ) -> Tensor { assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); diff --git a/src/operators/tensor/math/abs.cairo b/src/operators/tensor/math/abs.cairo index 1e47109db..56662aa6c 100644 --- a/src/operators/tensor/math/abs.cairo +++ b/src/operators/tensor/math/abs.cairo @@ -8,9 +8,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::abs docstring fn abs< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumberTrait: NumberTrait, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/acos.cairo b/src/operators/tensor/math/acos.cairo index 0bedc919c..b394620cd 100644 --- a/src/operators/tensor/math/acos.cairo +++ b/src/operators/tensor/math/acos.cairo @@ -7,15 +7,15 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::acos docstring fn acos< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { match self.data.pop_front() { @@ -28,6 +28,6 @@ fn acos< }; }; - return TensorTrait::::new(self.shape, result.span()); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/acosh.cairo b/src/operators/tensor/math/acosh.cairo index 030a50222..ed253063e 100644 --- a/src/operators/tensor/math/acosh.cairo +++ b/src/operators/tensor/math/acosh.cairo @@ -8,54 +8,16 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::acosh docstring -fn acosh_from_int< +fn acosh< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .acosh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::acosh docstring -fn acosh_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/argmax.cairo b/src/operators/tensor/math/argmax.cairo index 5a76b9802..d270e0c4c 100644 --- a/src/operators/tensor/math/argmax.cairo +++ b/src/operators/tensor/math/argmax.cairo @@ -10,9 +10,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::argmax docstring fn argmax< T, - F, MAG, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, @@ -34,7 +33,7 @@ fn argmax< assert(axis <= (*self.shape).len(), 'axis out of dimensions'); if (*self.shape).len() == 1 { - return find_argmax_1D::(*self, axis, true, select_last_index); + return find_argmax_1D::(*self, axis, true, select_last_index); } let mut output_data = ArrayTrait::new(); @@ -77,8 +76,7 @@ fn argmax< /// * A usize value representing the index of the maximum value along the specified axis. fn find_argmax_1D< T, - F, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, @@ -91,8 +89,7 @@ fn find_argmax_1D< let mut max = match input.data.pop_front() { Option::Some(item) => *item, Option::None(_) => { - return TensorTrait::::new( + return TensorTrait::::new( reduce_output_shape(input.shape, axis, keepdims), output_data.span() ); } @@ -122,8 +119,9 @@ fn find_argmax_1D< output_data.append(max_index); - return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span() + ); } diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index fd9c26fff..63fbc5b89 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -12,7 +12,7 @@ fn argmin< T, F, MAG, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, @@ -78,8 +78,7 @@ fn argmin< /// * A usize value representing the index of the minimum value along the specified axis. fn find_argmin_1D< T, - F, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, @@ -92,8 +91,9 @@ fn find_argmin_1D< let mut min = match input.data.pop_front() { Option::Some(item) => *item, Option::None(_) => { - return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span() + ); } }; let mut min_index = 0; diff --git a/src/operators/tensor/math/arithmetic.cairo b/src/operators/tensor/math/arithmetic.cairo index cc7592d4e..075f565b8 100644 --- a/src/operators/tensor/math/arithmetic.cairo +++ b/src/operators/tensor/math/arithmetic.cairo @@ -10,12 +10,7 @@ use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, use orion::utils::saturate; fn add< - T, - F, - impl TTensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -44,10 +39,9 @@ fn add< fn saturated_add< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -86,16 +80,11 @@ fn saturated_add< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn sub< - T, - F, - impl TTensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TSub: Sub, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -124,10 +113,9 @@ fn sub< fn saturated_sub< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TSub: Sub, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -166,16 +154,11 @@ fn saturated_sub< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn mul< - T, - F, - impl TTensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TMul: Mul, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -204,10 +187,9 @@ fn mul< fn saturated_mul< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TMul: Mul, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -246,16 +228,11 @@ fn saturated_mul< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn div< - T, - F, - impl TTensor: TensorTrait, - impl TMul: Div, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TMul: Div, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -284,10 +261,9 @@ fn div< fn saturated_div< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TDiv: Div, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -326,5 +302,5 @@ fn saturated_div< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/asin.cairo b/src/operators/tensor/math/asin.cairo index 3e2b8ec95..712c34575 100644 --- a/src/operators/tensor/math/asin.cairo +++ b/src/operators/tensor/math/asin.cairo @@ -7,15 +7,15 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::asin docstring fn asin< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/asinh.cairo b/src/operators/tensor/math/asinh.cairo index 182086281..4fe92bc16 100644 --- a/src/operators/tensor/math/asinh.cairo +++ b/src/operators/tensor/math/asinh.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::asinh docstring -fn asinh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .asinh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::asinh docstring -fn asinh_from_fp< - F, +fn asinh< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/atan.cairo b/src/operators/tensor/math/atan.cairo index d93649fa3..5474aaf13 100644 --- a/src/operators/tensor/math/atan.cairo +++ b/src/operators/tensor/math/atan.cairo @@ -8,53 +8,16 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -fn atan_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .atan() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - fn atan_from_fp< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/ceil.cairo b/src/operators/tensor/math/ceil.cairo index ea61b2ba4..6b8e68d4b 100644 --- a/src/operators/tensor/math/ceil.cairo +++ b/src/operators/tensor/math/ceil.cairo @@ -7,16 +7,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::ceil docstring fn ceil< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop >( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo index 61d9867ff..7327153f9 100644 --- a/src/operators/tensor/math/concat.cairo +++ b/src/operators/tensor/math/concat.cairo @@ -8,7 +8,7 @@ use orion::operators::tensor::helpers::replace_index; use orion::operators::tensor::core::{TensorTrait, Tensor}; -fn concat, impl TCopy: Copy, impl TDrop: Drop,>( +fn concat, impl TCopy: Copy, impl TDrop: Drop,>( mut tensors: Span>, axis: usize ) -> Tensor { assert(tensors.len() >= 2, 'Input tensors must be > 1'); diff --git a/src/operators/tensor/math/cos.cairo b/src/operators/tensor/math/cos.cairo index 15a3cdb5d..e27ad5c1d 100644 --- a/src/operators/tensor/math/cos.cairo +++ b/src/operators/tensor/math/cos.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::cos docstring -fn cos_from_int< +fn cos< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .cos() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::cos docstring -fn cos_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/cosh.cairo b/src/operators/tensor/math/cosh.cairo index 4a1eef5a9..4cc505876 100644 --- a/src/operators/tensor/math/cosh.cairo +++ b/src/operators/tensor/math/cosh.cairo @@ -8,55 +8,17 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::cosh docstring -fn cosh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .cosh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - /// Cf: TensorTrait::cosh docstring fn cosh_from_fp< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/cumsum.cairo b/src/operators/tensor/math/cumsum.cairo index 062506305..97a755874 100644 --- a/src/operators/tensor/math/cumsum.cairo +++ b/src/operators/tensor/math/cumsum.cairo @@ -10,9 +10,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::cumsum docstring fn cumsum< T, - F, MAG, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TAdd: Add, @@ -28,17 +27,16 @@ fn cumsum< }; if reverse { - cumsum_reverse::(self, axis, exclusive, NumberTrait::zero()) + cumsum_reverse::(self, axis, exclusive, NumberTrait::zero()) } else { - cumsum_forward::(self, axis, exclusive, NumberTrait::zero()) + cumsum_forward::(self, axis, exclusive, NumberTrait::zero()) } } /// Cf: TensorTrait::cumsum docstring fn cumsum_forward< T, - F, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop, @@ -100,8 +98,7 @@ fn cumsum_forward< /// Cf: TensorTrait::cumsum docstring fn cumsum_reverse< T, - F, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TAddEq: AddEq, impl TSub: Sub, impl TCopy: Copy, diff --git a/src/operators/tensor/math/equal.cairo b/src/operators/tensor/math/equal.cairo index 3ad337372..bc98b866f 100644 --- a/src/operators/tensor/math/equal.cairo +++ b/src/operators/tensor/math/equal.cairo @@ -8,8 +8,7 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::equal docstring fn equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index b0f1b8fff..3ba1e97d7 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::exp docstring -fn exp_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .exp() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span()); -} /// Cf: TensorTrait::exp docstring -fn exp_from_fp< - F, +fn exp< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/flatten.cairo b/src/operators/tensor/math/flatten.cairo index bede9adc7..a15bb13ef 100644 --- a/src/operators/tensor/math/flatten.cairo +++ b/src/operators/tensor/math/flatten.cairo @@ -5,7 +5,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::flatten docstring -fn flatten>(self: @Tensor, axis: usize) -> Tensor { +fn flatten>(self: @Tensor, axis: usize) -> Tensor { let current_shape = *self.shape; assert(axis < current_shape.len(), 'axis out of dimensions'); diff --git a/src/operators/tensor/math/greater.cairo b/src/operators/tensor/math/greater.cairo index bf2e0096f..fb24e507d 100644 --- a/src/operators/tensor/math/greater.cairo +++ b/src/operators/tensor/math/greater.cairo @@ -8,8 +8,7 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::greater docstring fn greater< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/greater_equal.cairo b/src/operators/tensor/math/greater_equal.cairo index 2897a4dbb..c353336d8 100644 --- a/src/operators/tensor/math/greater_equal.cairo +++ b/src/operators/tensor/math/greater_equal.cairo @@ -8,8 +8,7 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::greater_equal docstring fn greater_equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/less.cairo b/src/operators/tensor/math/less.cairo index 423ed1152..e1e7cbc99 100644 --- a/src/operators/tensor/math/less.cairo +++ b/src/operators/tensor/math/less.cairo @@ -9,8 +9,7 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::less docstring fn less< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/less_equal.cairo b/src/operators/tensor/math/less_equal.cairo index 49d3354c2..2a97e9150 100644 --- a/src/operators/tensor/math/less_equal.cairo +++ b/src/operators/tensor/math/less_equal.cairo @@ -8,8 +8,7 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::less_equal docstring fn less_equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/log.cairo b/src/operators/tensor/math/log.cairo index 34c2258fe..1b9413e57 100644 --- a/src/operators/tensor/math/log.cairo +++ b/src/operators/tensor/math/log.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::log docstring -fn log_from_int< +fn log< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .ln() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::log docstring -fn log_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { @@ -70,5 +32,5 @@ fn log_from_fp< }; }; - return TensorTrait::::new(self.shape, result.span()); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index 7803efe1c..68f2018e5 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -12,18 +12,19 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{TensorTrait, Tensor}; + /// Cf: TensorTrait::onehot docstring -fn onehot_encode_from_int< +fn onehot_encode< T, - F, MAG, - impl TTensorTrait: TensorTrait, - impl TNumber: NumberTrait, - impl TTryInto: TryInto, - impl TPartialEq: PartialEq, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, >( self: @Tensor, depth: usize, axis: Option, values: Tensor ) -> Tensor { @@ -67,14 +68,15 @@ fn onehot_encode_from_int< let mut fixed_number = *(*self.data).at(outer_index); if fixed_number.is_neg() { - fixed_number = NumberTrait::new(depth.try_into().unwrap(), false) + fixed_number + fixed_number = FixedTrait::::new_unscaled(depth.try_into().unwrap(), false) + + fixed_number } loop { if inner_index == depth { break (); }; - let ind = NumberTrait::new(inner_index.try_into().unwrap(), false); + let ind = FixedTrait::::new_unscaled(inner_index.try_into().unwrap(), false); if fixed_number == ind { output_data.append(*values.data.at(1)); @@ -114,17 +116,17 @@ fn onehot_encode_from_int< return output_tensor; } -fn onehot_from_int< +fn onehot< T, - F, MAG, - impl TTensorTrait: TensorTrait, - impl TNumber: NumberTrait, - impl TInto: TryInto, - impl TPartialEq: PartialEq, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, >( self: @Tensor, depth: usize, axis: Option, mut values: Span, ) -> Tensor { @@ -137,142 +139,9 @@ fn onehot_from_int< let mut second = *values.pop_front().unwrap(); let mut data = ArrayTrait::new(); - data.append(NumberTrait::new(first.try_into().unwrap(), false)); - data.append(NumberTrait::new(second.try_into().unwrap(), false)); - - let values = TensorTrait::new(sizes.span(), data.span()); - onehot_encode_from_int(self, depth, axis, values) -} - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode_from_fp< - F, - MAG, - impl FFixed: FixedTrait, - impl FTensorTrait: TensorTrait, - impl FNumber: NumberTrait, - impl U32TryIntoMAG: TryInto, - impl FPartialEq: PartialEq, - impl FAdd: Add, - impl FCopy: Copy, - impl FDrop: Drop, ->( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 999 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 999 - }; - - assert(((axis == 999) | (axis.into() <= rank)), 'axis out of dimensions'); - - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth.into()); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index = 0; - let mut fixed_number = *(*self.data).at(outer_index); - - if fixed_number.is_neg() { - fixed_number = FixedTrait::::new_unscaled(depth.try_into().unwrap(), false) - + fixed_number - } - - loop { - if inner_index == depth { - break (); - }; - let ind = FixedTrait::::new_unscaled(inner_index.try_into().unwrap(), false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span()); - let mut tranpose_axes = ArrayTrait::new(); - // Get New shape is axis is not last dimension - if (axis != 999) & (axis.into() != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index.into() == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim.into()) - } - tranpose_axes.append(index.into()); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - -fn onehot_from_fp< - F, - MAG, - impl FFixed: FixedTrait, - impl FTensorTrait: TensorTrait, - impl FNumber: NumberTrait, - impl U32TryIntoMAG: TryInto, - impl FPartialEq: PartialEq, - impl FAdd: Add, - impl FCopy: Copy, - impl FDrop: Drop, ->( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); - data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); + data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); + data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); let values = TensorTrait::new(sizes.span(), data.span()); - onehot_encode_from_fp(self, depth, axis, values) + onehot_encode(self, depth, axis, values) } diff --git a/src/operators/tensor/math/or.cairo b/src/operators/tensor/math/or.cairo index 1cb4bdf8d..6cff9e8a9 100644 --- a/src/operators/tensor/math/or.cairo +++ b/src/operators/tensor/math/or.cairo @@ -9,10 +9,9 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::or docstring fn or< T, - F, MAG, impl TNumber: NumberTrait, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TCopy: Copy, impl TDrop: Drop >( diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index ee4e9af9a..fb27c9c26 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -10,9 +10,8 @@ use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, com /// Cf: TensorTrait::reduce_sum docstring fn reduce_sum< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TCopy: Copy, diff --git a/src/operators/tensor/math/sin.cairo b/src/operators/tensor/math/sin.cairo index 4f28285fd..fb8212a77 100644 --- a/src/operators/tensor/math/sin.cairo +++ b/src/operators/tensor/math/sin.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::sin docstring -fn sin_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sin() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::sin docstring -fn sin_from_fp< - F, +fn sin< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/sinh.cairo b/src/operators/tensor/math/sinh.cairo index 719dd2a29..f728bf966 100644 --- a/src/operators/tensor/math/sinh.cairo +++ b/src/operators/tensor/math/sinh.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::sinh docstring -fn sinh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sinh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::sinh docstring -fn sinh_from_fp< - F, +fn sinh< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/sqrt.cairo b/src/operators/tensor/math/sqrt.cairo index b67bab792..39cae98a4 100644 --- a/src/operators/tensor/math/sqrt.cairo +++ b/src/operators/tensor/math/sqrt.cairo @@ -7,53 +7,17 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -fn sqrt_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sqrt() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -fn sqrt_from_fp< - F, +fn sqrt< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/tanh.cairo b/src/operators/tensor/math/tanh.cairo index 36fb7f385..a0ac967ef 100644 --- a/src/operators/tensor/math/tanh.cairo +++ b/src/operators/tensor/math/tanh.cairo @@ -8,55 +8,17 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::tanh docstring -fn tanh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .tanh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - /// Cf: TensorTrait::tanh docstring fn tanh_from_fp< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/xor.cairo b/src/operators/tensor/math/xor.cairo index 3c7b5999b..4d7bb9a1d 100644 --- a/src/operators/tensor/math/xor.cairo +++ b/src/operators/tensor/math/xor.cairo @@ -9,10 +9,9 @@ use orion::operators::tensor::helpers::check_compatibility; /// Cf: TensorTrait::xor docstring fn xor< T, - F, MAG, impl TNumber: NumberTrait, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TCopy: Copy, impl TDrop: Drop >( diff --git a/src/operators/tensor/quantization/dequantize_linear.cairo b/src/operators/tensor/quantization/dequantize_linear.cairo index dc558ae6d..1ca4bf8d5 100644 --- a/src/operators/tensor/quantization/dequantize_linear.cairo +++ b/src/operators/tensor/quantization/dequantize_linear.cairo @@ -11,8 +11,7 @@ use orion::utils::saturate; fn dequantize_linear< Q, T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl QIntoT: Into, impl TSub: Sub, impl TMul: Mul, @@ -38,8 +37,7 @@ fn dequantize_linear< fn dequantize_per_axis< T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TTensorSub: Sub>, impl TTensorMul: Mul>, impl TCopy: Copy, @@ -55,8 +53,7 @@ fn dequantize_per_axis< fn dequantize_element_wise< Q, T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl QIntoT: Into, impl TSub: Sub, impl TMul: Mul, diff --git a/src/operators/tensor/quantization/quantize_linear.cairo b/src/operators/tensor/quantization/quantize_linear.cairo index a91b405db..4c68edfe4 100644 --- a/src/operators/tensor/quantization/quantize_linear.cairo +++ b/src/operators/tensor/quantization/quantize_linear.cairo @@ -12,10 +12,9 @@ use orion::utils::saturate; /// Cf: TensorTrait::quantize_linear docstring fn quantize_linear< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TDiv: Div, impl TTensorDiv: Div>, @@ -40,10 +39,9 @@ fn quantize_linear< fn quantize_per_axis< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TTensorDiv: Div>, impl TPartialOrd: PartialOrd, @@ -59,7 +57,6 @@ fn quantize_per_axis< fn quantize_element_wise< T, - F, Q, impl TCopy: Copy, impl TDrop: Drop, @@ -69,7 +66,7 @@ fn quantize_element_wise< impl TDiv: Div, impl TAdd: Add, impl TTryIntoQ: TryInto, - impl QTensor: TensorTrait + impl QTensor: TensorTrait >( mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T ) -> Tensor:: { From ba54fe7de424f0ff704803d9e8b05a8039b596e8 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 09:30:40 +0300 Subject: [PATCH 109/179] add implementations --- src/numbers.cairo | 12 +- src/operators/tensor.cairo | 2 +- src/operators/tensor/implementations.cairo | 20 +- .../implementations/tensor_fp16x16.cairo | 136 +++++--- .../implementations/tensor_fp8x23.cairo | 132 +++++--- ...nsor_i32_fp8x23.cairo => tensor_i32.cairo} | 183 ++++++++--- .../implementations/tensor_i32_fp16x16.cairo | 281 ---------------- ...tensor_i8_fp8x23.cairo => tensor_i8.cairo} | 198 ++++++----- .../implementations/tensor_i8_fp16x16.cairo | 311 ------------------ ...sor_u32_fp16x16.cairo => tensor_u32.cairo} | 178 ++++++---- .../implementations/tensor_u32_fp8x23.cairo | 296 ----------------- src/operators/tensor/math/argmin.cairo | 1 - src/operators/tensor/math/atan.cairo | 2 +- src/operators/tensor/math/cosh.cairo | 2 +- src/operators/tensor/math/tanh.cairo | 2 +- 15 files changed, 538 insertions(+), 1218 deletions(-) rename src/operators/tensor/implementations/{tensor_i32_fp8x23.cairo => tensor_i32.cairo} (61%) delete mode 100644 src/operators/tensor/implementations/tensor_i32_fp16x16.cairo rename src/operators/tensor/implementations/{tensor_i8_fp8x23.cairo => tensor_i8.cairo} (61%) delete mode 100644 src/operators/tensor/implementations/tensor_i8_fp16x16.cairo rename src/operators/tensor/implementations/{tensor_u32_fp16x16.cairo => tensor_u32.cairo} (63%) delete mode 100644 src/operators/tensor/implementations/tensor_u32_fp8x23.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index 9cf412ed5..e091d4f3f 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -378,7 +378,7 @@ impl I8Number of NumberTrait { } fn new_unscaled(mag: u8, sign: bool) -> i8 { - panic(array!['not supported!']) + i8 { mag: mag, sign: false } } fn from_felt(val: felt252) -> i8 { @@ -546,7 +546,7 @@ impl i16Number of NumberTrait { } fn new_unscaled(mag: u16, sign: bool) -> i16 { - panic(array!['not supported!']) + i16 { mag: mag, sign: false } } fn from_felt(val: felt252) -> i16 { @@ -714,7 +714,7 @@ impl i32Number of NumberTrait { } fn new_unscaled(mag: u32, sign: bool) -> i32 { - panic(array!['not supported!']) + i32 { mag: mag, sign: false } } fn from_felt(val: felt252) -> i32 { @@ -882,7 +882,7 @@ impl i64Number of NumberTrait { } fn new_unscaled(mag: u64, sign: bool) -> i64 { - panic(array!['not supported!']) + i64 { mag: mag, sign: false } } fn from_felt(val: felt252) -> i64 { @@ -1050,7 +1050,7 @@ impl i128Number of NumberTrait { } fn new_unscaled(mag: u128, sign: bool) -> i128 { - panic(array!['not supported!']) + i128 { mag: mag, sign: false } } fn from_felt(val: felt252) -> i128 { @@ -1216,7 +1216,7 @@ impl u32Number of NumberTrait { } fn new_unscaled(mag: u32, sign: bool) -> u32 { - panic(array!['not supported!']) + mag } fn from_felt(val: felt252) -> u32 { diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index eec33e384..7a1512ebf 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -3,7 +3,7 @@ mod helpers; mod math; mod linalg; mod quantization; -// mod implementations; +mod implementations; // use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index ea84e8aba..6d0956e5f 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -1,9 +1,15 @@ -mod tensor_fp8x23; -mod tensor_i32_fp8x23; -mod tensor_u32_fp8x23; -mod tensor_i8_fp8x23; +// mod tensor_fp8x23; +// mod tensor_i32_fp8x23; +// mod tensor_u32_fp8x23; +// mod tensor_i8_fp8x23; + +// mod tensor_fp16x16; +// mod tensor_i32_fp16x16; +// mod tensor_u32_fp16x16; +// mod tensor_i8_fp16x16; +mod tensor_u32; +mod tensor_i8; +mod tensor_i32; +mod tensor_fp8x23; mod tensor_fp16x16; -mod tensor_i32_fp16x16; -mod tensor_u32_fp16x16; -mod tensor_i8_fp16x16; diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 0b2e43023..994fcd334 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -1,24 +1,17 @@ -//! This module defines and implement a Tensor for FP16x16 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, TensorI8IntoTensorFP16x16 -}; -use orion::numbers::i8; +use orion::numbers::{i8, NumberTrait, FP16x16}; +use orion::operators::tensor::implementations::{tensor_i8::I8TensorImpl, tensor_u32::U32TensorImpl}; -impl Tensor_fp16x16 of TensorTrait { +impl FP16x16TensorImpl of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -28,7 +21,7 @@ impl Tensor_fp16x16 of TensorTrait { } fn min(self: @Tensor) -> FP16x16 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> FP16x16 { @@ -58,13 +51,13 @@ impl Tensor_fp16x16 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,11 +69,11 @@ impl Tensor_fp16x16 of TensorTrait { } fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_fp::(*self) + math::exp::exp(*self) } fn log(self: @Tensor) -> Tensor { - math::log::log_from_fp::(*self) + math::log::log(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -112,11 +105,11 @@ impl Tensor_fp16x16 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sin::sin(*self) } fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_fp(*self) + math::cos::cos(*self) } fn asin(self: @Tensor) -> Tensor { @@ -134,27 +127,27 @@ impl Tensor_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_fp(*self) + math::sinh::sinh(*self) } fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_fp(*self) + math::tanh::tanh(*self) } fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_fp(*self) + math::cosh::cosh(*self) } fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_fp(*self) + math::acosh::acosh(*self) } fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_fp(*self) + math::asinh::asinh(*self) } fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_fp(*self) + math::atan::atan(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -164,6 +157,7 @@ impl Tensor_fp16x16 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } + fn acos(self: @Tensor) -> Tensor { math::acos::acos(*self) } @@ -171,11 +165,11 @@ impl Tensor_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_fp(self, depth, axis, values) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_fp(*self) + math::sqrt::sqrt(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -189,8 +183,8 @@ impl Tensor_fp16x16 of TensorTrait { self, y_scale, y_zero_point, - FixedTrait::new(8388608, true), - FixedTrait::new(8323072, false) + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -202,7 +196,13 @@ impl Tensor_fp16x16 of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl FP16x16TensorAdd of Add> { +impl FP16x16TensorAdd< + FP16x16, + impl FP16x16Tensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -217,7 +217,13 @@ impl FP16x16TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl FP16x16TensorSub of Sub> { +impl FP16x16TensorSub< + FP16x16, + impl FP16x16Tensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -232,7 +238,13 @@ impl FP16x16TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl FP16x16TensorMul of Mul> { +impl FP16x16TensorMul< + FP16x16, + impl FP16x16Tensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -247,7 +259,13 @@ impl FP16x16TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl FP16x16TensorDiv of Div> { +impl FP16x16TensorDiv< + FP16x16, + impl FP16x16Tensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -262,7 +280,13 @@ impl FP16x16TensorDiv of Div> { } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl FP16x16TensorPartialEq of PartialEq> { +impl FP16x16TensorPartialEq< + FP16x16, + impl FP16x16Tensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +> of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -278,24 +302,23 @@ impl U32TryIntoU32 of TryInto { } } -// Internals - -const PRECISION: u32 = 589; // 0.009 - -fn relative_eq(lhs: @FP16x16, rhs: @FP16x16) -> bool { - let diff = *lhs - *rhs; - - let rel_diff = if *lhs.mag != 0 { - (diff / *lhs).mag - } else { - diff.mag - }; - - rel_diff <= PRECISION +impl TensorI8IntoTensorFP16x16 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp16x16(@self) + } } -fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { +// Internals + +fn tensor_eq< + FP16x16, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +>( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { let mut is_eq = true; loop { @@ -315,8 +338,23 @@ fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { break; } - is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); }; return is_eq; } + +fn tensor_i8_to_tensor_fp16x16(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 8ff83d9e4..ee5ce92e1 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -1,24 +1,17 @@ -//! This module defines and implement a Tensor for FP8x23 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, TensorI8IntoTensorFP8x23 -}; -use orion::numbers::i8; +use orion::numbers::{i8, NumberTrait, FP8x23}; +use orion::operators::tensor::implementations::{tensor_i8::I8TensorImpl, tensor_u32::U32TensorImpl}; -impl Tensor_fp8x23 of TensorTrait { +impl FP8x23TensorImpl of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -28,7 +21,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> FP8x23 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> FP8x23 { @@ -58,13 +51,13 @@ impl Tensor_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,11 +69,11 @@ impl Tensor_fp8x23 of TensorTrait { } fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_fp::(*self) + math::exp::exp(*self) } fn log(self: @Tensor) -> Tensor { - math::log::log_from_fp::(*self) + math::log::log(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -112,11 +105,11 @@ impl Tensor_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sin::sin(*self) } fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_fp(*self) + math::cos::cos(*self) } fn asin(self: @Tensor) -> Tensor { @@ -134,27 +127,27 @@ impl Tensor_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_fp(*self) + math::sinh::sinh(*self) } fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_fp(*self) + math::tanh::tanh(*self) } fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_fp(*self) + math::cosh::cosh(*self) } fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_fp(*self) + math::acosh::acosh(*self) } fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_fp(*self) + math::asinh::asinh(*self) } fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_fp(*self) + math::atan::atan(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -164,6 +157,7 @@ impl Tensor_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } + fn acos(self: @Tensor) -> Tensor { math::acos::acos(*self) } @@ -171,11 +165,11 @@ impl Tensor_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_fp(self, depth, axis, values) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_fp(*self) + math::sqrt::sqrt(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -189,8 +183,8 @@ impl Tensor_fp8x23 of TensorTrait { self, y_scale, y_zero_point, - FixedTrait::new(1073741824, true), - FixedTrait::new(1065353216, false) + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -202,7 +196,13 @@ impl Tensor_fp8x23 of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl FP8x23TensorAdd of Add> { +impl FP8x23TensorAdd< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -217,7 +217,13 @@ impl FP8x23TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl FP8x23TensorSub of Sub> { +impl FP8x23TensorSub< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -232,7 +238,13 @@ impl FP8x23TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl FP8x23TensorMul of Mul> { +impl FP8x23TensorMul< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -247,7 +259,13 @@ impl FP8x23TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl FP8x23TensorDiv of Div> { +impl FP8x23TensorDiv< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -262,7 +280,13 @@ impl FP8x23TensorDiv of Div> { } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl FP8x23TensorPartialEq of PartialEq> { +impl FP8x23TensorPartialEq< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +> of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -278,23 +302,20 @@ impl U32TryIntoU32 of TryInto { } } -// Internals - -const PRECISION: u32 = 75497; // 0.009 - -fn relative_eq(lhs: @FP8x23, rhs: @FP8x23) -> bool { - let diff = *lhs - *rhs; +impl TensorI8IntoTensorFP8x23 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp8x23(@self) + } +} - let rel_diff = if *lhs.mag != 0 { - (diff / *lhs).mag - } else { - diff.mag - }; - rel_diff <= PRECISION -} +// Internals -fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { +fn tensor_eq< + FP8x23, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop +>( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { let mut is_eq = true; loop { @@ -314,8 +335,23 @@ fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { break; } - is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); }; return is_eq; } + +fn tensor_i8_to_tensor_fp8x23(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32.cairo similarity index 61% rename from src/operators/tensor/implementations/tensor_i32_fp8x23.cairo rename to src/operators/tensor/implementations/tensor_i32.cairo index 09d9c5121..1d8c71857 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32.cairo @@ -1,25 +1,18 @@ -//! This module defines and implement a Tensor for i32 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::{Into, TryInto}; +use traits::{TryInto, Into}; -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, TensorI8IntoTensorI32 -}; -use orion::numbers::i8; +use orion::numbers::{i32, i8, NumberTrait}; +use orion::operators::tensor::implementations::{tensor_u32::U32TensorImpl, tensor_i8::I8TensorImpl}; + -impl Tensor_i32_fp8x23 of TensorTrait { +impl I32TensorImpl of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -29,7 +22,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> i32 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> i32 { @@ -59,13 +52,13 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,12 +69,12 @@ impl Tensor_i32_fp8x23 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -109,19 +102,19 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -134,28 +127,28 @@ impl Tensor_i32_fp8x23 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -165,18 +158,19 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -190,8 +184,8 @@ impl Tensor_i32_fp8x23 of TensorTrait { self, y_scale, y_zero_point, - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -203,7 +197,13 @@ impl Tensor_i32_fp8x23 of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl i32TensorAdd of Add> { +impl TTensorAdd< + i32, + impl TTensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -218,7 +218,13 @@ impl i32TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl i32TensorSub of Sub> { +impl TTensorSub< + i32, + impl TTensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -233,7 +239,13 @@ impl i32TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl i32TensorMul of Mul> { +impl TTensorMul< + i32, + impl TTensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -248,7 +260,13 @@ impl i32TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl i32TensorDiv of Div> { +impl TTensorDiv< + i32, + impl TTensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -262,9 +280,14 @@ impl i32TensorDiv of Div> { } } - /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i32TensorPartialEq of PartialEq> { +impl TTensorPartialEq< + i32, + impl TTensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +> of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -274,8 +297,60 @@ impl i32TensorPartialEq of PartialEq> { } } -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { +impl I8TryIntoI8 of TryInto { + fn try_into(self: i32) -> Option { Option::Some(self) } } + +impl TensorI8IntoTensorI32 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_i32(@self) + } +} + + +// Internals + +fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + }; + + return is_eq; +} + +fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo deleted file mode 100644 index d176dcf1f..000000000 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ /dev/null @@ -1,281 +0,0 @@ -//! This module defines and implement a Tensor for i32 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::{Into, TryInto}; - -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq -}; -use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, TensorI8IntoTensorI32 -}; -use orion::numbers::i8; - -impl Tensor_i32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span,) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> i32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> i32 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> i32 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - quantization::quantize_linear::quantize_linear( - self, - y_scale, - y_zero_point, - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - ) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl i32TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl i32TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl i32TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl i32TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} - -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } -} diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8.cairo similarity index 61% rename from src/operators/tensor/implementations/tensor_i8_fp8x23.cairo rename to src/operators/tensor/implementations/tensor_i8.cairo index 9638a4a4b..d2bf068dc 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8.cairo @@ -1,23 +1,17 @@ -//! This module defines and implement a Tensor for i8 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::{Into, TryInto}; +use traits::{TryInto, Into}; -use orion::numbers::signed_integer::{i8::i8, i32::i32}; -use orion::numbers::signed_integer::i8::{i8_to_fp8x23}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait}; +use orion::operators::tensor::implementations::tensor_u32::U32TensorImpl; -impl Tensor_i8_fp8x23 of TensorTrait { +impl I8TensorImpl of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -27,7 +21,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> i8 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> i8 { @@ -57,13 +51,13 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -74,12 +68,12 @@ impl Tensor_i8_fp8x23 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -107,19 +101,19 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -132,28 +126,28 @@ impl Tensor_i8_fp8x23 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -163,18 +157,19 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -184,18 +179,30 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) + ) } fn dequantize_linear( self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } } /// Implements addition for `Tensor` using the `Add` trait. -impl i8TensorAdd of Add> { +impl TTensorAdd< + i8, + impl TTensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -210,7 +217,13 @@ impl i8TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl i8TensorSub of Sub> { +impl TTensorSub< + i8, + impl TTensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -225,7 +238,13 @@ impl i8TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl i8TensorMul of Mul> { +impl TTensorMul< + i8, + impl TTensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -240,7 +259,13 @@ impl i8TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl i8TensorDiv of Div> { +impl TTensorDiv< + i8, + impl TTensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -254,58 +279,55 @@ impl i8TensorDiv of Div> { } } -// Implements the Into trait for i8 tensor to i32 tensor. -impl TensorI8IntoTensorI32 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_tensor_i32(@self) +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl TTensorPartialEq< + i8, + impl TTensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +> of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) } } -// Implements the Into trait for i8 tensor to fp tensor. -impl TensorI8IntoTensorFP8x23 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_fp8x23(@self) +impl I8TryIntoI8 of TryInto { + fn try_into(self: i8) -> Option { + Option::Some(self) } } -fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; +// Internals + +fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; loop { - result_data.append((*data.pop_front().unwrap()).into()); + if lhs.shape.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); }; - return TensorTrait::new(*x.shape, result_data.span()); -} - - -fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; + if !is_eq { + return false; + } loop { - result_data.append(i8_to_fp8x23(*data.pop_front().unwrap())); + if lhs.data.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); }; - return TensorTrait::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i8TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } + return is_eq; } diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo deleted file mode 100644 index 0eac14104..000000000 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ /dev/null @@ -1,311 +0,0 @@ -//! This module defines and implement a Tensor for i8 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::{Into, TryInto}; - -use orion::numbers::signed_integer::{i8::i8, i32::i32}; -use orion::numbers::signed_integer::i8::{i8_to_fp16x16}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq -}; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - -impl Tensor_i8_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> i8 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> i8 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> i8 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with i8']) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with i8']) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl i8TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl i8TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl i8TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl i8TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - -// Implements the Into trait for i8 tensor to i32 tensor. -impl TensorI8IntoTensorI32 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_tensor_i32(@self) - } -} - -// Implements the Into trait for i8 tensor to fp tensor. -impl TensorI8IntoTensorFP16x16 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_fp16x16(@self) - } -} - -fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append((*data.pop_front().unwrap()).into()); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::new(*x.shape, result_data.span()); -} - - -fn tensor_i8_to_fp16x16(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append(i8_to_fp16x16(*data.pop_front().unwrap())); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i8TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32.cairo similarity index 63% rename from src/operators/tensor/implementations/tensor_u32_fp16x16.cairo rename to src/operators/tensor/implementations/tensor_u32.cairo index c694d10e3..acdc14f1e 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_u32.cairo @@ -1,22 +1,17 @@ -//! This module defines and implement a Tensor for u32 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::Into; +use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq }; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::i8; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait}; +use orion::operators::tensor::implementations::tensor_i8::I8TensorImpl; -impl Tensor_u32_fp16x16 of TensorTrait { +impl U32TensorImpl of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -26,7 +21,7 @@ impl Tensor_u32_fp16x16 of TensorTrait { } fn min(self: @Tensor) -> u32 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> u32 { @@ -56,13 +51,13 @@ impl Tensor_u32_fp16x16 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -73,12 +68,12 @@ impl Tensor_u32_fp16x16 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -106,19 +101,19 @@ impl Tensor_u32_fp16x16 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -131,28 +126,28 @@ impl Tensor_u32_fp16x16 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -163,18 +158,18 @@ impl Tensor_u32_fp16x16 of TensorTrait { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -184,18 +179,24 @@ impl Tensor_u32_fp16x16 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } fn dequantize_linear( self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } } /// Implements addition for `Tensor` using the `Add` trait. -impl u32TensorAdd of Add> { +impl TTensorAdd< + u32, + impl TTensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -210,7 +211,13 @@ impl u32TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl u32TensorSub of Sub> { +impl TTensorSub< + u32, + impl TTensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -225,7 +232,13 @@ impl u32TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl u32TensorMul of Mul> { +impl TTensorMul< + u32, + impl TTensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -240,7 +253,13 @@ impl u32TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl u32TensorDiv of Div> { +impl TTensorDiv< + u32, + impl TTensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -254,43 +273,56 @@ impl u32TensorDiv of Div> { } } +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl TTensorPartialEq< + u32, + impl TTensor: TensorTrait, + impl TPartialEq: PartialEq, + impl TCopy: Copy, + impl TDrop: Drop +> of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + -// Implements the Into trait for u32 tensor to fp tensor. -impl Tensoru32IntoTensorFP16x16 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_u32_to_fp16x16(@self) +impl U32TryIntoI8 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(i8 { mag: self.try_into().unwrap(), sign: false }) } } +// Internals -fn tensor_u32_to_fp16x16(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; +fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; loop { - result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); + if lhs.shape.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); }; - return TensorTrait::::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl u32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) + if !is_eq { + return false; } - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + }; + + return is_eq; } diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo deleted file mode 100644 index ec660cf0e..000000000 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ /dev/null @@ -1,296 +0,0 @@ -//! This module defines and implement a Tensor for u32 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq -}; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::i8; - -impl Tensor_u32_fp8x23 of TensorTrait { - fn new(shape: Span, data: Span) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> u32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> u32 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> u32 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with u32']) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with u32']) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl u32TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl u32TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl u32TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl u32TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - - -// Implements the Into trait for u32 tensor to fp tensor. -impl Tensoru32IntoTensorFP8x23 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_u32_to_fp8x23(@self) - } -} - - -fn tensor_u32_to_fp8x23(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl u32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} - -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } -} diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index 63fbc5b89..77217a9ab 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -10,7 +10,6 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::argmin docstring fn argmin< T, - F, MAG, impl UsizeTensor: TensorTrait, impl TNumber: NumberTrait, diff --git a/src/operators/tensor/math/atan.cairo b/src/operators/tensor/math/atan.cairo index 5474aaf13..d1a0ab3b3 100644 --- a/src/operators/tensor/math/atan.cairo +++ b/src/operators/tensor/math/atan.cairo @@ -8,7 +8,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -fn atan_from_fp< +fn atan< T, MAG, impl FFixedTrait: FixedTrait, diff --git a/src/operators/tensor/math/cosh.cairo b/src/operators/tensor/math/cosh.cairo index 4cc505876..d0c2d8515 100644 --- a/src/operators/tensor/math/cosh.cairo +++ b/src/operators/tensor/math/cosh.cairo @@ -9,7 +9,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::cosh docstring -fn cosh_from_fp< +fn cosh< T, MAG, impl FFixedTrait: FixedTrait, diff --git a/src/operators/tensor/math/tanh.cairo b/src/operators/tensor/math/tanh.cairo index a0ac967ef..cb12690c5 100644 --- a/src/operators/tensor/math/tanh.cairo +++ b/src/operators/tensor/math/tanh.cairo @@ -9,7 +9,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::tanh docstring -fn tanh_from_fp< +fn tanh< T, MAG, impl FFixedTrait: FixedTrait, From 15dc676e120d202bb410091a65774afee9a68a2e Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 09:35:49 +0300 Subject: [PATCH 110/179] update functions nn --- src/operators.cairo | 2 +- src/operators/nn.cairo | 20 +++--- src/operators/nn/core.cairo | 28 ++++---- src/operators/nn/functional/leaky_relu.cairo | 67 ++++---------------- src/operators/nn/functional/linear.cairo | 3 +- src/operators/nn/functional/logsoftmax.cairo | 9 +-- src/operators/nn/functional/relu.cairo | 3 +- src/operators/nn/functional/sigmoid.cairo | 60 +++--------------- src/operators/nn/functional/softmax.cairo | 14 ++-- src/operators/nn/functional/softplus.cairo | 57 +++-------------- src/operators/nn/functional/softsign.cairo | 56 +++------------- 11 files changed, 76 insertions(+), 243 deletions(-) diff --git a/src/operators.cairo b/src/operators.cairo index d1bf082ac..989bc1209 100644 --- a/src/operators.cairo +++ b/src/operators.cairo @@ -1,3 +1,3 @@ mod tensor; -// mod nn; +mod nn; diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index 9d226494d..b7f0a1cf6 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -1,17 +1,17 @@ mod core; -mod implementations; +// mod implementations; mod functional; -use orion::operators::nn::core::NNTrait; +// use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; +// use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; +// use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; +// use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; +// use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; +// use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; +// use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; +// use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; +// use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index 99e09f4da..f08d6b56b 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -10,7 +10,7 @@ use orion::operators::tensor::core::Tensor; /// softsign - Applies the Softsign function element-wise. /// softplus - Applies the Softplus function element-wise. /// linear - Performs a linear transformation of the input tensor using the provided weights and bias. -trait NNTrait { +trait NNTrait { /// # NNTrait::relu /// /// ```rust @@ -61,7 +61,7 @@ trait NNTrait { /// # NNTrait::softmax /// /// ```rust - /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// ``` /// /// Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -107,11 +107,11 @@ trait NNTrait { /// // [[0.2689, 0.7311],[0.2689, 0.7311]] /// ``` /// - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::logsoftmax /// /// ```rust - /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor /// ``` /// /// Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -163,11 +163,11 @@ trait NNTrait { /// // [[-1.3134, -0.3132],[-1.3134, -0.3132]] /// ``` /// - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::sigmoid /// /// ```rust - /// fn sigmoid(tensor: @Tensor) -> Tensor; + /// fn sigmoid(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -212,11 +212,11 @@ trait NNTrait { /// // [[0.5, 0.7310586],[0.88079703, 0.95257413]] /// ``` /// - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; /// # NNTrait::softsign /// /// ```rust - /// fn softsign(tensor: @Tensor) -> Tensor; + /// fn softsign(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -261,11 +261,11 @@ trait NNTrait { /// // [[0, 0.5],[0.67, 0.75]] /// ``` /// - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; /// # NNTrait::softplus /// /// ```rust - /// fn softplus(tensor: @Tensor) -> Tensor; + /// fn softplus(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -310,7 +310,7 @@ trait NNTrait { /// // [[0.6931452, 1.31326096],[2.12692796, 3.04858728]] /// ``` /// - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; /// # NNTrait::linear /// /// ```rust @@ -381,7 +381,7 @@ trait NNTrait { /// # NNTrait::leaky_relu /// /// ```rust - /// fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor + /// fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor /// ``` /// /// Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -390,7 +390,7 @@ trait NNTrait { /// /// ## Args /// * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. - /// * `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. + /// * `alpha`(`@T`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. /// /// ## Returns /// A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. @@ -426,5 +426,5 @@ trait NNTrait { /// [[1, 2, 0.1], [0.2, 0, 0]] /// ``` /// - fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor; + fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor; } diff --git a/src/operators/nn/functional/leaky_relu.cairo b/src/operators/nn/functional/leaky_relu.cairo index 5fdcd46a1..5ad8c3e02 100644 --- a/src/operators/nn/functional/leaky_relu.cairo +++ b/src/operators/nn/functional/leaky_relu.cairo @@ -7,68 +7,23 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FMul: Mul, - impl TPartialOrd: PartialOrd, - impl FPartialOrd: PartialOrd, - impl TCopy: Copy, - impl TDrop: Drop, - impl FCopy: Copy, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut z: Tensor, alpha: @F -) -> Tensor { - assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - if (*item >= NumberTrait::zero()) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} /// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_from_fp< - F, +fn leaky_relu< + T, MAG, - impl FNumber: NumberTrait, - impl FTensor: TensorTrait, - impl FPartialOrd: PartialOrd, - impl FMul: Mul, - impl FCopy: Copy, - impl FDrop: Drop, + impl FNumber: NumberTrait, + impl FTensor: TensorTrait, + impl FPartialOrd: PartialOrd, + impl FMul: Mul, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut z: Tensor, alpha: @F -) -> Tensor { + mut z: Tensor, alpha: @T +) -> Tensor { assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); - let mut data_result = ArrayTrait::::new(); + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/linear.cairo b/src/operators/nn/functional/linear.cairo index e08cb3b99..b65e0cee7 100644 --- a/src/operators/nn/functional/linear.cairo +++ b/src/operators/nn/functional/linear.cairo @@ -6,8 +6,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::linear docstring fn linear< T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TAddTensor: Add>, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/nn/functional/logsoftmax.cairo b/src/operators/nn/functional/logsoftmax.cairo index 892f16d60..6d19cbb62 100644 --- a/src/operators/nn/functional/logsoftmax.cairo +++ b/src/operators/nn/functional/logsoftmax.cairo @@ -5,15 +5,10 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::logsoftmax docstring fn logsoftmax< - T, - F, - impl TTensor: TensorTrait, - impl FTensor: TensorTrait, - impl FDivTensor: Div>, - impl FDrop: Drop + T, impl TTensor: TensorTrait, impl TDivTensor: Div>, impl TDrop: Drop >( z: @Tensor, axis: usize -) -> Tensor { +) -> Tensor { let exp_tensor = z.exp(); let sum = exp_tensor.reduce_sum(axis, true); let softmax = exp_tensor / sum; diff --git a/src/operators/nn/functional/relu.cairo b/src/operators/nn/functional/relu.cairo index de487d8fa..f8f1bb99d 100644 --- a/src/operators/nn/functional/relu.cairo +++ b/src/operators/nn/functional/relu.cairo @@ -8,9 +8,8 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::relu docstring fn relu< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, diff --git a/src/operators/nn/functional/sigmoid.cairo b/src/operators/nn/functional/sigmoid.cairo index 577393974..23f444e23 100644 --- a/src/operators/nn/functional/sigmoid.cairo +++ b/src/operators/nn/functional/sigmoid.cairo @@ -9,61 +9,21 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; /// Cf: NNTrait::sigmoid docstring -fn sigmoid_from_int< +fn sigmoid< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, - impl FMul: Mul, - impl FDiv: Div, + MAG, + impl TNumber: NumberTrait, + impl TTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TMul: Mul, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), !(*item).is_neg()); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_from_fp< - F, - MAG, - impl FNumber: NumberTrait, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FMul: Mul, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/softmax.cairo b/src/operators/nn/functional/softmax.cairo index e07969e8b..8d3feea78 100644 --- a/src/operators/nn/functional/softmax.cairo +++ b/src/operators/nn/functional/softmax.cairo @@ -4,15 +4,15 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::softmax docstring fn softmax< T, - F, - impl TTensor: TensorTrait, - impl FTensor: TensorTrait, - impl FTensorDiv: Div>, - impl FCopy: Copy, - impl FDrop: Drop, + T, + impl TTensor: TensorTrait, + impl TTensor: TensorTrait, + impl TTensorDiv: Div>, + impl TCopy: Copy, + impl TDrop: Drop, >( z: @Tensor, axis: usize -) -> Tensor { +) -> Tensor { let exp_tensor = z.exp(); let sum = exp_tensor.reduce_sum(axis, true); let softmax = exp_tensor / sum; diff --git a/src/operators/nn/functional/softplus.cairo b/src/operators/nn/functional/softplus.cairo index b65150bcc..1d98a848b 100644 --- a/src/operators/nn/functional/softplus.cairo +++ b/src/operators/nn/functional/softplus.cairo @@ -7,59 +7,22 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; + /// Cf: NNTrait::softplus docstring -fn softplus_from_int< +fn softplus< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, + MAG, + impl TTensor: TensorTrait, + impl TFixed: FixedTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - - -/// Cf: NNTrait::softplus docstring -fn softplus_from_fp< - F, - MAG, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/softsign.cairo b/src/operators/nn/functional/softsign.cairo index f2dda6c2e..7d88ae2ce 100644 --- a/src/operators/nn/functional/softsign.cairo +++ b/src/operators/nn/functional/softsign.cairo @@ -7,59 +7,21 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; + /// Cf: NNTrait::softsign docstring -fn softsign_from_int< +fn softsign< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, - impl FDiv: Div, + MAG, + impl TTensor: TensorTrait, + impl TFixed: FixedTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FCopy: Copy, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - -/// Cf: NNTrait::softsign docstring -fn softsign_from_fp< - F, - MAG, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { +) -> Tensor { let mut data_result = ArrayTrait::new(); loop { From 356bb9b5165ce9572d06d22e36b5ef50087ed252 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 09:45:41 +0300 Subject: [PATCH 111/179] add NN implementations --- src/operators/nn.cairo | 2 +- src/operators/nn/functional/softmax.cairo | 1 - src/operators/nn/implementations.cairo | 10 ++--- .../nn/implementations/nn_fp16x16.cairo | 12 +++--- .../nn/implementations/nn_fp8x23.cairo | 12 +++--- src/operators/nn/implementations/nn_i32.cairo | 41 ++++++++++++++++++ .../nn/implementations/nn_i32_fp16x16.cairo | 43 ------------------- .../nn/implementations/nn_i32_fp8x23.cairo | 43 ------------------- src/operators/nn/implementations/nn_i8.cairo | 41 ++++++++++++++++++ .../nn/implementations/nn_i8_fp16x16.cairo | 43 ------------------- .../nn/implementations/nn_i8_fp8x23.cairo | 43 ------------------- src/operators/nn/implementations/nn_u32.cairo | 40 +++++++++++++++++ .../nn/implementations/nn_u32_fp16x16.cairo | 42 ------------------ .../nn/implementations/nn_u32_fp8x23.cairo | 42 ------------------ .../implementations/tensor_fp16x16.cairo | 4 +- .../implementations/tensor_fp8x23.cairo | 4 +- .../tensor/implementations/tensor_i32.cairo | 24 +++++------ .../tensor/implementations/tensor_i8.cairo | 24 +++++------ .../tensor/implementations/tensor_u32.cairo | 24 +++++------ 19 files changed, 178 insertions(+), 317 deletions(-) create mode 100644 src/operators/nn/implementations/nn_i32.cairo delete mode 100644 src/operators/nn/implementations/nn_i32_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_i32_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_i8.cairo delete mode 100644 src/operators/nn/implementations/nn_i8_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_i8_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_u32.cairo delete mode 100644 src/operators/nn/implementations/nn_u32_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_u32_fp8x23.cairo diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index b7f0a1cf6..1505d3957 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -1,5 +1,5 @@ mod core; -// mod implementations; +mod implementations; mod functional; // use orion::operators::nn::core::NNTrait; diff --git a/src/operators/nn/functional/softmax.cairo b/src/operators/nn/functional/softmax.cairo index 8d3feea78..528856265 100644 --- a/src/operators/nn/functional/softmax.cairo +++ b/src/operators/nn/functional/softmax.cairo @@ -3,7 +3,6 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::softmax docstring fn softmax< - T, T, impl TTensor: TensorTrait, impl TTensor: TensorTrait, diff --git a/src/operators/nn/implementations.cairo b/src/operators/nn/implementations.cairo index 50a1cde62..4f0b9f719 100644 --- a/src/operators/nn/implementations.cairo +++ b/src/operators/nn/implementations.cairo @@ -1,10 +1,6 @@ -mod nn_i8_fp8x23; -mod nn_i32_fp8x23; -mod nn_u32_fp8x23; +mod nn_i8; +mod nn_i32; +mod nn_u32; mod nn_fp8x23; - -mod nn_i8_fp16x16; -mod nn_i32_fp16x16; -mod nn_u32_fp16x16; mod nn_fp16x16; diff --git a/src/operators/nn/implementations/nn_fp16x16.cairo b/src/operators/nn/implementations/nn_fp16x16.cairo index 271b1d321..a0094de29 100644 --- a/src/operators/nn/implementations/nn_fp16x16.cairo +++ b/src/operators/nn/implementations/nn_fp16x16.cairo @@ -5,16 +5,16 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorDiv, FP16x16TensorAdd + FP16x16Tensor, FP16x16TensorDiv, FP16x16TensorAdd }; -impl NN_fp16x16 of NNTrait { +impl FP16x16NN of NNTrait { fn relu(tensor: @Tensor) -> Tensor { functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_fp(*tensor) + functional::sigmoid::sigmoid(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { @@ -26,11 +26,11 @@ impl NN_fp16x16 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_fp(*tensor) + functional::softsign::softsign(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_fp(*tensor) + functional::softplus::softplus(*tensor) } fn linear( @@ -40,6 +40,6 @@ impl NN_fp16x16 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) + functional::leaky_relu::leaky_relu(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index aa93229f8..305eeaba2 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -5,16 +5,16 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorDiv, FP8x23TensorAdd + FP8x23Tensor, FP8x23TensorDiv, FP8x23TensorAdd }; -impl NN_fp8x23 of NNTrait { +impl FP8x23NN of NNTrait { fn relu(tensor: @Tensor) -> Tensor { functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_fp(*tensor) + functional::sigmoid::sigmoid(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { @@ -26,11 +26,11 @@ impl NN_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_fp(*tensor) + functional::softsign::softsign(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_fp(*tensor) + functional::softplus::softplus(*tensor) } fn linear( @@ -40,6 +40,6 @@ impl NN_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) + functional::leaky_relu::leaky_relu(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_i32.cairo b/src/operators/nn/implementations/nn_i32.cairo new file mode 100644 index 000000000..c74dfc268 --- /dev/null +++ b/src/operators/nn/implementations/nn_i32.cairo @@ -0,0 +1,41 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i32::i32; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_i32::{I32Tensor, I32TensorAdd}; + +impl I32NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @i32) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_i32_fp16x16.cairo b/src/operators/nn/implementations/nn_i32_fp16x16.cairo deleted file mode 100644 index 270587c14..000000000 --- a/src/operators/nn/implementations/nn_i32_fp16x16.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_i32_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo deleted file mode 100644 index bf8781ca5..000000000 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{Tensor_i32_fp8x23, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_i32_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i8.cairo b/src/operators/nn/implementations/nn_i8.cairo new file mode 100644 index 000000000..12e9812a1 --- /dev/null +++ b/src/operators/nn/implementations/nn_i8.cairo @@ -0,0 +1,41 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i8::i8; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_i8::{I8Tensor, I8TensorAdd}; + +impl I8NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @i8) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_i8_fp16x16.cairo b/src/operators/nn/implementations/nn_i8_fp16x16.cairo deleted file mode 100644 index e0e29d515..000000000 --- a/src/operators/nn/implementations/nn_i8_fp16x16.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_i8_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo deleted file mode 100644 index 433761a3e..000000000 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{Tensor_i8_fp8x23, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_i8_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_u32.cairo b/src/operators/nn/implementations/nn_u32.cairo new file mode 100644 index 000000000..0da74d544 --- /dev/null +++ b/src/operators/nn/implementations/nn_u32.cairo @@ -0,0 +1,40 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_u32::{U32Tensor, U32TensorAdd}; + +impl U32NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @u32) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_u32_fp16x16.cairo b/src/operators/nn/implementations/nn_u32_fp16x16.cairo deleted file mode 100644 index 02088a5d8..000000000 --- a/src/operators/nn/implementations/nn_u32_fp16x16.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_u32_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo deleted file mode 100644 index a31a9daf6..000000000 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{Tensor_u32_fp8x23, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_u32_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 994fcd334..9fde3f95e 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -9,9 +9,9 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::numbers::{i8, NumberTrait, FP16x16}; -use orion::operators::tensor::implementations::{tensor_i8::I8TensorImpl, tensor_u32::U32TensorImpl}; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; -impl FP16x16TensorImpl of TensorTrait { +impl FP16x16Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index ee5ce92e1..0fa7e4ea4 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -9,9 +9,9 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::numbers::{i8, NumberTrait, FP8x23}; -use orion::operators::tensor::implementations::{tensor_i8::I8TensorImpl, tensor_u32::U32TensorImpl}; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; -impl FP8x23TensorImpl of TensorTrait { +impl FP8x23Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } diff --git a/src/operators/tensor/implementations/tensor_i32.cairo b/src/operators/tensor/implementations/tensor_i32.cairo index 1d8c71857..9932b891a 100644 --- a/src/operators/tensor/implementations/tensor_i32.cairo +++ b/src/operators/tensor/implementations/tensor_i32.cairo @@ -9,10 +9,10 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::numbers::{i32, i8, NumberTrait}; -use orion::operators::tensor::implementations::{tensor_u32::U32TensorImpl, tensor_i8::I8TensorImpl}; +use orion::operators::tensor::implementations::{tensor_u32::U32Tensor, tensor_i8::I8Tensor}; -impl I32TensorImpl of TensorTrait { +impl I32Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -197,9 +197,9 @@ impl I32TensorImpl of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl TTensorAdd< +impl I32TensorAdd< i32, - impl TTensor: TensorTrait, + impl I32Tensor: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop @@ -218,9 +218,9 @@ impl TTensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl TTensorSub< +impl I32TensorSub< i32, - impl TTensor: TensorTrait, + impl I32Tensor: TensorTrait, impl TSub: Sub, impl TCopy: Copy, impl TDrop: Drop @@ -239,9 +239,9 @@ impl TTensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl TTensorMul< +impl I32TensorMul< i32, - impl TTensor: TensorTrait, + impl I32Tensor: TensorTrait, impl TMul: Mul, impl TCopy: Copy, impl TDrop: Drop @@ -260,9 +260,9 @@ impl TTensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl TTensorDiv< +impl I32TensorDiv< i32, - impl TTensor: TensorTrait, + impl I32Tensor: TensorTrait, impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop @@ -281,9 +281,9 @@ impl TTensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl TTensorPartialEq< +impl I32TensorPartialEq< i32, - impl TTensor: TensorTrait, + impl I32Tensor: TensorTrait, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/implementations/tensor_i8.cairo b/src/operators/tensor/implementations/tensor_i8.cairo index d2bf068dc..322e09ce4 100644 --- a/src/operators/tensor/implementations/tensor_i8.cairo +++ b/src/operators/tensor/implementations/tensor_i8.cairo @@ -9,9 +9,9 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::numbers::{i8, NumberTrait}; -use orion::operators::tensor::implementations::tensor_u32::U32TensorImpl; +use orion::operators::tensor::implementations::tensor_u32::U32Tensor; -impl I8TensorImpl of TensorTrait { +impl I8Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -196,9 +196,9 @@ impl I8TensorImpl of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl TTensorAdd< +impl I8TensorAdd< i8, - impl TTensor: TensorTrait, + impl I8Tensor: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop @@ -217,9 +217,9 @@ impl TTensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl TTensorSub< +impl I8TensorSub< i8, - impl TTensor: TensorTrait, + impl I8Tensor: TensorTrait, impl TSub: Sub, impl TCopy: Copy, impl TDrop: Drop @@ -238,9 +238,9 @@ impl TTensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl TTensorMul< +impl I8TensorMul< i8, - impl TTensor: TensorTrait, + impl I8Tensor: TensorTrait, impl TMul: Mul, impl TCopy: Copy, impl TDrop: Drop @@ -259,9 +259,9 @@ impl TTensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl TTensorDiv< +impl I8TensorDiv< i8, - impl TTensor: TensorTrait, + impl I8Tensor: TensorTrait, impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop @@ -280,9 +280,9 @@ impl TTensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl TTensorPartialEq< +impl I8TensorPartialEq< i8, - impl TTensor: TensorTrait, + impl I8Tensor: TensorTrait, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/implementations/tensor_u32.cairo b/src/operators/tensor/implementations/tensor_u32.cairo index acdc14f1e..b71b02c9a 100644 --- a/src/operators/tensor/implementations/tensor_u32.cairo +++ b/src/operators/tensor/implementations/tensor_u32.cairo @@ -9,9 +9,9 @@ use orion::operators::tensor::core::{ }; use orion::operators::tensor::{math, linalg, quantization}; use orion::numbers::{i8, NumberTrait}; -use orion::operators::tensor::implementations::tensor_i8::I8TensorImpl; +use orion::operators::tensor::implementations::tensor_i8::I8Tensor; -impl U32TensorImpl of TensorTrait { +impl U32Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -190,9 +190,9 @@ impl U32TensorImpl of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl TTensorAdd< +impl U32TensorAdd< u32, - impl TTensor: TensorTrait, + impl U32Tensor: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop @@ -211,9 +211,9 @@ impl TTensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl TTensorSub< +impl U32TensorSub< u32, - impl TTensor: TensorTrait, + impl U32Tensor: TensorTrait, impl TSub: Sub, impl TCopy: Copy, impl TDrop: Drop @@ -232,9 +232,9 @@ impl TTensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl TTensorMul< +impl U32TensorMul< u32, - impl TTensor: TensorTrait, + impl U32Tensor: TensorTrait, impl TMul: Mul, impl TCopy: Copy, impl TDrop: Drop @@ -253,9 +253,9 @@ impl TTensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl TTensorDiv< +impl U32TensorDiv< u32, - impl TTensor: TensorTrait, + impl U32Tensor: TensorTrait, impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop @@ -274,9 +274,9 @@ impl TTensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl TTensorPartialEq< +impl U32TensorPartialEq< u32, - impl TTensor: TensorTrait, + impl U32Tensor: TensorTrait, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop From 02649884a5c6b95e9fef7b7c38ebd7fc27e0de83 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 09:51:15 +0300 Subject: [PATCH 112/179] import implementations --- src/operators/nn.cairo | 18 ++++-------- src/operators/tensor.cairo | 58 +++++++++++++------------------------- 2 files changed, 25 insertions(+), 51 deletions(-) diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index 1505d3957..1f7a3abe5 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -2,16 +2,10 @@ mod core; mod implementations; mod functional; -// use orion::operators::nn::core::NNTrait; +use orion::operators::nn::core::NNTrait; -// use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -// use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; - -// use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -// use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; - -// use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -// use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; - -// use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -// use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; +use orion::operators::nn::implementations::nn_fp8x23::FP8x23NN; +use orion::operators::nn::implementations::nn_fp16x16::FP16x16NN; +use orion::operators::nn::implementations::nn_i8::I8NN; +use orion::operators::nn::implementations::nn_i32::I32NN; +use orion::operators::nn::implementations::nn_u32::U32NN; diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 7a1512ebf..976102b52 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -5,48 +5,28 @@ mod linalg; mod quantization; mod implementations; -// use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; +use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; -// use orion::operators::tensor::implementations::tensor_fp8x23::{ -// Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, -// FP8x23TensorPartialEq, -// }; +use orion::operators::tensor::implementations::tensor_fp8x23::{ + FP8x23Tensor, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, + FP8x23TensorPartialEq, +}; -// use orion::operators::tensor::implementations::tensor_fp16x16::{ -// Tensor_fp16x16, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, -// FP16x16TensorPartialEq, -// }; +use orion::operators::tensor::implementations::tensor_fp16x16::{ + FP16x16Tensor, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, + FP16x16TensorPartialEq, +}; -// use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ -// Tensor_i8_fp8x23, i8TensorAdd as i8FP8x23TensorAdd, i8TensorSub as i8FP8x23Sub, -// i8TensorMul as i8FP8x23Mul, i8TensorDiv as i8FP8x23Div, -// TensorI8IntoTensorI32 as TensorI8FP8x23IntoTensorI32, -// TensorI8IntoTensorFP8x23 as TensorI8FP8x23IntoTensorFP8x23, -// }; +use orion::operators::tensor::implementations::tensor_i8::{ + I8Tensor, I8TensorAdd, I8TensorSub, I8TensorMul, I8TensorDiv, I8TensorPartialEq, +}; -// use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ -// Tensor_i8_fp16x16, i8TensorAdd as i8FP16x16TensorAdd, i8TensorSub as i8FP16x16Sub, -// i8TensorMul as i8FP16x16Mul, i8TensorDiv as i8FP16x16Div, -// TensorI8IntoTensorI32 as TensorI8FP16x16IntoTensorI32, -// TensorI8IntoTensorFP16x16 as TensorI8FP16x16IntoTensorFP16x16, -// }; +use orion::operators::tensor::implementations::tensor_i32::{ + I32Tensor, I32TensorAdd, I32TensorSub, I32TensorMul, I32TensorDiv, I32TensorPartialEq, + TensorI8IntoTensorI32 +}; -// use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ -// Tensor_i32_fp8x23, i32TensorAdd as i32FP8x23TensorAdd, i32TensorSub as i32FP8x23Sub, -// i32TensorMul as i32FP8x23Mul, i32TensorDiv as i32FP8x23Div, -// }; +use orion::operators::tensor::implementations::tensor_u32::{ + U32Tensor, U32TensorAdd, U32TensorSub, U32TensorMul, U32TensorDiv, U32TensorPartialEq +}; -// use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ -// Tensor_i32_fp16x16, i32TensorAdd as i32FP16x16TensorAdd, i32TensorSub as i32FP16x16Sub, -// i32TensorMul as i32FP16x16Mul, i32TensorDiv as i32FP16x16Div, -// }; - -// use orion::operators::tensor::implementations::tensor_u32_fp8x23::{ -// Tensor_u32_fp8x23, u32TensorAdd as u32FP8x23TensorAdd, u32TensorSub as u32FP8x23Sub, -// u32TensorMul as u32FP8x23Mul, u32TensorDiv as u32FP8x23Div, -// }; - -// use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ -// Tensor_u32_fp16x16, u32TensorAdd as u32FP16x16TensorAdd, u32TensorSub as u32FP16x16Sub, -// u32TensorMul as u32FP16x16Mul, u32TensorDiv as u32FP16x16Div, -// }; From f210cba8f2d210c086da164f8f62af25d2be4207 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 09:52:01 +0300 Subject: [PATCH 113/179] Update implementations.cairo --- src/operators/tensor/implementations.cairo | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index 6d0956e5f..cee4bc7ac 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -1,13 +1,3 @@ -// mod tensor_fp8x23; -// mod tensor_i32_fp8x23; -// mod tensor_u32_fp8x23; -// mod tensor_i8_fp8x23; - -// mod tensor_fp16x16; -// mod tensor_i32_fp16x16; -// mod tensor_u32_fp16x16; -// mod tensor_i8_fp16x16; - mod tensor_u32; mod tensor_i8; mod tensor_i32; From bc8216305aa7c1b134178cf0260b58c22a8c8fc9 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 10:12:06 +0300 Subject: [PATCH 114/179] fix tensor_core and performance tests --- src/lib.cairo | 2 +- src/numbers.cairo | 20 +- src/operators/tensor/core.cairo | 24 +- src/operators/tensor/math/concat.cairo | 2 +- src/operators/tensor/math/onehot.cairo | 2 +- src/tests.cairo | 2 +- .../helpers/tensor/fixed_point/fp16x16.cairo | 4 +- .../helpers/tensor/fixed_point/fp8x23.cairo | 4 +- src/tests/helpers/tensor/i32.cairo | 4 +- src/tests/helpers/tensor/i8.cairo | 41 +- src/tests/helpers/tensor/u32.cairo | 4 +- src/tests/nodes/abs_fp16x16.cairo | 2 +- src/tests/nodes/abs_fp16x16/input_0.cairo | 4 +- src/tests/nodes/abs_fp16x16/output_0.cairo | 4 +- src/tests/nodes/abs_fp8x23.cairo | 2 +- src/tests/nodes/abs_fp8x23/input_0.cairo | 4 +- src/tests/nodes/abs_fp8x23/output_0.cairo | 4 +- src/tests/nodes/abs_i32/input_0.cairo | 4 +- src/tests/nodes/abs_i32/output_0.cairo | 4 +- src/tests/nodes/abs_i8/input_0.cairo | 4 +- src/tests/nodes/abs_i8/output_0.cairo | 4 +- src/tests/nodes/acos_fp16x16.cairo | 2 +- src/tests/nodes/acos_fp16x16/input_0.cairo | 4 +- src/tests/nodes/acos_fp16x16/output_0.cairo | 4 +- src/tests/nodes/acos_fp8x23.cairo | 2 +- src/tests/nodes/acos_fp8x23/input_0.cairo | 4 +- src/tests/nodes/acos_fp8x23/output_0.cairo | 4 +- src/tests/nodes/acosh_fp16x16.cairo | 2 +- src/tests/nodes/acosh_fp16x16/input_0.cairo | 4 +- src/tests/nodes/acosh_fp16x16/output_0.cairo | 4 +- src/tests/nodes/acosh_fp8x23.cairo | 2 +- src/tests/nodes/acosh_fp8x23/input_0.cairo | 4 +- src/tests/nodes/acosh_fp8x23/output_0.cairo | 4 +- src/tests/nodes/acosh_i32_fp16x16.cairo | 2 +- .../nodes/acosh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/acosh_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/acosh_i32_fp8x23.cairo | 2 +- .../nodes/acosh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/acosh_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/acosh_i8_fp16x16.cairo | 2 +- .../nodes/acosh_i8_fp16x16/input_0.cairo | 4 +- .../nodes/acosh_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/acosh_i8_fp8x23.cairo | 2 +- src/tests/nodes/acosh_i8_fp8x23/input_0.cairo | 4 +- .../nodes/acosh_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/acosh_u32_fp16x16.cairo | 2 +- .../nodes/acosh_u32_fp16x16/input_0.cairo | 4 +- .../nodes/acosh_u32_fp16x16/output_0.cairo | 4 +- .../nodes/acosh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/acosh_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/add_fp16x16.cairo | 2 +- src/tests/nodes/add_fp16x16/input_0.cairo | 4 +- src/tests/nodes/add_fp16x16/input_1.cairo | 4 +- src/tests/nodes/add_fp16x16/output_0.cairo | 4 +- src/tests/nodes/add_fp16x16_broadcast.cairo | 2 +- .../nodes/add_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/add_fp16x16_broadcast/input_1.cairo | 4 +- .../add_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/add_fp8x23.cairo | 2 +- src/tests/nodes/add_fp8x23/input_0.cairo | 4 +- src/tests/nodes/add_fp8x23/input_1.cairo | 4 +- src/tests/nodes/add_fp8x23/output_0.cairo | 4 +- src/tests/nodes/add_fp8x23_broadcast.cairo | 2 +- .../nodes/add_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/add_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/add_fp8x23_broadcast/output_0.cairo | 4 +- src/tests/nodes/add_i32/input_0.cairo | 4 +- src/tests/nodes/add_i32/input_1.cairo | 4 +- src/tests/nodes/add_i32/output_0.cairo | 4 +- .../nodes/add_i32_broadcast/input_0.cairo | 4 +- .../nodes/add_i32_broadcast/input_1.cairo | 4 +- .../nodes/add_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/add_i8/input_0.cairo | 4 +- src/tests/nodes/add_i8/input_1.cairo | 4 +- src/tests/nodes/add_i8/output_0.cairo | 4 +- .../nodes/add_i8_broadcast/input_0.cairo | 4 +- .../nodes/add_i8_broadcast/input_1.cairo | 4 +- .../nodes/add_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/add_u32/input_0.cairo | 4 +- src/tests/nodes/add_u32/input_1.cairo | 4 +- src/tests/nodes/add_u32/output_0.cairo | 4 +- .../nodes/add_u32_broadcast/input_0.cairo | 4 +- .../nodes/add_u32_broadcast/input_1.cairo | 4 +- .../nodes/add_u32_broadcast/output_0.cairo | 4 +- .../nodes/argmax_fp16x16_1D_default.cairo | 2 +- .../argmax_fp16x16_1D_default/input_0.cairo | 4 +- .../argmax_fp16x16_1D_default/output_0.cairo | 4 +- .../argmax_fp16x16_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp16x16_1D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp16x16_2D_default.cairo | 2 +- .../argmax_fp16x16_2D_default/input_0.cairo | 4 +- .../argmax_fp16x16_2D_default/output_0.cairo | 4 +- .../argmax_fp16x16_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp16x16_2D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp16x16_3D_default.cairo | 2 +- .../argmax_fp16x16_3D_default/input_0.cairo | 4 +- .../argmax_fp16x16_3D_default/output_0.cairo | 4 +- .../argmax_fp16x16_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp16x16_3D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_fp8x23_1D_default.cairo | 2 +- .../argmax_fp8x23_1D_default/input_0.cairo | 4 +- .../argmax_fp8x23_1D_default/output_0.cairo | 2 +- .../argmax_fp8x23_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_1D_last_index.cairo | 2 +- .../argmax_fp8x23_1D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_2D_default.cairo | 2 +- .../argmax_fp8x23_2D_default/input_0.cairo | 4 +- .../argmax_fp8x23_2D_default/output_0.cairo | 2 +- .../argmax_fp8x23_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_2D_last_index.cairo | 2 +- .../argmax_fp8x23_2D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_3D_default.cairo | 2 +- .../argmax_fp8x23_3D_default/input_0.cairo | 4 +- .../argmax_fp8x23_3D_default/output_0.cairo | 2 +- .../argmax_fp8x23_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmax_fp8x23_3D_last_index.cairo | 2 +- .../argmax_fp8x23_3D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmax_i32_1D_default.cairo | 2 +- .../nodes/argmax_i32_1D_default/input_0.cairo | 4 +- .../argmax_i32_1D_default/output_0.cairo | 4 +- .../nodes/argmax_i32_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_i32_1D_last_index.cairo | 2 +- .../argmax_i32_1D_last_index/input_0.cairo | 4 +- .../argmax_i32_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_i32_2D_default.cairo | 2 +- .../nodes/argmax_i32_2D_default/input_0.cairo | 4 +- .../argmax_i32_2D_default/output_0.cairo | 4 +- .../nodes/argmax_i32_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_i32_2D_last_index.cairo | 2 +- .../argmax_i32_2D_last_index/input_0.cairo | 4 +- .../argmax_i32_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_i32_3D_default.cairo | 2 +- .../nodes/argmax_i32_3D_default/input_0.cairo | 4 +- .../argmax_i32_3D_default/output_0.cairo | 4 +- .../nodes/argmax_i32_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_i32_3D_last_index.cairo | 2 +- .../argmax_i32_3D_last_index/input_0.cairo | 4 +- .../argmax_i32_3D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_i8_1D_default.cairo | 2 +- .../nodes/argmax_i8_1D_default/input_0.cairo | 4 +- .../nodes/argmax_i8_1D_default/output_0.cairo | 4 +- .../nodes/argmax_i8_1D_keepdims_false.cairo | 2 +- .../argmax_i8_1D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmax_i8_1D_last_index.cairo | 2 +- .../argmax_i8_1D_last_index/input_0.cairo | 4 +- .../argmax_i8_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_i8_2D_default.cairo | 2 +- .../nodes/argmax_i8_2D_default/input_0.cairo | 4 +- .../nodes/argmax_i8_2D_default/output_0.cairo | 4 +- .../nodes/argmax_i8_2D_keepdims_false.cairo | 2 +- .../argmax_i8_2D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmax_i8_2D_last_index.cairo | 2 +- .../argmax_i8_2D_last_index/input_0.cairo | 4 +- .../argmax_i8_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_i8_3D_default.cairo | 2 +- .../nodes/argmax_i8_3D_default/input_0.cairo | 4 +- .../nodes/argmax_i8_3D_default/output_0.cairo | 4 +- .../nodes/argmax_i8_3D_keepdims_false.cairo | 2 +- .../argmax_i8_3D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmax_i8_3D_last_index.cairo | 2 +- .../argmax_i8_3D_last_index/input_0.cairo | 4 +- .../argmax_i8_3D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_u32_1D_default.cairo | 2 +- .../nodes/argmax_u32_1D_default/input_0.cairo | 4 +- .../argmax_u32_1D_default/output_0.cairo | 4 +- .../nodes/argmax_u32_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_u32_1D_last_index.cairo | 2 +- .../argmax_u32_1D_last_index/input_0.cairo | 4 +- .../argmax_u32_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_u32_2D_default.cairo | 2 +- .../nodes/argmax_u32_2D_default/input_0.cairo | 4 +- .../argmax_u32_2D_default/output_0.cairo | 4 +- .../nodes/argmax_u32_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_u32_2D_last_index.cairo | 2 +- .../argmax_u32_2D_last_index/input_0.cairo | 4 +- .../argmax_u32_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmax_u32_3D_default.cairo | 2 +- .../nodes/argmax_u32_3D_default/input_0.cairo | 4 +- .../argmax_u32_3D_default/output_0.cairo | 4 +- .../nodes/argmax_u32_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmax_u32_3D_last_index.cairo | 2 +- .../argmax_u32_3D_last_index/input_0.cairo | 4 +- .../argmax_u32_3D_last_index/output_0.cairo | 4 +- .../nodes/argmin_fp16x16_1D_default.cairo | 2 +- .../argmin_fp16x16_1D_default/input_0.cairo | 4 +- .../argmin_fp16x16_1D_default/output_0.cairo | 4 +- .../argmin_fp16x16_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp16x16_1D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp16x16_2D_default.cairo | 2 +- .../argmin_fp16x16_2D_default/input_0.cairo | 4 +- .../argmin_fp16x16_2D_default/output_0.cairo | 4 +- .../argmin_fp16x16_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp16x16_2D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp16x16_3D_default.cairo | 2 +- .../argmin_fp16x16_3D_default/input_0.cairo | 4 +- .../argmin_fp16x16_3D_default/output_0.cairo | 4 +- .../argmin_fp16x16_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp16x16_3D_last_index.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_fp8x23_1D_default.cairo | 2 +- .../argmin_fp8x23_1D_default/input_0.cairo | 4 +- .../argmin_fp8x23_1D_default/output_0.cairo | 2 +- .../argmin_fp8x23_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_1D_last_index.cairo | 2 +- .../argmin_fp8x23_1D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_2D_default.cairo | 2 +- .../argmin_fp8x23_2D_default/input_0.cairo | 4 +- .../argmin_fp8x23_2D_default/output_0.cairo | 2 +- .../argmin_fp8x23_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_2D_last_index.cairo | 2 +- .../argmin_fp8x23_2D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_3D_default.cairo | 2 +- .../argmin_fp8x23_3D_default/input_0.cairo | 4 +- .../argmin_fp8x23_3D_default/output_0.cairo | 2 +- .../argmin_fp8x23_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 2 +- .../nodes/argmin_fp8x23_3D_last_index.cairo | 2 +- .../argmin_fp8x23_3D_last_index/input_0.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/argmin_i32_1D_default.cairo | 2 +- .../nodes/argmin_i32_1D_default/input_0.cairo | 4 +- .../argmin_i32_1D_default/output_0.cairo | 4 +- .../nodes/argmin_i32_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_i32_1D_last_index.cairo | 2 +- .../argmin_i32_1D_last_index/input_0.cairo | 4 +- .../argmin_i32_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_i32_2D_default.cairo | 2 +- .../nodes/argmin_i32_2D_default/input_0.cairo | 4 +- .../argmin_i32_2D_default/output_0.cairo | 4 +- .../nodes/argmin_i32_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_i32_2D_last_index.cairo | 2 +- .../argmin_i32_2D_last_index/input_0.cairo | 4 +- .../argmin_i32_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_i32_3D_default.cairo | 2 +- .../nodes/argmin_i32_3D_default/input_0.cairo | 4 +- .../argmin_i32_3D_default/output_0.cairo | 4 +- .../nodes/argmin_i32_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_i32_3D_last_index.cairo | 2 +- .../argmin_i32_3D_last_index/input_0.cairo | 4 +- .../argmin_i32_3D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_i8_1D_default.cairo | 2 +- .../nodes/argmin_i8_1D_default/input_0.cairo | 4 +- .../nodes/argmin_i8_1D_default/output_0.cairo | 4 +- .../nodes/argmin_i8_1D_keepdims_false.cairo | 2 +- .../argmin_i8_1D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmin_i8_1D_last_index.cairo | 2 +- .../argmin_i8_1D_last_index/input_0.cairo | 4 +- .../argmin_i8_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_i8_2D_default.cairo | 2 +- .../nodes/argmin_i8_2D_default/input_0.cairo | 4 +- .../nodes/argmin_i8_2D_default/output_0.cairo | 4 +- .../nodes/argmin_i8_2D_keepdims_false.cairo | 2 +- .../argmin_i8_2D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmin_i8_2D_last_index.cairo | 2 +- .../argmin_i8_2D_last_index/input_0.cairo | 4 +- .../argmin_i8_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_i8_3D_default.cairo | 2 +- .../nodes/argmin_i8_3D_default/input_0.cairo | 4 +- .../nodes/argmin_i8_3D_default/output_0.cairo | 4 +- .../nodes/argmin_i8_3D_keepdims_false.cairo | 2 +- .../argmin_i8_3D_keepdims_false/input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/argmin_i8_3D_last_index.cairo | 2 +- .../argmin_i8_3D_last_index/input_0.cairo | 4 +- .../argmin_i8_3D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_u32_1D_default.cairo | 2 +- .../nodes/argmin_u32_1D_default/input_0.cairo | 4 +- .../argmin_u32_1D_default/output_0.cairo | 4 +- .../nodes/argmin_u32_1D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_u32_1D_last_index.cairo | 2 +- .../argmin_u32_1D_last_index/input_0.cairo | 4 +- .../argmin_u32_1D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_u32_2D_default.cairo | 2 +- .../nodes/argmin_u32_2D_default/input_0.cairo | 4 +- .../argmin_u32_2D_default/output_0.cairo | 4 +- .../nodes/argmin_u32_2D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_u32_2D_last_index.cairo | 2 +- .../argmin_u32_2D_last_index/input_0.cairo | 4 +- .../argmin_u32_2D_last_index/output_0.cairo | 4 +- src/tests/nodes/argmin_u32_3D_default.cairo | 2 +- .../nodes/argmin_u32_3D_default/input_0.cairo | 4 +- .../argmin_u32_3D_default/output_0.cairo | 4 +- .../nodes/argmin_u32_3D_keepdims_false.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/argmin_u32_3D_last_index.cairo | 2 +- .../argmin_u32_3D_last_index/input_0.cairo | 4 +- .../argmin_u32_3D_last_index/output_0.cairo | 4 +- src/tests/nodes/asin_fp16x16.cairo | 2 +- src/tests/nodes/asin_fp16x16/input_0.cairo | 4 +- src/tests/nodes/asin_fp16x16/output_0.cairo | 4 +- src/tests/nodes/asin_fp8x23.cairo | 2 +- src/tests/nodes/asin_fp8x23/input_0.cairo | 4 +- src/tests/nodes/asin_fp8x23/output_0.cairo | 4 +- src/tests/nodes/asinh_fp16x16.cairo | 2 +- src/tests/nodes/asinh_fp16x16/input_0.cairo | 4 +- src/tests/nodes/asinh_fp16x16/output_0.cairo | 4 +- src/tests/nodes/asinh_fp8x23.cairo | 2 +- src/tests/nodes/asinh_fp8x23/input_0.cairo | 4 +- src/tests/nodes/asinh_fp8x23/output_0.cairo | 4 +- src/tests/nodes/asinh_i32_fp16x16.cairo | 2 +- .../nodes/asinh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/asinh_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/asinh_i32_fp8x23.cairo | 2 +- .../nodes/asinh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/asinh_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/asinh_i8_fp16x16.cairo | 2 +- .../nodes/asinh_i8_fp16x16/input_0.cairo | 4 +- .../nodes/asinh_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/asinh_i8_fp8x23.cairo | 2 +- src/tests/nodes/asinh_i8_fp8x23/input_0.cairo | 4 +- .../nodes/asinh_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/asinh_u32_fp16x16.cairo | 2 +- .../nodes/asinh_u32_fp16x16/input_0.cairo | 4 +- .../nodes/asinh_u32_fp16x16/output_0.cairo | 4 +- .../nodes/asinh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/asinh_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/atan_fp16x16.cairo | 2 +- src/tests/nodes/atan_fp16x16/input_0.cairo | 4 +- src/tests/nodes/atan_fp16x16/output_0.cairo | 4 +- src/tests/nodes/atan_fp8x23.cairo | 2 +- src/tests/nodes/atan_fp8x23/input_0.cairo | 4 +- src/tests/nodes/atan_fp8x23/output_0.cairo | 4 +- src/tests/nodes/atan_i32_fp16x16.cairo | 2 +- .../nodes/atan_i32_fp16x16/input_0.cairo | 4 +- .../nodes/atan_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/atan_i32_fp8x23.cairo | 2 +- src/tests/nodes/atan_i32_fp8x23/input_0.cairo | 4 +- .../nodes/atan_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/atan_i8_fp16x16.cairo | 2 +- src/tests/nodes/atan_i8_fp16x16/input_0.cairo | 4 +- .../nodes/atan_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/atan_i8_fp8x23.cairo | 2 +- src/tests/nodes/atan_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/atan_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/atan_u32_fp16x16.cairo | 2 +- .../nodes/atan_u32_fp16x16/input_0.cairo | 4 +- .../nodes/atan_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/atan_u32_fp8x23/input_0.cairo | 2 +- .../nodes/atan_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/ceil_fp16x16.cairo | 2 +- src/tests/nodes/ceil_fp16x16/input_0.cairo | 4 +- src/tests/nodes/ceil_fp16x16/output_0.cairo | 4 +- src/tests/nodes/ceil_fp8x23.cairo | 2 +- src/tests/nodes/ceil_fp8x23/input_0.cairo | 4 +- src/tests/nodes/ceil_fp8x23/output_0.cairo | 4 +- src/tests/nodes/concat_fp16x16_1d.cairo | 2 +- .../nodes/concat_fp16x16_1d/input_0.cairo | 4 +- .../nodes/concat_fp16x16_1d/input_1.cairo | 4 +- .../nodes/concat_fp16x16_1d/output_0.cairo | 4 +- src/tests/nodes/concat_fp16x16_2d.cairo | 2 +- .../nodes/concat_fp16x16_2d/input_0.cairo | 4 +- .../nodes/concat_fp16x16_2d/input_1.cairo | 4 +- .../nodes/concat_fp16x16_2d/output_0.cairo | 4 +- .../nodes/concat_fp16x16_3d_axis_1.cairo | 2 +- .../concat_fp16x16_3d_axis_1/input_0.cairo | 4 +- .../concat_fp16x16_3d_axis_1/input_1.cairo | 4 +- .../concat_fp16x16_3d_axis_1/output_0.cairo | 4 +- .../nodes/concat_fp16x16_3d_axis_2.cairo | 2 +- .../concat_fp16x16_3d_axis_2/input_0.cairo | 4 +- .../concat_fp16x16_3d_axis_2/input_1.cairo | 4 +- .../concat_fp16x16_3d_axis_2/output_0.cairo | 4 +- .../nodes/concat_fp16x16_3d_default.cairo | 2 +- .../concat_fp16x16_3d_default/input_0.cairo | 4 +- .../concat_fp16x16_3d_default/input_1.cairo | 4 +- .../concat_fp16x16_3d_default/output_0.cairo | 4 +- ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/concat_fp8x23_1d.cairo | 2 +- .../nodes/concat_fp8x23_1d/input_0.cairo | 4 +- .../nodes/concat_fp8x23_1d/input_1.cairo | 4 +- .../nodes/concat_fp8x23_1d/output_0.cairo | 4 +- src/tests/nodes/concat_fp8x23_2d.cairo | 2 +- .../nodes/concat_fp8x23_2d/input_0.cairo | 4 +- .../nodes/concat_fp8x23_2d/input_1.cairo | 4 +- .../nodes/concat_fp8x23_2d/output_0.cairo | 4 +- src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 2 +- .../concat_fp8x23_3d_axis_1/input_0.cairo | 4 +- .../concat_fp8x23_3d_axis_1/input_1.cairo | 4 +- .../concat_fp8x23_3d_axis_1/output_0.cairo | 4 +- src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 2 +- .../concat_fp8x23_3d_axis_2/input_0.cairo | 4 +- .../concat_fp8x23_3d_axis_2/input_1.cairo | 4 +- .../concat_fp8x23_3d_axis_2/output_0.cairo | 4 +- .../nodes/concat_fp8x23_3d_default.cairo | 2 +- .../concat_fp8x23_3d_default/input_0.cairo | 4 +- .../concat_fp8x23_3d_default/input_1.cairo | 4 +- .../concat_fp8x23_3d_default/output_0.cairo | 4 +- ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/concat_i32_1d/input_0.cairo | 4 +- src/tests/nodes/concat_i32_1d/input_1.cairo | 4 +- src/tests/nodes/concat_i32_1d/output_0.cairo | 4 +- src/tests/nodes/concat_i32_2d/input_0.cairo | 4 +- src/tests/nodes/concat_i32_2d/input_1.cairo | 4 +- src/tests/nodes/concat_i32_2d/output_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_1/input_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_1/input_1.cairo | 4 +- .../nodes/concat_i32_3d_axis_1/output_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_2/input_0.cairo | 4 +- .../nodes/concat_i32_3d_axis_2/input_1.cairo | 4 +- .../nodes/concat_i32_3d_axis_2/output_0.cairo | 4 +- .../nodes/concat_i32_3d_default/input_0.cairo | 4 +- .../nodes/concat_i32_3d_default/input_1.cairo | 4 +- .../concat_i32_3d_default/output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/concat_u32_1d.cairo | 2 +- src/tests/nodes/concat_u32_1d/input_0.cairo | 4 +- src/tests/nodes/concat_u32_1d/input_1.cairo | 4 +- src/tests/nodes/concat_u32_1d/output_0.cairo | 4 +- src/tests/nodes/concat_u32_2d.cairo | 2 +- src/tests/nodes/concat_u32_2d/input_0.cairo | 4 +- src/tests/nodes/concat_u32_2d/input_1.cairo | 4 +- src/tests/nodes/concat_u32_2d/output_0.cairo | 4 +- src/tests/nodes/concat_u32_3d_axis_1.cairo | 2 +- .../nodes/concat_u32_3d_axis_1/input_0.cairo | 4 +- .../nodes/concat_u32_3d_axis_1/input_1.cairo | 4 +- .../nodes/concat_u32_3d_axis_1/output_0.cairo | 4 +- src/tests/nodes/concat_u32_3d_axis_2.cairo | 2 +- .../nodes/concat_u32_3d_axis_2/input_0.cairo | 4 +- .../nodes/concat_u32_3d_axis_2/input_1.cairo | 4 +- .../nodes/concat_u32_3d_axis_2/output_0.cairo | 4 +- src/tests/nodes/concat_u32_3d_default.cairo | 2 +- .../nodes/concat_u32_3d_default/input_0.cairo | 4 +- .../nodes/concat_u32_3d_default/input_1.cairo | 4 +- .../concat_u32_3d_default/output_0.cairo | 4 +- .../concat_u32_3d_three_tensors_axis_1.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- .../concat_u32_3d_three_tensors_axis_2.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../input_2.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/cos_fp16x16.cairo | 2 +- src/tests/nodes/cos_fp16x16/input_0.cairo | 4 +- src/tests/nodes/cos_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cos_fp8x23.cairo | 2 +- src/tests/nodes/cos_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cos_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cos_i32_fp16x16.cairo | 2 +- src/tests/nodes/cos_i32_fp16x16/input_0.cairo | 4 +- .../nodes/cos_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cos_i32_fp8x23.cairo | 2 +- src/tests/nodes/cos_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cos_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cos_i8_fp16x16.cairo | 2 +- src/tests/nodes/cos_i8_fp16x16/input_0.cairo | 4 +- src/tests/nodes/cos_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cos_i8_fp8x23.cairo | 2 +- src/tests/nodes/cos_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cos_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cos_u32_fp16x16.cairo | 2 +- src/tests/nodes/cos_u32_fp16x16/input_0.cairo | 4 +- .../nodes/cos_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cos_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/cos_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cosh_fp16x16.cairo | 2 +- src/tests/nodes/cosh_fp16x16/input_0.cairo | 4 +- src/tests/nodes/cosh_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cosh_fp8x23.cairo | 2 +- src/tests/nodes/cosh_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cosh_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cosh_i32_fp16x16.cairo | 2 +- .../nodes/cosh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/cosh_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cosh_i32_fp8x23.cairo | 2 +- src/tests/nodes/cosh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/cosh_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cosh_i8_fp16x16.cairo | 2 +- src/tests/nodes/cosh_i8_fp16x16/input_0.cairo | 4 +- .../nodes/cosh_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cosh_i8_fp8x23.cairo | 2 +- src/tests/nodes/cosh_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/cosh_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/cosh_u32_fp16x16.cairo | 2 +- .../nodes/cosh_u32_fp16x16/input_0.cairo | 4 +- .../nodes/cosh_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/cosh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/cosh_u32_fp8x23/output_0.cairo | 4 +- .../nodes/cumsum_fp16x16_1d_default.cairo | 2 +- .../cumsum_fp16x16_1d_default/input_0.cairo | 4 +- .../cumsum_fp16x16_1d_default/output_0.cairo | 4 +- .../nodes/cumsum_fp16x16_1d_exclusive.cairo | 2 +- .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/cumsum_fp16x16_1d_reverse.cairo | 2 +- .../cumsum_fp16x16_1d_reverse/input_0.cairo | 4 +- .../cumsum_fp16x16_1d_reverse/output_0.cairo | 4 +- .../cumsum_fp16x16_1d_reverse_exclusive.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/cumsum_fp16x16_2d_axis_0.cairo | 2 +- .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 4 +- .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 4 +- .../nodes/cumsum_fp16x16_2d_axis_1.cairo | 2 +- .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 4 +- .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 4 +- .../nodes/cumsum_fp8x23_1d_default.cairo | 2 +- .../cumsum_fp8x23_1d_default/input_0.cairo | 4 +- .../cumsum_fp8x23_1d_default/output_0.cairo | 4 +- .../nodes/cumsum_fp8x23_1d_exclusive.cairo | 2 +- .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 4 +- .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 4 +- .../nodes/cumsum_fp8x23_1d_reverse.cairo | 2 +- .../cumsum_fp8x23_1d_reverse/input_0.cairo | 4 +- .../cumsum_fp8x23_1d_reverse/output_0.cairo | 4 +- .../cumsum_fp8x23_1d_reverse_exclusive.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo | 2 +- .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 4 +- .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 4 +- src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo | 2 +- .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 4 +- .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 4 +- .../nodes/cumsum_i32_1d_default/input_0.cairo | 4 +- .../cumsum_i32_1d_default/output_0.cairo | 4 +- .../cumsum_i32_1d_exclusive/input_0.cairo | 4 +- .../cumsum_i32_1d_exclusive/output_0.cairo | 4 +- .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 4 +- .../cumsum_i32_1d_reverse/output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 4 +- .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 4 +- .../nodes/cumsum_i8_1d_default/input_0.cairo | 4 +- .../nodes/cumsum_i8_1d_default/output_0.cairo | 4 +- .../cumsum_i8_1d_exclusive/input_0.cairo | 4 +- .../cumsum_i8_1d_exclusive/output_0.cairo | 4 +- .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 4 +- .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 4 +- .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 4 +- .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 4 +- .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 4 +- src/tests/nodes/cumsum_u32_1d_default.cairo | 2 +- .../nodes/cumsum_u32_1d_default/input_0.cairo | 4 +- .../cumsum_u32_1d_default/output_0.cairo | 4 +- src/tests/nodes/cumsum_u32_1d_exclusive.cairo | 2 +- .../cumsum_u32_1d_exclusive/input_0.cairo | 4 +- .../cumsum_u32_1d_exclusive/output_0.cairo | 4 +- src/tests/nodes/cumsum_u32_1d_reverse.cairo | 2 +- .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 4 +- .../cumsum_u32_1d_reverse/output_0.cairo | 4 +- .../cumsum_u32_1d_reverse_exclusive.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/cumsum_u32_2d_axis_0.cairo | 2 +- .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 4 +- .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 4 +- src/tests/nodes/cumsum_u32_2d_axis_1.cairo | 2 +- .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 4 +- .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 4 +- src/tests/nodes/div_fp16x16.cairo | 2 +- src/tests/nodes/div_fp16x16/input_0.cairo | 4 +- src/tests/nodes/div_fp16x16/input_1.cairo | 4 +- src/tests/nodes/div_fp16x16/output_0.cairo | 4 +- src/tests/nodes/div_fp16x16_broadcast.cairo | 2 +- .../nodes/div_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/div_fp16x16_broadcast/input_1.cairo | 4 +- .../div_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/div_fp8x23.cairo | 2 +- src/tests/nodes/div_fp8x23/input_0.cairo | 4 +- src/tests/nodes/div_fp8x23/input_1.cairo | 4 +- src/tests/nodes/div_fp8x23/output_0.cairo | 4 +- src/tests/nodes/div_fp8x23_broadcast.cairo | 2 +- .../nodes/div_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/div_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/div_fp8x23_broadcast/output_0.cairo | 4 +- src/tests/nodes/div_i32/input_0.cairo | 4 +- src/tests/nodes/div_i32/input_1.cairo | 4 +- src/tests/nodes/div_i32/output_0.cairo | 4 +- .../nodes/div_i32_broadcast/input_0.cairo | 4 +- .../nodes/div_i32_broadcast/input_1.cairo | 4 +- .../nodes/div_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/div_i8/input_0.cairo | 4 +- src/tests/nodes/div_i8/input_1.cairo | 4 +- src/tests/nodes/div_i8/output_0.cairo | 4 +- .../nodes/div_i8_broadcast/input_0.cairo | 4 +- .../nodes/div_i8_broadcast/input_1.cairo | 4 +- .../nodes/div_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/div_u32/input_0.cairo | 4 +- src/tests/nodes/div_u32/input_1.cairo | 4 +- src/tests/nodes/div_u32/output_0.cairo | 4 +- .../nodes/div_u32_broadcast/input_0.cairo | 4 +- .../nodes/div_u32_broadcast/input_1.cairo | 4 +- .../nodes/div_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/equal_fp16x16.cairo | 2 +- src/tests/nodes/equal_fp16x16/input_0.cairo | 4 +- src/tests/nodes/equal_fp16x16/input_1.cairo | 4 +- src/tests/nodes/equal_fp16x16/output_0.cairo | 4 +- src/tests/nodes/equal_fp16x16_broadcast.cairo | 2 +- .../equal_fp16x16_broadcast/input_0.cairo | 4 +- .../equal_fp16x16_broadcast/input_1.cairo | 4 +- .../equal_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/equal_fp8x23.cairo | 2 +- src/tests/nodes/equal_fp8x23/input_0.cairo | 4 +- src/tests/nodes/equal_fp8x23/input_1.cairo | 4 +- src/tests/nodes/equal_fp8x23/output_0.cairo | 2 +- src/tests/nodes/equal_fp8x23_broadcast.cairo | 2 +- .../equal_fp8x23_broadcast/input_0.cairo | 4 +- .../equal_fp8x23_broadcast/input_1.cairo | 4 +- .../equal_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/equal_i32.cairo | 2 +- src/tests/nodes/equal_i32/input_0.cairo | 4 +- src/tests/nodes/equal_i32/input_1.cairo | 4 +- src/tests/nodes/equal_i32/output_0.cairo | 4 +- src/tests/nodes/equal_i32_broadcast.cairo | 2 +- .../nodes/equal_i32_broadcast/input_0.cairo | 4 +- .../nodes/equal_i32_broadcast/input_1.cairo | 4 +- .../nodes/equal_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/equal_i8.cairo | 2 +- src/tests/nodes/equal_i8/input_0.cairo | 4 +- src/tests/nodes/equal_i8/input_1.cairo | 4 +- src/tests/nodes/equal_i8/output_0.cairo | 4 +- src/tests/nodes/equal_i8_broadcast.cairo | 2 +- .../nodes/equal_i8_broadcast/input_0.cairo | 4 +- .../nodes/equal_i8_broadcast/input_1.cairo | 4 +- .../nodes/equal_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/equal_u32.cairo | 2 +- src/tests/nodes/equal_u32/input_0.cairo | 4 +- src/tests/nodes/equal_u32/input_1.cairo | 4 +- src/tests/nodes/equal_u32/output_0.cairo | 4 +- src/tests/nodes/equal_u32_broadcast.cairo | 2 +- .../nodes/equal_u32_broadcast/input_0.cairo | 4 +- .../nodes/equal_u32_broadcast/input_1.cairo | 4 +- .../nodes/equal_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/exp_fp16x16.cairo | 2 +- src/tests/nodes/exp_fp16x16/input_0.cairo | 4 +- src/tests/nodes/exp_fp16x16/output_0.cairo | 4 +- src/tests/nodes/exp_fp8x23.cairo | 2 +- src/tests/nodes/exp_fp8x23/input_0.cairo | 4 +- src/tests/nodes/exp_fp8x23/output_0.cairo | 4 +- src/tests/nodes/exp_i32_fp16x16.cairo | 2 +- src/tests/nodes/exp_i32_fp16x16/input_0.cairo | 4 +- .../nodes/exp_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/exp_i32_fp8x23.cairo | 2 +- src/tests/nodes/exp_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/exp_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/exp_i8_fp16x16.cairo | 2 +- src/tests/nodes/exp_i8_fp16x16/input_0.cairo | 4 +- src/tests/nodes/exp_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/exp_i8_fp8x23.cairo | 2 +- src/tests/nodes/exp_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/exp_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/exp_u32_fp16x16.cairo | 2 +- src/tests/nodes/exp_u32_fp16x16/input_0.cairo | 4 +- .../nodes/exp_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/exp_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/exp_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/greater_equal_fp16x16.cairo | 2 +- .../nodes/greater_equal_fp16x16/input_0.cairo | 4 +- .../nodes/greater_equal_fp16x16/input_1.cairo | 4 +- .../greater_equal_fp16x16/output_0.cairo | 4 +- .../greater_equal_fp16x16_broadcast.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/greater_equal_fp8x23.cairo | 2 +- .../nodes/greater_equal_fp8x23/input_0.cairo | 4 +- .../nodes/greater_equal_fp8x23/input_1.cairo | 4 +- .../nodes/greater_equal_fp8x23/output_0.cairo | 2 +- .../greater_equal_fp8x23_broadcast.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/greater_equal_i32.cairo | 2 +- .../nodes/greater_equal_i32/input_0.cairo | 4 +- .../nodes/greater_equal_i32/input_1.cairo | 4 +- .../nodes/greater_equal_i32/output_0.cairo | 4 +- .../nodes/greater_equal_i32_broadcast.cairo | 2 +- .../greater_equal_i32_broadcast/input_0.cairo | 4 +- .../greater_equal_i32_broadcast/input_1.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/greater_equal_i8.cairo | 2 +- .../nodes/greater_equal_i8/input_0.cairo | 4 +- .../nodes/greater_equal_i8/input_1.cairo | 4 +- .../nodes/greater_equal_i8/output_0.cairo | 4 +- .../nodes/greater_equal_i8_broadcast.cairo | 2 +- .../greater_equal_i8_broadcast/input_0.cairo | 4 +- .../greater_equal_i8_broadcast/input_1.cairo | 4 +- .../greater_equal_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/greater_equal_u32.cairo | 2 +- .../nodes/greater_equal_u32/input_0.cairo | 4 +- .../nodes/greater_equal_u32/input_1.cairo | 4 +- .../nodes/greater_equal_u32/output_0.cairo | 4 +- .../nodes/greater_equal_u32_broadcast.cairo | 2 +- .../greater_equal_u32_broadcast/input_0.cairo | 4 +- .../greater_equal_u32_broadcast/input_1.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/greater_fp16x16.cairo | 2 +- src/tests/nodes/greater_fp16x16/input_0.cairo | 4 +- src/tests/nodes/greater_fp16x16/input_1.cairo | 4 +- .../nodes/greater_fp16x16/output_0.cairo | 4 +- .../nodes/greater_fp16x16_broadcast.cairo | 2 +- .../greater_fp16x16_broadcast/input_0.cairo | 4 +- .../greater_fp16x16_broadcast/input_1.cairo | 4 +- .../greater_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/greater_fp8x23.cairo | 2 +- src/tests/nodes/greater_fp8x23/input_0.cairo | 4 +- src/tests/nodes/greater_fp8x23/input_1.cairo | 4 +- src/tests/nodes/greater_fp8x23/output_0.cairo | 2 +- .../nodes/greater_fp8x23_broadcast.cairo | 2 +- .../greater_fp8x23_broadcast/input_0.cairo | 4 +- .../greater_fp8x23_broadcast/input_1.cairo | 4 +- .../greater_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/greater_i32.cairo | 2 +- src/tests/nodes/greater_i32/input_0.cairo | 4 +- src/tests/nodes/greater_i32/input_1.cairo | 4 +- src/tests/nodes/greater_i32/output_0.cairo | 4 +- src/tests/nodes/greater_i32_broadcast.cairo | 2 +- .../nodes/greater_i32_broadcast/input_0.cairo | 4 +- .../nodes/greater_i32_broadcast/input_1.cairo | 4 +- .../greater_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/greater_i8.cairo | 2 +- src/tests/nodes/greater_i8/input_0.cairo | 4 +- src/tests/nodes/greater_i8/input_1.cairo | 4 +- src/tests/nodes/greater_i8/output_0.cairo | 4 +- src/tests/nodes/greater_i8_broadcast.cairo | 2 +- .../nodes/greater_i8_broadcast/input_0.cairo | 4 +- .../nodes/greater_i8_broadcast/input_1.cairo | 4 +- .../nodes/greater_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/greater_u32.cairo | 2 +- src/tests/nodes/greater_u32/input_0.cairo | 4 +- src/tests/nodes/greater_u32/input_1.cairo | 4 +- src/tests/nodes/greater_u32/output_0.cairo | 4 +- src/tests/nodes/greater_u32_broadcast.cairo | 2 +- .../nodes/greater_u32_broadcast/input_0.cairo | 4 +- .../nodes/greater_u32_broadcast/input_1.cairo | 4 +- .../greater_u32_broadcast/output_0.cairo | 4 +- .../nodes/leaky_relu_fp16x16/input_0.cairo | 4 +- .../nodes/leaky_relu_fp16x16/output_0.cairo | 4 +- .../nodes/leaky_relu_fp8x23/input_0.cairo | 4 +- .../nodes/leaky_relu_fp8x23/output_0.cairo | 4 +- .../leaky_relu_i32_fp16x16/input_0.cairo | 4 +- .../leaky_relu_i32_fp16x16/output_0.cairo | 4 +- .../nodes/leaky_relu_i32_fp8x23/input_0.cairo | 4 +- .../leaky_relu_i32_fp8x23/output_0.cairo | 4 +- .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 4 +- .../leaky_relu_i8_fp16x16/output_0.cairo | 4 +- .../nodes/leaky_relu_i8_fp8x23/input_0.cairo | 4 +- .../nodes/leaky_relu_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/less_equal_fp16x16.cairo | 2 +- .../nodes/less_equal_fp16x16/input_0.cairo | 4 +- .../nodes/less_equal_fp16x16/input_1.cairo | 4 +- .../nodes/less_equal_fp16x16/output_0.cairo | 4 +- .../nodes/less_equal_fp16x16_broadcast.cairo | 2 +- .../input_0.cairo | 4 +- .../input_1.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/less_equal_fp8x23.cairo | 2 +- .../nodes/less_equal_fp8x23/input_0.cairo | 4 +- .../nodes/less_equal_fp8x23/input_1.cairo | 4 +- .../nodes/less_equal_fp8x23/output_0.cairo | 2 +- .../nodes/less_equal_fp8x23_broadcast.cairo | 2 +- .../less_equal_fp8x23_broadcast/input_0.cairo | 4 +- .../less_equal_fp8x23_broadcast/input_1.cairo | 4 +- .../output_0.cairo | 2 +- src/tests/nodes/less_equal_i32.cairo | 2 +- src/tests/nodes/less_equal_i32/input_0.cairo | 4 +- src/tests/nodes/less_equal_i32/input_1.cairo | 4 +- src/tests/nodes/less_equal_i32/output_0.cairo | 4 +- .../nodes/less_equal_i32_broadcast.cairo | 2 +- .../less_equal_i32_broadcast/input_0.cairo | 4 +- .../less_equal_i32_broadcast/input_1.cairo | 4 +- .../less_equal_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_equal_i8.cairo | 2 +- src/tests/nodes/less_equal_i8/input_0.cairo | 4 +- src/tests/nodes/less_equal_i8/input_1.cairo | 4 +- src/tests/nodes/less_equal_i8/output_0.cairo | 4 +- src/tests/nodes/less_equal_i8_broadcast.cairo | 2 +- .../less_equal_i8_broadcast/input_0.cairo | 4 +- .../less_equal_i8_broadcast/input_1.cairo | 4 +- .../less_equal_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_equal_u32.cairo | 2 +- src/tests/nodes/less_equal_u32/input_0.cairo | 4 +- src/tests/nodes/less_equal_u32/input_1.cairo | 4 +- src/tests/nodes/less_equal_u32/output_0.cairo | 4 +- .../nodes/less_equal_u32_broadcast.cairo | 2 +- .../less_equal_u32_broadcast/input_0.cairo | 4 +- .../less_equal_u32_broadcast/input_1.cairo | 4 +- .../less_equal_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_fp16x16.cairo | 2 +- src/tests/nodes/less_fp16x16/input_0.cairo | 4 +- src/tests/nodes/less_fp16x16/input_1.cairo | 4 +- src/tests/nodes/less_fp16x16/output_0.cairo | 4 +- src/tests/nodes/less_fp16x16_broadcast.cairo | 2 +- .../less_fp16x16_broadcast/input_0.cairo | 4 +- .../less_fp16x16_broadcast/input_1.cairo | 4 +- .../less_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_fp8x23.cairo | 2 +- src/tests/nodes/less_fp8x23/input_0.cairo | 4 +- src/tests/nodes/less_fp8x23/input_1.cairo | 4 +- src/tests/nodes/less_fp8x23/output_0.cairo | 2 +- src/tests/nodes/less_fp8x23_broadcast.cairo | 2 +- .../nodes/less_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/less_fp8x23_broadcast/input_1.cairo | 4 +- .../less_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/less_i32.cairo | 2 +- src/tests/nodes/less_i32/input_0.cairo | 4 +- src/tests/nodes/less_i32/input_1.cairo | 4 +- src/tests/nodes/less_i32/output_0.cairo | 4 +- src/tests/nodes/less_i32_broadcast.cairo | 2 +- .../nodes/less_i32_broadcast/input_0.cairo | 4 +- .../nodes/less_i32_broadcast/input_1.cairo | 4 +- .../nodes/less_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_i8.cairo | 2 +- src/tests/nodes/less_i8/input_0.cairo | 4 +- src/tests/nodes/less_i8/input_1.cairo | 4 +- src/tests/nodes/less_i8/output_0.cairo | 4 +- src/tests/nodes/less_i8_broadcast.cairo | 2 +- .../nodes/less_i8_broadcast/input_0.cairo | 4 +- .../nodes/less_i8_broadcast/input_1.cairo | 4 +- .../nodes/less_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/less_u32.cairo | 2 +- src/tests/nodes/less_u32/input_0.cairo | 4 +- src/tests/nodes/less_u32/input_1.cairo | 4 +- src/tests/nodes/less_u32/output_0.cairo | 4 +- src/tests/nodes/less_u32_broadcast.cairo | 2 +- .../nodes/less_u32_broadcast/input_0.cairo | 4 +- .../nodes/less_u32_broadcast/input_1.cairo | 4 +- .../nodes/less_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/linear_fp16x16/input_0.cairo | 4 +- src/tests/nodes/linear_fp16x16/input_1.cairo | 4 +- src/tests/nodes/linear_fp16x16/input_2.cairo | 4 +- src/tests/nodes/linear_fp16x16/output_0.cairo | 4 +- src/tests/nodes/linear_fp8x23/input_0.cairo | 4 +- src/tests/nodes/linear_fp8x23/input_1.cairo | 4 +- src/tests/nodes/linear_fp8x23/input_2.cairo | 4 +- src/tests/nodes/linear_fp8x23/output_0.cairo | 4 +- src/tests/nodes/linear_i32/input_0.cairo | 4 +- src/tests/nodes/linear_i32/input_1.cairo | 4 +- src/tests/nodes/linear_i32/input_2.cairo | 4 +- src/tests/nodes/linear_i32/output_0.cairo | 4 +- src/tests/nodes/linear_i8/input_0.cairo | 4 +- src/tests/nodes/linear_i8/input_1.cairo | 4 +- src/tests/nodes/linear_i8/input_2.cairo | 4 +- src/tests/nodes/linear_i8/output_0.cairo | 4 +- src/tests/nodes/linear_u32/input_0.cairo | 4 +- src/tests/nodes/linear_u32/input_1.cairo | 4 +- src/tests/nodes/linear_u32/input_2.cairo | 4 +- src/tests/nodes/linear_u32/output_0.cairo | 4 +- src/tests/nodes/log_fp16x16.cairo | 2 +- src/tests/nodes/log_fp16x16/input_0.cairo | 4 +- src/tests/nodes/log_fp16x16/output_0.cairo | 4 +- src/tests/nodes/log_fp8x23.cairo | 2 +- src/tests/nodes/log_fp8x23/input_0.cairo | 4 +- src/tests/nodes/log_fp8x23/output_0.cairo | 4 +- src/tests/nodes/log_i32_fp16x16.cairo | 2 +- src/tests/nodes/log_i32_fp16x16/input_0.cairo | 4 +- .../nodes/log_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/log_i32_fp8x23.cairo | 2 +- src/tests/nodes/log_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/log_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/log_i8_fp16x16.cairo | 2 +- src/tests/nodes/log_i8_fp16x16/input_0.cairo | 4 +- src/tests/nodes/log_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/log_i8_fp8x23.cairo | 2 +- src/tests/nodes/log_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/log_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/log_u32_fp16x16.cairo | 2 +- src/tests/nodes/log_u32_fp16x16/input_0.cairo | 4 +- .../nodes/log_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/log_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/log_u32_fp8x23/output_0.cairo | 4 +- .../logsoftmax_fp16x16_axis_0/input_0.cairo | 4 +- .../logsoftmax_fp16x16_axis_0/output_0.cairo | 4 +- .../logsoftmax_fp16x16_axis_1/input_0.cairo | 4 +- .../logsoftmax_fp16x16_axis_1/output_0.cairo | 4 +- .../logsoftmax_fp8x23_axis_0/input_0.cairo | 4 +- .../logsoftmax_fp8x23_axis_0/output_0.cairo | 4 +- .../logsoftmax_fp8x23_axis_1/input_0.cairo | 4 +- .../logsoftmax_fp8x23_axis_1/output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../logsoftmax_i8_fp8x23_axis_0/input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../logsoftmax_i8_fp8x23_axis_1/input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 4 +- .../input_0.cairo | 2 +- .../output_0.cairo | 4 +- src/tests/nodes/matmul_fp16x16_1d.cairo | 2 +- .../nodes/matmul_fp16x16_1d/input_0.cairo | 4 +- .../nodes/matmul_fp16x16_1d/input_1.cairo | 4 +- .../nodes/matmul_fp16x16_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_fp16x16_1x2.cairo | 2 +- .../nodes/matmul_fp16x16_1x2/input_0.cairo | 4 +- .../nodes/matmul_fp16x16_1x2/input_1.cairo | 4 +- .../nodes/matmul_fp16x16_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_fp16x16_2x1.cairo | 2 +- .../nodes/matmul_fp16x16_2x1/input_0.cairo | 4 +- .../nodes/matmul_fp16x16_2x1/input_1.cairo | 4 +- .../nodes/matmul_fp16x16_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_fp16x16_2x2.cairo | 2 +- .../nodes/matmul_fp16x16_2x2/input_0.cairo | 4 +- .../nodes/matmul_fp16x16_2x2/input_1.cairo | 4 +- .../nodes/matmul_fp16x16_2x2/output_0.cairo | 4 +- src/tests/nodes/matmul_fp8x23_1d.cairo | 2 +- .../nodes/matmul_fp8x23_1d/input_0.cairo | 4 +- .../nodes/matmul_fp8x23_1d/input_1.cairo | 4 +- .../nodes/matmul_fp8x23_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_fp8x23_1x2.cairo | 2 +- .../nodes/matmul_fp8x23_1x2/input_0.cairo | 4 +- .../nodes/matmul_fp8x23_1x2/input_1.cairo | 4 +- .../nodes/matmul_fp8x23_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_fp8x23_2x1.cairo | 2 +- .../nodes/matmul_fp8x23_2x1/input_0.cairo | 4 +- .../nodes/matmul_fp8x23_2x1/input_1.cairo | 4 +- .../nodes/matmul_fp8x23_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_fp8x23_2x2.cairo | 2 +- .../nodes/matmul_fp8x23_2x2/input_0.cairo | 4 +- .../nodes/matmul_fp8x23_2x2/input_1.cairo | 4 +- .../nodes/matmul_fp8x23_2x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_1d/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_1d/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_1x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_1x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x1/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x1/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i32_2x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i32_2x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i8_1d/input_0.cairo | 4 +- src/tests/nodes/matmul_i8_1d/input_1.cairo | 4 +- src/tests/nodes/matmul_i8_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_i8_1x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i8_1x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i8_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_i8_2x1/input_0.cairo | 4 +- src/tests/nodes/matmul_i8_2x1/input_1.cairo | 4 +- src/tests/nodes/matmul_i8_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_i8_2x2/input_0.cairo | 4 +- src/tests/nodes/matmul_i8_2x2/input_1.cairo | 4 +- src/tests/nodes/matmul_i8_2x2/output_0.cairo | 4 +- src/tests/nodes/matmul_u32_1d.cairo | 2 +- src/tests/nodes/matmul_u32_1d/input_0.cairo | 4 +- src/tests/nodes/matmul_u32_1d/input_1.cairo | 4 +- src/tests/nodes/matmul_u32_1d/output_0.cairo | 4 +- src/tests/nodes/matmul_u32_1x2.cairo | 2 +- src/tests/nodes/matmul_u32_1x2/input_0.cairo | 4 +- src/tests/nodes/matmul_u32_1x2/input_1.cairo | 4 +- src/tests/nodes/matmul_u32_1x2/output_0.cairo | 4 +- src/tests/nodes/matmul_u32_2x1.cairo | 2 +- src/tests/nodes/matmul_u32_2x1/input_0.cairo | 4 +- src/tests/nodes/matmul_u32_2x1/input_1.cairo | 4 +- src/tests/nodes/matmul_u32_2x1/output_0.cairo | 4 +- src/tests/nodes/matmul_u32_2x2.cairo | 2 +- src/tests/nodes/matmul_u32_2x2/input_0.cairo | 4 +- src/tests/nodes/matmul_u32_2x2/input_1.cairo | 4 +- src/tests/nodes/matmul_u32_2x2/output_0.cairo | 4 +- src/tests/nodes/mul_fp16x16.cairo | 2 +- src/tests/nodes/mul_fp16x16/input_0.cairo | 4 +- src/tests/nodes/mul_fp16x16/input_1.cairo | 4 +- src/tests/nodes/mul_fp16x16/output_0.cairo | 4 +- src/tests/nodes/mul_fp16x16_broadcast.cairo | 2 +- .../nodes/mul_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/mul_fp16x16_broadcast/input_1.cairo | 4 +- .../mul_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/mul_fp8x23.cairo | 2 +- src/tests/nodes/mul_fp8x23/input_0.cairo | 4 +- src/tests/nodes/mul_fp8x23/input_1.cairo | 4 +- src/tests/nodes/mul_fp8x23/output_0.cairo | 4 +- src/tests/nodes/mul_fp8x23_broadcast.cairo | 2 +- .../nodes/mul_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/mul_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/mul_fp8x23_broadcast/output_0.cairo | 4 +- src/tests/nodes/mul_i32/input_0.cairo | 4 +- src/tests/nodes/mul_i32/input_1.cairo | 4 +- src/tests/nodes/mul_i32/output_0.cairo | 4 +- .../nodes/mul_i32_broadcast/input_0.cairo | 4 +- .../nodes/mul_i32_broadcast/input_1.cairo | 4 +- .../nodes/mul_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/mul_i8/input_0.cairo | 4 +- src/tests/nodes/mul_i8/input_1.cairo | 4 +- src/tests/nodes/mul_i8/output_0.cairo | 4 +- .../nodes/mul_i8_broadcast/input_0.cairo | 4 +- .../nodes/mul_i8_broadcast/input_1.cairo | 4 +- .../nodes/mul_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/mul_u32/input_0.cairo | 4 +- src/tests/nodes/mul_u32/input_1.cairo | 4 +- src/tests/nodes/mul_u32/output_0.cairo | 4 +- .../nodes/mul_u32_broadcast/input_0.cairo | 4 +- .../nodes/mul_u32_broadcast/input_1.cairo | 4 +- .../nodes/mul_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/or_fp16x16.cairo | 2 +- src/tests/nodes/or_fp16x16/input_0.cairo | 4 +- src/tests/nodes/or_fp16x16/input_1.cairo | 4 +- src/tests/nodes/or_fp16x16/output_0.cairo | 4 +- src/tests/nodes/or_fp16x16_broadcast.cairo | 2 +- .../nodes/or_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/or_fp16x16_broadcast/input_1.cairo | 4 +- .../nodes/or_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/or_fp8x23.cairo | 2 +- src/tests/nodes/or_fp8x23/input_0.cairo | 4 +- src/tests/nodes/or_fp8x23/input_1.cairo | 4 +- src/tests/nodes/or_fp8x23/output_0.cairo | 2 +- src/tests/nodes/or_fp8x23_broadcast.cairo | 2 +- .../nodes/or_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/or_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/or_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/or_i32.cairo | 2 +- src/tests/nodes/or_i32/input_0.cairo | 4 +- src/tests/nodes/or_i32/input_1.cairo | 4 +- src/tests/nodes/or_i32/output_0.cairo | 4 +- src/tests/nodes/or_i32_broadcast.cairo | 2 +- .../nodes/or_i32_broadcast/input_0.cairo | 4 +- .../nodes/or_i32_broadcast/input_1.cairo | 4 +- .../nodes/or_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/or_i8.cairo | 2 +- src/tests/nodes/or_i8/input_0.cairo | 4 +- src/tests/nodes/or_i8/input_1.cairo | 4 +- src/tests/nodes/or_i8/output_0.cairo | 4 +- src/tests/nodes/or_i8_broadcast.cairo | 2 +- src/tests/nodes/or_i8_broadcast/input_0.cairo | 4 +- src/tests/nodes/or_i8_broadcast/input_1.cairo | 4 +- .../nodes/or_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/or_u32.cairo | 2 +- src/tests/nodes/or_u32/input_0.cairo | 4 +- src/tests/nodes/or_u32/input_1.cairo | 4 +- src/tests/nodes/or_u32/output_0.cairo | 4 +- src/tests/nodes/or_u32_broadcast.cairo | 2 +- .../nodes/or_u32_broadcast/input_0.cairo | 4 +- .../nodes/or_u32_broadcast/input_1.cairo | 4 +- .../nodes/or_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/reduce_sum_fp16x16_1D.cairo | 2 +- .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 4 +- .../reduce_sum_fp16x16_1D/output_0.cairo | 4 +- .../nodes/reduce_sum_fp16x16_2D_axis_1.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/reduce_sum_fp16x16_2D_default.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../reduce_sum_fp16x16_2D_keepdims.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- src/tests/nodes/reduce_sum_fp8x23_1D.cairo | 2 +- .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 4 +- .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 4 +- .../nodes/reduce_sum_fp8x23_2D_axis_1.cairo | 2 +- .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/reduce_sum_fp8x23_2D_default.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/reduce_sum_fp8x23_2D_keepdims.cairo | 2 +- .../input_0.cairo | 4 +- .../output_0.cairo | 4 +- .../nodes/reduce_sum_i32_1D/input_0.cairo | 4 +- .../nodes/reduce_sum_i32_1D/output_0.cairo | 4 +- .../reduce_sum_i32_2D_axis_1/input_0.cairo | 4 +- .../reduce_sum_i32_2D_axis_1/output_0.cairo | 4 +- .../reduce_sum_i32_2D_default/input_0.cairo | 4 +- .../reduce_sum_i32_2D_default/output_0.cairo | 4 +- .../reduce_sum_i32_2D_keepdims/input_0.cairo | 4 +- .../reduce_sum_i32_2D_keepdims/output_0.cairo | 4 +- src/tests/nodes/reduce_sum_i8_1D.cairo | 2 +- .../nodes/reduce_sum_i8_1D/input_0.cairo | 4 +- .../nodes/reduce_sum_i8_1D/output_0.cairo | 4 +- src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 2 +- .../reduce_sum_i8_2D_axis_1/input_0.cairo | 4 +- .../reduce_sum_i8_2D_axis_1/output_0.cairo | 4 +- .../nodes/reduce_sum_i8_2D_default.cairo | 2 +- .../reduce_sum_i8_2D_default/input_0.cairo | 4 +- .../reduce_sum_i8_2D_default/output_0.cairo | 4 +- .../nodes/reduce_sum_i8_2D_keepdims.cairo | 2 +- .../reduce_sum_i8_2D_keepdims/input_0.cairo | 4 +- .../reduce_sum_i8_2D_keepdims/output_0.cairo | 4 +- src/tests/nodes/reduce_sum_u32_1D.cairo | 2 +- .../nodes/reduce_sum_u32_1D/input_0.cairo | 4 +- .../nodes/reduce_sum_u32_1D/output_0.cairo | 4 +- .../nodes/reduce_sum_u32_2D_axis_1.cairo | 2 +- .../reduce_sum_u32_2D_axis_1/input_0.cairo | 4 +- .../reduce_sum_u32_2D_axis_1/output_0.cairo | 4 +- .../nodes/reduce_sum_u32_2D_default.cairo | 2 +- .../reduce_sum_u32_2D_default/input_0.cairo | 4 +- .../reduce_sum_u32_2D_default/output_0.cairo | 4 +- .../nodes/reduce_sum_u32_2D_keepdims.cairo | 2 +- .../reduce_sum_u32_2D_keepdims/input_0.cairo | 4 +- .../reduce_sum_u32_2D_keepdims/output_0.cairo | 4 +- src/tests/nodes/relu_fp16x16/input_0.cairo | 4 +- src/tests/nodes/relu_fp16x16/output_0.cairo | 4 +- src/tests/nodes/relu_fp8x23/input_0.cairo | 4 +- src/tests/nodes/relu_fp8x23/output_0.cairo | 4 +- src/tests/nodes/relu_i32/input_0.cairo | 4 +- src/tests/nodes/relu_i32/output_0.cairo | 4 +- src/tests/nodes/relu_i8/input_0.cairo | 4 +- src/tests/nodes/relu_i8/output_0.cairo | 4 +- src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 4 +- .../nodes/sigmoid_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 4 +- .../nodes/sigmoid_i32_fp16x16/input_0.cairo | 4 +- .../nodes/sigmoid_i32_fp16x16/output_0.cairo | 4 +- .../nodes/sigmoid_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sigmoid_i32_fp8x23/output_0.cairo | 4 +- .../nodes/sigmoid_i8_fp16x16/input_0.cairo | 4 +- .../nodes/sigmoid_i8_fp16x16/output_0.cairo | 4 +- .../nodes/sigmoid_i8_fp8x23/input_0.cairo | 4 +- .../nodes/sigmoid_i8_fp8x23/output_0.cairo | 4 +- .../nodes/sigmoid_u32_fp16x16/input_0.cairo | 4 +- .../nodes/sigmoid_u32_fp16x16/output_0.cairo | 4 +- .../nodes/sigmoid_u32_fp8x23/input_0.cairo | 2 +- .../nodes/sigmoid_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sin_fp16x16.cairo | 2 +- src/tests/nodes/sin_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sin_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sin_fp8x23.cairo | 2 +- src/tests/nodes/sin_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sin_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sin_i32_fp16x16.cairo | 2 +- src/tests/nodes/sin_i32_fp16x16/input_0.cairo | 4 +- .../nodes/sin_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sin_i32_fp8x23.cairo | 2 +- src/tests/nodes/sin_i32_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sin_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sin_i8_fp16x16.cairo | 2 +- src/tests/nodes/sin_i8_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sin_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sin_i8_fp8x23.cairo | 2 +- src/tests/nodes/sin_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sin_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sin_u32_fp16x16.cairo | 2 +- src/tests/nodes/sin_u32_fp16x16/input_0.cairo | 4 +- .../nodes/sin_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sin_u32_fp8x23/input_0.cairo | 2 +- src/tests/nodes/sin_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sinh_fp16x16.cairo | 2 +- src/tests/nodes/sinh_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sinh_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sinh_fp8x23.cairo | 2 +- src/tests/nodes/sinh_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sinh_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sinh_i32_fp16x16.cairo | 2 +- .../nodes/sinh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/sinh_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sinh_i32_fp8x23.cairo | 2 +- src/tests/nodes/sinh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sinh_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sinh_i8_fp16x16.cairo | 2 +- src/tests/nodes/sinh_i8_fp16x16/input_0.cairo | 4 +- .../nodes/sinh_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sinh_i8_fp8x23.cairo | 2 +- src/tests/nodes/sinh_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sinh_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sinh_u32_fp16x16.cairo | 2 +- .../nodes/sinh_u32_fp16x16/input_0.cairo | 4 +- .../nodes/sinh_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sinh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/sinh_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/softmax_fp16x16/input_0.cairo | 4 +- .../nodes/softmax_fp16x16/output_0.cairo | 4 +- src/tests/nodes/softmax_fp8x23/input_0.cairo | 4 +- src/tests/nodes/softmax_fp8x23/output_0.cairo | 4 +- .../nodes/softmax_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softmax_i32_fp16x16/output_0.cairo | 4 +- .../nodes/softmax_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softmax_i32_fp8x23/output_0.cairo | 4 +- .../nodes/softmax_i8_fp16x16/input_0.cairo | 4 +- .../nodes/softmax_i8_fp16x16/output_0.cairo | 4 +- .../nodes/softmax_i8_fp8x23/input_0.cairo | 4 +- .../nodes/softmax_i8_fp8x23/output_0.cairo | 4 +- .../nodes/softmax_u32_fp16x16/input_0.cairo | 4 +- .../nodes/softmax_u32_fp16x16/output_0.cairo | 4 +- .../nodes/softmax_u32_fp8x23/input_0.cairo | 2 +- .../nodes/softmax_u32_fp8x23/output_0.cairo | 4 +- .../nodes/softplus_fp16x16/input_0.cairo | 4 +- .../nodes/softplus_fp16x16/output_0.cairo | 4 +- src/tests/nodes/softplus_fp8x23/input_0.cairo | 4 +- .../nodes/softplus_fp8x23/output_0.cairo | 4 +- .../nodes/softplus_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softplus_i32_fp16x16/output_0.cairo | 4 +- .../nodes/softplus_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softplus_i32_fp8x23/output_0.cairo | 4 +- .../nodes/softplus_i8_fp16x16/input_0.cairo | 4 +- .../nodes/softplus_i8_fp16x16/output_0.cairo | 4 +- .../nodes/softplus_i8_fp8x23/input_0.cairo | 4 +- .../nodes/softplus_i8_fp8x23/output_0.cairo | 4 +- .../nodes/softplus_u32_fp16x16/input_0.cairo | 4 +- .../nodes/softplus_u32_fp16x16/output_0.cairo | 4 +- .../nodes/softplus_u32_fp8x23/input_0.cairo | 2 +- .../nodes/softplus_u32_fp8x23/output_0.cairo | 4 +- .../nodes/softsign_fp16x16/input_0.cairo | 4 +- .../nodes/softsign_fp16x16/output_0.cairo | 4 +- src/tests/nodes/softsign_fp8x23/input_0.cairo | 4 +- .../nodes/softsign_fp8x23/output_0.cairo | 4 +- .../nodes/softsign_i32_fp16x16/input_0.cairo | 4 +- .../nodes/softsign_i32_fp16x16/output_0.cairo | 4 +- .../nodes/softsign_i32_fp8x23/input_0.cairo | 4 +- .../nodes/softsign_i32_fp8x23/output_0.cairo | 4 +- .../nodes/softsign_i8_fp16x16/input_0.cairo | 4 +- .../nodes/softsign_i8_fp16x16/output_0.cairo | 4 +- .../nodes/softsign_i8_fp8x23/input_0.cairo | 4 +- .../nodes/softsign_i8_fp8x23/output_0.cairo | 4 +- .../nodes/softsign_u32_fp16x16/input_0.cairo | 4 +- .../nodes/softsign_u32_fp16x16/output_0.cairo | 4 +- .../nodes/softsign_u32_fp8x23/input_0.cairo | 2 +- .../nodes/softsign_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sqrt_fp16x16.cairo | 2 +- src/tests/nodes/sqrt_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sqrt_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sqrt_fp8x23.cairo | 2 +- src/tests/nodes/sqrt_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sqrt_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sqrt_i32_fp16x16.cairo | 2 +- .../nodes/sqrt_i32_fp16x16/input_0.cairo | 4 +- .../nodes/sqrt_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sqrt_i32_fp8x23.cairo | 2 +- src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo | 4 +- .../nodes/sqrt_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sqrt_i8_fp16x16.cairo | 2 +- src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo | 4 +- .../nodes/sqrt_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sqrt_i8_fp8x23.cairo | 2 +- src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sqrt_u32_fp16x16.cairo | 2 +- .../nodes/sqrt_u32_fp16x16/input_0.cairo | 4 +- .../nodes/sqrt_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo | 2 +- .../nodes/sqrt_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sub_fp16x16.cairo | 2 +- src/tests/nodes/sub_fp16x16/input_0.cairo | 4 +- src/tests/nodes/sub_fp16x16/input_1.cairo | 4 +- src/tests/nodes/sub_fp16x16/output_0.cairo | 4 +- src/tests/nodes/sub_fp16x16_broadcast.cairo | 2 +- .../nodes/sub_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/sub_fp16x16_broadcast/input_1.cairo | 4 +- .../sub_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/sub_fp8x23.cairo | 2 +- src/tests/nodes/sub_fp8x23/input_0.cairo | 4 +- src/tests/nodes/sub_fp8x23/input_1.cairo | 4 +- src/tests/nodes/sub_fp8x23/output_0.cairo | 4 +- src/tests/nodes/sub_fp8x23_broadcast.cairo | 2 +- .../nodes/sub_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/sub_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/sub_fp8x23_broadcast/output_0.cairo | 4 +- src/tests/nodes/sub_i32/input_0.cairo | 4 +- src/tests/nodes/sub_i32/input_1.cairo | 4 +- src/tests/nodes/sub_i32/output_0.cairo | 4 +- .../nodes/sub_i32_broadcast/input_0.cairo | 4 +- .../nodes/sub_i32_broadcast/input_1.cairo | 4 +- .../nodes/sub_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/sub_i8/input_0.cairo | 4 +- src/tests/nodes/sub_i8/input_1.cairo | 4 +- src/tests/nodes/sub_i8/output_0.cairo | 4 +- .../nodes/sub_i8_broadcast/input_0.cairo | 4 +- .../nodes/sub_i8_broadcast/input_1.cairo | 4 +- .../nodes/sub_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/sub_u32/input_0.cairo | 4 +- src/tests/nodes/sub_u32/input_1.cairo | 4 +- src/tests/nodes/sub_u32/output_0.cairo | 4 +- .../nodes/sub_u32_broadcast/input_0.cairo | 4 +- .../nodes/sub_u32_broadcast/input_1.cairo | 4 +- .../nodes/sub_u32_broadcast/output_0.cairo | 4 +- src/tests/nodes/tanh_fp16x16.cairo | 2 +- src/tests/nodes/tanh_fp16x16/input_0.cairo | 4 +- src/tests/nodes/tanh_fp16x16/output_0.cairo | 4 +- src/tests/nodes/tanh_fp8x23.cairo | 2 +- src/tests/nodes/tanh_fp8x23/input_0.cairo | 4 +- src/tests/nodes/tanh_fp8x23/output_0.cairo | 4 +- src/tests/nodes/tanh_i32_fp16x16.cairo | 2 +- .../nodes/tanh_i32_fp16x16/input_0.cairo | 4 +- .../nodes/tanh_i32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/tanh_i32_fp8x23.cairo | 2 +- src/tests/nodes/tanh_i32_fp8x23/input_0.cairo | 4 +- .../nodes/tanh_i32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/tanh_i8_fp16x16.cairo | 2 +- src/tests/nodes/tanh_i8_fp16x16/input_0.cairo | 4 +- .../nodes/tanh_i8_fp16x16/output_0.cairo | 4 +- src/tests/nodes/tanh_i8_fp8x23.cairo | 2 +- src/tests/nodes/tanh_i8_fp8x23/input_0.cairo | 4 +- src/tests/nodes/tanh_i8_fp8x23/output_0.cairo | 4 +- src/tests/nodes/tanh_u32_fp16x16.cairo | 2 +- .../nodes/tanh_u32_fp16x16/input_0.cairo | 4 +- .../nodes/tanh_u32_fp16x16/output_0.cairo | 4 +- src/tests/nodes/tanh_u32_fp8x23/input_0.cairo | 2 +- .../nodes/tanh_u32_fp8x23/output_0.cairo | 4 +- src/tests/nodes/transpose_fp16x16_2d.cairo | 2 +- .../nodes/transpose_fp16x16_2d/input_0.cairo | 4 +- .../nodes/transpose_fp16x16_2d/output_0.cairo | 4 +- src/tests/nodes/transpose_fp16x16_3d.cairo | 2 +- .../nodes/transpose_fp16x16_3d/input_0.cairo | 4 +- .../nodes/transpose_fp16x16_3d/output_0.cairo | 4 +- src/tests/nodes/transpose_fp8x23_2d.cairo | 2 +- .../nodes/transpose_fp8x23_2d/input_0.cairo | 4 +- .../nodes/transpose_fp8x23_2d/output_0.cairo | 4 +- src/tests/nodes/transpose_fp8x23_3d.cairo | 2 +- .../nodes/transpose_fp8x23_3d/input_0.cairo | 4 +- .../nodes/transpose_fp8x23_3d/output_0.cairo | 4 +- .../nodes/transpose_i32_2d/input_0.cairo | 4 +- .../nodes/transpose_i32_2d/output_0.cairo | 4 +- .../nodes/transpose_i32_3d/input_0.cairo | 4 +- .../nodes/transpose_i32_3d/output_0.cairo | 4 +- src/tests/nodes/transpose_i8_2d/input_0.cairo | 4 +- .../nodes/transpose_i8_2d/output_0.cairo | 4 +- src/tests/nodes/transpose_i8_3d/input_0.cairo | 4 +- .../nodes/transpose_i8_3d/output_0.cairo | 4 +- src/tests/nodes/transpose_u32_2d.cairo | 2 +- .../nodes/transpose_u32_2d/input_0.cairo | 4 +- .../nodes/transpose_u32_2d/output_0.cairo | 4 +- src/tests/nodes/transpose_u32_3d.cairo | 2 +- .../nodes/transpose_u32_3d/input_0.cairo | 4 +- .../nodes/transpose_u32_3d/output_0.cairo | 4 +- src/tests/nodes/xor_fp16x16.cairo | 2 +- src/tests/nodes/xor_fp16x16/input_0.cairo | 4 +- src/tests/nodes/xor_fp16x16/input_1.cairo | 4 +- src/tests/nodes/xor_fp16x16/output_0.cairo | 4 +- src/tests/nodes/xor_fp16x16_broadcast.cairo | 2 +- .../nodes/xor_fp16x16_broadcast/input_0.cairo | 4 +- .../nodes/xor_fp16x16_broadcast/input_1.cairo | 4 +- .../xor_fp16x16_broadcast/output_0.cairo | 4 +- src/tests/nodes/xor_fp8x23.cairo | 2 +- src/tests/nodes/xor_fp8x23/input_0.cairo | 4 +- src/tests/nodes/xor_fp8x23/input_1.cairo | 4 +- src/tests/nodes/xor_fp8x23/output_0.cairo | 2 +- src/tests/nodes/xor_fp8x23_broadcast.cairo | 2 +- .../nodes/xor_fp8x23_broadcast/input_0.cairo | 4 +- .../nodes/xor_fp8x23_broadcast/input_1.cairo | 4 +- .../nodes/xor_fp8x23_broadcast/output_0.cairo | 2 +- src/tests/nodes/xor_i32.cairo | 2 +- src/tests/nodes/xor_i32/input_0.cairo | 4 +- src/tests/nodes/xor_i32/input_1.cairo | 4 +- src/tests/nodes/xor_i32/output_0.cairo | 4 +- src/tests/nodes/xor_i32_broadcast.cairo | 2 +- .../nodes/xor_i32_broadcast/input_0.cairo | 4 +- .../nodes/xor_i32_broadcast/input_1.cairo | 4 +- .../nodes/xor_i32_broadcast/output_0.cairo | 4 +- src/tests/nodes/xor_i8.cairo | 2 +- src/tests/nodes/xor_i8/input_0.cairo | 4 +- src/tests/nodes/xor_i8/input_1.cairo | 4 +- src/tests/nodes/xor_i8/output_0.cairo | 4 +- src/tests/nodes/xor_i8_broadcast.cairo | 2 +- .../nodes/xor_i8_broadcast/input_0.cairo | 4 +- .../nodes/xor_i8_broadcast/input_1.cairo | 4 +- .../nodes/xor_i8_broadcast/output_0.cairo | 4 +- src/tests/nodes/xor_u32.cairo | 2 +- src/tests/nodes/xor_u32/input_0.cairo | 4 +- src/tests/nodes/xor_u32/input_1.cairo | 4 +- src/tests/nodes/xor_u32/output_0.cairo | 4 +- src/tests/nodes/xor_u32_broadcast.cairo | 2 +- .../nodes/xor_u32_broadcast/input_0.cairo | 4 +- .../nodes/xor_u32_broadcast/input_1.cairo | 4 +- .../nodes/xor_u32_broadcast/output_0.cairo | 4 +- .../fp_i8_test.cairo | 12 +- .../dequantize_linear_i32_test.cairo | 6 +- .../quantize_linear_fp_test/fp_i8_test.cairo | 12 +- .../quantize_linear_i32_test.cairo | 6 +- .../at/at_fp_test/at_fp16x16_test.cairo | 6 +- .../at/at_fp_test/at_fp8x23_test.cairo | 6 +- src/tests/tensor_core/at/at_i32_test.cairo | 6 +- src/tests/tensor_core/at/at_u32_test.cairo | 6 +- .../flatten_fp16x16_test.cairo | 6 +- .../flatten_fp_test/flatten_fp8x23_test.cairo | 6 +- .../flatten/flatten_i32_test.cairo | 6 +- .../flatten/flatten_u32_test.cairo | 6 +- .../max/max_fp_test/max_fp16x16_test.cairo | 6 +- .../max/max_fp_test/max_fp8x23_test.cairo | 6 +- src/tests/tensor_core/max/max_i32_test.cairo | 6 +- src/tests/tensor_core/max/max_u32_test.cairo | 6 +- .../min/min_fp_test/min_fp16x16_test.cairo | 6 +- .../min/min_fp_test/min_fp8x23_test.cairo | 6 +- src/tests/tensor_core/min/min_i32_test.cairo | 6 +- src/tests/tensor_core/min/min_u32_test.cairo | 6 +- src/tests/tensor_core/onehot.cairo | 3 - .../onehot_fp_test/onehot_fp16x16_test.cairo | 2 +- .../onehot_fp_test/onehot_fp8x23_test.cairo | 2 +- .../tensor_core/onehot/onehot_i32_test.cairo | 494 ------------------ .../tensor_core/onehot/onehot_i8_test.cairo | 148 ------ .../tensor_core/onehot/onehot_u32_test.cairo | 444 ---------------- .../stride_fp_test/stride_fp16x16_test.cairo | 6 +- .../stride_fp_test/stride_fp8x23_test.cairo | 6 +- .../tensor_core/stride/stride_i32_test.cairo | 6 +- .../tensor_core/stride/stride_u32_test.cairo | 6 +- 1489 files changed, 2633 insertions(+), 3751 deletions(-) delete mode 100644 src/tests/tensor_core/onehot/onehot_i32_test.cairo delete mode 100644 src/tests/tensor_core/onehot/onehot_i8_test.cairo delete mode 100644 src/tests/tensor_core/onehot/onehot_u32_test.cairo diff --git a/src/lib.cairo b/src/lib.cairo index 599a350a8..7cc13d360 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,5 +1,5 @@ mod operators; mod numbers; -// mod tests; +mod tests; mod utils; diff --git a/src/numbers.cairo b/src/numbers.cairo index e091d4f3f..077d22208 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -374,11 +374,11 @@ use orion::numbers::signed_integer::i8::i8; impl I8Number of NumberTrait { fn new(mag: u8, sign: bool) -> i8 { - i8 { mag: mag, sign: false } + i8 { mag, sign } } fn new_unscaled(mag: u8, sign: bool) -> i8 { - i8 { mag: mag, sign: false } + i8 { mag, sign } } fn from_felt(val: felt252) -> i8 { @@ -542,11 +542,11 @@ use orion::numbers::signed_integer::i16::i16; impl i16Number of NumberTrait { fn new(mag: u16, sign: bool) -> i16 { - i16 { mag: mag, sign: false } + i16 { mag, sign } } fn new_unscaled(mag: u16, sign: bool) -> i16 { - i16 { mag: mag, sign: false } + i16 { mag, sign } } fn from_felt(val: felt252) -> i16 { @@ -710,11 +710,11 @@ use orion::numbers::signed_integer::i32::i32; impl i32Number of NumberTrait { fn new(mag: u32, sign: bool) -> i32 { - i32 { mag: mag, sign: false } + i32 { mag, sign } } fn new_unscaled(mag: u32, sign: bool) -> i32 { - i32 { mag: mag, sign: false } + i32 { mag, sign } } fn from_felt(val: felt252) -> i32 { @@ -878,11 +878,11 @@ use orion::numbers::signed_integer::i64::i64; impl i64Number of NumberTrait { fn new(mag: u64, sign: bool) -> i64 { - i64 { mag: mag, sign: false } + i64 { mag, sign } } fn new_unscaled(mag: u64, sign: bool) -> i64 { - i64 { mag: mag, sign: false } + i64 { mag, sign } } fn from_felt(val: felt252) -> i64 { @@ -1046,11 +1046,11 @@ use orion::numbers::signed_integer::i128::i128; impl i128Number of NumberTrait { fn new(mag: u128, sign: bool) -> i128 { - i128 { mag: mag, sign: false } + i128 { mag, sign } } fn new_unscaled(mag: u128, sign: bool) -> i128 { - i128 { mag: mag, sign: false } + i128 { mag, sign } } fn from_felt(val: felt252) -> i128 { diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 934b4c753..251d006ee 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -1228,7 +1228,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn ceil_example() -> Tensor { @@ -1271,7 +1271,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn sin_example() -> Tensor { @@ -1316,7 +1316,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn cos_example() -> Tensor { @@ -1516,7 +1516,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn sinh_example() -> Tensor { @@ -1563,7 +1563,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn tanh_example() -> Tensor { @@ -1610,7 +1610,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn cosh_example() -> Tensor { @@ -1657,7 +1657,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn asinh_example() -> Tensor { @@ -1704,7 +1704,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn acosh_example() -> Tensor { @@ -1750,7 +1750,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn atan_example() -> Tensor { @@ -1795,7 +1795,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn asin_example() -> Tensor { @@ -1974,7 +1974,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn acos_example() -> Tensor { @@ -2058,7 +2058,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn sqrt_example() -> Tensor { diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo index 7327153f9..e4baf6c91 100644 --- a/src/operators/tensor/math/concat.cairo +++ b/src/operators/tensor/math/concat.cairo @@ -5,7 +5,7 @@ use debug::PrintTrait; use core::traits::Into; use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; fn concat, impl TCopy: Copy, impl TDrop: Drop,>( diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index 68f2018e5..56f465e0b 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -10,7 +10,7 @@ use option::OptionTrait; use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; /// Cf: TensorTrait::onehot docstring diff --git a/src/tests.cairo b/src/tests.cairo index 8463adb0a..51f345ec5 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ mod numbers; mod performance; mod tensor_core; -mod nodes; +// mod nodes; mod helpers; diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index 92658c5d0..8ec365032 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -2,8 +2,8 @@ use array::ArrayTrait; use array::SpanTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo index 0d60fa651..57f4475b7 100644 --- a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo @@ -2,8 +2,8 @@ use array::ArrayTrait; use array::SpanTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/i32.cairo b/src/tests/helpers/tensor/i32.cairo index 28e51857c..5de4889ff 100644 --- a/src/tests/helpers/tensor/i32.cairo +++ b/src/tests/helpers/tensor/i32.cairo @@ -3,8 +3,8 @@ use array::SpanTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn i32_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/i8.cairo b/src/tests/helpers/tensor/i8.cairo index 14693ae94..27274dcc4 100644 --- a/src/tests/helpers/tensor/i8.cairo +++ b/src/tests/helpers/tensor/i8.cairo @@ -2,10 +2,9 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; // 1D @@ -16,7 +15,7 @@ fn i8_tensor_1x3_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -28,7 +27,7 @@ fn i8_tensor_1x3_neg_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -45,7 +44,6 @@ fn i8_tensor_2x2_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: false }); - let tensor = TensorTrait::new(sizes.span(), data.span()); @@ -62,7 +60,6 @@ fn i8_tensor_2x2_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - let tensor = TensorTrait::new(sizes.span(), data.span()); @@ -85,8 +82,6 @@ fn i8_tensor_3x3_helper() -> Tensor { data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 8, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -108,8 +103,6 @@ fn i8_tensor_3x3_neg_helper() -> Tensor { data.append(i8 { mag: 7, sign: true }); data.append(i8 { mag: 8, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -128,8 +121,6 @@ fn i8_tensor_3x2_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -148,8 +139,6 @@ fn i8_tensor_3x2_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -165,8 +154,6 @@ fn i8_tensor_3x1_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -182,8 +169,6 @@ fn i8_tensor_3x1_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -202,8 +187,6 @@ fn i8_tensor_2x3_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -222,8 +205,6 @@ fn i8_tensor_2x3_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -247,8 +228,6 @@ fn i8_tensor_2x2x2_helper() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 7, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -270,8 +249,6 @@ fn i8_tensor_2x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 7, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -297,8 +274,6 @@ fn i8_tensor_3x2x2_helper() -> Tensor { data.append(i8 { mag: 10, sign: false }); data.append(i8 { mag: 11, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -324,8 +299,6 @@ fn i8_tensor_3x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 10, sign: true }); data.append(i8 { mag: 11, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -366,8 +339,6 @@ fn i8_tensor_3x3x3_helper() -> Tensor { data.append(i8 { mag: 25, sign: false }); data.append(i8 { mag: 26, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -408,8 +379,6 @@ fn i8_tensor_3x3x3_neg_helper() -> Tensor { data.append(i8 { mag: 25, sign: true }); data.append(i8 { mag: 26, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; diff --git a/src/tests/helpers/tensor/u32.cairo b/src/tests/helpers/tensor/u32.cairo index bcdd70f71..4395faffc 100644 --- a/src/tests/helpers/tensor/u32.cairo +++ b/src/tests/helpers/tensor/u32.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn u32_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/nodes/abs_fp16x16.cairo b/src/tests/nodes/abs_fp16x16.cairo index 7a20b16d9..7070a8862 100644 --- a/src/tests/nodes/abs_fp16x16.cairo +++ b/src/tests/nodes/abs_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo index 6a45ab1ef..761c33202 100644 --- a/src/tests/nodes/abs_fp16x16/input_0.cairo +++ b/src/tests/nodes/abs_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo index f78d1b2ce..419e63a5f 100644 --- a/src/tests/nodes/abs_fp16x16/output_0.cairo +++ b/src/tests/nodes/abs_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/abs_fp8x23.cairo b/src/tests/nodes/abs_fp8x23.cairo index 53987cac7..0256aff33 100644 --- a/src/tests/nodes/abs_fp8x23.cairo +++ b/src/tests/nodes/abs_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo index 9e7694db9..d44bcc906 100644 --- a/src/tests/nodes/abs_fp8x23/input_0.cairo +++ b/src/tests/nodes/abs_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo index 9001ec514..8b32cd208 100644 --- a/src/tests/nodes/abs_fp8x23/output_0.cairo +++ b/src/tests/nodes/abs_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo index 479de4311..8b7409509 100644 --- a/src/tests/nodes/abs_i32/input_0.cairo +++ b/src/tests/nodes/abs_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo index 45c2a40f9..beb6167a5 100644 --- a/src/tests/nodes/abs_i32/output_0.cairo +++ b/src/tests/nodes/abs_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo index 51c28093e..b033927c7 100644 --- a/src/tests/nodes/abs_i8/input_0.cairo +++ b/src/tests/nodes/abs_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo index 195ec686f..10779ddb3 100644 --- a/src/tests/nodes/abs_i8/output_0.cairo +++ b/src/tests/nodes/abs_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/acos_fp16x16.cairo b/src/tests/nodes/acos_fp16x16.cairo index 705927846..4ecfa9f22 100644 --- a/src/tests/nodes/acos_fp16x16.cairo +++ b/src/tests/nodes/acos_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo index 17e0d5e64..27ee8b248 100644 --- a/src/tests/nodes/acos_fp16x16/input_0.cairo +++ b/src/tests/nodes/acos_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo index 0b39ad9e7..ba8b241e3 100644 --- a/src/tests/nodes/acos_fp16x16/output_0.cairo +++ b/src/tests/nodes/acos_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acos_fp8x23.cairo b/src/tests/nodes/acos_fp8x23.cairo index 4b0c9d965..96893b374 100644 --- a/src/tests/nodes/acos_fp8x23.cairo +++ b/src/tests/nodes/acos_fp8x23.cairo @@ -8,7 +8,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo index 9ffdabbb0..db8531bb1 100644 --- a/src/tests/nodes/acos_fp8x23/input_0.cairo +++ b/src/tests/nodes/acos_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo index 950b70ab0..3ec1d287c 100644 --- a/src/tests/nodes/acos_fp8x23/output_0.cairo +++ b/src/tests/nodes/acos_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_fp16x16.cairo b/src/tests/nodes/acosh_fp16x16.cairo index 309547d0e..b7a438965 100644 --- a/src/tests/nodes/acosh_fp16x16.cairo +++ b/src/tests/nodes/acosh_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo index 00ca0f127..005c79368 100644 --- a/src/tests/nodes/acosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo index e51f2e0c5..ebf93bb2d 100644 --- a/src/tests/nodes/acosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acosh_fp8x23.cairo b/src/tests/nodes/acosh_fp8x23.cairo index 91f99ab6f..35a44a30f 100644 --- a/src/tests/nodes/acosh_fp8x23.cairo +++ b/src/tests/nodes/acosh_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo index 4313439c1..98f3cfe10 100644 --- a/src/tests/nodes/acosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo index 96806d869..fbcb11487 100644 --- a/src/tests/nodes/acosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_i32_fp16x16.cairo b/src/tests/nodes/acosh_i32_fp16x16.cairo index b179ee1ad..323841edc 100644 --- a/src/tests/nodes/acosh_i32_fp16x16.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo index ea52e85fb..7cd6ec7b2 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo index 6e3a187ca..384956057 100644 --- a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acosh_i32_fp8x23.cairo b/src/tests/nodes/acosh_i32_fp8x23.cairo index c2506eef1..5bdc98f9e 100644 --- a/src/tests/nodes/acosh_i32_fp8x23.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo index d4a204e87..e644620a9 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo index 1e1b3ce52..e4a7a362c 100644 --- a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_i8_fp16x16.cairo b/src/tests/nodes/acosh_i8_fp16x16.cairo index 899d3f77d..15921d2b4 100644 --- a/src/tests/nodes/acosh_i8_fp16x16.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo index 9779ebd97..84c25957a 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo index 247adde60..01cef149c 100644 --- a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acosh_i8_fp8x23.cairo b/src/tests/nodes/acosh_i8_fp8x23.cairo index fc4583b91..6695da49d 100644 --- a/src/tests/nodes/acosh_i8_fp8x23.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo index fceca83ea..120099750 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo index a369ec21d..5fd33378f 100644 --- a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_u32_fp16x16.cairo b/src/tests/nodes/acosh_u32_fp16x16.cairo index e513caa26..6c920968b 100644 --- a/src/tests/nodes/acosh_u32_fp16x16.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo index 841f732bd..a1d34cbd9 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo index 429d6ad18..a57fc637b 100644 --- a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo index f988508a8..8af2f99c6 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo index dd6ddf580..de43f374c 100644 --- a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo index 431877f06..9685475e7 100644 --- a/src/tests/nodes/add_fp16x16.cairo +++ b/src/tests/nodes/add_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorAdd}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo index 205d8e20b..1ccbb06cf 100644 --- a/src/tests/nodes/add_fp16x16/input_0.cairo +++ b/src/tests/nodes/add_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo index 883fa3f37..4f4448274 100644 --- a/src/tests/nodes/add_fp16x16/input_1.cairo +++ b/src/tests/nodes/add_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo index c408ca8e3..3b95a46c0 100644 --- a/src/tests/nodes/add_fp16x16/output_0.cairo +++ b/src/tests/nodes/add_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo index 6956a73fc..244febbc4 100644 --- a/src/tests/nodes/add_fp16x16_broadcast.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorAdd}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo index a211d0266..28a653686 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo index c56726c2e..044239d81 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo index 88d53d94d..1ddfac80a 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo index 6cef78b83..f3c6f8c37 100644 --- a/src/tests/nodes/add_fp8x23.cairo +++ b/src/tests/nodes/add_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorAdd}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo index 0fbf9553c..71a56b601 100644 --- a/src/tests/nodes/add_fp8x23/input_0.cairo +++ b/src/tests/nodes/add_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo index b2c352a25..141f869ff 100644 --- a/src/tests/nodes/add_fp8x23/input_1.cairo +++ b/src/tests/nodes/add_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo index 5c1b047e5..88c282e5e 100644 --- a/src/tests/nodes/add_fp8x23/output_0.cairo +++ b/src/tests/nodes/add_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo index 18441d6f0..642422627 100644 --- a/src/tests/nodes/add_fp8x23_broadcast.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorAdd}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo index cbb8f7e30..1a1806b60 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo index ae39bb3f7..195bbb66a 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo index bf4926eea..eb3d29705 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo index 546cf7f35..7296175ff 100644 --- a/src/tests/nodes/add_i32/input_0.cairo +++ b/src/tests/nodes/add_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo index 6b4b147a3..583908a5f 100644 --- a/src/tests/nodes/add_i32/input_1.cairo +++ b/src/tests/nodes/add_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo index 4b84bd019..d2288e1d6 100644 --- a/src/tests/nodes/add_i32/output_0.cairo +++ b/src/tests/nodes/add_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo index 9d1d930e9..448346ee1 100644 --- a/src/tests/nodes/add_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo index 22b8002f2..db807b285 100644 --- a/src/tests/nodes/add_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo index 0e49d8977..118ef7d34 100644 --- a/src/tests/nodes/add_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo index 01bc9d830..c45ae21f4 100644 --- a/src/tests/nodes/add_i8/input_0.cairo +++ b/src/tests/nodes/add_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo index 10b07ea72..a66c7dc7a 100644 --- a/src/tests/nodes/add_i8/input_1.cairo +++ b/src/tests/nodes/add_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo index 7e472ce6e..c83eef625 100644 --- a/src/tests/nodes/add_i8/output_0.cairo +++ b/src/tests/nodes/add_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo index b15bb5310..72363ac41 100644 --- a/src/tests/nodes/add_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo index eca978b79..2a3d1a042 100644 --- a/src/tests/nodes/add_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo index 589b11227..1e90591b9 100644 --- a/src/tests/nodes/add_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo index 07d7d0368..c9667084d 100644 --- a/src/tests/nodes/add_u32/input_0.cairo +++ b/src/tests/nodes/add_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo index de25d58f4..f6cc717db 100644 --- a/src/tests/nodes/add_u32/input_1.cairo +++ b/src/tests/nodes/add_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo index b93e7079c..ac5a7d75e 100644 --- a/src/tests/nodes/add_u32/output_0.cairo +++ b/src/tests/nodes/add_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo index d6bc759d4..e8d081cb8 100644 --- a/src/tests/nodes/add_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo index 10e87537e..868ed9207 100644 --- a/src/tests/nodes/add_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo index 86f417ba8..fbfbe85c8 100644 --- a/src/tests/nodes/add_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_default.cairo b/src/tests/nodes/argmax_fp16x16_1D_default.cairo index f6419914e..2ee539d03 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo index ad46362cd..b8d5ccebc 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo index 30d25cb78..53df6c3ee 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo index 5d92f7e12..fd1fda8b9 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo index fd893d35b..c7778b918 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo index 8acfeb912..afcbaebb6 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_default.cairo b/src/tests/nodes/argmax_fp16x16_2D_default.cairo index 4a6e4a79b..aba188ce4 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo index 749ba2419..b2089a0b8 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo index 4772e1bdd..d861d39b2 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo index 6e219e889..319ff8005 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo index b17cecf19..8f134e3c8 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo index 027b5780b..15fc8f60f 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo index 5ab75d2a6..c37c8a7a4 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_default.cairo b/src/tests/nodes/argmax_fp16x16_3D_default.cairo index 20df65650..29b26d7c8 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo index 7e478c01d..04e2bab8a 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo index 195c9348f..136e09853 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo index aea9d2496..ae376eb62 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo index ddc37f740..295a3e6ca 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo index a5785e938..860fbeac5 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo index 1f368a019..6874c9c1d 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo index 20a3579b6..d9f34e465 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo index 51e873382..68bc671ca 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_fp8x23_1D_default.cairo b/src/tests/nodes/argmax_fp8x23_1D_default.cairo index 9c4606446..ebeaf8ad5 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo index 30fd5f2fa..6ec1eec20 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::numbers::FP8x23; diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo index 27813c347..734558e18 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo index 18348d6dd..f5745319a 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo index 7f8e487d8..4341eba2d 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo index 677e4493a..0709371b3 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo index ade2f6df9..cf87c113c 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo index 011789634..c45587f2f 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo index 33352224c..c850344f8 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_2D_default.cairo b/src/tests/nodes/argmax_fp8x23_2D_default.cairo index 21e7a2908..4d93f88f9 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo index 83d905d82..31a5c2ac8 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo index 7678d6def..b7e846fe6 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo index 27658df23..2cb0142d0 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo index 37f0ee7e6..09e28cc1e 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo index f7e6d0630..4be933eda 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo index 6e3aaee54..568d41665 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo index 6ea1d4345..b546e99ae 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo index 9436ef375..f1299f304 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_3D_default.cairo b/src/tests/nodes/argmax_fp8x23_3D_default.cairo index 4feb747c1..2acc6df0a 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo index a0ed37e8b..2fda70e0e 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo index f3a503686..f5542d724 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo index 75401571c..647d77ee8 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo index 07f1e22d1..57a41cf88 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo index 785b6f87b..fc226dcc7 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo index f238237a0..1f349a9b0 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo index f6b5ef345..cb84f459e 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo index 2f36933a3..877bec739 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmax_i32_1D_default.cairo b/src/tests/nodes/argmax_i32_1D_default.cairo index 7e9e1bc63..50f3d7612 100644 --- a/src/tests/nodes/argmax_i32_1D_default.cairo +++ b/src/tests/nodes/argmax_i32_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo index 836d62c0e..bcb89a996 100644 --- a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo index 862255e47..d5f560f65 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo index fdff564e7..3da193dfd 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_1D_last_index.cairo b/src/tests/nodes/argmax_i32_1D_last_index.cairo index 11e173897..e9571136b 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo index 75fda421e..e20ef8d50 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_default.cairo b/src/tests/nodes/argmax_i32_2D_default.cairo index 8faa8a041..54a81f5f3 100644 --- a/src/tests/nodes/argmax_i32_2D_default.cairo +++ b/src/tests/nodes/argmax_i32_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo index c26192745..5450e2ac1 100644 --- a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo index 5eb2f3881..ccb5073f0 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo index 4950d0ec3..9bb6d1e8e 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo index ffa5b8fca..821960a5c 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_2D_last_index.cairo b/src/tests/nodes/argmax_i32_2D_last_index.cairo index 719503095..9d16ace4f 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo index cb1a902fd..b0090ee48 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_default.cairo b/src/tests/nodes/argmax_i32_3D_default.cairo index f2eb2321f..7e6174116 100644 --- a/src/tests/nodes/argmax_i32_3D_default.cairo +++ b/src/tests/nodes/argmax_i32_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo index c7070452d..b4114fa43 100644 --- a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo index 172baa773..e1528e820 100644 --- a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo index dc9458264..ac97c59e5 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo index 29f97de73..d8212af7d 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo index 352a5ae44..6e8d900c2 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i32_3D_last_index.cairo b/src/tests/nodes/argmax_i32_3D_last_index.cairo index a0b63c136..b42810169 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo index d0e711e2c..8d77ea9af 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo index 66a58ab2a..2e3cdb18c 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_default.cairo b/src/tests/nodes/argmax_i8_1D_default.cairo index ac0a22420..0354b2727 100644 --- a/src/tests/nodes/argmax_i8_1D_default.cairo +++ b/src/tests/nodes/argmax_i8_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo index 444222bb3..815140cd8 100644 --- a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo index 3c74d3bc4..a7c78053d 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo index 02a5efda3..c91a2f367 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_1D_last_index.cairo b/src/tests/nodes/argmax_i8_1D_last_index.cairo index 6cc95fe41..4a971e89e 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo index 544307351..35fce7574 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo index a67ee926d..0e55dcd93 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_default.cairo b/src/tests/nodes/argmax_i8_2D_default.cairo index 17ddafa92..0ad1685af 100644 --- a/src/tests/nodes/argmax_i8_2D_default.cairo +++ b/src/tests/nodes/argmax_i8_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo index 1710b0e18..9a3b18bd1 100644 --- a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo index f434690a9..9184122c0 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo index 41b4ab422..376497746 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo index ffa5b8fca..821960a5c 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_2D_last_index.cairo b/src/tests/nodes/argmax_i8_2D_last_index.cairo index c95a30d97..8c2cbd142 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo index 64e414805..c4b6d1fc2 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_default.cairo b/src/tests/nodes/argmax_i8_3D_default.cairo index 4dd1aa32b..444cff643 100644 --- a/src/tests/nodes/argmax_i8_3D_default.cairo +++ b/src/tests/nodes/argmax_i8_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo index 26d6eb5ac..bf297a055 100644 --- a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo index 88365399e..08b7c7ed2 100644 --- a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo index 056a2aeff..24f540a3a 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo index ce37efb86..ec1028455 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo index 54020fa6e..fc5a7363d 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_i8_3D_last_index.cairo b/src/tests/nodes/argmax_i8_3D_last_index.cairo index 1a691b3f0..e475e3dbe 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo index fbd780b20..c925b67d2 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo index 06984466e..caf59ad27 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_default.cairo b/src/tests/nodes/argmax_u32_1D_default.cairo index 2366062dd..30680f085 100644 --- a/src/tests/nodes/argmax_u32_1D_default.cairo +++ b/src/tests/nodes/argmax_u32_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo index a808637e4..751c1095d 100644 --- a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo index bc25381e8..f7401e8f1 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo index 6a7bc89d5..53191c1ce 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_last_index.cairo b/src/tests/nodes/argmax_u32_1D_last_index.cairo index e48020b0e..f219cb60f 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo index 8864e62dd..ad4204066 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_default.cairo b/src/tests/nodes/argmax_u32_2D_default.cairo index cc31349b8..111141d54 100644 --- a/src/tests/nodes/argmax_u32_2D_default.cairo +++ b/src/tests/nodes/argmax_u32_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo index f859375f9..1598351f9 100644 --- a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo index 02d44a9af..8783e76fe 100644 --- a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo index 1764728b8..20c8820fe 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo index 622fbb162..d130d4b1b 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo index b17cecf19..8f134e3c8 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_last_index.cairo b/src/tests/nodes/argmax_u32_2D_last_index.cairo index c1047a564..fae12251b 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo index 8b69b7475..9447daab5 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo index 9c78877f7..6b2f74d5a 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_default.cairo b/src/tests/nodes/argmax_u32_3D_default.cairo index c8f61e89f..c4feebabb 100644 --- a/src/tests/nodes/argmax_u32_3D_default.cairo +++ b/src/tests/nodes/argmax_u32_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo index d41551f38..3a4b09fd2 100644 --- a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo index 195c9348f..136e09853 100644 --- a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo index 3b33c7dd0..57491a40e 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo index b5b0e5571..14fd03bf5 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo index 0ff4ae4f1..5d845ddb5 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_last_index.cairo b/src/tests/nodes/argmax_u32_3D_last_index.cairo index cf99d65fa..93e274004 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo index 56e8b7b10..be65359d7 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo index f2789da70..753c8de31 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_default.cairo b/src/tests/nodes/argmin_fp16x16_1D_default.cairo index 714cfd034..85c005487 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo index 4d33fa09c..2b16cfe23 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo index a67ee926d..0e55dcd93 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo index dccfc4671..e7d9998d8 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo index 054ef1f67..057c16d02 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo index 6bc534eed..424ae1b36 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo index 68852809c..f93882e41 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo index a67ee926d..0e55dcd93 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_default.cairo b/src/tests/nodes/argmin_fp16x16_2D_default.cairo index fcf6f2286..3a72064da 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo index 945591c1a..89752ba37 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo index a2600b3f6..ee3b52098 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo index 073496918..e248667d1 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo index ffa5b8fca..821960a5c 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo index d2749adeb..2fc9cc1b6 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo index 11fa1e517..cb4ceef87 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_default.cairo b/src/tests/nodes/argmin_fp16x16_3D_default.cairo index ba167948a..791adc5d9 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo index c68d5b943..816accc90 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo index f7502c1f3..fe45fc97c 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo index 171cc0a9d..66227e308 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo index 963ea1a0c..bccbc310c 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo index 4d79b7b34..5643a4030 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo index 1e37ac066..9d4fd04e5 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo index e19a9a2d3..64507742e 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo index f2789da70..753c8de31 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_fp8x23_1D_default.cairo b/src/tests/nodes/argmin_fp8x23_1D_default.cairo index a28d4ee41..a85c4dabb 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo index f11ecf26e..a316a855b 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo index 27813c347..734558e18 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo index 5ca425414..5a6aae05f 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo index 4a8c148eb..3852c5aa4 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo index 677e4493a..0709371b3 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo index ab254b5db..c9667ab6d 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo index 064313e33..3d4b15ca6 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo index 677e4493a..0709371b3 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_2D_default.cairo b/src/tests/nodes/argmin_fp8x23_2D_default.cairo index 3b3ab4bdb..a1d3e30f4 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo index 111f0c5ba..7a33e65ac 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo index 55682a53f..a74486c15 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo index 15feb889a..36c17e41f 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo index 936fc7424..0b741cb2d 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo index 8ddfaae45..689061735 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo index 258a9aef6..0a70312bc 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo index 66c0551f9..465da8805 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo index 9436ef375..f1299f304 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_3D_default.cairo b/src/tests/nodes/argmin_fp8x23_3D_default.cairo index e0bedf385..8745d440c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo index 079ed090c..1eeb57c4d 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo index 18a497632..d8763819b 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo index aa2c8ec15..117574e08 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo index 563c7e76b..1e2e951e4 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo index 785b6f87b..fc226dcc7 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo index e47bdbb0d..5ea754c34 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo index f19286fe2..6f0ec372b 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo index 64a6bc737..4aa4de577 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/argmin_i32_1D_default.cairo b/src/tests/nodes/argmin_i32_1D_default.cairo index e5388a3aa..c66fa16f3 100644 --- a/src/tests/nodes/argmin_i32_1D_default.cairo +++ b/src/tests/nodes/argmin_i32_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo index 17cabca29..d8e0dcf0f 100644 --- a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo index 8c558ab22..0147a3d7c 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo index 6428d6fe0..9636a0d6b 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo index a67ee926d..0e55dcd93 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_1D_last_index.cairo b/src/tests/nodes/argmin_i32_1D_last_index.cairo index b092293b8..a9b869189 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo index 005e8270f..bb2145bfd 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_default.cairo b/src/tests/nodes/argmin_i32_2D_default.cairo index d97ab6f04..d6d6b873a 100644 --- a/src/tests/nodes/argmin_i32_2D_default.cairo +++ b/src/tests/nodes/argmin_i32_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo index 92af493ee..ef5cb411a 100644 --- a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo index 377152f30..0a6836f32 100644 --- a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo index d475ad6d5..ea8e70302 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo index 6f6f9297f..72d895f2f 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo index ffa5b8fca..821960a5c 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_2D_last_index.cairo b/src/tests/nodes/argmin_i32_2D_last_index.cairo index c7cc4c6b2..10f4b256f 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo index 03eda0fdc..63d5d8713 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo index 02d44a9af..8783e76fe 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_default.cairo b/src/tests/nodes/argmin_i32_3D_default.cairo index 8f0999fae..3fd45f9f4 100644 --- a/src/tests/nodes/argmin_i32_3D_default.cairo +++ b/src/tests/nodes/argmin_i32_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo index e9a9fa2f7..90a80274f 100644 --- a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo index be944a9d1..50130933c 100644 --- a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo index 596adeb1c..7416fbd0f 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo index af6b48d07..8f6b9a8b1 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo index a5785e938..860fbeac5 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i32_3D_last_index.cairo b/src/tests/nodes/argmin_i32_3D_last_index.cairo index 111a7d66f..ce4aecca0 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo index 30476108c..3bea17118 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo index 7d611909b..c732e39e8 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_default.cairo b/src/tests/nodes/argmin_i8_1D_default.cairo index e12f3290a..4a4ff4cdf 100644 --- a/src/tests/nodes/argmin_i8_1D_default.cairo +++ b/src/tests/nodes/argmin_i8_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo index 05abc7998..fff1574e9 100644 --- a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo index 2b1287185..be7059d69 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo index adef9a836..de4df70e4 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_1D_last_index.cairo b/src/tests/nodes/argmin_i8_1D_last_index.cairo index b54b17238..67f46b0ed 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo index 6875015e7..21e13a88a 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_default.cairo b/src/tests/nodes/argmin_i8_2D_default.cairo index b04856fa2..6690d3c6e 100644 --- a/src/tests/nodes/argmin_i8_2D_default.cairo +++ b/src/tests/nodes/argmin_i8_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo index e0ebc90f2..f7487fae0 100644 --- a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo index 650584f89..be7f7de6c 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo index 750cdcda2..cdf00d022 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo index ffa5b8fca..821960a5c 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_2D_last_index.cairo b/src/tests/nodes/argmin_i8_2D_last_index.cairo index 822e6a939..8550cb791 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo index 543f7c5f2..58d569c2c 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_default.cairo b/src/tests/nodes/argmin_i8_3D_default.cairo index e25240235..ca990c4fb 100644 --- a/src/tests/nodes/argmin_i8_3D_default.cairo +++ b/src/tests/nodes/argmin_i8_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo index 416b77545..18494d55b 100644 --- a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo index f2789da70..753c8de31 100644 --- a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo index d040750ed..7594ecda3 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo index 9fbf341db..70db0a336 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo index a5785e938..860fbeac5 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_i8_3D_last_index.cairo b/src/tests/nodes/argmin_i8_3D_last_index.cairo index ae1a6fae1..dcaffaf8a 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo index 1444a2d05..dffbe1c88 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo index a4bc0e46d..a4111d63c 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_default.cairo b/src/tests/nodes/argmin_u32_1D_default.cairo index 5b8d68d12..1930ca929 100644 --- a/src/tests/nodes/argmin_u32_1D_default.cairo +++ b/src/tests/nodes/argmin_u32_1D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo index 9e248f9c8..ee3cfbd8c 100644 --- a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo index d3b930f2a..228325d29 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo index 959707ae7..f0b3e0bae 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo index 02af17401..988f810bb 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_last_index.cairo b/src/tests/nodes/argmin_u32_1D_last_index.cairo index 91e0c2596..bd2f4c7d1 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo index 001dfdbde..82699dd3a 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo index da7c37eb4..49ab81047 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_default.cairo b/src/tests/nodes/argmin_u32_2D_default.cairo index bef55bfb4..a90da7654 100644 --- a/src/tests/nodes/argmin_u32_2D_default.cairo +++ b/src/tests/nodes/argmin_u32_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo index ade11e51c..f8f5049a4 100644 --- a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo index 13835338e..01918443f 100644 --- a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo index 559e4739e..9b8ff3f61 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo index c27fbf9a5..b97b60bf5 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo index b17cecf19..8f134e3c8 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_last_index.cairo b/src/tests/nodes/argmin_u32_2D_last_index.cairo index aa78bde3e..c6ac9d812 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo index e7e4c7404..7af862548 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo index 02d44a9af..8783e76fe 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_default.cairo b/src/tests/nodes/argmin_u32_3D_default.cairo index e73589229..65e748c6c 100644 --- a/src/tests/nodes/argmin_u32_3D_default.cairo +++ b/src/tests/nodes/argmin_u32_3D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo index 5362c67a3..120b369f4 100644 --- a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo index 06984466e..caf59ad27 100644 --- a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo index ddb40ec07..dae2eb375 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo index c81364173..66d7bcf5d 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo index 8b96ad6d7..8a44faccf 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_last_index.cairo b/src/tests/nodes/argmin_u32_3D_last_index.cairo index 641e6c5c1..e0cd74fc2 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo index 46fcc91d1..a08deda84 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo index 20893c6f6..dbbf113a0 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asin_fp16x16.cairo b/src/tests/nodes/asin_fp16x16.cairo index c4e9804c5..540b32f9d 100644 --- a/src/tests/nodes/asin_fp16x16.cairo +++ b/src/tests/nodes/asin_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo index 1109f01df..76ca745c2 100644 --- a/src/tests/nodes/asin_fp16x16/input_0.cairo +++ b/src/tests/nodes/asin_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo index b7a5453f3..f5dede644 100644 --- a/src/tests/nodes/asin_fp16x16/output_0.cairo +++ b/src/tests/nodes/asin_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asin_fp8x23.cairo b/src/tests/nodes/asin_fp8x23.cairo index f986b0794..ca44a6ac8 100644 --- a/src/tests/nodes/asin_fp8x23.cairo +++ b/src/tests/nodes/asin_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo index 00a785abc..0bdab3ab9 100644 --- a/src/tests/nodes/asin_fp8x23/input_0.cairo +++ b/src/tests/nodes/asin_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo index e799677ee..19443211d 100644 --- a/src/tests/nodes/asin_fp8x23/output_0.cairo +++ b/src/tests/nodes/asin_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_fp16x16.cairo b/src/tests/nodes/asinh_fp16x16.cairo index 5afdc5a5b..36bed0dc2 100644 --- a/src/tests/nodes/asinh_fp16x16.cairo +++ b/src/tests/nodes/asinh_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo index e937ae9ef..ca60f8831 100644 --- a/src/tests/nodes/asinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo index 8a06869b8..cacc8bd6e 100644 --- a/src/tests/nodes/asinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asinh_fp8x23.cairo b/src/tests/nodes/asinh_fp8x23.cairo index 243c8bdc2..b9f465ff4 100644 --- a/src/tests/nodes/asinh_fp8x23.cairo +++ b/src/tests/nodes/asinh_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo index d152e7f5c..a8f84245f 100644 --- a/src/tests/nodes/asinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo index df65c9fa0..e56a3bb72 100644 --- a/src/tests/nodes/asinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_i32_fp16x16.cairo b/src/tests/nodes/asinh_i32_fp16x16.cairo index d66d05948..9025d2996 100644 --- a/src/tests/nodes/asinh_i32_fp16x16.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo index 460038553..c5ce9a22c 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo index 82b2ebf08..4c4a15796 100644 --- a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asinh_i32_fp8x23.cairo b/src/tests/nodes/asinh_i32_fp8x23.cairo index 415a0451e..7f21e2004 100644 --- a/src/tests/nodes/asinh_i32_fp8x23.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo index 8913e07cd..81b751d80 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo index 030e6be33..8c74651fd 100644 --- a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_i8_fp16x16.cairo b/src/tests/nodes/asinh_i8_fp16x16.cairo index 4cfdcc4dd..ad978b521 100644 --- a/src/tests/nodes/asinh_i8_fp16x16.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo index 0b4a1417b..696018232 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo index e32b27b55..e46358617 100644 --- a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asinh_i8_fp8x23.cairo b/src/tests/nodes/asinh_i8_fp8x23.cairo index 48a6f52c0..a15086cea 100644 --- a/src/tests/nodes/asinh_i8_fp8x23.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo index f012abb30..e06af2b23 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo index b3f140ef1..41bd781e5 100644 --- a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_u32_fp16x16.cairo b/src/tests/nodes/asinh_u32_fp16x16.cairo index e5d39a217..92219cdf7 100644 --- a/src/tests/nodes/asinh_u32_fp16x16.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo index dcce3c169..8ade59660 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo index d423ace19..b865e729b 100644 --- a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo index bd1bd7931..a9333ac0e 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo index ac58fc4b7..d30f3b3b7 100644 --- a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_fp16x16.cairo b/src/tests/nodes/atan_fp16x16.cairo index 8f6744cd7..0358ce989 100644 --- a/src/tests/nodes/atan_fp16x16.cairo +++ b/src/tests/nodes/atan_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo index 9bc95f034..6ba5a0e89 100644 --- a/src/tests/nodes/atan_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo index 250147b80..5b58b25b4 100644 --- a/src/tests/nodes/atan_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/atan_fp8x23.cairo b/src/tests/nodes/atan_fp8x23.cairo index dc743bd29..effbbcd7d 100644 --- a/src/tests/nodes/atan_fp8x23.cairo +++ b/src/tests/nodes/atan_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo index ed1e35225..91041d0b5 100644 --- a/src/tests/nodes/atan_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo index 7e51ef6f4..041b138d5 100644 --- a/src/tests/nodes/atan_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_i32_fp16x16.cairo b/src/tests/nodes/atan_i32_fp16x16.cairo index 7095ca34b..f083336a9 100644 --- a/src/tests/nodes/atan_i32_fp16x16.cairo +++ b/src/tests/nodes/atan_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo index d6ba29844..834233def 100644 --- a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo index 103bb5fea..8269f606e 100644 --- a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/atan_i32_fp8x23.cairo b/src/tests/nodes/atan_i32_fp8x23.cairo index a817fb050..1b367d133 100644 --- a/src/tests/nodes/atan_i32_fp8x23.cairo +++ b/src/tests/nodes/atan_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo index 988bdae06..92e901428 100644 --- a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo index c62213ed4..da7c6cecb 100644 --- a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_i8_fp16x16.cairo b/src/tests/nodes/atan_i8_fp16x16.cairo index 54e65d9e5..100445960 100644 --- a/src/tests/nodes/atan_i8_fp16x16.cairo +++ b/src/tests/nodes/atan_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo index 18e53424f..c4a348698 100644 --- a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo index 3e7e5748d..9e92ca3ac 100644 --- a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/atan_i8_fp8x23.cairo b/src/tests/nodes/atan_i8_fp8x23.cairo index 0d3efc784..9785f3c1b 100644 --- a/src/tests/nodes/atan_i8_fp8x23.cairo +++ b/src/tests/nodes/atan_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo index bd77e4920..08f4eb156 100644 --- a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo index 87dfe59f0..8d906b5bd 100644 --- a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_u32_fp16x16.cairo b/src/tests/nodes/atan_u32_fp16x16.cairo index bbca2c8f0..3ebe6be46 100644 --- a/src/tests/nodes/atan_u32_fp16x16.cairo +++ b/src/tests/nodes/atan_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo index 8f63b12a7..6d592527a 100644 --- a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo index f74f0cb17..672eb4a25 100644 --- a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo index 9f2960112..57abc0486 100644 --- a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo index b9394f904..6b518d0c7 100644 --- a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/ceil_fp16x16.cairo b/src/tests/nodes/ceil_fp16x16.cairo index ed58a66d9..b12288825 100644 --- a/src/tests/nodes/ceil_fp16x16.cairo +++ b/src/tests/nodes/ceil_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo index 253460137..8e747d175 100644 --- a/src/tests/nodes/ceil_fp16x16/input_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo index b75ca726c..b5432c0f4 100644 --- a/src/tests/nodes/ceil_fp16x16/output_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/ceil_fp8x23.cairo b/src/tests/nodes/ceil_fp8x23.cairo index 73d90864a..528ede834 100644 --- a/src/tests/nodes/ceil_fp8x23.cairo +++ b/src/tests/nodes/ceil_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo index 4008a5b79..26ea14210 100644 --- a/src/tests/nodes/ceil_fp8x23/input_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo index ba8c25372..3117516ad 100644 --- a/src/tests/nodes/ceil_fp8x23/output_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo index 68c1be1a0..e6f2a16b4 100644 --- a/src/tests/nodes/concat_fp16x16_1d.cairo +++ b/src/tests/nodes/concat_fp16x16_1d.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo index fe673e49f..27600d35a 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo index c46b70c37..2d9d56a63 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo index 534bce1f4..2a8d6de98 100644 --- a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo index f16a209ba..9980d3c0a 100644 --- a/src/tests/nodes/concat_fp16x16_2d.cairo +++ b/src/tests/nodes/concat_fp16x16_2d.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo index ab66a57c5..67df4256d 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo index a70d8ad82..fdc0177bd 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo index 4229624bb..fd5a92c68 100644 --- a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo index bcbf0ef64..ad002ea58 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo index 62f5c0c10..417a9dacf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo index 659703dbf..af99a4d3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo index 298534a32..a7293eb55 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo index 1bf642b07..774acaeaa 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo index 62f5c0c10..417a9dacf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo index 659703dbf..af99a4d3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo index 00a914a6f..d25c61cef 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo index 10153f1ca..9a34dfd87 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo index 62f5c0c10..417a9dacf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo index 659703dbf..af99a4d3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo index 85b380441..04afb32ae 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo index 439fcf616..529dbab65 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo @@ -7,7 +7,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo index 62f5c0c10..417a9dacf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo index 659703dbf..af99a4d3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo index b86c6b754..3a191bf3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo index 9eef2491a..e4c972355 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo index 36031e9fc..2ccbb62bc 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo @@ -7,7 +7,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo index 62f5c0c10..417a9dacf 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo index 659703dbf..af99a4d3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo index b86c6b754..3a191bf3a 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo index 18d73421b..a73b60b12 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo index 2fbd0843a..cfd9d0df9 100644 --- a/src/tests/nodes/concat_fp8x23_1d.cairo +++ b/src/tests/nodes/concat_fp8x23_1d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo index 70f856b7b..cf36019b6 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo index 9940d8904..7625f514c 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo index c749e3416..902420ef1 100644 --- a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo index 6c5f44d2b..5ce6c7902 100644 --- a/src/tests/nodes/concat_fp8x23_2d.cairo +++ b/src/tests/nodes/concat_fp8x23_2d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo index a864bb8cd..2477d67f2 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo index 057e3e4dc..ff11b21dc 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo index 5a7a25a0b..bc4aade19 100644 --- a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo index 8a0287144..28b5ae4c9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo index 9f3390a22..3d38e6ab9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo index 452e70970..b6679fdf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo index c2b79bef3..3454dafe8 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo index bb7faef59..7e662c0bb 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo index 9f3390a22..3d38e6ab9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo index 452e70970..b6679fdf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo index 3dc43ac7f..e472ddcf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo index 01ccd7b85..d32913d21 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo index 9f3390a22..3d38e6ab9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo index 452e70970..b6679fdf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo index e69bc4196..115287e73 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo index f2663361a..a7e58a46d 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo index 9f3390a22..3d38e6ab9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo index 452e70970..b6679fdf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo index 36c8e320b..05650c299 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_2() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo index f67a3f7b1..abe1e9f9d 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo index 254692893..fa0ac2c8c 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo index 9f3390a22..3d38e6ab9 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo index 452e70970..b6679fdf7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo index 36c8e320b..05650c299 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_2() -> Tensor { diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo index e41d95a88..48d6fc0a7 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo index c00a2d702..9624df005 100644 --- a/src/tests/nodes/concat_i32_1d/input_0.cairo +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo index e1650050d..f1ecb5589 100644 --- a/src/tests/nodes/concat_i32_1d/input_1.cairo +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo index 23d89eb46..02f100bf7 100644 --- a/src/tests/nodes/concat_i32_1d/output_0.cairo +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo index b98f20165..3e5097679 100644 --- a/src/tests/nodes/concat_i32_2d/input_0.cairo +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo index 96a8d3e2d..7b6b525f5 100644 --- a/src/tests/nodes/concat_i32_2d/input_1.cairo +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo index 5b676d07e..c48e970e5 100644 --- a/src/tests/nodes/concat_i32_2d/output_0.cairo +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo index 8a3e3213d..61784418d 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo index 0ea0eec3f..3266738ec 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo index 8c18ca2d5..58d3e89e6 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo index 8a3e3213d..61784418d 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo index 0ea0eec3f..3266738ec 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo index 6927c5a4a..ca65fd4d0 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo index 8a3e3213d..61784418d 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo index 0ea0eec3f..3266738ec 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo index 60dc21bd3..e1e094d78 100644 --- a/src/tests/nodes/concat_i32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo index 8a3e3213d..61784418d 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo index 0ea0eec3f..3266738ec 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo index fe57b4d80..dbdd44e79 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo index 91d9fe8ea..64d78e35e 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo index 8a3e3213d..61784418d 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo index 0ea0eec3f..3266738ec 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo index fe57b4d80..dbdd44e79 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo index f218cc354..0f5b44b6e 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo index 3f4117c0a..785a1dbf1 100644 --- a/src/tests/nodes/concat_u32_1d.cairo +++ b/src/tests/nodes/concat_u32_1d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo index f5f32b096..f9eb0d735 100644 --- a/src/tests/nodes/concat_u32_1d/input_0.cairo +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo index 8f746063d..33a8a8d3e 100644 --- a/src/tests/nodes/concat_u32_1d/input_1.cairo +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo index cac406506..259cbfb62 100644 --- a/src/tests/nodes/concat_u32_1d/output_0.cairo +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo index 74a620db4..fa4af1123 100644 --- a/src/tests/nodes/concat_u32_2d.cairo +++ b/src/tests/nodes/concat_u32_2d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo index a45833125..e00a217d3 100644 --- a/src/tests/nodes/concat_u32_2d/input_0.cairo +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo index 4bbdd1760..3ce6b0519 100644 --- a/src/tests/nodes/concat_u32_2d/input_1.cairo +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo index 9f7b2dfed..5a9bb6695 100644 --- a/src/tests/nodes/concat_u32_2d/output_0.cairo +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo index 622205de6..6d8eddd14 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo index 616831948..00c9dd0ea 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo index 0bca198d7..1e959db25 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo index 3268695e8..f14e6cb52 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo index 1d9a5e6aa..ba171a2d9 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo index 616831948..00c9dd0ea 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo index 0bca198d7..1e959db25 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo index 85c516beb..472866a29 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo index 9c2d16474..e6c8f8317 100644 --- a/src/tests/nodes/concat_u32_3d_default.cairo +++ b/src/tests/nodes/concat_u32_3d_default.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo index 616831948..00c9dd0ea 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo index 0bca198d7..1e959db25 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo index 327af1fd4..d2320f921 100644 --- a/src/tests/nodes/concat_u32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo index 5b613c0ee..fa36041d4 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo index 616831948..00c9dd0ea 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo index 0bca198d7..1e959db25 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo index 55ab7d447..7d7318547 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo index 4171de88e..9b02a7a92 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo index 5a08b4cbe..eeecb91ef 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo index 616831948..00c9dd0ea 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo index 0bca198d7..1e959db25 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo index 55ab7d447..7d7318547 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo index 032de4f77..8c7ff7362 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_fp16x16.cairo b/src/tests/nodes/cos_fp16x16.cairo index 35b11efad..1e31dda0c 100644 --- a/src/tests/nodes/cos_fp16x16.cairo +++ b/src/tests/nodes/cos_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo index 1d32f6c03..f150fdf62 100644 --- a/src/tests/nodes/cos_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo index d2466f6e2..082efa79f 100644 --- a/src/tests/nodes/cos_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cos_fp8x23.cairo b/src/tests/nodes/cos_fp8x23.cairo index 16b8ab8e1..59464bd80 100644 --- a/src/tests/nodes/cos_fp8x23.cairo +++ b/src/tests/nodes/cos_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo index 09db416db..0c0fb872d 100644 --- a/src/tests/nodes/cos_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo index 1409351e1..1d93c6bb4 100644 --- a/src/tests/nodes/cos_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_i32_fp16x16.cairo b/src/tests/nodes/cos_i32_fp16x16.cairo index 03d5c32d9..bc2b62c87 100644 --- a/src/tests/nodes/cos_i32_fp16x16.cairo +++ b/src/tests/nodes/cos_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo index c466d583f..01c81e479 100644 --- a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo index 0bacfec01..6575b9e66 100644 --- a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cos_i32_fp8x23.cairo b/src/tests/nodes/cos_i32_fp8x23.cairo index 514f6e3e5..ddd8fe165 100644 --- a/src/tests/nodes/cos_i32_fp8x23.cairo +++ b/src/tests/nodes/cos_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo index 48e320a73..f4fcbf45f 100644 --- a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo index 37b8f89ee..d2e823112 100644 --- a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_i8_fp16x16.cairo b/src/tests/nodes/cos_i8_fp16x16.cairo index 8a7faf5d6..7e0b934aa 100644 --- a/src/tests/nodes/cos_i8_fp16x16.cairo +++ b/src/tests/nodes/cos_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo index a41f5b68b..41c172c7b 100644 --- a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo index ff86a5034..bdebd1a7d 100644 --- a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cos_i8_fp8x23.cairo b/src/tests/nodes/cos_i8_fp8x23.cairo index 0c69e65bb..43b74051c 100644 --- a/src/tests/nodes/cos_i8_fp8x23.cairo +++ b/src/tests/nodes/cos_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo index 5cc3e913a..bf5cb16dd 100644 --- a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo index 857f19768..1362622e7 100644 --- a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_u32_fp16x16.cairo b/src/tests/nodes/cos_u32_fp16x16.cairo index b5859750f..c014724bf 100644 --- a/src/tests/nodes/cos_u32_fp16x16.cairo +++ b/src/tests/nodes/cos_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo index 480b9d527..77718b678 100644 --- a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo index 00cb9e8fc..b8dc520f5 100644 --- a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo index 4e242ade3..29fa9f234 100644 --- a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo index 6890334dc..edc6cc94e 100644 --- a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_fp16x16.cairo b/src/tests/nodes/cosh_fp16x16.cairo index aa71896ce..140c33a36 100644 --- a/src/tests/nodes/cosh_fp16x16.cairo +++ b/src/tests/nodes/cosh_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo index 7b6076506..4995a09f8 100644 --- a/src/tests/nodes/cosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo index 1e223f76c..9076c3fc8 100644 --- a/src/tests/nodes/cosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cosh_fp8x23.cairo b/src/tests/nodes/cosh_fp8x23.cairo index 0e3d5e4dd..84cf36a75 100644 --- a/src/tests/nodes/cosh_fp8x23.cairo +++ b/src/tests/nodes/cosh_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo index f7da429c1..addc169c1 100644 --- a/src/tests/nodes/cosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo index 0453f74ac..b8cb7b53e 100644 --- a/src/tests/nodes/cosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_i32_fp16x16.cairo b/src/tests/nodes/cosh_i32_fp16x16.cairo index c83b76317..6c7240e0f 100644 --- a/src/tests/nodes/cosh_i32_fp16x16.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo index 4fbbfd4c1..e7af7d45e 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo index 7950a2d11..0de69daa4 100644 --- a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cosh_i32_fp8x23.cairo b/src/tests/nodes/cosh_i32_fp8x23.cairo index 27ef2732a..410cb506b 100644 --- a/src/tests/nodes/cosh_i32_fp8x23.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo index 90b330149..bd1a6a0ff 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo index c2e2eb616..26ae20ae5 100644 --- a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_i8_fp16x16.cairo b/src/tests/nodes/cosh_i8_fp16x16.cairo index 1a0b689f5..aec99b118 100644 --- a/src/tests/nodes/cosh_i8_fp16x16.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo index 473ba7e65..6725cb226 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo index 55af66e71..9448ffc3d 100644 --- a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cosh_i8_fp8x23.cairo b/src/tests/nodes/cosh_i8_fp8x23.cairo index cb5ac3d57..67f3917eb 100644 --- a/src/tests/nodes/cosh_i8_fp8x23.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo index bea77b274..db78026c0 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo index e19ddb17a..13a4b0922 100644 --- a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_u32_fp16x16.cairo b/src/tests/nodes/cosh_u32_fp16x16.cairo index 868823194..2d5362e95 100644 --- a/src/tests/nodes/cosh_u32_fp16x16.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo index d8184661c..7e12251c9 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo index acb38e7ab..87e63156c 100644 --- a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo index 68993312c..0d5461234 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo index 5e570ad94..793e947b7 100644 --- a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo index f93b1c93f..7a313f572 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo index 3009292c2..39b391cbb 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo index f7b448590..1622405e1 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo index c06c4d71c..13a8f3ff9 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo index 3009292c2..39b391cbb 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo index 04f5e9b62..e9b191e5f 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo index f1498160e..60caac603 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo index 3009292c2..39b391cbb 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo index ff141c51b..8dd2ccdf0 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo index 724109563..3fce47035 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo index 3009292c2..39b391cbb 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo index 01c2749bb..1c33d89ca 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo index 2e8591a65..466884ae0 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo index 4369e0e11..91236fee0 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo index 7e1ea29d1..c0b877cce 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo index 767be3046..3aa2110f2 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo index 4369e0e11..91236fee0 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo index 7abe9e587..2f95b30bc 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo index 4e871eb38..1737662f8 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo index 8441eb7e5..f470f24ea 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo index 21b3ad380..b339f4cc5 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo index 95a041190..aedade397 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo index 8441eb7e5..f470f24ea 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo index fec948eae..3b8ad4f00 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo index 2ae807b26..c154bed5f 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo index 8441eb7e5..f470f24ea 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo index 0e624aa83..8ea2e2593 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo index 8d337b282..495849495 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo index 8441eb7e5..f470f24ea 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo index 249049c13..6b8aa986a 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo index 705484c28..e38890a1e 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo index 62272c00b..327fa9b04 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo index 9e25de000..845e1e846 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo index 519937370..cd29e9308 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo index 62272c00b..327fa9b04 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo index fa9b5ece3..139d162aa 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo index 20a7c3317..e38efdd93 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo index 2bd621824..dab4314d5 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo index 20a7c3317..e38efdd93 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo index 3c47044cf..b45d02d74 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo index 20a7c3317..e38efdd93 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo index f6283b984..0aeeeb2ff 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo index 20a7c3317..e38efdd93 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo index 9b71025f4..90d83ae9a 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo index 9d9583581..9374117be 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo index 57265935b..037078153 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo index 9d9583581..9374117be 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo index 84c181b29..5c8a04a94 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo index 78d4fffb9..1c20a2ff3 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo index 76f19885e..4760ab452 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo index 78d4fffb9..1c20a2ff3 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo index 335a5304b..473338b6e 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo index 78d4fffb9..1c20a2ff3 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo index 82a160735..f5046a724 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo index 78d4fffb9..1c20a2ff3 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo index 6d6dbef0d..320369819 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo index 9754f22b4..86f72eef9 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo index 483dfcbbc..78eda0683 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo index 9754f22b4..86f72eef9 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo index 6998388b5..380d698e5 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/cumsum_u32_1d_default.cairo b/src/tests/nodes/cumsum_u32_1d_default.cairo index d7b7b0f2e..484d147f8 100644 --- a/src/tests/nodes/cumsum_u32_1d_default.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo index 3bd45b22f..c6505ee4f 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo index bd69e9099..84b74be03 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo index 5b36016d3..4ff0e9bbf 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo index 3bd45b22f..c6505ee4f 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo index 4bbc3d658..4e0bec73c 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse.cairo b/src/tests/nodes/cumsum_u32_1d_reverse.cairo index 1f0d2d480..08f829d11 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo index 3bd45b22f..c6505ee4f 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo index a8cb0db1a..de26bc14e 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo index dae1c1505..39876a8ca 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo index 3bd45b22f..c6505ee4f 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo index f7293e101..af37f94d7 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo index 12989bc1c..8df58fc1b 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo index 88daf2320..312a8444c 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo index d60af45c6..e7f7e1868 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo index c806f3601..527589e8a 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo index 88daf2320..312a8444c 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo index eb1fbb901..d70af3640 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo index 4421155ff..475c7f315 100644 --- a/src/tests/nodes/div_fp16x16.cairo +++ b/src/tests/nodes/div_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorDiv}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo index a6464c245..7222de826 100644 --- a/src/tests/nodes/div_fp16x16/input_0.cairo +++ b/src/tests/nodes/div_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo index 335ab82ed..4a43a1a69 100644 --- a/src/tests/nodes/div_fp16x16/input_1.cairo +++ b/src/tests/nodes/div_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo index ba90c325b..b632aaa95 100644 --- a/src/tests/nodes/div_fp16x16/output_0.cairo +++ b/src/tests/nodes/div_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo index 767641aa3..89722e484 100644 --- a/src/tests/nodes/div_fp16x16_broadcast.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorDiv}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo index ca1bce5d4..31a178b97 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo index 1b1eaed9b..a8bfb31e7 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo index 8423b3373..1b82da99b 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo index 293f65d9e..d1a5d2263 100644 --- a/src/tests/nodes/div_fp8x23.cairo +++ b/src/tests/nodes/div_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorDiv}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo index cb9dc3f35..dd9694783 100644 --- a/src/tests/nodes/div_fp8x23/input_0.cairo +++ b/src/tests/nodes/div_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo index f7bb7a0ea..c1d246375 100644 --- a/src/tests/nodes/div_fp8x23/input_1.cairo +++ b/src/tests/nodes/div_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo index f69910b00..84327ba8e 100644 --- a/src/tests/nodes/div_fp8x23/output_0.cairo +++ b/src/tests/nodes/div_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo index ea6394676..8661873ad 100644 --- a/src/tests/nodes/div_fp8x23_broadcast.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorDiv}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo index 7d114bc30..0a0734e31 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo index 1fc93e061..4521accca 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo index 6d4db2fee..df85c4b45 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo index 8c3c1bd42..0e5d7b5c9 100644 --- a/src/tests/nodes/div_i32/input_0.cairo +++ b/src/tests/nodes/div_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo index 8c77b13bb..6bbfde96e 100644 --- a/src/tests/nodes/div_i32/input_1.cairo +++ b/src/tests/nodes/div_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo index b1b679cf7..94c38368d 100644 --- a/src/tests/nodes/div_i32/output_0.cairo +++ b/src/tests/nodes/div_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo index d4966ec7a..1b3bf8456 100644 --- a/src/tests/nodes/div_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo index 49b270924..3d00bb6f9 100644 --- a/src/tests/nodes/div_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo index bbfa64a39..ca12e53fe 100644 --- a/src/tests/nodes/div_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo index f62a547b2..e8aa9362f 100644 --- a/src/tests/nodes/div_i8/input_0.cairo +++ b/src/tests/nodes/div_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo index b7f1810ae..9f8c7c029 100644 --- a/src/tests/nodes/div_i8/input_1.cairo +++ b/src/tests/nodes/div_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo index bdacfb241..37b830322 100644 --- a/src/tests/nodes/div_i8/output_0.cairo +++ b/src/tests/nodes/div_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo index 092dca5bc..9d7e1f3f7 100644 --- a/src/tests/nodes/div_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo index 2d9c5deae..eae1cd532 100644 --- a/src/tests/nodes/div_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo index 41c9c8961..3fb34e72f 100644 --- a/src/tests/nodes/div_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo index bfb873711..4391c4806 100644 --- a/src/tests/nodes/div_u32/input_0.cairo +++ b/src/tests/nodes/div_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo index 16041b3a4..a7fe24508 100644 --- a/src/tests/nodes/div_u32/input_1.cairo +++ b/src/tests/nodes/div_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo index a80f991cc..1d638fb47 100644 --- a/src/tests/nodes/div_u32/output_0.cairo +++ b/src/tests/nodes/div_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo index c3b09c057..34afc8a47 100644 --- a/src/tests/nodes/div_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo index ad72dc172..cb8025485 100644 --- a/src/tests/nodes/div_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo index a2245f819..2ca8f9e5c 100644 --- a/src/tests/nodes/div_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp16x16.cairo b/src/tests/nodes/equal_fp16x16.cairo index d26dd6568..f97944c4c 100644 --- a/src/tests/nodes/equal_fp16x16.cairo +++ b/src/tests/nodes/equal_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo index 4781e0447..2dd812e3b 100644 --- a/src/tests/nodes/equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo index 431f47ac8..f2256f156 100644 --- a/src/tests/nodes/equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo index 29b80c686..195f01f3f 100644 --- a/src/tests/nodes/equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp16x16_broadcast.cairo b/src/tests/nodes/equal_fp16x16_broadcast.cairo index 46e6f4daa..a99aa1bf1 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo index 4425c2779..c6f09af00 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo index b2e478356..4c73a9f00 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo index 43b0cb52e..93e71b66c 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp8x23.cairo b/src/tests/nodes/equal_fp8x23.cairo index e965e068e..1399eb9e6 100644 --- a/src/tests/nodes/equal_fp8x23.cairo +++ b/src/tests/nodes/equal_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo index eb8db3def..ed55b0bf2 100644 --- a/src/tests/nodes/equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo index e39dbe926..c67922000 100644 --- a/src/tests/nodes/equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo index 5c3751443..277153bde 100644 --- a/src/tests/nodes/equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/equal_fp8x23_broadcast.cairo b/src/tests/nodes/equal_fp8x23_broadcast.cairo index 30f014cac..f0dd70dcd 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo index 5bb0c90e0..b67424022 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo index 296b06c77..dcf001379 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo index b596f2262..4e5a8296d 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/equal_i32.cairo b/src/tests/nodes/equal_i32.cairo index e931a63dc..00d822856 100644 --- a/src/tests/nodes/equal_i32.cairo +++ b/src/tests/nodes/equal_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo index ac17d19e8..94dbd0f6f 100644 --- a/src/tests/nodes/equal_i32/input_0.cairo +++ b/src/tests/nodes/equal_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo index 4a2e8f239..2a43ee275 100644 --- a/src/tests/nodes/equal_i32/input_1.cairo +++ b/src/tests/nodes/equal_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo index caa1d538a..9f916a719 100644 --- a/src/tests/nodes/equal_i32/output_0.cairo +++ b/src/tests/nodes/equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i32_broadcast.cairo b/src/tests/nodes/equal_i32_broadcast.cairo index 8f5fd3c1a..1742aa4af 100644 --- a/src/tests/nodes/equal_i32_broadcast.cairo +++ b/src/tests/nodes/equal_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo index b9c41cea1..5044842b3 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo index 1e127e19f..59971a2b8 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo index 10a574f2b..df8ca9f0f 100644 --- a/src/tests/nodes/equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i8.cairo b/src/tests/nodes/equal_i8.cairo index 0943b2781..406e74efe 100644 --- a/src/tests/nodes/equal_i8.cairo +++ b/src/tests/nodes/equal_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo index db2bf7b2e..128a1e811 100644 --- a/src/tests/nodes/equal_i8/input_0.cairo +++ b/src/tests/nodes/equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo index da60cb9f9..2484362a8 100644 --- a/src/tests/nodes/equal_i8/input_1.cairo +++ b/src/tests/nodes/equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo index 9348d938e..9920606cb 100644 --- a/src/tests/nodes/equal_i8/output_0.cairo +++ b/src/tests/nodes/equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_i8_broadcast.cairo b/src/tests/nodes/equal_i8_broadcast.cairo index 017470c4a..b6ebcc437 100644 --- a/src/tests/nodes/equal_i8_broadcast.cairo +++ b/src/tests/nodes/equal_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo index 9775e54cb..21c8f27d4 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo index 92f479de2..f25a822e5 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo index 0ff4ae4f1..5d845ddb5 100644 --- a/src/tests/nodes/equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32.cairo b/src/tests/nodes/equal_u32.cairo index 3b5ec2429..e2328ee8b 100644 --- a/src/tests/nodes/equal_u32.cairo +++ b/src/tests/nodes/equal_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo index 1c4b0a4f4..e3ec06ebe 100644 --- a/src/tests/nodes/equal_u32/input_0.cairo +++ b/src/tests/nodes/equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo index e2e310a7a..38792aeae 100644 --- a/src/tests/nodes/equal_u32/input_1.cairo +++ b/src/tests/nodes/equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo index a355bd6a4..0276290f9 100644 --- a/src/tests/nodes/equal_u32/output_0.cairo +++ b/src/tests/nodes/equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast.cairo b/src/tests/nodes/equal_u32_broadcast.cairo index 15b1cb76e..11431986f 100644 --- a/src/tests/nodes/equal_u32_broadcast.cairo +++ b/src/tests/nodes/equal_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo index 84acaec5c..7d3708044 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo index f5fa620f7..c27660263 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo index 43b0cb52e..93e71b66c 100644 --- a/src/tests/nodes/equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_fp16x16.cairo b/src/tests/nodes/exp_fp16x16.cairo index 97522c6d3..c63959a9c 100644 --- a/src/tests/nodes/exp_fp16x16.cairo +++ b/src/tests/nodes/exp_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo index 43dfc7796..108199991 100644 --- a/src/tests/nodes/exp_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo index 73f606ddb..f2779c4e3 100644 --- a/src/tests/nodes/exp_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/exp_fp8x23.cairo b/src/tests/nodes/exp_fp8x23.cairo index 775275f37..765bc5c60 100644 --- a/src/tests/nodes/exp_fp8x23.cairo +++ b/src/tests/nodes/exp_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo index aa1580331..d3a948793 100644 --- a/src/tests/nodes/exp_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo index cd691cfc2..62e5191d4 100644 --- a/src/tests/nodes/exp_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_i32_fp16x16.cairo b/src/tests/nodes/exp_i32_fp16x16.cairo index 23de3dbc7..f3d3cc83a 100644 --- a/src/tests/nodes/exp_i32_fp16x16.cairo +++ b/src/tests/nodes/exp_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo index a19d14650..a78ff95e8 100644 --- a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo index 35b276e20..d08907c87 100644 --- a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/exp_i32_fp8x23.cairo b/src/tests/nodes/exp_i32_fp8x23.cairo index 3bf5c54b6..69d519d95 100644 --- a/src/tests/nodes/exp_i32_fp8x23.cairo +++ b/src/tests/nodes/exp_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo index 85688121c..a7f2eb38e 100644 --- a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo index 291f9707e..81f2256ca 100644 --- a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_i8_fp16x16.cairo b/src/tests/nodes/exp_i8_fp16x16.cairo index 7eea4c096..e686f3ed6 100644 --- a/src/tests/nodes/exp_i8_fp16x16.cairo +++ b/src/tests/nodes/exp_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo index f39a4c6a9..94d46da17 100644 --- a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo index 3a23fe7e8..6db38b681 100644 --- a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/exp_i8_fp8x23.cairo b/src/tests/nodes/exp_i8_fp8x23.cairo index 8b2bf9c66..4b6705c67 100644 --- a/src/tests/nodes/exp_i8_fp8x23.cairo +++ b/src/tests/nodes/exp_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo index b6c6dfe1d..f54f45ea6 100644 --- a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo index ceb3112f3..ff56ee17a 100644 --- a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_u32_fp16x16.cairo b/src/tests/nodes/exp_u32_fp16x16.cairo index 562b19124..33e0998c9 100644 --- a/src/tests/nodes/exp_u32_fp16x16.cairo +++ b/src/tests/nodes/exp_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo index 81da859b5..63a9af527 100644 --- a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo index 91e547189..46f95c8fc 100644 --- a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo index 82f46d49b..86159c5d3 100644 --- a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo index 244b753aa..e4e684f73 100644 --- a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp16x16.cairo b/src/tests/nodes/greater_equal_fp16x16.cairo index 5d03e4377..272071e56 100644 --- a/src/tests/nodes/greater_equal_fp16x16.cairo +++ b/src/tests/nodes/greater_equal_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo index ad8e7159f..2b18fe431 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo index cf2a4ec9b..be9258306 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo index 25ccb257d..0938024d8 100644 --- a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo index a5f824fe8..e2f949359 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo index df03abce9..94ed3e710 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo index 597dddf23..04cb2f937 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo index df61a6440..2a3395e70 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp8x23.cairo b/src/tests/nodes/greater_equal_fp8x23.cairo index fd274bb85..b4611358c 100644 --- a/src/tests/nodes/greater_equal_fp8x23.cairo +++ b/src/tests/nodes/greater_equal_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo index c9a6125ad..aa0db3610 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo index 85b993ba9..596b3e651 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo index 8ff181507..864e5d493 100644 --- a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo index dfa93ac73..bc9742b1f 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo index 349d1099f..88561a5b6 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo index e9aafdf08..cd226ffab 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo index d9a0db6c5..06ca7e946 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/greater_equal_i32.cairo b/src/tests/nodes/greater_equal_i32.cairo index c149c8c5f..5ed191eeb 100644 --- a/src/tests/nodes/greater_equal_i32.cairo +++ b/src/tests/nodes/greater_equal_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo index 2497849a7..425b22861 100644 --- a/src/tests/nodes/greater_equal_i32/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo index eb3eb55c5..db8f7942f 100644 --- a/src/tests/nodes/greater_equal_i32/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo index 7513a27aa..519dcd4ba 100644 --- a/src/tests/nodes/greater_equal_i32/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i32_broadcast.cairo b/src/tests/nodes/greater_equal_i32_broadcast.cairo index 6a1a7c877..f15e48144 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo index 137296f4b..78c0f6a5f 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo index 569f48feb..00ae79e11 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo index 5d34c92b8..17571932c 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i8.cairo b/src/tests/nodes/greater_equal_i8.cairo index 6730923ed..398bb9be4 100644 --- a/src/tests/nodes/greater_equal_i8.cairo +++ b/src/tests/nodes/greater_equal_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo index 0b8e88bdf..c0b9d3a45 100644 --- a/src/tests/nodes/greater_equal_i8/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo index 68082c9fd..adff9998f 100644 --- a/src/tests/nodes/greater_equal_i8/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo index da861d8c1..61bcb7445 100644 --- a/src/tests/nodes/greater_equal_i8/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_i8_broadcast.cairo b/src/tests/nodes/greater_equal_i8_broadcast.cairo index 16b3df945..533e7c972 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo index 63b8fddf6..434a1136f 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo index 7d9a07861..d568c0e81 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo index 3787cdd6b..958689eef 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32.cairo b/src/tests/nodes/greater_equal_u32.cairo index 29423ae20..5e113a6c9 100644 --- a/src/tests/nodes/greater_equal_u32.cairo +++ b/src/tests/nodes/greater_equal_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo index 17b8e19bc..8d7067f96 100644 --- a/src/tests/nodes/greater_equal_u32/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo index aa419737a..869695e54 100644 --- a/src/tests/nodes/greater_equal_u32/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo index 4fbd2de10..82ed158c2 100644 --- a/src/tests/nodes/greater_equal_u32/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast.cairo b/src/tests/nodes/greater_equal_u32_broadcast.cairo index cb85922a6..c6bc449aa 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo index b0f52dc50..f174351a5 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo index e436903f2..7afe7d09a 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo index 1d7599271..e08fe28e9 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp16x16.cairo b/src/tests/nodes/greater_fp16x16.cairo index e91c08cb7..56db9ec78 100644 --- a/src/tests/nodes/greater_fp16x16.cairo +++ b/src/tests/nodes/greater_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo index 8b2369a0f..fab13d120 100644 --- a/src/tests/nodes/greater_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo index c63c51509..eb34874d0 100644 --- a/src/tests/nodes/greater_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo index 65887af29..6a51e48f9 100644 --- a/src/tests/nodes/greater_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp16x16_broadcast.cairo b/src/tests/nodes/greater_fp16x16_broadcast.cairo index eca2056c8..a7174429b 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo index be9405c7e..18317ea76 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo index b25ce3265..4ca3a24e0 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo index 27e8bec3b..54043d4af 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp8x23.cairo b/src/tests/nodes/greater_fp8x23.cairo index 1db45bd6a..7b49a8d12 100644 --- a/src/tests/nodes/greater_fp8x23.cairo +++ b/src/tests/nodes/greater_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo index 160308e9a..fb29a878e 100644 --- a/src/tests/nodes/greater_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo index b89e44dd8..ebdce3ee3 100644 --- a/src/tests/nodes/greater_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo index e79b7cdb1..f5e467fd2 100644 --- a/src/tests/nodes/greater_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/greater_fp8x23_broadcast.cairo b/src/tests/nodes/greater_fp8x23_broadcast.cairo index 19e021088..f9cc6834c 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo index b5180501b..8b14cfc49 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo index 54bae4b76..c1197c188 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo index 88acc4f8f..9f8adfb50 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/greater_i32.cairo b/src/tests/nodes/greater_i32.cairo index cf8c5aa4a..9c2263dc3 100644 --- a/src/tests/nodes/greater_i32.cairo +++ b/src/tests/nodes/greater_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo index 4ad6a9e53..e7a9854e1 100644 --- a/src/tests/nodes/greater_i32/input_0.cairo +++ b/src/tests/nodes/greater_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo index ba1790c2c..2691f3e4d 100644 --- a/src/tests/nodes/greater_i32/input_1.cairo +++ b/src/tests/nodes/greater_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo index b09996d78..09c16cfc3 100644 --- a/src/tests/nodes/greater_i32/output_0.cairo +++ b/src/tests/nodes/greater_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i32_broadcast.cairo b/src/tests/nodes/greater_i32_broadcast.cairo index 5fca3c14f..f320a126f 100644 --- a/src/tests/nodes/greater_i32_broadcast.cairo +++ b/src/tests/nodes/greater_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo index 08f8d3646..7d3ec4792 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo index d03dc85f0..7325080a0 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo index 27e8bec3b..54043d4af 100644 --- a/src/tests/nodes/greater_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i8.cairo b/src/tests/nodes/greater_i8.cairo index 903867b5d..054386201 100644 --- a/src/tests/nodes/greater_i8.cairo +++ b/src/tests/nodes/greater_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo index c4f8b552b..ef1f978f4 100644 --- a/src/tests/nodes/greater_i8/input_0.cairo +++ b/src/tests/nodes/greater_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo index f78b8477a..cf3c0a461 100644 --- a/src/tests/nodes/greater_i8/input_1.cairo +++ b/src/tests/nodes/greater_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo index 83a9fc93c..8651ea44f 100644 --- a/src/tests/nodes/greater_i8/output_0.cairo +++ b/src/tests/nodes/greater_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_i8_broadcast.cairo b/src/tests/nodes/greater_i8_broadcast.cairo index 7747b02f0..6007ebbb2 100644 --- a/src/tests/nodes/greater_i8_broadcast.cairo +++ b/src/tests/nodes/greater_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo index 099874646..a077d9c9a 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo index b27826cf0..4b86ff635 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo index a5e4f8529..2d721c3bc 100644 --- a/src/tests/nodes/greater_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32.cairo b/src/tests/nodes/greater_u32.cairo index 3b4046086..77c16ceeb 100644 --- a/src/tests/nodes/greater_u32.cairo +++ b/src/tests/nodes/greater_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo index d87a8a860..d0738bad3 100644 --- a/src/tests/nodes/greater_u32/input_0.cairo +++ b/src/tests/nodes/greater_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo index 8376bd1db..0d98744de 100644 --- a/src/tests/nodes/greater_u32/input_1.cairo +++ b/src/tests/nodes/greater_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo index eb506897d..b2afd6f2d 100644 --- a/src/tests/nodes/greater_u32/output_0.cairo +++ b/src/tests/nodes/greater_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast.cairo b/src/tests/nodes/greater_u32_broadcast.cairo index 10ea19488..7a3763d33 100644 --- a/src/tests/nodes/greater_u32_broadcast.cairo +++ b/src/tests/nodes/greater_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo index 8ca296287..1217ff01a 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo index 6a8045306..cabde4212 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo index 42b65c16e..edfc188ca 100644 --- a/src/tests/nodes/greater_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo index 61a62e2d3..5278c956c 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo index 28955f8d9..51f8b564b 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo index eb1f0e91e..a3d0b383f 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo index 01b06acb5..f7a3a2394 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo index 057b3047f..3bf9091c9 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo index 7a184935f..2b1569cd0 100644 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo index 845416092..32f650d08 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo index 973a1ed7f..68de684a1 100644 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo index 50367146a..a11c30f0b 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::{i8, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo index 23ff596c7..4207de091 100644 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo index 48d2c9017..043f121cc 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo index a67107781..fef089ef2 100644 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp16x16.cairo b/src/tests/nodes/less_equal_fp16x16.cairo index dd46aadd8..4a810f476 100644 --- a/src/tests/nodes/less_equal_fp16x16.cairo +++ b/src/tests/nodes/less_equal_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo index ed8db7d25..5afc02a45 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo index 88c276fc5..622220d18 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/less_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo index c581fa726..9787d1ef3 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo index 4fdf18635..c764315ad 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo index b2e478356..4c73a9f00 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo index c1fc9ff84..b2b9896af 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp8x23.cairo b/src/tests/nodes/less_equal_fp8x23.cairo index da488ddc1..f1eb72d22 100644 --- a/src/tests/nodes/less_equal_fp8x23.cairo +++ b/src/tests/nodes/less_equal_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo index 62fb02fd0..43c360a28 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo index 8aa8d9b02..009b36fd7 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo index 269e60640..229d62683 100644 --- a/src/tests/nodes/less_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo index 0059779ff..07ee3587e 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo index 0ba99e7df..e45f29929 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo index 54bae4b76..c1197c188 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo index 7843f1bd6..803855ca6 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/less_equal_i32.cairo b/src/tests/nodes/less_equal_i32.cairo index 474820b5b..2b39e8c1d 100644 --- a/src/tests/nodes/less_equal_i32.cairo +++ b/src/tests/nodes/less_equal_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo index 7ae23200d..74558c823 100644 --- a/src/tests/nodes/less_equal_i32/input_0.cairo +++ b/src/tests/nodes/less_equal_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo index f70335877..85345ea37 100644 --- a/src/tests/nodes/less_equal_i32/input_1.cairo +++ b/src/tests/nodes/less_equal_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo index 352a5ae44..6e8d900c2 100644 --- a/src/tests/nodes/less_equal_i32/output_0.cairo +++ b/src/tests/nodes/less_equal_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i32_broadcast.cairo b/src/tests/nodes/less_equal_i32_broadcast.cairo index 72e3667aa..164a05c14 100644 --- a/src/tests/nodes/less_equal_i32_broadcast.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo index fe7f59be6..44a41170c 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo index 1272e68e6..fe3fa7759 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo index 34e792936..180389d2b 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i8.cairo b/src/tests/nodes/less_equal_i8.cairo index e8ff70de7..d54e6ba76 100644 --- a/src/tests/nodes/less_equal_i8.cairo +++ b/src/tests/nodes/less_equal_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo index 3673e03dc..e2e849163 100644 --- a/src/tests/nodes/less_equal_i8/input_0.cairo +++ b/src/tests/nodes/less_equal_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo index 03ff7cfc5..d17abf35a 100644 --- a/src/tests/nodes/less_equal_i8/input_1.cairo +++ b/src/tests/nodes/less_equal_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo index 8b96ad6d7..8a44faccf 100644 --- a/src/tests/nodes/less_equal_i8/output_0.cairo +++ b/src/tests/nodes/less_equal_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_i8_broadcast.cairo b/src/tests/nodes/less_equal_i8_broadcast.cairo index 3c06fda77..988888f0f 100644 --- a/src/tests/nodes/less_equal_i8_broadcast.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo index d7859c33d..5ffb1b603 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo index b27826cf0..4b86ff635 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo index d47a2506a..6147252f2 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32.cairo b/src/tests/nodes/less_equal_u32.cairo index 9175996d0..3da51fff7 100644 --- a/src/tests/nodes/less_equal_u32.cairo +++ b/src/tests/nodes/less_equal_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo index 76cb25b81..1c359adeb 100644 --- a/src/tests/nodes/less_equal_u32/input_0.cairo +++ b/src/tests/nodes/less_equal_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo index 34981c2a5..94ecbbf6c 100644 --- a/src/tests/nodes/less_equal_u32/input_1.cairo +++ b/src/tests/nodes/less_equal_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/less_equal_u32/output_0.cairo +++ b/src/tests/nodes/less_equal_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast.cairo b/src/tests/nodes/less_equal_u32_broadcast.cairo index 082f41f18..fbeb82c21 100644 --- a/src/tests/nodes/less_equal_u32_broadcast.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo index 709c45a1f..2632c62ea 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo index 09704395b..87056020f 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo index d47a2506a..6147252f2 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp16x16.cairo b/src/tests/nodes/less_fp16x16.cairo index c9962677f..76f1383d2 100644 --- a/src/tests/nodes/less_fp16x16.cairo +++ b/src/tests/nodes/less_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo index a7a1eef9a..3e7d7e7ab 100644 --- a/src/tests/nodes/less_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo index 5baee07ce..91f99e522 100644 --- a/src/tests/nodes/less_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo index 35383d32d..c4a74578b 100644 --- a/src/tests/nodes/less_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp16x16_broadcast.cairo b/src/tests/nodes/less_fp16x16_broadcast.cairo index 8dfc3eedf..6269a1e0a 100644 --- a/src/tests/nodes/less_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo index e1c3654c8..7eca8a5fb 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo index 310195ab0..7f6907f11 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo index 0abc35cbc..d64dfda5f 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp8x23.cairo b/src/tests/nodes/less_fp8x23.cairo index 42a5c3991..660a7919d 100644 --- a/src/tests/nodes/less_fp8x23.cairo +++ b/src/tests/nodes/less_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo index bb2f52e02..bedc75e89 100644 --- a/src/tests/nodes/less_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo index 37db5d9a0..336322c8f 100644 --- a/src/tests/nodes/less_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo index 560b1a86e..a6e9670eb 100644 --- a/src/tests/nodes/less_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/less_fp8x23_broadcast.cairo b/src/tests/nodes/less_fp8x23_broadcast.cairo index 78632cf96..e9594e474 100644 --- a/src/tests/nodes/less_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo index 78c5f553c..a3c5f36f5 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo index 544dee9db..131225329 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo index 45770ecc0..6ee2fe20e 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/less_i32.cairo b/src/tests/nodes/less_i32.cairo index 156877d35..d0902f211 100644 --- a/src/tests/nodes/less_i32.cairo +++ b/src/tests/nodes/less_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo index f0c2e5f3a..6953357f1 100644 --- a/src/tests/nodes/less_i32/input_0.cairo +++ b/src/tests/nodes/less_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo index 2a3e754fd..507854555 100644 --- a/src/tests/nodes/less_i32/input_1.cairo +++ b/src/tests/nodes/less_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo index 0ba1ef43f..ab576aa1d 100644 --- a/src/tests/nodes/less_i32/output_0.cairo +++ b/src/tests/nodes/less_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i32_broadcast.cairo b/src/tests/nodes/less_i32_broadcast.cairo index e7560bff6..e3c9cdd53 100644 --- a/src/tests/nodes/less_i32_broadcast.cairo +++ b/src/tests/nodes/less_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo index 4ddf966f2..2acfae742 100644 --- a/src/tests/nodes/less_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo index e9117838b..1bc322d90 100644 --- a/src/tests/nodes/less_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo index 620953ab7..219970281 100644 --- a/src/tests/nodes/less_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i8.cairo b/src/tests/nodes/less_i8.cairo index 6cd37e77d..dbbed410b 100644 --- a/src/tests/nodes/less_i8.cairo +++ b/src/tests/nodes/less_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo index d065e3e09..8317436c1 100644 --- a/src/tests/nodes/less_i8/input_0.cairo +++ b/src/tests/nodes/less_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo index cde5c4c3b..f92c368d9 100644 --- a/src/tests/nodes/less_i8/input_1.cairo +++ b/src/tests/nodes/less_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo index 64e5f523a..a21a003e6 100644 --- a/src/tests/nodes/less_i8/output_0.cairo +++ b/src/tests/nodes/less_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_i8_broadcast.cairo b/src/tests/nodes/less_i8_broadcast.cairo index 3cceec019..4aace83e4 100644 --- a/src/tests/nodes/less_i8_broadcast.cairo +++ b/src/tests/nodes/less_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo index 399841593..61cc01be1 100644 --- a/src/tests/nodes/less_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo index 6d46a96d7..68d0125d4 100644 --- a/src/tests/nodes/less_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo index 08c091389..a1aee4480 100644 --- a/src/tests/nodes/less_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32.cairo b/src/tests/nodes/less_u32.cairo index ddcbd9061..032bc3ffc 100644 --- a/src/tests/nodes/less_u32.cairo +++ b/src/tests/nodes/less_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo index 247f83da5..38b4f8a3c 100644 --- a/src/tests/nodes/less_u32/input_0.cairo +++ b/src/tests/nodes/less_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo index 79fd95c92..38d6a8263 100644 --- a/src/tests/nodes/less_u32/input_1.cairo +++ b/src/tests/nodes/less_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo index 307ab7582..33d2fc5ca 100644 --- a/src/tests/nodes/less_u32/output_0.cairo +++ b/src/tests/nodes/less_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast.cairo b/src/tests/nodes/less_u32_broadcast.cairo index e152fc996..8ae776a37 100644 --- a/src/tests/nodes/less_u32_broadcast.cairo +++ b/src/tests/nodes/less_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo index 84ec9d8fd..3d563c796 100644 --- a/src/tests/nodes/less_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo index 5af96453a..0e9116fd7 100644 --- a/src/tests/nodes/less_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo index ef89940d1..c16cf8771 100644 --- a/src/tests/nodes/less_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo index 41ae699ce..957cc2f4d 100644 --- a/src/tests/nodes/linear_fp16x16/input_0.cairo +++ b/src/tests/nodes/linear_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo index 6b37bd16b..911ffdee7 100644 --- a/src/tests/nodes/linear_fp16x16/input_1.cairo +++ b/src/tests/nodes/linear_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo index 1d39acf99..56ebfef13 100644 --- a/src/tests/nodes/linear_fp16x16/input_2.cairo +++ b/src/tests/nodes/linear_fp16x16/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo index 70959dbae..873e48752 100644 --- a/src/tests/nodes/linear_fp16x16/output_0.cairo +++ b/src/tests/nodes/linear_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo index 777eb9f09..561c55c86 100644 --- a/src/tests/nodes/linear_fp8x23/input_0.cairo +++ b/src/tests/nodes/linear_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo index dcb16d515..8233e6e05 100644 --- a/src/tests/nodes/linear_fp8x23/input_1.cairo +++ b/src/tests/nodes/linear_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo index 37a11a04b..ff8712325 100644 --- a/src/tests/nodes/linear_fp8x23/input_2.cairo +++ b/src/tests/nodes/linear_fp8x23/input_2.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo index a8d973435..4e72468a4 100644 --- a/src/tests/nodes/linear_fp8x23/output_0.cairo +++ b/src/tests/nodes/linear_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo index 4c0ffaec1..497c8a723 100644 --- a/src/tests/nodes/linear_i32/input_0.cairo +++ b/src/tests/nodes/linear_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo index 566971bd0..79d61c565 100644 --- a/src/tests/nodes/linear_i32/input_1.cairo +++ b/src/tests/nodes/linear_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo index 86937a12a..1018678ce 100644 --- a/src/tests/nodes/linear_i32/input_2.cairo +++ b/src/tests/nodes/linear_i32/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_2() -> Tensor { diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo index 1d367affa..a5d72eb8b 100644 --- a/src/tests/nodes/linear_i32/output_0.cairo +++ b/src/tests/nodes/linear_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo index 1778478d8..1084d0423 100644 --- a/src/tests/nodes/linear_i8/input_0.cairo +++ b/src/tests/nodes/linear_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo index 3e919ffad..894c77a4b 100644 --- a/src/tests/nodes/linear_i8/input_1.cairo +++ b/src/tests/nodes/linear_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo index fac27ceaf..39d8f3aed 100644 --- a/src/tests/nodes/linear_i8/input_2.cairo +++ b/src/tests/nodes/linear_i8/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_2() -> Tensor { diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo index 702ed6ba6..496683fa3 100644 --- a/src/tests/nodes/linear_i8/output_0.cairo +++ b/src/tests/nodes/linear_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo index ff0cb4baf..487e5b1b4 100644 --- a/src/tests/nodes/linear_u32/input_0.cairo +++ b/src/tests/nodes/linear_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo index a75ff38bd..98f597953 100644 --- a/src/tests/nodes/linear_u32/input_1.cairo +++ b/src/tests/nodes/linear_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo index 2b0b51c1f..c08c8818c 100644 --- a/src/tests/nodes/linear_u32/input_2.cairo +++ b/src/tests/nodes/linear_u32/input_2.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo index 9f6a8d887..e39b6956d 100644 --- a/src/tests/nodes/linear_u32/output_0.cairo +++ b/src/tests/nodes/linear_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_fp16x16.cairo b/src/tests/nodes/log_fp16x16.cairo index 0eeabc712..742716792 100644 --- a/src/tests/nodes/log_fp16x16.cairo +++ b/src/tests/nodes/log_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo index ad8331684..0108f09c5 100644 --- a/src/tests/nodes/log_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo index d9c7772ce..f38c6d20a 100644 --- a/src/tests/nodes/log_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/log_fp8x23.cairo b/src/tests/nodes/log_fp8x23.cairo index b42265b04..2d1d9e9fc 100644 --- a/src/tests/nodes/log_fp8x23.cairo +++ b/src/tests/nodes/log_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo index 0b8b833ff..47f76e26e 100644 --- a/src/tests/nodes/log_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo index b77950618..35d97375e 100644 --- a/src/tests/nodes/log_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_i32_fp16x16.cairo b/src/tests/nodes/log_i32_fp16x16.cairo index 9e3ca72df..98a77e2f2 100644 --- a/src/tests/nodes/log_i32_fp16x16.cairo +++ b/src/tests/nodes/log_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_i32_fp16x16/input_0.cairo b/src/tests/nodes/log_i32_fp16x16/input_0.cairo index 0e5e22245..96ec86221 100644 --- a/src/tests/nodes/log_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i32_fp16x16/output_0.cairo b/src/tests/nodes/log_i32_fp16x16/output_0.cairo index 63f8c4561..d99b5c4f3 100644 --- a/src/tests/nodes/log_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/log_i32_fp8x23.cairo b/src/tests/nodes/log_i32_fp8x23.cairo index 9975862e8..2878f99a1 100644 --- a/src/tests/nodes/log_i32_fp8x23.cairo +++ b/src/tests/nodes/log_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_i32_fp8x23/input_0.cairo b/src/tests/nodes/log_i32_fp8x23/input_0.cairo index 9695faf4d..3d369d64f 100644 --- a/src/tests/nodes/log_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i32_fp8x23/output_0.cairo b/src/tests/nodes/log_i32_fp8x23/output_0.cairo index b16b930e7..11da5d5ba 100644 --- a/src/tests/nodes/log_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_i8_fp16x16.cairo b/src/tests/nodes/log_i8_fp16x16.cairo index fda4b859b..3a29b8c57 100644 --- a/src/tests/nodes/log_i8_fp16x16.cairo +++ b/src/tests/nodes/log_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_i8_fp16x16/input_0.cairo b/src/tests/nodes/log_i8_fp16x16/input_0.cairo index 6ca968ddc..29fd507b4 100644 --- a/src/tests/nodes/log_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i8_fp16x16/output_0.cairo b/src/tests/nodes/log_i8_fp16x16/output_0.cairo index 6478dd7c2..e4ec8654c 100644 --- a/src/tests/nodes/log_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/log_i8_fp8x23.cairo b/src/tests/nodes/log_i8_fp8x23.cairo index fa9e21fa1..999e9727b 100644 --- a/src/tests/nodes/log_i8_fp8x23.cairo +++ b/src/tests/nodes/log_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_i8_fp8x23/input_0.cairo b/src/tests/nodes/log_i8_fp8x23/input_0.cairo index 3b3477959..3d30917fd 100644 --- a/src/tests/nodes/log_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/log_i8_fp8x23/output_0.cairo b/src/tests/nodes/log_i8_fp8x23/output_0.cairo index fb069c2f9..3de1f46e0 100644 --- a/src/tests/nodes/log_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_u32_fp16x16.cairo b/src/tests/nodes/log_u32_fp16x16.cairo index 45a07345b..afce23f72 100644 --- a/src/tests/nodes/log_u32_fp16x16.cairo +++ b/src/tests/nodes/log_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/log_u32_fp16x16/input_0.cairo b/src/tests/nodes/log_u32_fp16x16/input_0.cairo index 4b672b683..80854b406 100644 --- a/src/tests/nodes/log_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/log_u32_fp16x16/output_0.cairo b/src/tests/nodes/log_u32_fp16x16/output_0.cairo index 85880be30..1de71a2e6 100644 --- a/src/tests/nodes/log_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/log_u32_fp8x23/input_0.cairo b/src/tests/nodes/log_u32_fp8x23/input_0.cairo index 70dff11d8..376fc7a0a 100644 --- a/src/tests/nodes/log_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/log_u32_fp8x23/output_0.cairo b/src/tests/nodes/log_u32_fp8x23/output_0.cairo index f694761a1..b52db2414 100644 --- a/src/tests/nodes/log_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo index d64727cba..99c17af4b 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo index fe4dee981..b48cc7511 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo index d80451237..9e122cb4c 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo index 88584f65e..2808bc50d 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo index 5679a22d4..651a079b7 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo index 979d89612..139c146e6 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo index c9a98f76d..e077c4de9 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo index 431cbef7a..227b96407 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo index 6796c6ff3..f66676771 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo index 47c6038a2..a9025f599 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo index c44ef7976..dc47775c8 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo index 8c8141bd6..cc2416077 100644 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo index ada1f98d4..f8b2f6ebf 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo index 2573b0103..260ef17c9 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo index 103394aa0..b90417ff6 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo index c0d35d60b..81e97e847 100644 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo index bbe626e9a..ede71260a 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo index 52e5d50ca..343e50e81 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo index f30b47e16..a3dd92746 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo index 80997966d..dd78e0de3 100644 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo index 27757ec9d..b21d95311 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo index 399779e5a..1a7ed2187 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo index ec2bcaa17..f044e4ad4 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo index 1c5b631ab..f8c3b83dd 100644 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo index e3cc04b8b..e60e786c9 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo index 28441a9ab..ed8f143da 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo index bdde8723a..82ee05a7f 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo index 7747097a7..ba45ca63a 100644 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo index b8b640838..75b34128a 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo index b75d7144f..da12feb1f 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo index 496e5236a..950a39012 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo index a848c657d..fda467366 100644 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp16x16_1d.cairo b/src/tests/nodes/matmul_fp16x16_1d.cairo index e1e1768f0..24be4db30 100644 --- a/src/tests/nodes/matmul_fp16x16_1d.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo index e457f2400..ab502bcdb 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo index ce3be0260..765303e82 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo index e0d232829..6d577b145 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_1x2.cairo b/src/tests/nodes/matmul_fp16x16_1x2.cairo index e8bfd380f..f4377c513 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo index 83ebb437e..e10d6551a 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo index b00823fe0..cf9a1aa92 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo index 50c08ef45..22dbef96b 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x1.cairo b/src/tests/nodes/matmul_fp16x16_2x1.cairo index 36f782867..f45009611 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo index 40a99440c..42393acac 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo index d7358673f..0b3d134b5 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo index 5379ce7e7..d8a4a37b6 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x2.cairo b/src/tests/nodes/matmul_fp16x16_2x2.cairo index 8d1a03f6a..a8d91c33c 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2.cairo @@ -6,7 +6,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo index f15b988e5..3bd275f59 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo index b5a08db5d..90bf57259 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo index cbeea8289..bea19e5c9 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/matmul_fp8x23_1d.cairo b/src/tests/nodes/matmul_fp8x23_1d.cairo index 3b70dcd0f..a0f6f06dc 100644 --- a/src/tests/nodes/matmul_fp8x23_1d.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo index 356cebe63..f9b8e9b16 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo index 8b87951e5..8a3295aa9 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo index c8c026db1..8d28bb17b 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_1x2.cairo b/src/tests/nodes/matmul_fp8x23_1x2.cairo index 79afdca5e..917077bdc 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo index 9638a9b28..aaecf20b6 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo index 076a1e8d9..01d9c442a 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo index 1f808122c..37368c096 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x1.cairo b/src/tests/nodes/matmul_fp8x23_2x1.cairo index 91a5d6614..28897f7a7 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo index f338b9e61..9fa618a1a 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo index 596fa477b..dee47a74f 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo index 482847fbd..afc5f989b 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x2.cairo b/src/tests/nodes/matmul_fp8x23_2x2.cairo index c68378d0c..eec6e3841 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo index aec8407c3..a3e9e8e9c 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo index 8903cb66d..d36a67981 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo index ff42753be..238a9e08a 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo index edda7ffa1..1c369cc59 100644 --- a/src/tests/nodes/matmul_i32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo index 4ab755f55..b2eb68b26 100644 --- a/src/tests/nodes/matmul_i32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo index 45b6a348d..7acc6b511 100644 --- a/src/tests/nodes/matmul_i32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo index e8080c314..9fb9f7614 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo index ba83c444a..c79bf40d4 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo index 89a9ef013..b0db023aa 100644 --- a/src/tests/nodes/matmul_i32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo index c12a05491..bfe54ea87 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo index 0646139d6..4cc4a1326 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo index e6c52c5d6..ea03de14b 100644 --- a/src/tests/nodes/matmul_i32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo index dfff10927..ec94cc957 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo index f51acded1..8a8a37edc 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo index dc2f0862d..d2e2d7949 100644 --- a/src/tests/nodes/matmul_i32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo index 6d5bc94cd..7c2f63a43 100644 --- a/src/tests/nodes/matmul_i8_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo index 600081ca3..9067510cb 100644 --- a/src/tests/nodes/matmul_i8_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo index 79c16c618..c4167bdd3 100644 --- a/src/tests/nodes/matmul_i8_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo index bcf19b13e..12bcf2716 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo index 180041466..daf6bcad2 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo index 35bfed041..582a19dab 100644 --- a/src/tests/nodes/matmul_i8_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo index ad35318e8..7d6f49afb 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo index e3a372fd7..3564cfb32 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo index 8dc1b2214..8756347a1 100644 --- a/src/tests/nodes/matmul_i8_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo index d45ba7592..bd16a02b8 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo index 67c925552..d8dd2b79c 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo index a93ee6dc0..b2b553de9 100644 --- a/src/tests/nodes/matmul_i8_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/matmul_u32_1d.cairo b/src/tests/nodes/matmul_u32_1d.cairo index f01d7114e..fac93202b 100644 --- a/src/tests/nodes/matmul_u32_1d.cairo +++ b/src/tests/nodes/matmul_u32_1d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo index fe0751134..91831eea5 100644 --- a/src/tests/nodes/matmul_u32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo index bc70c2261..d246c275b 100644 --- a/src/tests/nodes/matmul_u32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo index 9d4279854..9ee66a4f3 100644 --- a/src/tests/nodes/matmul_u32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2.cairo b/src/tests/nodes/matmul_u32_1x2.cairo index fc58345ce..b6055e676 100644 --- a/src/tests/nodes/matmul_u32_1x2.cairo +++ b/src/tests/nodes/matmul_u32_1x2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo index 3c5d74d63..04ed2a6bf 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo index 31a497675..bcb37f5f3 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo index f777727f8..dbc07696e 100644 --- a/src/tests/nodes/matmul_u32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1.cairo b/src/tests/nodes/matmul_u32_2x1.cairo index 4c9084cf6..fe9718e53 100644 --- a/src/tests/nodes/matmul_u32_2x1.cairo +++ b/src/tests/nodes/matmul_u32_2x1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo index f375cf383..a2fcb5539 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo index 48db9f3c9..67dd60eef 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo index 8287e8b57..1a8924a87 100644 --- a/src/tests/nodes/matmul_u32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2.cairo b/src/tests/nodes/matmul_u32_2x2.cairo index d707ef683..cbbadee2f 100644 --- a/src/tests/nodes/matmul_u32_2x2.cairo +++ b/src/tests/nodes/matmul_u32_2x2.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo index 275c99dc1..c73eafec0 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo index 1ae8c0cf8..eaa08c3c5 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo index c3e31c352..5634e6398 100644 --- a/src/tests/nodes/matmul_u32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo index a5af760e3..f30de968f 100644 --- a/src/tests/nodes/mul_fp16x16.cairo +++ b/src/tests/nodes/mul_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorMul}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo index f2761da22..46e1a0173 100644 --- a/src/tests/nodes/mul_fp16x16/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo index 3888b1ef8..ab6d68502 100644 --- a/src/tests/nodes/mul_fp16x16/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo index 00fc300c7..8303b5b76 100644 --- a/src/tests/nodes/mul_fp16x16/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo index f02393f63..13eb0d3f0 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorMul}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo index cf95219b7..e55d66442 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo index cbcf7a5c2..d62343f47 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo index 139a145d8..a70489936 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo index 3c5f8bdd4..b5ff09c3e 100644 --- a/src/tests/nodes/mul_fp8x23.cairo +++ b/src/tests/nodes/mul_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorMul}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo index 49129df26..bb364f1ab 100644 --- a/src/tests/nodes/mul_fp8x23/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo index 33f3f3658..751982ba9 100644 --- a/src/tests/nodes/mul_fp8x23/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo index 8be8f074c..805f08c11 100644 --- a/src/tests/nodes/mul_fp8x23/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo index 95b2db23b..d73cb8ff6 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorMul}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo index 31700f184..3312730d1 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo index 1e94f288f..871bb230a 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo index 60aac83eb..fdc2a7376 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo index 83f22160e..245fe1ea2 100644 --- a/src/tests/nodes/mul_i32/input_0.cairo +++ b/src/tests/nodes/mul_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo index b3d06c8b0..c3afa3a84 100644 --- a/src/tests/nodes/mul_i32/input_1.cairo +++ b/src/tests/nodes/mul_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo index 2f755ebf5..8d1b0c885 100644 --- a/src/tests/nodes/mul_i32/output_0.cairo +++ b/src/tests/nodes/mul_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo index a79a32c78..2614b2d06 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo index b982bc597..cc7759abf 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo index 165772efc..6f32cbb37 100644 --- a/src/tests/nodes/mul_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo index bdcfe6842..01df7f53e 100644 --- a/src/tests/nodes/mul_i8/input_0.cairo +++ b/src/tests/nodes/mul_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo index 52fbbef13..bcebf3b5c 100644 --- a/src/tests/nodes/mul_i8/input_1.cairo +++ b/src/tests/nodes/mul_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo index ce231aa7c..c498e53c2 100644 --- a/src/tests/nodes/mul_i8/output_0.cairo +++ b/src/tests/nodes/mul_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo index e2eaef2cd..84360e083 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo index 5f33477b6..42c0a21b3 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo index 5bbabf463..e16882b8d 100644 --- a/src/tests/nodes/mul_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo index 8b52be464..bae9c3b76 100644 --- a/src/tests/nodes/mul_u32/input_0.cairo +++ b/src/tests/nodes/mul_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo index 902b12de2..b40d1b863 100644 --- a/src/tests/nodes/mul_u32/input_1.cairo +++ b/src/tests/nodes/mul_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo index 1bc016684..9743e9666 100644 --- a/src/tests/nodes/mul_u32/output_0.cairo +++ b/src/tests/nodes/mul_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo index 030c12aa6..3f6f1febd 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo index 7328c5086..b4c0b55bb 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo index c468c14e2..15deb75b2 100644 --- a/src/tests/nodes/mul_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp16x16.cairo b/src/tests/nodes/or_fp16x16.cairo index 24079efd6..89bd34c5b 100644 --- a/src/tests/nodes/or_fp16x16.cairo +++ b/src/tests/nodes/or_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo index 5fbe47970..b924b44e2 100644 --- a/src/tests/nodes/or_fp16x16/input_0.cairo +++ b/src/tests/nodes/or_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo index f3cdb3adc..bfe1f8987 100644 --- a/src/tests/nodes/or_fp16x16/input_1.cairo +++ b/src/tests/nodes/or_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo index f900f0c86..2d266e42d 100644 --- a/src/tests/nodes/or_fp16x16/output_0.cairo +++ b/src/tests/nodes/or_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp16x16_broadcast.cairo b/src/tests/nodes/or_fp16x16_broadcast.cairo index eec0b4489..1f86096ac 100644 --- a/src/tests/nodes/or_fp16x16_broadcast.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo index 21395111c..3717f8bf8 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo index 229688c01..e773dba79 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp8x23.cairo b/src/tests/nodes/or_fp8x23.cairo index 5e8f096e9..7a8c4e3c0 100644 --- a/src/tests/nodes/or_fp8x23.cairo +++ b/src/tests/nodes/or_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo index 379c8ec0f..e6a86e0a3 100644 --- a/src/tests/nodes/or_fp8x23/input_0.cairo +++ b/src/tests/nodes/or_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo index 0b329c9a1..232918288 100644 --- a/src/tests/nodes/or_fp8x23/input_1.cairo +++ b/src/tests/nodes/or_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo index 279670f33..f6699346a 100644 --- a/src/tests/nodes/or_fp8x23/output_0.cairo +++ b/src/tests/nodes/or_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/or_fp8x23_broadcast.cairo b/src/tests/nodes/or_fp8x23_broadcast.cairo index f23f115a4..46451914c 100644 --- a/src/tests/nodes/or_fp8x23_broadcast.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo index 072e92225..5875d3a48 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo index 408bdeebe..7c903a7b1 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo index 1c49a2028..bd196cf3c 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/or_i32.cairo b/src/tests/nodes/or_i32.cairo index 9d57493ea..217a49069 100644 --- a/src/tests/nodes/or_i32.cairo +++ b/src/tests/nodes/or_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo index a527933d9..daee2cd25 100644 --- a/src/tests/nodes/or_i32/input_0.cairo +++ b/src/tests/nodes/or_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo index 00872f8c5..29e1ef774 100644 --- a/src/tests/nodes/or_i32/input_1.cairo +++ b/src/tests/nodes/or_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo index ac6fe54ab..abc95e344 100644 --- a/src/tests/nodes/or_i32/output_0.cairo +++ b/src/tests/nodes/or_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i32_broadcast.cairo b/src/tests/nodes/or_i32_broadcast.cairo index b2a5488a3..368331e42 100644 --- a/src/tests/nodes/or_i32_broadcast.cairo +++ b/src/tests/nodes/or_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo index e0abc538c..aa07975d9 100644 --- a/src/tests/nodes/or_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo index 88a30bf1b..4d2e8fcc9 100644 --- a/src/tests/nodes/or_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo index 536420238..d8b1b5b6b 100644 --- a/src/tests/nodes/or_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i8.cairo b/src/tests/nodes/or_i8.cairo index 19464afe1..6c3344085 100644 --- a/src/tests/nodes/or_i8.cairo +++ b/src/tests/nodes/or_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo index e8a5f2bf1..c90d07ebe 100644 --- a/src/tests/nodes/or_i8/input_0.cairo +++ b/src/tests/nodes/or_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo index 5927a61ab..104f34b13 100644 --- a/src/tests/nodes/or_i8/input_1.cairo +++ b/src/tests/nodes/or_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo index aa3ff0688..e06d29e92 100644 --- a/src/tests/nodes/or_i8/output_0.cairo +++ b/src/tests/nodes/or_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_i8_broadcast.cairo b/src/tests/nodes/or_i8_broadcast.cairo index 6c8ec4215..4b711bbc9 100644 --- a/src/tests/nodes/or_i8_broadcast.cairo +++ b/src/tests/nodes/or_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo index b09781cf9..e4723c948 100644 --- a/src/tests/nodes/or_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo index 1cb2ca5fd..a8a4ab7ea 100644 --- a/src/tests/nodes/or_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/or_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32.cairo b/src/tests/nodes/or_u32.cairo index ef607d1a7..5f5cf85c8 100644 --- a/src/tests/nodes/or_u32.cairo +++ b/src/tests/nodes/or_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo index ff2c70f78..83dd23c18 100644 --- a/src/tests/nodes/or_u32/input_0.cairo +++ b/src/tests/nodes/or_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo index c74ce9ed6..f47e1a46a 100644 --- a/src/tests/nodes/or_u32/input_1.cairo +++ b/src/tests/nodes/or_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo index 1bc0eb6b0..fabf22102 100644 --- a/src/tests/nodes/or_u32/output_0.cairo +++ b/src/tests/nodes/or_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast.cairo b/src/tests/nodes/or_u32_broadcast.cairo index a3976c8f7..f51a9bf29 100644 --- a/src/tests/nodes/or_u32_broadcast.cairo +++ b/src/tests/nodes/or_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo index 130926076..914d3f569 100644 --- a/src/tests/nodes/or_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo index b6728b30d..96422a60d 100644 --- a/src/tests/nodes/or_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/or_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo index 34d942289..9df10344c 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo index fe673e49f..27600d35a 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo index ac46d462a..67f34f79f 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo index c0e70aab1..3a9435591 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo index ab66a57c5..67df4256d 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo index 4ccc0cafa..97d085c82 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo index 2c33ad9db..db5a7f34d 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo index ab66a57c5..67df4256d 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo index 4c892df31..8c2d74e4f 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo index 7e3aea2ff..d8eb48d76 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo index ab66a57c5..67df4256d 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo index 5e34e8228..68c73da75 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo index 35f65a3f3..69950fe25 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo index 70f856b7b..cf36019b6 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo index 55a4baaf3..d09df6d26 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo index cd381015c..e7e022b95 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo index a864bb8cd..2477d67f2 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo index 3efde36fd..c1a779e53 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo index be6e79304..f9fbac82b 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo index a864bb8cd..2477d67f2 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo index c84576a4a..c9534e9d5 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo index fa6be356d..1a61500c4 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo index a864bb8cd..2477d67f2 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo index cf168a51d..252227bf1 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo index c00a2d702..9624df005 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo index 9f423af2f..6a233dd79 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo index b98f20165..3e5097679 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo index 00dfde57c..96601be08 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo index b98f20165..3e5097679 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo index c114c8e8d..257e9ed47 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo index b98f20165..3e5097679 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo index ea6bb49b3..ceb7a72bb 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo index 0b26257dd..4ac731eb3 100644 --- a/src/tests/nodes/reduce_sum_i8_1D.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo index 84690570b..2b523b042 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo index db7c35cbf..a7f1fb94c 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo index 4d149962c..d29891f30 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo index bff6f9ba5..3feeb101a 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo index fddad70f8..923daa0ed 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo index 5149fd51c..41ea95187 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo index bff6f9ba5..3feeb101a 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo index c902e8d36..622ef7cb7 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo index 24d0d34d3..7de25186e 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo index bff6f9ba5..3feeb101a 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn input_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo index 1be0ea24e..31670a5c3 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; fn output_0() -> Tensor { diff --git a/src/tests/nodes/reduce_sum_u32_1D.cairo b/src/tests/nodes/reduce_sum_u32_1D.cairo index 813d3f17a..54e336df7 100644 --- a/src/tests/nodes/reduce_sum_u32_1D.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo index f5f32b096..f9eb0d735 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo index a6f2d5b2c..ad666dae7 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo index 206d2b9a1..47239a485 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo index a45833125..e00a217d3 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo index 528c34455..026127699 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_default.cairo b/src/tests/nodes/reduce_sum_u32_2D_default.cairo index 3f8cb2fef..1c7c48815 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo index a45833125..e00a217d3 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo index 250ff6bdd..2ddf146d8 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo index 330564708..9270d5893 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo index a45833125..e00a217d3 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo index 557258418..de4da0924 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo index 954a9866e..8b2af6459 100644 --- a/src/tests/nodes/relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/relu_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo index be3b200c5..68347d5fc 100644 --- a/src/tests/nodes/relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/relu_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo index 2fa238075..b06411d55 100644 --- a/src/tests/nodes/relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/relu_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo index d280171a3..9ddd451fa 100644 --- a/src/tests/nodes/relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/relu_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo index 0e949dc63..68e0b8271 100644 --- a/src/tests/nodes/relu_i32/input_0.cairo +++ b/src/tests/nodes/relu_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo index 46f6f9b7c..fe08ca50a 100644 --- a/src/tests/nodes/relu_i32/output_0.cairo +++ b/src/tests/nodes/relu_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo index 6b3b4b416..a2a473c2e 100644 --- a/src/tests/nodes/relu_i8/input_0.cairo +++ b/src/tests/nodes/relu_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo index c0001110e..929f1a3a2 100644 --- a/src/tests/nodes/relu_i8/output_0.cairo +++ b/src/tests/nodes/relu_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo index dc3c21c90..bfb2c66b4 100644 --- a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo index cda29c4e2..b4145ab87 100644 --- a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo index eaa32b3c3..50ae1d44f 100644 --- a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo index 00bff969a..3d3145a5b 100644 --- a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo index 28375dcb8..900f82ac2 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo index 034a85cc0..b0863f3b2 100644 --- a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo index d5b451252..2c34d4543 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo index 2e90dbfea..2d556bc5b 100644 --- a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo index e5d32a7e6..ab6e721de 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo index 9fc9a2c45..38f601433 100644 --- a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo index e725132ad..cb2feb918 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo index df5f9fcc9..a4a248dfd 100644 --- a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo index d5256abb0..8ff7d31e7 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo index 63b440ede..7de14684f 100644 --- a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo index 272bebf66..8cef2b8ea 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo index cdd194ff5..c296e0925 100644 --- a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_fp16x16.cairo b/src/tests/nodes/sin_fp16x16.cairo index 91e8c59fc..b30fb7648 100644 --- a/src/tests/nodes/sin_fp16x16.cairo +++ b/src/tests/nodes/sin_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo index bb21fc2ec..bd03b9a6f 100644 --- a/src/tests/nodes/sin_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo index 837c8627c..1ff0c63f0 100644 --- a/src/tests/nodes/sin_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sin_fp8x23.cairo b/src/tests/nodes/sin_fp8x23.cairo index c019679a3..5b25b37f9 100644 --- a/src/tests/nodes/sin_fp8x23.cairo +++ b/src/tests/nodes/sin_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo index 7abb7b273..f2268cf33 100644 --- a/src/tests/nodes/sin_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo index 451c5ad91..0603301c5 100644 --- a/src/tests/nodes/sin_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_i32_fp16x16.cairo b/src/tests/nodes/sin_i32_fp16x16.cairo index c8d969996..dbf5bdc71 100644 --- a/src/tests/nodes/sin_i32_fp16x16.cairo +++ b/src/tests/nodes/sin_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo index 1d8d2b6d4..f74593395 100644 --- a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo index e1ecc6bf0..4650c276d 100644 --- a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sin_i32_fp8x23.cairo b/src/tests/nodes/sin_i32_fp8x23.cairo index 3f5a8a641..05f4b9e7a 100644 --- a/src/tests/nodes/sin_i32_fp8x23.cairo +++ b/src/tests/nodes/sin_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo index 9e643a7f7..9824ce0e6 100644 --- a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo index 2251b359a..75c5ebc13 100644 --- a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_i8_fp16x16.cairo b/src/tests/nodes/sin_i8_fp16x16.cairo index 2c2a45f27..264ffa70b 100644 --- a/src/tests/nodes/sin_i8_fp16x16.cairo +++ b/src/tests/nodes/sin_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo index 2d8dc3d6f..3a8f196af 100644 --- a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo index 6944beed7..b5d193890 100644 --- a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sin_i8_fp8x23.cairo b/src/tests/nodes/sin_i8_fp8x23.cairo index a93b999a0..2dcc22542 100644 --- a/src/tests/nodes/sin_i8_fp8x23.cairo +++ b/src/tests/nodes/sin_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo index e23a3e87c..63c4cd2a8 100644 --- a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo index 861f4a5ad..e3daf33fd 100644 --- a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_u32_fp16x16.cairo b/src/tests/nodes/sin_u32_fp16x16.cairo index 4fa544094..714cce1ef 100644 --- a/src/tests/nodes/sin_u32_fp16x16.cairo +++ b/src/tests/nodes/sin_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo index 2b246d306..d24d6e90b 100644 --- a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo index fb4290c09..1d7ae5924 100644 --- a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo index 6c6286bce..0feed4ec4 100644 --- a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo index 098e758e8..5d7c4e488 100644 --- a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_fp16x16.cairo b/src/tests/nodes/sinh_fp16x16.cairo index 48b4ad374..d0a785790 100644 --- a/src/tests/nodes/sinh_fp16x16.cairo +++ b/src/tests/nodes/sinh_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo index 9d68def2a..cb301abc6 100644 --- a/src/tests/nodes/sinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo index 0d1281edd..97573fb94 100644 --- a/src/tests/nodes/sinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sinh_fp8x23.cairo b/src/tests/nodes/sinh_fp8x23.cairo index a35a2caba..e51a4ec81 100644 --- a/src/tests/nodes/sinh_fp8x23.cairo +++ b/src/tests/nodes/sinh_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo index e3205cce0..704e8fa73 100644 --- a/src/tests/nodes/sinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo index 8417ffb0c..a39774287 100644 --- a/src/tests/nodes/sinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_i32_fp16x16.cairo b/src/tests/nodes/sinh_i32_fp16x16.cairo index ef8da9a76..7e6670fc0 100644 --- a/src/tests/nodes/sinh_i32_fp16x16.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo index 6c2240a90..81c3df257 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo index 7ebb9b63a..bac42d2eb 100644 --- a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sinh_i32_fp8x23.cairo b/src/tests/nodes/sinh_i32_fp8x23.cairo index 3a42818c3..2e893d486 100644 --- a/src/tests/nodes/sinh_i32_fp8x23.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo index 20e864acb..4272b7c70 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo index be70c4855..348aefde3 100644 --- a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_i8_fp16x16.cairo b/src/tests/nodes/sinh_i8_fp16x16.cairo index 10fd349df..f46919a68 100644 --- a/src/tests/nodes/sinh_i8_fp16x16.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo index 80bc98e82..82d35a470 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo index 0f76bda00..78295a8ad 100644 --- a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sinh_i8_fp8x23.cairo b/src/tests/nodes/sinh_i8_fp8x23.cairo index 1b320741c..19c214567 100644 --- a/src/tests/nodes/sinh_i8_fp8x23.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo index 04b050e31..0e7e43479 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo index e455e8802..6db67fd6d 100644 --- a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_u32_fp16x16.cairo b/src/tests/nodes/sinh_u32_fp16x16.cairo index dbe4651d6..ae0dccee7 100644 --- a/src/tests/nodes/sinh_u32_fp16x16.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo index 883bb6a93..42c5fa605 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo index d0d134a33..6262a7334 100644 --- a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo index d80e4683d..8ae4884fe 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo index 728706456..c37f8d53b 100644 --- a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo index 558a0f6e5..8f9595579 100644 --- a/src/tests/nodes/softmax_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo index 85f7d502d..22f5a06ad 100644 --- a/src/tests/nodes/softmax_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo index 6324ce49a..65058c0f7 100644 --- a/src/tests/nodes/softmax_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo index 098bd78be..35331ff12 100644 --- a/src/tests/nodes/softmax_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo index 5bbe6f705..d439bd874 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo index b70151038..6cf881369 100644 --- a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo index 22880cbd8..dd6cf8ce4 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo index 146ecab7c..1bb14d2a6 100644 --- a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo index e28064280..c668bcb8a 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo index 79db189c8..4ca9fe8fd 100644 --- a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo index 5d4607c74..54c5c38e0 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo index 49347042a..f7a847406 100644 --- a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo index a104b89a0..1f98644d5 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo index a41a5e1f1..03aea3cc1 100644 --- a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo index 074554b20..5a0febf43 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo index eb2b75f6f..4e7676d56 100644 --- a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo index 0576a6f28..2ae94ce54 100644 --- a/src/tests/nodes/softplus_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo index 603010455..4c11a1de6 100644 --- a/src/tests/nodes/softplus_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo index 8195309c8..3af622a02 100644 --- a/src/tests/nodes/softplus_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo index 9239c5c29..d74d142dd 100644 --- a/src/tests/nodes/softplus_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo index 0855cfdcc..d1a22af92 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo index 570da7532..3531d12ba 100644 --- a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo index 45e73ad92..6f8606cad 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo index 422ca58ca..960ea9cdf 100644 --- a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo index e486e4786..948d1da0f 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo index 98294135a..7fe1f29d2 100644 --- a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo index 0d44cb8f0..53f1719d9 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo index 773ca19f3..52bfff2a8 100644 --- a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo index 841f732bd..a1d34cbd9 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo index e3ebe8eeb..8269f105f 100644 --- a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo index 030c5137b..fda3d5946 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo index a733efcc1..db922ab91 100644 --- a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo index 23161c684..8e05177c4 100644 --- a/src/tests/nodes/softsign_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo index 2fa140cf6..d2d593454 100644 --- a/src/tests/nodes/softsign_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo index 2cba2580b..7e1d74c03 100644 --- a/src/tests/nodes/softsign_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo index 7d7ab76b3..445b41dd6 100644 --- a/src/tests/nodes/softsign_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo index c6d36ec05..dc9085f7c 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo index 015f4f896..8d1dd9548 100644 --- a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo index c32016fda..b5cc0488e 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo index de4499dde..44f65c526 100644 --- a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo index 7fb7c23f9..adf27b956 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo index 76c6b6be7..b57081c8c 100644 --- a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo index d93386027..a7496cabc 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo index aabc4beb0..a002b1e5e 100644 --- a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo index b41c79bb9..3e092792c 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo index 4d9f52d15..fd862ce92 100644 --- a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo index f5a92dfdb..c20cebbf0 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo index ba4d6a2ff..fdd572ff7 100644 --- a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_fp16x16.cairo b/src/tests/nodes/sqrt_fp16x16.cairo index dd49653b2..9d2da13a4 100644 --- a/src/tests/nodes/sqrt_fp16x16.cairo +++ b/src/tests/nodes/sqrt_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo index 283473ea6..a96888b3d 100644 --- a/src/tests/nodes/sqrt_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo index f9d2ce19a..e094f212a 100644 --- a/src/tests/nodes/sqrt_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sqrt_fp8x23.cairo b/src/tests/nodes/sqrt_fp8x23.cairo index 9b3077d2b..c73e5b717 100644 --- a/src/tests/nodes/sqrt_fp8x23.cairo +++ b/src/tests/nodes/sqrt_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo index 075f80d1c..3fb85e1f5 100644 --- a/src/tests/nodes/sqrt_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo index 6f4eea042..55feba2e1 100644 --- a/src/tests/nodes/sqrt_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_i32_fp16x16.cairo b/src/tests/nodes/sqrt_i32_fp16x16.cairo index e21b1f464..b6ba0d1a4 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo index 0bb7f7e0d..7b98c9ffd 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo index ee9a45a04..777a3defd 100644 --- a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sqrt_i32_fp8x23.cairo b/src/tests/nodes/sqrt_i32_fp8x23.cairo index 488c4f52f..c86c826bf 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo index 61ccf69f2..f8228d8f1 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo index afbd74e79..fbbf08a50 100644 --- a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_i8_fp16x16.cairo b/src/tests/nodes/sqrt_i8_fp16x16.cairo index 92d59a07c..1d883b9da 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo index 8cf5067b5..e035f8764 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo index 4c8851444..175b505fe 100644 --- a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sqrt_i8_fp8x23.cairo b/src/tests/nodes/sqrt_i8_fp8x23.cairo index 96e4f5679..c733457a3 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo index 93812389b..7fdbc3e45 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo index 148f71d24..b5facfa3c 100644 --- a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_u32_fp16x16.cairo b/src/tests/nodes/sqrt_u32_fp16x16.cairo index 8e2604522..95e936ca3 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo index 5d1b496a9..a1dff326d 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo index c8db481bb..1b62fbda0 100644 --- a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo index 69f4bdbaf..75b76137b 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo index 9320b1c07..ae13720b0 100644 --- a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo index 701be515a..c23af0f02 100644 --- a/src/tests/nodes/sub_fp16x16.cairo +++ b/src/tests/nodes/sub_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorSub}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo index d4b9d9e8c..cc23e4d24 100644 --- a/src/tests/nodes/sub_fp16x16/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo index 87742d9ef..4151de57d 100644 --- a/src/tests/nodes/sub_fp16x16/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo index a1cf2b5a7..4268e2a72 100644 --- a/src/tests/nodes/sub_fp16x16/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo index 9b45175e1..18dd83805 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; +use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorSub}; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo index 9df55dd26..179955bd6 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo index 43aa6c5d2..894aae74b 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo index 0b7991ac0..6adeb1ede 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo index 31ec74fa7..f7d0a02fd 100644 --- a/src/tests/nodes/sub_fp8x23.cairo +++ b/src/tests/nodes/sub_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorSub}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo index 37e7b15e2..51ecc175e 100644 --- a/src/tests/nodes/sub_fp8x23/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo index d27d2ef4b..a0f42ee28 100644 --- a/src/tests/nodes/sub_fp8x23/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo index 192194bf8..492a45129 100644 --- a/src/tests/nodes/sub_fp8x23/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo index 2eb5027c8..f7c7e3ac9 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; +use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorSub}; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo index a0ddecc2c..9d9a924bc 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo index bea4fe381..544813ff3 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo index 61ed91a14..6b8456ba9 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo index 6065c319f..a454c6b3d 100644 --- a/src/tests/nodes/sub_i32/input_0.cairo +++ b/src/tests/nodes/sub_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo index 6bc170c44..c5fccc3d2 100644 --- a/src/tests/nodes/sub_i32/input_1.cairo +++ b/src/tests/nodes/sub_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo index a7ddc02f2..579b76211 100644 --- a/src/tests/nodes/sub_i32/output_0.cairo +++ b/src/tests/nodes/sub_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo index 99c9e7e3b..933aa3732 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo index b5a40313b..0b29a840d 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo index bc31e9f74..f536dbb84 100644 --- a/src/tests/nodes/sub_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo index 5ba41119e..dfd91850d 100644 --- a/src/tests/nodes/sub_i8/input_0.cairo +++ b/src/tests/nodes/sub_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo index facd54cc3..055bfa359 100644 --- a/src/tests/nodes/sub_i8/input_1.cairo +++ b/src/tests/nodes/sub_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo index bb99a41cf..9a2280bfa 100644 --- a/src/tests/nodes/sub_i8/output_0.cairo +++ b/src/tests/nodes/sub_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo index f557477fc..ade7249f8 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo index c822a8c92..b31bebb23 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo index e4cfd4133..27ab497ce 100644 --- a/src/tests/nodes/sub_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo index bd4360457..a62766b6a 100644 --- a/src/tests/nodes/sub_u32/input_0.cairo +++ b/src/tests/nodes/sub_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo index 5649516b9..a500725f3 100644 --- a/src/tests/nodes/sub_u32/input_1.cairo +++ b/src/tests/nodes/sub_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo index 2a769133a..3ed5a2dfa 100644 --- a/src/tests/nodes/sub_u32/output_0.cairo +++ b/src/tests/nodes/sub_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo index 6b25dfce3..da618283c 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo index 5a223f6bd..03d203849 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo index b8e4302a2..723f0aa71 100644 --- a/src/tests/nodes/sub_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_fp16x16.cairo b/src/tests/nodes/tanh_fp16x16.cairo index c7488ebba..8b53e5a7d 100644 --- a/src/tests/nodes/tanh_fp16x16.cairo +++ b/src/tests/nodes/tanh_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo index a1ad0a3fa..2afbc53a7 100644 --- a/src/tests/nodes/tanh_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo index aba3df85e..c1b3c4637 100644 --- a/src/tests/nodes/tanh_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/tanh_fp8x23.cairo b/src/tests/nodes/tanh_fp8x23.cairo index 1536ab369..aa6cd2dd2 100644 --- a/src/tests/nodes/tanh_fp8x23.cairo +++ b/src/tests/nodes/tanh_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq + FP8x23Tensor, FP8x23TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo index e4520d387..487610095 100644 --- a/src/tests/nodes/tanh_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo index f902c3081..6e7d132f4 100644 --- a/src/tests/nodes/tanh_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_i32_fp16x16.cairo b/src/tests/nodes/tanh_i32_fp16x16.cairo index 9953c0949..a8bcc81e8 100644 --- a/src/tests/nodes/tanh_i32_fp16x16.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo index 351f3ec63..8d28d7382 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo index b745c3913..6a39e6923 100644 --- a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/tanh_i32_fp8x23.cairo b/src/tests/nodes/tanh_i32_fp8x23.cairo index 06a1debe2..e14e5eaaa 100644 --- a/src/tests/nodes/tanh_i32_fp8x23.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo index 8e01c6ea3..d21a25dae 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP8x23}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo index ca9a4210e..8e68ae91b 100644 --- a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_i8_fp16x16.cairo b/src/tests/nodes/tanh_i8_fp16x16.cairo index 22fde3884..933cabacc 100644 --- a/src/tests/nodes/tanh_i8_fp16x16.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo index 1f7b6aca2..09ea4bfc6 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo index 0c780358f..b8fbaa5a8 100644 --- a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/tanh_i8_fp8x23.cairo b/src/tests/nodes/tanh_i8_fp8x23.cairo index e238884ab..2ebd7d5d8 100644 --- a/src/tests/nodes/tanh_i8_fp8x23.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo index fe5d442e0..4fc9c0b85 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo index 9338458ae..f84795874 100644 --- a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_u32_fp16x16.cairo b/src/tests/nodes/tanh_u32_fp16x16.cairo index 6015c3827..0d8b47a30 100644 --- a/src/tests/nodes/tanh_u32_fp16x16.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo index 9d0f08d73..fed0724b1 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo index 3c1f4a4c3..490acdefd 100644 --- a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo index cc05e1538..3500947fa 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo index dfaf4ae2c..1f3f8ded7 100644 --- a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_fp16x16_2d.cairo b/src/tests/nodes/transpose_fp16x16_2d.cairo index d587bcdaf..d8b59e3ca 100644 --- a/src/tests/nodes/transpose_fp16x16_2d.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo index fe3c461ae..4b1e3682c 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo index 33139bf13..371a37677 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/transpose_fp16x16_3d.cairo b/src/tests/nodes/transpose_fp16x16_3d.cairo index 661842bed..25fb6587d 100644 --- a/src/tests/nodes/transpose_fp16x16_3d.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq + FP16x16Tensor, FP16x16TensorPartialEq }; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo index eaac156cd..09511a484 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo index 6fdaeb53c..a3f081067 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/transpose_fp8x23_2d.cairo b/src/tests/nodes/transpose_fp8x23_2d.cairo index 4adef9b80..a956056f8 100644 --- a/src/tests/nodes/transpose_fp8x23_2d.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo index a8ade95c4..f60cf6123 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo index 64a9f2e69..451188469 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_fp8x23_3d.cairo b/src/tests/nodes/transpose_fp8x23_3d.cairo index a5858c37a..e8c59b302 100644 --- a/src/tests/nodes/transpose_fp8x23_3d.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo index 97ec416c1..f802eb8fd 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo index 37c16b6e0..c42619425 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo index bccc13819..303348a4c 100644 --- a/src/tests/nodes/transpose_i32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo index 95d9d474f..549fd3e7f 100644 --- a/src/tests/nodes/transpose_i32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo index 76b614373..d30187fb9 100644 --- a/src/tests/nodes/transpose_i32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo index 64b474367..579d195a9 100644 --- a/src/tests/nodes/transpose_i32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo index 02347830e..ae41c45ad 100644 --- a/src/tests/nodes/transpose_i8_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo index a91937334..0bc30234c 100644 --- a/src/tests/nodes/transpose_i8_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo index 36e20af83..2bd90f187 100644 --- a/src/tests/nodes/transpose_i8_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo index bfd18dd5f..2e2f427c3 100644 --- a/src/tests/nodes/transpose_i8_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn output_0() -> Tensor { diff --git a/src/tests/nodes/transpose_u32_2d.cairo b/src/tests/nodes/transpose_u32_2d.cairo index a99971cdf..7361e5543 100644 --- a/src/tests/nodes/transpose_u32_2d.cairo +++ b/src/tests/nodes/transpose_u32_2d.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo index 7af200cb9..377408d4d 100644 --- a/src/tests/nodes/transpose_u32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo index 26e4cc71d..acf45884f 100644 --- a/src/tests/nodes/transpose_u32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_3d.cairo b/src/tests/nodes/transpose_u32_3d.cairo index 185e74244..34d076ad7 100644 --- a/src/tests/nodes/transpose_u32_3d.cairo +++ b/src/tests/nodes/transpose_u32_3d.cairo @@ -4,7 +4,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo index 521e242be..bc616e439 100644 --- a/src/tests/nodes/transpose_u32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo index aedc1e8b5..d345ed817 100644 --- a/src/tests/nodes/transpose_u32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp16x16.cairo b/src/tests/nodes/xor_fp16x16.cairo index e68270ac7..cd2409c28 100644 --- a/src/tests/nodes/xor_fp16x16.cairo +++ b/src/tests/nodes/xor_fp16x16.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo index fc920912c..84d334bcf 100644 --- a/src/tests/nodes/xor_fp16x16/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo index c4b2c6891..d0ab3e715 100644 --- a/src/tests/nodes/xor_fp16x16/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo index 54020fa6e..fc5a7363d 100644 --- a/src/tests/nodes/xor_fp16x16/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp16x16_broadcast.cairo b/src/tests/nodes/xor_fp16x16_broadcast.cairo index 243d8747e..d4246d42a 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo index 5553168da..8af3b0551 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo index 9b21e0dac..5b5792dee 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::numbers::FP16x16; diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo index 0606e6413..1d0d3e4e8 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp8x23.cairo b/src/tests/nodes/xor_fp8x23.cairo index 812eca2d1..13b17c930 100644 --- a/src/tests/nodes/xor_fp8x23.cairo +++ b/src/tests/nodes/xor_fp8x23.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo index 7dee15971..df9bc4560 100644 --- a/src/tests/nodes/xor_fp8x23/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo index b0aa5fe8c..42fb3e066 100644 --- a/src/tests/nodes/xor_fp8x23/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo index bfe4ee4ac..c9175b03b 100644 --- a/src/tests/nodes/xor_fp8x23/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/xor_fp8x23_broadcast.cairo b/src/tests/nodes/xor_fp8x23_broadcast.cairo index 30b99c40a..163c3060f 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo index df287636b..f2d149aca 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo index ba5d490de..6e8cb0955 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo @@ -1,8 +1,8 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo index 1046ea885..f0e06cebf 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo @@ -1,5 +1,5 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; diff --git a/src/tests/nodes/xor_i32.cairo b/src/tests/nodes/xor_i32.cairo index 259943c51..5c05a0c65 100644 --- a/src/tests/nodes/xor_i32.cairo +++ b/src/tests/nodes/xor_i32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo index fec3113a1..390a54df3 100644 --- a/src/tests/nodes/xor_i32/input_0.cairo +++ b/src/tests/nodes/xor_i32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo index fa846a694..b9b25dc94 100644 --- a/src/tests/nodes/xor_i32/input_1.cairo +++ b/src/tests/nodes/xor_i32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo index 9217e1d12..cc18d5805 100644 --- a/src/tests/nodes/xor_i32/output_0.cairo +++ b/src/tests/nodes/xor_i32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i32_broadcast.cairo b/src/tests/nodes/xor_i32_broadcast.cairo index 78faa30e7..37fd7db74 100644 --- a/src/tests/nodes/xor_i32_broadcast.cairo +++ b/src/tests/nodes/xor_i32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo index 23ab56b38..46aa56b66 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo index 0b7673a46..bf452db2c 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; +use orion::operators::tensor::I32Tensor; use orion::numbers::{i32, FP16x16}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo index 54020fa6e..fc5a7363d 100644 --- a/src/tests/nodes/xor_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i8.cairo b/src/tests/nodes/xor_i8.cairo index 3f95ecefc..58dc31f44 100644 --- a/src/tests/nodes/xor_i8.cairo +++ b/src/tests/nodes/xor_i8.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo index 6c5b2e301..ade70cc22 100644 --- a/src/tests/nodes/xor_i8/input_0.cairo +++ b/src/tests/nodes/xor_i8/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo index bd76c437b..06bce8e58 100644 --- a/src/tests/nodes/xor_i8/input_1.cairo +++ b/src/tests/nodes/xor_i8/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo index ca73ef6fc..db236b160 100644 --- a/src/tests/nodes/xor_i8/output_0.cairo +++ b/src/tests/nodes/xor_i8/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_i8_broadcast.cairo b/src/tests/nodes/xor_i8_broadcast.cairo index a7e153abe..fadb808ee 100644 --- a/src/tests/nodes/xor_i8_broadcast.cairo +++ b/src/tests/nodes/xor_i8_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo index 11de9ced1..fff4396a6 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_0() -> Tensor { diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo index 676db0ca8..8a8cf3815 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; +use orion::operators::tensor::I8Tensor; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; fn input_1() -> Tensor { diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo index 54020fa6e..fc5a7363d 100644 --- a/src/tests/nodes/xor_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32.cairo b/src/tests/nodes/xor_u32.cairo index 329041ae2..779514951 100644 --- a/src/tests/nodes/xor_u32.cairo +++ b/src/tests/nodes/xor_u32.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo index 6dcfd699e..8b7e67c73 100644 --- a/src/tests/nodes/xor_u32/input_0.cairo +++ b/src/tests/nodes/xor_u32/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo index 9416ab8e8..6aed8ce64 100644 --- a/src/tests/nodes/xor_u32/input_1.cairo +++ b/src/tests/nodes/xor_u32/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo index 85a04b2b6..85e23933c 100644 --- a/src/tests/nodes/xor_u32/output_0.cairo +++ b/src/tests/nodes/xor_u32/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast.cairo b/src/tests/nodes/xor_u32_broadcast.cairo index d1e4018d1..aa30bd52e 100644 --- a/src/tests/nodes/xor_u32_broadcast.cairo +++ b/src/tests/nodes/xor_u32_broadcast.cairo @@ -5,7 +5,7 @@ mod output_0; use array::ArrayTrait; use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; use orion::utils::assert_eq; diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo index 00a9967f1..d152c6059 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo index 41db35e5b..89f8ee9af 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_1.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo index 54020fa6e..fc5a7363d 100644 --- a/src/tests/nodes/xor_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/output_0.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo index 38303ee30..8bc1060bf 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo @@ -8,9 +8,9 @@ mod fp8x23 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; - use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I8Tensor; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -156,9 +156,9 @@ mod fp16x16 { use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; - use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I8Tensor; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo index 7592c06b1..84efc45e7 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo @@ -5,9 +5,9 @@ use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo index afe12a4e8..c586b1bcc 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo @@ -8,9 +8,9 @@ mod fp8x23 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I32Tensor; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -146,9 +146,9 @@ mod fp16x16 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I32Tensor; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 26109222d..51866881a 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -5,8 +5,8 @@ use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] @@ -42,6 +42,8 @@ fn quantize_linear() { let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); + (*y.data.at(0).mag).print(); + assert((*y.data[0]).into() == 1, '*result[0] == 1'); assert((*y.data[1]).into() == 2, '*result[1] == 2'); assert((*y.data[2]).into() == 2, '*result[2] == 2'); diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo index 8f286cf77..3765583e1 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo index 27651820e..36c226c01 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_i32_test.cairo b/src/tests/tensor_core/at/at_i32_test.cairo index a5f841670..9fb716b30 100644 --- a/src/tests/tensor_core/at/at_i32_test.cairo +++ b/src/tests/tensor_core/at/at_i32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/at/at_u32_test.cairo b/src/tests/tensor_core/at/at_u32_test.cairo index c7461c674..22f4a804d 100644 --- a/src/tests/tensor_core/at/at_u32_test.cairo +++ b/src/tests/tensor_core/at/at_u32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo index a5530bd25..e8a7e5762 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo index 531d524b5..be2d843fe 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_i32_test.cairo b/src/tests/tensor_core/flatten/flatten_i32_test.cairo index a9c7ec2b5..e1d67fc80 100644 --- a/src/tests/tensor_core/flatten/flatten_i32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_u32_test.cairo b/src/tests/tensor_core/flatten/flatten_u32_test.cairo index ab2114e61..6e763ceee 100644 --- a/src/tests/tensor_core/flatten/flatten_u32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo index 8337556d1..b90805c06 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo index c4e8d5923..26f5e043b 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; diff --git a/src/tests/tensor_core/max/max_i32_test.cairo b/src/tests/tensor_core/max/max_i32_test.cairo index a35fb3b11..450b20ac1 100644 --- a/src/tests/tensor_core/max/max_i32_test.cairo +++ b/src/tests/tensor_core/max/max_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/max/max_u32_test.cairo b/src/tests/tensor_core/max/max_u32_test.cairo index 7b2fc41f1..f53e455f4 100644 --- a/src/tests/tensor_core/max/max_u32_test.cairo +++ b/src/tests/tensor_core/max/max_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo index da4e50b83..9a88d635a 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo index bdb408d83..d4f94818c 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; diff --git a/src/tests/tensor_core/min/min_i32_test.cairo b/src/tests/tensor_core/min/min_i32_test.cairo index a6c3a6b5d..b7b8a1825 100644 --- a/src/tests/tensor_core/min/min_i32_test.cairo +++ b/src/tests/tensor_core/min/min_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/min/min_u32_test.cairo b/src/tests/tensor_core/min/min_u32_test.cairo index 93cd2b904..8fe474204 100644 --- a/src/tests/tensor_core/min/min_u32_test.cairo +++ b/src/tests/tensor_core/min/min_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/onehot.cairo b/src/tests/tensor_core/onehot.cairo index f2de1c516..c9df02f7c 100644 --- a/src/tests/tensor_core/onehot.cairo +++ b/src/tests/tensor_core/onehot.cairo @@ -1,4 +1 @@ -mod onehot_u32_test; -mod onehot_i32_test; -mod onehot_i8_test; mod onehot_fp_test; diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo index 0997b2e53..070143ffd 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo @@ -12,7 +12,7 @@ mod tensor_1D { use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16, FP16x16PartialEq }; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo index 37b6d05e4..3ccd57b90 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo @@ -10,7 +10,7 @@ mod tensor_1D { use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23, FP8x23PartialEq}; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, diff --git a/src/tests/tensor_core/onehot/onehot_i32_test.cairo b/src/tests/tensor_core/onehot/onehot_i32_test.cairo deleted file mode 100644 index 1b5e2cef9..000000000 --- a/src/tests/tensor_core/onehot/onehot_i32_test.cairo +++ /dev/null @@ -1,494 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use core::option::OptionTrait; - use serde::Serde; - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; - - use orion::tests::helpers::tensor::i32::{ - i32_tensor_1x3_helper, i32_tensor_1x3_neg_helper, i32_tensor_2x2_helper, - i32_tensor_3x2x2_helper - }; - - - fn i32_tensor_3x2x2_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - fn i32_tensor_2x2_pos_neg_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_neg_last_axis() { - let tensor = i32_tensor_1x3_neg_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 1, 'result[7] = 1'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_2x2_post_neg_last_axis() { - let tensor = i32_tensor_2x2_pos_neg_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 1, 'result[7] = 1'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 0, 'result[10] = 0'); - assert((*result.data.at(11)).into() == 1, 'result[11] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_last_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_fail() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_first_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_second_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 1, 'result[3] = 1'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 0, 'result[10] = 0'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 1, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_last_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(21)).into() == 1, 'result[21] = 1'); - assert((*result.data.at(26)).into() == 1, 'result[26] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(37)).into() == 1, 'result[37] = 1'); - assert((*result.data.at(42)).into() == 1, 'result[42] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 2'); - assert((*result.shape.at(3)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_fail() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(4); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_first_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(2); - values.append(5); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 5, 'result[0] = 5'); - assert((*result.data.at(1)).into() == 2, 'result[1] = 2'); - assert((*result.data.at(2)).into() == 2, 'result[2] = 2'); - assert((*result.data.at(3)).into() == 2, 'result[3] = 2'); - assert((*result.data.at(4)).into() == 5, 'result[4] = 5'); - assert((*result.data.at(5)).into() == 2, 'result[5] = 2'); - assert((*result.data.at(6)).into() == 2, 'result[6] = 2'); - assert((*result.data.at(7)).into() == 2, 'result[7] = 2'); - assert((*result.data.at(8)).into() == 5, 'result[8] = 5'); - assert((*result.data.at(9)).into() == 2, 'result[9] = 2'); - assert((*result.data.at(10)).into() == 2, 'result[10] = 2'); - assert((*result.data.at(11)).into() == 2, 'result[11] = 2'); - assert((*result.data.at(12)).into() == 2, 'result[12] = 2'); - assert((*result.data.at(13)).into() == 5, 'result[13] = 5'); - assert((*result.data.at(14)).into() == 2, 'result[14] = 2'); - assert((*result.data.at(17)).into() == 5, 'result[17] = 5'); - assert((*result.data.at(21)).into() == 5, 'result[21] = 5'); - assert((*result.data.at(26)).into() == 5, 'result[26] = 5'); - assert((*result.data.at(30)).into() == 5, 'result[30] = 5'); - assert((*result.data.at(34)).into() == 5, 'result[34] = 5'); - assert((*result.data.at(39)).into() == 5, 'result[39] = 5'); - assert((*result.data.at(43)).into() == 5, 'result[43] = 5'); - assert((*result.data.at(46)).into() == 2, 'result[46] = 2'); - assert((*result.data.at(47)).into() == 5, 'result[47] = 5'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_second_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(21)).into() == 1, 'result[21] = 1'); - assert((*result.data.at(26)).into() == 1, 'result[26] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(37)).into() == 1, 'result[37] = 1'); - assert((*result.data.at(42)).into() == 1, 'result[42] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_third_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(2); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 1, 'result[3] = 1'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(12)).into() == 1, 'result[12] = 1'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(19)).into() == 1, 'result[19] = 1'); - assert((*result.data.at(21)).into() == 0, 'result[21] = 0'); - assert((*result.data.at(26)).into() == 0, 'result[26] = 0'); - assert((*result.data.at(28)).into() == 1, 'result[28] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(35)).into() == 1, 'result[35] = 1'); - assert((*result.data.at(37)).into() == 0, 'result[37] = 0'); - assert((*result.data.at(44)).into() == 1, 'result[44] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[2] = 4'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } -} diff --git a/src/tests/tensor_core/onehot/onehot_i8_test.cairo b/src/tests/tensor_core/onehot/onehot_i8_test.cairo deleted file mode 100644 index 30ab6600d..000000000 --- a/src/tests/tensor_core/onehot/onehot_i8_test.cairo +++ /dev/null @@ -1,148 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // -use orion::numbers::fixed_point::core::FixedTrait; - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait}; - use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialEq - }; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::tests::helpers::tensor::fixed_point::fp16x16::{ - fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, - fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper - }; - use orion::operators::tensor::core::TensorTrait; - use debug::PrintTrait; - use core::clone::Clone; - use core::option::OptionTrait; - use serde::Serde; - - - use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; - - // use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::operators::tensor::core::{Tensor}; - - - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - - - // 1D - fn i8_tensor_1x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - return tensor; - } - - fn i8_tensor_1x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - return tensor; - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(1, false), 'result[4] = 1'); - assert((*result.data.at(5)) == IntegerTrait::new(0, false), 'result[5] = 0'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(0, false), 'result[7] = 0'); - assert((*result.data.at(8)) == IntegerTrait::new(1, false), 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_neg_last_axis() { - let tensor = i8_tensor_1x3_neg_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(0, false), 'result[4] = 0'); - assert((*result.data.at(5)) == IntegerTrait::new(1, false), 'result[5] = 1'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(1, false), 'result[7] = 1'); - assert((*result.data.at(8)) == IntegerTrait::new(0, false), 'result[8] = 0'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(1, false), 'result[4] = 1'); - assert((*result.data.at(5)) == IntegerTrait::new(0, false), 'result[5] = 0'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(0, false), 'result[7] = 0'); - assert((*result.data.at(8)) == IntegerTrait::new(1, false), 'result[8] = 1'); - } -} diff --git a/src/tests/tensor_core/onehot/onehot_u32_test.cairo b/src/tests/tensor_core/onehot/onehot_u32_test.cairo deleted file mode 100644 index 5d412a6bb..000000000 --- a/src/tests/tensor_core/onehot/onehot_u32_test.cairo +++ /dev/null @@ -1,444 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; - use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x2_helper}; - - - fn u32_tensor_3x2x2_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_axis_one() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_last_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_fail() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_first_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_second_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 1, 'result[3] = 1'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 0, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 1, 'result[12] = 1'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_last_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - // let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[21]) == 1, 'result[21] = 1'); - assert((*result.data[26]) == 1, 'result[26] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[37]) == 1, 'result[37] = 1'); - assert((*result.data[42]) == 1, 'result[42] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 2'); - assert((*result.shape.at(3)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_fail() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(4); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_first_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(2); - values.append(5); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 5, 'result[0] = 5'); - assert((*result.data[1]) == 2, 'result[1] = 2'); - assert((*result.data[2]) == 2, 'result[2] = 2'); - assert((*result.data[3]) == 2, 'result[3] = 2'); - assert((*result.data[4]) == 5, 'result[4] = 5'); - assert((*result.data[5]) == 2, 'result[5] = 2'); - assert((*result.data[6]) == 2, 'result[6] = 2'); - assert((*result.data[7]) == 2, 'result[7] = 2'); - assert((*result.data[8]) == 5, 'result[8] = 5'); - assert((*result.data[9]) == 2, 'result[9] = 2'); - assert((*result.data[10]) == 2, 'result[10] = 2'); - assert((*result.data[11]) == 2, 'result[11] = 2'); - assert((*result.data[12]) == 2, 'result[12] = 2'); - assert((*result.data[13]) == 5, 'result[13] = 5'); - assert((*result.data[14]) == 2, 'result[14] = 2'); - assert((*result.data[17]) == 5, 'result[17] = 5'); - assert((*result.data[21]) == 5, 'result[21] = 5'); - assert((*result.data[26]) == 5, 'result[26] = 5'); - assert((*result.data[30]) == 5, 'result[30] = 5'); - assert((*result.data[34]) == 5, 'result[34] = 5'); - assert((*result.data[39]) == 5, 'result[39] = 5'); - assert((*result.data[43]) == 5, 'result[43] = 5'); - assert((*result.data[46]) == 2, 'result[46] = 2'); - assert((*result.data[47]) == 5, 'result[47] = 5'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_second_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[21]) == 1, 'result[21] = 1'); - assert((*result.data[26]) == 1, 'result[26] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[37]) == 1, 'result[37] = 1'); - assert((*result.data[42]) == 1, 'result[42] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_third_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(2); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 1, 'result[3] = 1'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[12]) == 1, 'result[12] = 1'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[19]) == 1, 'result[19] = 1'); - assert((*result.data[21]) == 0, 'result[21] = 0'); - assert((*result.data[26]) == 0, 'result[26] = 0'); - assert((*result.data[28]) == 1, 'result[28] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[35]) == 1, 'result[35] = 1'); - assert((*result.data[37]) == 0, 'result[37] = 0'); - assert((*result.data[44]) == 1, 'result[44] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[2] = 4'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } -} diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo index e17084489..bc6883d98 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo index 3f3d6cd84..627644122 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_i32_test.cairo b/src/tests/tensor_core/stride/stride_i32_test.cairo index ff59feddc..280dad79e 100644 --- a/src/tests/tensor_core/stride/stride_i32_test.cairo +++ b/src/tests/tensor_core/stride/stride_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_u32_test.cairo b/src/tests/tensor_core/stride/stride_u32_test.cairo index 0d3cf39e8..01a4d1ada 100644 --- a/src/tests/tensor_core/stride/stride_u32_test.cairo +++ b/src/tests/tensor_core/stride/stride_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From 9e5d8da1ff02ba24bf064923be0c87a27efac2d3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 10:51:27 +0300 Subject: [PATCH 115/179] remove nodes --- src/tests.cairo | 2 +- src/tests/nodes.cairo | 449 ------------------ src/tests/nodes/abs_fp16x16.cairo | 21 - src/tests/nodes/abs_fp16x16/input_0.cairo | 20 - src/tests/nodes/abs_fp16x16/output_0.cairo | 20 - src/tests/nodes/abs_fp8x23.cairo | 20 - src/tests/nodes/abs_fp8x23/input_0.cairo | 20 - src/tests/nodes/abs_fp8x23/output_0.cairo | 20 - src/tests/nodes/abs_i32.cairo | 21 - src/tests/nodes/abs_i32/input_0.cairo | 20 - src/tests/nodes/abs_i32/output_0.cairo | 20 - src/tests/nodes/abs_i8.cairo | 21 - src/tests/nodes/abs_i8/input_0.cairo | 20 - src/tests/nodes/abs_i8/output_0.cairo | 20 - src/tests/nodes/acos_fp16x16.cairo | 21 - src/tests/nodes/acos_fp16x16/input_0.cairo | 21 - src/tests/nodes/acos_fp16x16/output_0.cairo | 22 - src/tests/nodes/acos_fp8x23.cairo | 24 - src/tests/nodes/acos_fp8x23/input_0.cairo | 20 - src/tests/nodes/acos_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_fp16x16.cairo | 21 - src/tests/nodes/acosh_fp16x16/input_0.cairo | 22 - src/tests/nodes/acosh_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_fp8x23.cairo | 21 - src/tests/nodes/acosh_fp8x23/input_0.cairo | 20 - src/tests/nodes/acosh_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_i32_fp16x16.cairo | 19 - .../nodes/acosh_i32_fp16x16/input_0.cairo | 20 - .../nodes/acosh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_i32_fp8x23.cairo | 20 - .../nodes/acosh_i32_fp8x23/input_0.cairo | 20 - .../nodes/acosh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_i8_fp16x16.cairo | 20 - .../nodes/acosh_i8_fp16x16/input_0.cairo | 20 - .../nodes/acosh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_i8_fp8x23.cairo | 21 - src/tests/nodes/acosh_i8_fp8x23/input_0.cairo | 20 - .../nodes/acosh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_u32_fp16x16.cairo | 20 - .../nodes/acosh_u32_fp16x16/input_0.cairo | 19 - .../nodes/acosh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_u32_fp8x23.cairo | 19 - .../nodes/acosh_u32_fp8x23/input_0.cairo | 19 - .../nodes/acosh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/add_fp16x16.cairo | 21 - src/tests/nodes/add_fp16x16/input_0.cairo | 46 -- src/tests/nodes/add_fp16x16/input_1.cairo | 46 -- src/tests/nodes/add_fp16x16/output_0.cairo | 46 -- src/tests/nodes/add_fp16x16_broadcast.cairo | 22 - .../nodes/add_fp16x16_broadcast/input_0.cairo | 46 -- .../nodes/add_fp16x16_broadcast/input_1.cairo | 22 - .../add_fp16x16_broadcast/output_0.cairo | 46 -- src/tests/nodes/add_fp8x23.cairo | 22 - src/tests/nodes/add_fp8x23/input_0.cairo | 44 -- src/tests/nodes/add_fp8x23/input_1.cairo | 44 -- src/tests/nodes/add_fp8x23/output_0.cairo | 44 -- src/tests/nodes/add_fp8x23_broadcast.cairo | 22 - .../nodes/add_fp8x23_broadcast/input_0.cairo | 45 -- .../nodes/add_fp8x23_broadcast/input_1.cairo | 21 - .../nodes/add_fp8x23_broadcast/output_0.cairo | 45 -- src/tests/nodes/add_i32.cairo | 22 - src/tests/nodes/add_i32/input_0.cairo | 44 -- src/tests/nodes/add_i32/input_1.cairo | 44 -- src/tests/nodes/add_i32/output_0.cairo | 44 -- src/tests/nodes/add_i32_broadcast.cairo | 22 - .../nodes/add_i32_broadcast/input_0.cairo | 44 -- .../nodes/add_i32_broadcast/input_1.cairo | 20 - .../nodes/add_i32_broadcast/output_0.cairo | 44 -- src/tests/nodes/add_i8.cairo | 22 - src/tests/nodes/add_i8/input_0.cairo | 44 -- src/tests/nodes/add_i8/input_1.cairo | 44 -- src/tests/nodes/add_i8/output_0.cairo | 44 -- src/tests/nodes/add_i8_broadcast.cairo | 23 - .../nodes/add_i8_broadcast/input_0.cairo | 44 -- .../nodes/add_i8_broadcast/input_1.cairo | 20 - .../nodes/add_i8_broadcast/output_0.cairo | 44 -- src/tests/nodes/add_u32.cairo | 22 - src/tests/nodes/add_u32/input_0.cairo | 43 -- src/tests/nodes/add_u32/input_1.cairo | 43 -- src/tests/nodes/add_u32/output_0.cairo | 43 -- src/tests/nodes/add_u32_broadcast.cairo | 22 - .../nodes/add_u32_broadcast/input_0.cairo | 43 -- .../nodes/add_u32_broadcast/input_1.cairo | 19 - .../nodes/add_u32_broadcast/output_0.cairo | 43 -- .../nodes/argmax_fp16x16_1D_default.cairo | 20 - .../argmax_fp16x16_1D_default/input_0.cairo | 20 - .../argmax_fp16x16_1D_default/output_0.cairo | 15 - .../argmax_fp16x16_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 15 - .../nodes/argmax_fp16x16_1D_last_index.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 15 - .../nodes/argmax_fp16x16_2D_default.cairo | 20 - .../argmax_fp16x16_2D_default/input_0.cairo | 22 - .../argmax_fp16x16_2D_default/output_0.cairo | 17 - .../argmax_fp16x16_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 22 - .../output_0.cairo | 16 - .../nodes/argmax_fp16x16_2D_last_index.cairo | 20 - .../input_0.cairo | 22 - .../output_0.cairo | 17 - .../nodes/argmax_fp16x16_3D_default.cairo | 20 - .../argmax_fp16x16_3D_default/input_0.cairo | 27 -- .../argmax_fp16x16_3D_default/output_0.cairo | 20 - .../argmax_fp16x16_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 27 -- .../output_0.cairo | 19 - .../nodes/argmax_fp16x16_3D_last_index.cairo | 20 - .../input_0.cairo | 27 -- .../output_0.cairo | 20 - .../nodes/argmax_fp8x23_1D_default.cairo | 20 - .../argmax_fp8x23_1D_default/input_0.cairo | 20 - .../argmax_fp8x23_1D_default/output_0.cairo | 15 - .../argmax_fp8x23_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 15 - .../nodes/argmax_fp8x23_1D_last_index.cairo | 20 - .../argmax_fp8x23_1D_last_index/input_0.cairo | 19 - .../output_0.cairo | 15 - .../nodes/argmax_fp8x23_2D_default.cairo | 20 - .../argmax_fp8x23_2D_default/input_0.cairo | 21 - .../argmax_fp8x23_2D_default/output_0.cairo | 17 - .../argmax_fp8x23_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 21 - .../output_0.cairo | 16 - .../nodes/argmax_fp8x23_2D_last_index.cairo | 20 - .../argmax_fp8x23_2D_last_index/input_0.cairo | 21 - .../output_0.cairo | 17 - .../nodes/argmax_fp8x23_3D_default.cairo | 20 - .../argmax_fp8x23_3D_default/input_0.cairo | 26 - .../argmax_fp8x23_3D_default/output_0.cairo | 20 - .../argmax_fp8x23_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 26 - .../output_0.cairo | 19 - .../nodes/argmax_fp8x23_3D_last_index.cairo | 20 - .../argmax_fp8x23_3D_last_index/input_0.cairo | 26 - .../output_0.cairo | 20 - src/tests/nodes/argmax_i32_1D_default.cairo | 20 - .../nodes/argmax_i32_1D_default/input_0.cairo | 18 - .../argmax_i32_1D_default/output_0.cairo | 15 - .../nodes/argmax_i32_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 18 - .../output_0.cairo | 15 - .../nodes/argmax_i32_1D_last_index.cairo | 20 - .../argmax_i32_1D_last_index/input_0.cairo | 18 - .../argmax_i32_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmax_i32_2D_default.cairo | 20 - .../nodes/argmax_i32_2D_default/input_0.cairo | 20 - .../argmax_i32_2D_default/output_0.cairo | 17 - .../nodes/argmax_i32_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 16 - .../nodes/argmax_i32_2D_last_index.cairo | 20 - .../argmax_i32_2D_last_index/input_0.cairo | 20 - .../argmax_i32_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmax_i32_3D_default.cairo | 20 - .../nodes/argmax_i32_3D_default/input_0.cairo | 25 - .../argmax_i32_3D_default/output_0.cairo | 20 - .../nodes/argmax_i32_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 25 - .../output_0.cairo | 19 - .../nodes/argmax_i32_3D_last_index.cairo | 20 - .../argmax_i32_3D_last_index/input_0.cairo | 25 - .../argmax_i32_3D_last_index/output_0.cairo | 20 - src/tests/nodes/argmax_i8_1D_default.cairo | 20 - .../nodes/argmax_i8_1D_default/input_0.cairo | 18 - .../nodes/argmax_i8_1D_default/output_0.cairo | 15 - .../nodes/argmax_i8_1D_keepdims_false.cairo | 20 - .../argmax_i8_1D_keepdims_false/input_0.cairo | 18 - .../output_0.cairo | 15 - src/tests/nodes/argmax_i8_1D_last_index.cairo | 20 - .../argmax_i8_1D_last_index/input_0.cairo | 18 - .../argmax_i8_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmax_i8_2D_default.cairo | 20 - .../nodes/argmax_i8_2D_default/input_0.cairo | 20 - .../nodes/argmax_i8_2D_default/output_0.cairo | 17 - .../nodes/argmax_i8_2D_keepdims_false.cairo | 20 - .../argmax_i8_2D_keepdims_false/input_0.cairo | 20 - .../output_0.cairo | 16 - src/tests/nodes/argmax_i8_2D_last_index.cairo | 20 - .../argmax_i8_2D_last_index/input_0.cairo | 20 - .../argmax_i8_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmax_i8_3D_default.cairo | 20 - .../nodes/argmax_i8_3D_default/input_0.cairo | 25 - .../nodes/argmax_i8_3D_default/output_0.cairo | 20 - .../nodes/argmax_i8_3D_keepdims_false.cairo | 20 - .../argmax_i8_3D_keepdims_false/input_0.cairo | 25 - .../output_0.cairo | 19 - src/tests/nodes/argmax_i8_3D_last_index.cairo | 20 - .../argmax_i8_3D_last_index/input_0.cairo | 25 - .../argmax_i8_3D_last_index/output_0.cairo | 20 - src/tests/nodes/argmax_u32_1D_default.cairo | 20 - .../nodes/argmax_u32_1D_default/input_0.cairo | 17 - .../argmax_u32_1D_default/output_0.cairo | 15 - .../nodes/argmax_u32_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 17 - .../output_0.cairo | 15 - .../nodes/argmax_u32_1D_last_index.cairo | 20 - .../argmax_u32_1D_last_index/input_0.cairo | 17 - .../argmax_u32_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmax_u32_2D_default.cairo | 20 - .../nodes/argmax_u32_2D_default/input_0.cairo | 19 - .../argmax_u32_2D_default/output_0.cairo | 17 - .../nodes/argmax_u32_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 16 - .../nodes/argmax_u32_2D_last_index.cairo | 20 - .../argmax_u32_2D_last_index/input_0.cairo | 19 - .../argmax_u32_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmax_u32_3D_default.cairo | 20 - .../nodes/argmax_u32_3D_default/input_0.cairo | 24 - .../argmax_u32_3D_default/output_0.cairo | 20 - .../nodes/argmax_u32_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 24 - .../output_0.cairo | 19 - .../nodes/argmax_u32_3D_last_index.cairo | 20 - .../argmax_u32_3D_last_index/input_0.cairo | 24 - .../argmax_u32_3D_last_index/output_0.cairo | 20 - .../nodes/argmin_fp16x16_1D_default.cairo | 20 - .../argmin_fp16x16_1D_default/input_0.cairo | 20 - .../argmin_fp16x16_1D_default/output_0.cairo | 15 - .../argmin_fp16x16_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 15 - .../nodes/argmin_fp16x16_1D_last_index.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 15 - .../nodes/argmin_fp16x16_2D_default.cairo | 20 - .../argmin_fp16x16_2D_default/input_0.cairo | 22 - .../argmin_fp16x16_2D_default/output_0.cairo | 17 - .../argmin_fp16x16_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 22 - .../output_0.cairo | 16 - .../nodes/argmin_fp16x16_2D_last_index.cairo | 20 - .../input_0.cairo | 22 - .../output_0.cairo | 17 - .../nodes/argmin_fp16x16_3D_default.cairo | 20 - .../argmin_fp16x16_3D_default/input_0.cairo | 27 -- .../argmin_fp16x16_3D_default/output_0.cairo | 20 - .../argmin_fp16x16_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 27 -- .../output_0.cairo | 19 - .../nodes/argmin_fp16x16_3D_last_index.cairo | 20 - .../input_0.cairo | 27 -- .../output_0.cairo | 20 - .../nodes/argmin_fp8x23_1D_default.cairo | 20 - .../argmin_fp8x23_1D_default/input_0.cairo | 19 - .../argmin_fp8x23_1D_default/output_0.cairo | 15 - .../argmin_fp8x23_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 15 - .../nodes/argmin_fp8x23_1D_last_index.cairo | 20 - .../argmin_fp8x23_1D_last_index/input_0.cairo | 19 - .../output_0.cairo | 15 - .../nodes/argmin_fp8x23_2D_default.cairo | 20 - .../argmin_fp8x23_2D_default/input_0.cairo | 21 - .../argmin_fp8x23_2D_default/output_0.cairo | 17 - .../argmin_fp8x23_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 21 - .../output_0.cairo | 16 - .../nodes/argmin_fp8x23_2D_last_index.cairo | 20 - .../argmin_fp8x23_2D_last_index/input_0.cairo | 21 - .../output_0.cairo | 17 - .../nodes/argmin_fp8x23_3D_default.cairo | 20 - .../argmin_fp8x23_3D_default/input_0.cairo | 26 - .../argmin_fp8x23_3D_default/output_0.cairo | 20 - .../argmin_fp8x23_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 26 - .../output_0.cairo | 19 - .../nodes/argmin_fp8x23_3D_last_index.cairo | 20 - .../argmin_fp8x23_3D_last_index/input_0.cairo | 26 - .../output_0.cairo | 20 - src/tests/nodes/argmin_i32_1D_default.cairo | 20 - .../nodes/argmin_i32_1D_default/input_0.cairo | 18 - .../argmin_i32_1D_default/output_0.cairo | 15 - .../nodes/argmin_i32_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 18 - .../output_0.cairo | 15 - .../nodes/argmin_i32_1D_last_index.cairo | 20 - .../argmin_i32_1D_last_index/input_0.cairo | 18 - .../argmin_i32_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmin_i32_2D_default.cairo | 20 - .../nodes/argmin_i32_2D_default/input_0.cairo | 20 - .../argmin_i32_2D_default/output_0.cairo | 17 - .../nodes/argmin_i32_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 16 - .../nodes/argmin_i32_2D_last_index.cairo | 20 - .../argmin_i32_2D_last_index/input_0.cairo | 20 - .../argmin_i32_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmin_i32_3D_default.cairo | 20 - .../nodes/argmin_i32_3D_default/input_0.cairo | 25 - .../argmin_i32_3D_default/output_0.cairo | 20 - .../nodes/argmin_i32_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 25 - .../output_0.cairo | 19 - .../nodes/argmin_i32_3D_last_index.cairo | 20 - .../argmin_i32_3D_last_index/input_0.cairo | 25 - .../argmin_i32_3D_last_index/output_0.cairo | 20 - src/tests/nodes/argmin_i8_1D_default.cairo | 20 - .../nodes/argmin_i8_1D_default/input_0.cairo | 18 - .../nodes/argmin_i8_1D_default/output_0.cairo | 15 - .../nodes/argmin_i8_1D_keepdims_false.cairo | 20 - .../argmin_i8_1D_keepdims_false/input_0.cairo | 18 - .../output_0.cairo | 15 - src/tests/nodes/argmin_i8_1D_last_index.cairo | 20 - .../argmin_i8_1D_last_index/input_0.cairo | 18 - .../argmin_i8_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmin_i8_2D_default.cairo | 20 - .../nodes/argmin_i8_2D_default/input_0.cairo | 20 - .../nodes/argmin_i8_2D_default/output_0.cairo | 17 - .../nodes/argmin_i8_2D_keepdims_false.cairo | 20 - .../argmin_i8_2D_keepdims_false/input_0.cairo | 20 - .../output_0.cairo | 16 - src/tests/nodes/argmin_i8_2D_last_index.cairo | 20 - .../argmin_i8_2D_last_index/input_0.cairo | 20 - .../argmin_i8_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmin_i8_3D_default.cairo | 20 - .../nodes/argmin_i8_3D_default/input_0.cairo | 25 - .../nodes/argmin_i8_3D_default/output_0.cairo | 20 - .../nodes/argmin_i8_3D_keepdims_false.cairo | 20 - .../argmin_i8_3D_keepdims_false/input_0.cairo | 25 - .../output_0.cairo | 19 - src/tests/nodes/argmin_i8_3D_last_index.cairo | 20 - .../argmin_i8_3D_last_index/input_0.cairo | 25 - .../argmin_i8_3D_last_index/output_0.cairo | 20 - src/tests/nodes/argmin_u32_1D_default.cairo | 20 - .../nodes/argmin_u32_1D_default/input_0.cairo | 17 - .../argmin_u32_1D_default/output_0.cairo | 15 - .../nodes/argmin_u32_1D_keepdims_false.cairo | 20 - .../input_0.cairo | 17 - .../output_0.cairo | 15 - .../nodes/argmin_u32_1D_last_index.cairo | 20 - .../argmin_u32_1D_last_index/input_0.cairo | 17 - .../argmin_u32_1D_last_index/output_0.cairo | 15 - src/tests/nodes/argmin_u32_2D_default.cairo | 20 - .../nodes/argmin_u32_2D_default/input_0.cairo | 19 - .../argmin_u32_2D_default/output_0.cairo | 17 - .../nodes/argmin_u32_2D_keepdims_false.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 16 - .../nodes/argmin_u32_2D_last_index.cairo | 20 - .../argmin_u32_2D_last_index/input_0.cairo | 19 - .../argmin_u32_2D_last_index/output_0.cairo | 17 - src/tests/nodes/argmin_u32_3D_default.cairo | 20 - .../nodes/argmin_u32_3D_default/input_0.cairo | 24 - .../argmin_u32_3D_default/output_0.cairo | 20 - .../nodes/argmin_u32_3D_keepdims_false.cairo | 20 - .../input_0.cairo | 24 - .../output_0.cairo | 19 - .../nodes/argmin_u32_3D_last_index.cairo | 20 - .../argmin_u32_3D_last_index/input_0.cairo | 24 - .../argmin_u32_3D_last_index/output_0.cairo | 20 - src/tests/nodes/asin_fp16x16.cairo | 21 - src/tests/nodes/asin_fp16x16/input_0.cairo | 22 - src/tests/nodes/asin_fp16x16/output_0.cairo | 22 - src/tests/nodes/asin_fp8x23.cairo | 21 - src/tests/nodes/asin_fp8x23/input_0.cairo | 20 - src/tests/nodes/asin_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_fp16x16.cairo | 21 - src/tests/nodes/asinh_fp16x16/input_0.cairo | 22 - src/tests/nodes/asinh_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_fp8x23.cairo | 21 - src/tests/nodes/asinh_fp8x23/input_0.cairo | 20 - src/tests/nodes/asinh_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_i32_fp16x16.cairo | 19 - .../nodes/asinh_i32_fp16x16/input_0.cairo | 20 - .../nodes/asinh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_i32_fp8x23.cairo | 20 - .../nodes/asinh_i32_fp8x23/input_0.cairo | 20 - .../nodes/asinh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_i8_fp16x16.cairo | 20 - .../nodes/asinh_i8_fp16x16/input_0.cairo | 20 - .../nodes/asinh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_i8_fp8x23.cairo | 21 - src/tests/nodes/asinh_i8_fp8x23/input_0.cairo | 20 - .../nodes/asinh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_u32_fp16x16.cairo | 20 - .../nodes/asinh_u32_fp16x16/input_0.cairo | 19 - .../nodes/asinh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_u32_fp8x23.cairo | 19 - .../nodes/asinh_u32_fp8x23/input_0.cairo | 19 - .../nodes/asinh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_fp16x16.cairo | 20 - src/tests/nodes/atan_fp16x16/input_0.cairo | 22 - src/tests/nodes/atan_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_fp8x23.cairo | 21 - src/tests/nodes/atan_fp8x23/input_0.cairo | 20 - src/tests/nodes/atan_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_i32_fp16x16.cairo | 20 - .../nodes/atan_i32_fp16x16/input_0.cairo | 20 - .../nodes/atan_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_i32_fp8x23.cairo | 20 - src/tests/nodes/atan_i32_fp8x23/input_0.cairo | 20 - .../nodes/atan_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_i8_fp16x16.cairo | 20 - src/tests/nodes/atan_i8_fp16x16/input_0.cairo | 20 - .../nodes/atan_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_i8_fp8x23.cairo | 20 - src/tests/nodes/atan_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/atan_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_u32_fp16x16.cairo | 20 - .../nodes/atan_u32_fp16x16/input_0.cairo | 19 - .../nodes/atan_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_u32_fp8x23.cairo | 20 - src/tests/nodes/atan_u32_fp8x23/input_0.cairo | 19 - .../nodes/atan_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/ceil_fp16x16.cairo | 21 - src/tests/nodes/ceil_fp16x16/input_0.cairo | 22 - src/tests/nodes/ceil_fp16x16/output_0.cairo | 22 - src/tests/nodes/ceil_fp8x23.cairo | 21 - src/tests/nodes/ceil_fp8x23/input_0.cairo | 20 - src/tests/nodes/ceil_fp8x23/output_0.cairo | 20 - src/tests/nodes/concat_fp16x16_1d.cairo | 23 - .../nodes/concat_fp16x16_1d/input_0.cairo | 20 - .../nodes/concat_fp16x16_1d/input_1.cairo | 20 - .../nodes/concat_fp16x16_1d/output_0.cairo | 23 - src/tests/nodes/concat_fp16x16_2d.cairo | 23 - .../nodes/concat_fp16x16_2d/input_0.cairo | 22 - .../nodes/concat_fp16x16_2d/input_1.cairo | 22 - .../nodes/concat_fp16x16_2d/output_0.cairo | 26 - .../nodes/concat_fp16x16_3d_axis_1.cairo | 23 - .../concat_fp16x16_3d_axis_1/input_0.cairo | 46 -- .../concat_fp16x16_3d_axis_1/input_1.cairo | 46 -- .../concat_fp16x16_3d_axis_1/output_0.cairo | 73 --- .../nodes/concat_fp16x16_3d_axis_2.cairo | 23 - .../concat_fp16x16_3d_axis_2/input_0.cairo | 46 -- .../concat_fp16x16_3d_axis_2/input_1.cairo | 46 -- .../concat_fp16x16_3d_axis_2/output_0.cairo | 73 --- .../nodes/concat_fp16x16_3d_default.cairo | 23 - .../concat_fp16x16_3d_default/input_0.cairo | 46 -- .../concat_fp16x16_3d_default/input_1.cairo | 46 -- .../concat_fp16x16_3d_default/output_0.cairo | 73 --- ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 25 - .../input_0.cairo | 46 -- .../input_1.cairo | 46 -- .../input_2.cairo | 46 -- .../output_0.cairo | 100 ---- ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 25 - .../input_0.cairo | 46 -- .../input_1.cairo | 46 -- .../input_2.cairo | 46 -- .../output_0.cairo | 100 ---- src/tests/nodes/concat_fp8x23_1d.cairo | 22 - .../nodes/concat_fp8x23_1d/input_0.cairo | 19 - .../nodes/concat_fp8x23_1d/input_1.cairo | 19 - .../nodes/concat_fp8x23_1d/output_0.cairo | 22 - src/tests/nodes/concat_fp8x23_2d.cairo | 22 - .../nodes/concat_fp8x23_2d/input_0.cairo | 21 - .../nodes/concat_fp8x23_2d/input_1.cairo | 21 - .../nodes/concat_fp8x23_2d/output_0.cairo | 25 - src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 22 - .../concat_fp8x23_3d_axis_1/input_0.cairo | 45 -- .../concat_fp8x23_3d_axis_1/input_1.cairo | 45 -- .../concat_fp8x23_3d_axis_1/output_0.cairo | 72 --- src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 22 - .../concat_fp8x23_3d_axis_2/input_0.cairo | 45 -- .../concat_fp8x23_3d_axis_2/input_1.cairo | 45 -- .../concat_fp8x23_3d_axis_2/output_0.cairo | 72 --- .../nodes/concat_fp8x23_3d_default.cairo | 22 - .../concat_fp8x23_3d_default/input_0.cairo | 45 -- .../concat_fp8x23_3d_default/input_1.cairo | 45 -- .../concat_fp8x23_3d_default/output_0.cairo | 72 --- ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 24 - .../input_0.cairo | 45 -- .../input_1.cairo | 45 -- .../input_2.cairo | 45 -- .../output_0.cairo | 99 ---- ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 24 - .../input_0.cairo | 45 -- .../input_1.cairo | 45 -- .../input_2.cairo | 45 -- .../output_0.cairo | 99 ---- src/tests/nodes/concat_i32_1d.cairo | 23 - src/tests/nodes/concat_i32_1d/input_0.cairo | 18 - src/tests/nodes/concat_i32_1d/input_1.cairo | 18 - src/tests/nodes/concat_i32_1d/output_0.cairo | 21 - src/tests/nodes/concat_i32_2d.cairo | 23 - src/tests/nodes/concat_i32_2d/input_0.cairo | 20 - src/tests/nodes/concat_i32_2d/input_1.cairo | 20 - src/tests/nodes/concat_i32_2d/output_0.cairo | 24 - src/tests/nodes/concat_i32_3d_axis_1.cairo | 23 - .../nodes/concat_i32_3d_axis_1/input_0.cairo | 44 -- .../nodes/concat_i32_3d_axis_1/input_1.cairo | 44 -- .../nodes/concat_i32_3d_axis_1/output_0.cairo | 71 --- src/tests/nodes/concat_i32_3d_axis_2.cairo | 23 - .../nodes/concat_i32_3d_axis_2/input_0.cairo | 44 -- .../nodes/concat_i32_3d_axis_2/input_1.cairo | 44 -- .../nodes/concat_i32_3d_axis_2/output_0.cairo | 71 --- src/tests/nodes/concat_i32_3d_default.cairo | 23 - .../nodes/concat_i32_3d_default/input_0.cairo | 44 -- .../nodes/concat_i32_3d_default/input_1.cairo | 44 -- .../concat_i32_3d_default/output_0.cairo | 71 --- .../concat_i32_3d_three_tensors_axis_1.cairo | 25 - .../input_0.cairo | 44 -- .../input_1.cairo | 44 -- .../input_2.cairo | 44 -- .../output_0.cairo | 98 ---- .../concat_i32_3d_three_tensors_axis_2.cairo | 25 - .../input_0.cairo | 44 -- .../input_1.cairo | 44 -- .../input_2.cairo | 44 -- .../output_0.cairo | 98 ---- src/tests/nodes/concat_u32_1d.cairo | 22 - src/tests/nodes/concat_u32_1d/input_0.cairo | 17 - src/tests/nodes/concat_u32_1d/input_1.cairo | 17 - src/tests/nodes/concat_u32_1d/output_0.cairo | 20 - src/tests/nodes/concat_u32_2d.cairo | 22 - src/tests/nodes/concat_u32_2d/input_0.cairo | 19 - src/tests/nodes/concat_u32_2d/input_1.cairo | 19 - src/tests/nodes/concat_u32_2d/output_0.cairo | 23 - src/tests/nodes/concat_u32_3d_axis_1.cairo | 22 - .../nodes/concat_u32_3d_axis_1/input_0.cairo | 43 -- .../nodes/concat_u32_3d_axis_1/input_1.cairo | 43 -- .../nodes/concat_u32_3d_axis_1/output_0.cairo | 70 --- src/tests/nodes/concat_u32_3d_axis_2.cairo | 22 - .../nodes/concat_u32_3d_axis_2/input_0.cairo | 43 -- .../nodes/concat_u32_3d_axis_2/input_1.cairo | 43 -- .../nodes/concat_u32_3d_axis_2/output_0.cairo | 70 --- src/tests/nodes/concat_u32_3d_default.cairo | 22 - .../nodes/concat_u32_3d_default/input_0.cairo | 43 -- .../nodes/concat_u32_3d_default/input_1.cairo | 43 -- .../concat_u32_3d_default/output_0.cairo | 70 --- .../concat_u32_3d_three_tensors_axis_1.cairo | 24 - .../input_0.cairo | 43 -- .../input_1.cairo | 43 -- .../input_2.cairo | 43 -- .../output_0.cairo | 97 ---- .../concat_u32_3d_three_tensors_axis_2.cairo | 24 - .../input_0.cairo | 43 -- .../input_1.cairo | 43 -- .../input_2.cairo | 43 -- .../output_0.cairo | 97 ---- src/tests/nodes/cos_fp16x16.cairo | 21 - src/tests/nodes/cos_fp16x16/input_0.cairo | 22 - src/tests/nodes/cos_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_fp8x23.cairo | 21 - src/tests/nodes/cos_fp8x23/input_0.cairo | 20 - src/tests/nodes/cos_fp8x23/output_0.cairo | 20 - src/tests/nodes/cos_i32_fp16x16.cairo | 19 - src/tests/nodes/cos_i32_fp16x16/input_0.cairo | 20 - .../nodes/cos_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_i32_fp8x23.cairo | 20 - src/tests/nodes/cos_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/cos_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cos_i8_fp16x16.cairo | 20 - src/tests/nodes/cos_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/cos_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_i8_fp8x23.cairo | 21 - src/tests/nodes/cos_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/cos_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/cos_u32_fp16x16.cairo | 20 - src/tests/nodes/cos_u32_fp16x16/input_0.cairo | 19 - .../nodes/cos_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_u32_fp8x23.cairo | 19 - src/tests/nodes/cos_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/cos_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_fp16x16.cairo | 21 - src/tests/nodes/cosh_fp16x16/input_0.cairo | 22 - src/tests/nodes/cosh_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_fp8x23.cairo | 21 - src/tests/nodes/cosh_fp8x23/input_0.cairo | 20 - src/tests/nodes/cosh_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_i32_fp16x16.cairo | 19 - .../nodes/cosh_i32_fp16x16/input_0.cairo | 20 - .../nodes/cosh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_i32_fp8x23.cairo | 20 - src/tests/nodes/cosh_i32_fp8x23/input_0.cairo | 20 - .../nodes/cosh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_i8_fp16x16.cairo | 20 - src/tests/nodes/cosh_i8_fp16x16/input_0.cairo | 20 - .../nodes/cosh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_i8_fp8x23.cairo | 21 - src/tests/nodes/cosh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/cosh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_u32_fp16x16.cairo | 20 - .../nodes/cosh_u32_fp16x16/input_0.cairo | 19 - .../nodes/cosh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_u32_fp8x23.cairo | 19 - src/tests/nodes/cosh_u32_fp8x23/input_0.cairo | 19 - .../nodes/cosh_u32_fp8x23/output_0.cairo | 20 - .../nodes/cumsum_fp16x16_1d_default.cairo | 21 - .../cumsum_fp16x16_1d_default/input_0.cairo | 22 - .../cumsum_fp16x16_1d_default/output_0.cairo | 22 - .../nodes/cumsum_fp16x16_1d_exclusive.cairo | 21 - .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 22 - .../output_0.cairo | 22 - .../nodes/cumsum_fp16x16_1d_reverse.cairo | 21 - .../cumsum_fp16x16_1d_reverse/input_0.cairo | 22 - .../cumsum_fp16x16_1d_reverse/output_0.cairo | 22 - .../cumsum_fp16x16_1d_reverse_exclusive.cairo | 21 - .../input_0.cairo | 22 - .../output_0.cairo | 22 - .../nodes/cumsum_fp16x16_2d_axis_0.cairo | 21 - .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 24 - .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 24 - .../nodes/cumsum_fp16x16_2d_axis_1.cairo | 21 - .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 24 - .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 24 - .../nodes/cumsum_fp8x23_1d_default.cairo | 20 - .../cumsum_fp8x23_1d_default/input_0.cairo | 21 - .../cumsum_fp8x23_1d_default/output_0.cairo | 21 - .../nodes/cumsum_fp8x23_1d_exclusive.cairo | 20 - .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 21 - .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 21 - .../nodes/cumsum_fp8x23_1d_reverse.cairo | 20 - .../cumsum_fp8x23_1d_reverse/input_0.cairo | 21 - .../cumsum_fp8x23_1d_reverse/output_0.cairo | 21 - .../cumsum_fp8x23_1d_reverse_exclusive.cairo | 20 - .../input_0.cairo | 21 - .../output_0.cairo | 21 - src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo | 20 - .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 23 - .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 23 - src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo | 20 - .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 23 - .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 23 - src/tests/nodes/cumsum_i32_1d_default.cairo | 21 - .../nodes/cumsum_i32_1d_default/input_0.cairo | 20 - .../cumsum_i32_1d_default/output_0.cairo | 20 - src/tests/nodes/cumsum_i32_1d_exclusive.cairo | 21 - .../cumsum_i32_1d_exclusive/input_0.cairo | 20 - .../cumsum_i32_1d_exclusive/output_0.cairo | 20 - src/tests/nodes/cumsum_i32_1d_reverse.cairo | 21 - .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 20 - .../cumsum_i32_1d_reverse/output_0.cairo | 20 - .../cumsum_i32_1d_reverse_exclusive.cairo | 21 - .../input_0.cairo | 20 - .../output_0.cairo | 20 - src/tests/nodes/cumsum_i32_2d_axis_0.cairo | 21 - .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 22 - .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 22 - src/tests/nodes/cumsum_i32_2d_axis_1.cairo | 21 - .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 22 - .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 22 - src/tests/nodes/cumsum_i8_1d_default.cairo | 21 - .../nodes/cumsum_i8_1d_default/input_0.cairo | 20 - .../nodes/cumsum_i8_1d_default/output_0.cairo | 20 - src/tests/nodes/cumsum_i8_1d_exclusive.cairo | 21 - .../cumsum_i8_1d_exclusive/input_0.cairo | 20 - .../cumsum_i8_1d_exclusive/output_0.cairo | 20 - src/tests/nodes/cumsum_i8_1d_reverse.cairo | 21 - .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 20 - .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 20 - .../cumsum_i8_1d_reverse_exclusive.cairo | 21 - .../input_0.cairo | 20 - .../output_0.cairo | 20 - src/tests/nodes/cumsum_i8_2d_axis_0.cairo | 21 - .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 22 - .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 22 - src/tests/nodes/cumsum_i8_2d_axis_1.cairo | 21 - .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 22 - .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 22 - src/tests/nodes/cumsum_u32_1d_default.cairo | 20 - .../nodes/cumsum_u32_1d_default/input_0.cairo | 19 - .../cumsum_u32_1d_default/output_0.cairo | 19 - src/tests/nodes/cumsum_u32_1d_exclusive.cairo | 20 - .../cumsum_u32_1d_exclusive/input_0.cairo | 19 - .../cumsum_u32_1d_exclusive/output_0.cairo | 19 - src/tests/nodes/cumsum_u32_1d_reverse.cairo | 20 - .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 19 - .../cumsum_u32_1d_reverse/output_0.cairo | 19 - .../cumsum_u32_1d_reverse_exclusive.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 19 - src/tests/nodes/cumsum_u32_2d_axis_0.cairo | 20 - .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 21 - .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 21 - src/tests/nodes/cumsum_u32_2d_axis_1.cairo | 20 - .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 21 - .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 21 - src/tests/nodes/div_fp16x16.cairo | 22 - src/tests/nodes/div_fp16x16/input_0.cairo | 46 -- src/tests/nodes/div_fp16x16/input_1.cairo | 46 -- src/tests/nodes/div_fp16x16/output_0.cairo | 46 -- src/tests/nodes/div_fp16x16_broadcast.cairo | 22 - .../nodes/div_fp16x16_broadcast/input_0.cairo | 46 -- .../nodes/div_fp16x16_broadcast/input_1.cairo | 22 - .../div_fp16x16_broadcast/output_0.cairo | 46 -- src/tests/nodes/div_fp8x23.cairo | 22 - src/tests/nodes/div_fp8x23/input_0.cairo | 44 -- src/tests/nodes/div_fp8x23/input_1.cairo | 44 -- src/tests/nodes/div_fp8x23/output_0.cairo | 44 -- src/tests/nodes/div_fp8x23_broadcast.cairo | 22 - .../nodes/div_fp8x23_broadcast/input_0.cairo | 45 -- .../nodes/div_fp8x23_broadcast/input_1.cairo | 21 - .../nodes/div_fp8x23_broadcast/output_0.cairo | 45 -- src/tests/nodes/div_i32.cairo | 22 - src/tests/nodes/div_i32/input_0.cairo | 44 -- src/tests/nodes/div_i32/input_1.cairo | 44 -- src/tests/nodes/div_i32/output_0.cairo | 44 -- src/tests/nodes/div_i32_broadcast.cairo | 22 - .../nodes/div_i32_broadcast/input_0.cairo | 44 -- .../nodes/div_i32_broadcast/input_1.cairo | 20 - .../nodes/div_i32_broadcast/output_0.cairo | 44 -- src/tests/nodes/div_i8.cairo | 22 - src/tests/nodes/div_i8/input_0.cairo | 44 -- src/tests/nodes/div_i8/input_1.cairo | 44 -- src/tests/nodes/div_i8/output_0.cairo | 44 -- src/tests/nodes/div_i8_broadcast.cairo | 22 - .../nodes/div_i8_broadcast/input_0.cairo | 44 -- .../nodes/div_i8_broadcast/input_1.cairo | 20 - .../nodes/div_i8_broadcast/output_0.cairo | 44 -- src/tests/nodes/div_u32.cairo | 25 - src/tests/nodes/div_u32/input_0.cairo | 43 -- src/tests/nodes/div_u32/input_1.cairo | 43 -- src/tests/nodes/div_u32/output_0.cairo | 43 -- src/tests/nodes/div_u32_broadcast.cairo | 22 - .../nodes/div_u32_broadcast/input_0.cairo | 43 -- .../nodes/div_u32_broadcast/input_1.cairo | 19 - .../nodes/div_u32_broadcast/output_0.cairo | 43 -- src/tests/nodes/equal_fp16x16.cairo | 22 - src/tests/nodes/equal_fp16x16/input_0.cairo | 46 -- src/tests/nodes/equal_fp16x16/input_1.cairo | 46 -- src/tests/nodes/equal_fp16x16/output_0.cairo | 43 -- src/tests/nodes/equal_fp16x16_broadcast.cairo | 22 - .../equal_fp16x16_broadcast/input_0.cairo | 22 - .../equal_fp16x16_broadcast/input_1.cairo | 20 - .../equal_fp16x16_broadcast/output_0.cairo | 19 - src/tests/nodes/equal_fp8x23.cairo | 22 - src/tests/nodes/equal_fp8x23/input_0.cairo | 44 -- src/tests/nodes/equal_fp8x23/input_1.cairo | 44 -- src/tests/nodes/equal_fp8x23/output_0.cairo | 43 -- src/tests/nodes/equal_fp8x23_broadcast.cairo | 22 - .../equal_fp8x23_broadcast/input_0.cairo | 21 - .../equal_fp8x23_broadcast/input_1.cairo | 19 - .../equal_fp8x23_broadcast/output_0.cairo | 19 - src/tests/nodes/equal_i32.cairo | 22 - src/tests/nodes/equal_i32/input_0.cairo | 44 -- src/tests/nodes/equal_i32/input_1.cairo | 44 -- src/tests/nodes/equal_i32/output_0.cairo | 43 -- src/tests/nodes/equal_i32_broadcast.cairo | 22 - .../nodes/equal_i32_broadcast/input_0.cairo | 20 - .../nodes/equal_i32_broadcast/input_1.cairo | 18 - .../nodes/equal_i32_broadcast/output_0.cairo | 19 - src/tests/nodes/equal_i8.cairo | 22 - src/tests/nodes/equal_i8/input_0.cairo | 44 -- src/tests/nodes/equal_i8/input_1.cairo | 44 -- src/tests/nodes/equal_i8/output_0.cairo | 43 -- src/tests/nodes/equal_i8_broadcast.cairo | 22 - .../nodes/equal_i8_broadcast/input_0.cairo | 20 - .../nodes/equal_i8_broadcast/input_1.cairo | 18 - .../nodes/equal_i8_broadcast/output_0.cairo | 19 - src/tests/nodes/equal_u32.cairo | 22 - src/tests/nodes/equal_u32/input_0.cairo | 43 -- src/tests/nodes/equal_u32/input_1.cairo | 43 -- src/tests/nodes/equal_u32/output_0.cairo | 43 -- src/tests/nodes/equal_u32_broadcast.cairo | 22 - .../nodes/equal_u32_broadcast/input_0.cairo | 19 - .../nodes/equal_u32_broadcast/input_1.cairo | 17 - .../nodes/equal_u32_broadcast/output_0.cairo | 19 - src/tests/nodes/exp_fp16x16.cairo | 21 - src/tests/nodes/exp_fp16x16/input_0.cairo | 22 - src/tests/nodes/exp_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_fp8x23.cairo | 21 - src/tests/nodes/exp_fp8x23/input_0.cairo | 20 - src/tests/nodes/exp_fp8x23/output_0.cairo | 20 - src/tests/nodes/exp_i32_fp16x16.cairo | 19 - src/tests/nodes/exp_i32_fp16x16/input_0.cairo | 20 - .../nodes/exp_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_i32_fp8x23.cairo | 20 - src/tests/nodes/exp_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/exp_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/exp_i8_fp16x16.cairo | 20 - src/tests/nodes/exp_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/exp_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_i8_fp8x23.cairo | 21 - src/tests/nodes/exp_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/exp_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/exp_u32_fp16x16.cairo | 20 - src/tests/nodes/exp_u32_fp16x16/input_0.cairo | 19 - .../nodes/exp_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_u32_fp8x23.cairo | 19 - src/tests/nodes/exp_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/exp_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/greater_equal_fp16x16.cairo | 22 - .../nodes/greater_equal_fp16x16/input_0.cairo | 46 -- .../nodes/greater_equal_fp16x16/input_1.cairo | 46 -- .../greater_equal_fp16x16/output_0.cairo | 43 -- .../greater_equal_fp16x16_broadcast.cairo | 22 - .../input_0.cairo | 46 -- .../input_1.cairo | 22 - .../output_0.cairo | 43 -- src/tests/nodes/greater_equal_fp8x23.cairo | 22 - .../nodes/greater_equal_fp8x23/input_0.cairo | 44 -- .../nodes/greater_equal_fp8x23/input_1.cairo | 44 -- .../nodes/greater_equal_fp8x23/output_0.cairo | 43 -- .../greater_equal_fp8x23_broadcast.cairo | 22 - .../input_0.cairo | 45 -- .../input_1.cairo | 21 - .../output_0.cairo | 43 -- src/tests/nodes/greater_equal_i32.cairo | 22 - .../nodes/greater_equal_i32/input_0.cairo | 44 -- .../nodes/greater_equal_i32/input_1.cairo | 44 -- .../nodes/greater_equal_i32/output_0.cairo | 43 -- .../nodes/greater_equal_i32_broadcast.cairo | 22 - .../greater_equal_i32_broadcast/input_0.cairo | 44 -- .../greater_equal_i32_broadcast/input_1.cairo | 20 - .../output_0.cairo | 43 -- src/tests/nodes/greater_equal_i8.cairo | 22 - .../nodes/greater_equal_i8/input_0.cairo | 44 -- .../nodes/greater_equal_i8/input_1.cairo | 44 -- .../nodes/greater_equal_i8/output_0.cairo | 43 -- .../nodes/greater_equal_i8_broadcast.cairo | 22 - .../greater_equal_i8_broadcast/input_0.cairo | 44 -- .../greater_equal_i8_broadcast/input_1.cairo | 20 - .../greater_equal_i8_broadcast/output_0.cairo | 43 -- src/tests/nodes/greater_equal_u32.cairo | 22 - .../nodes/greater_equal_u32/input_0.cairo | 43 -- .../nodes/greater_equal_u32/input_1.cairo | 43 -- .../nodes/greater_equal_u32/output_0.cairo | 43 -- .../nodes/greater_equal_u32_broadcast.cairo | 22 - .../greater_equal_u32_broadcast/input_0.cairo | 43 -- .../greater_equal_u32_broadcast/input_1.cairo | 19 - .../output_0.cairo | 43 -- src/tests/nodes/greater_fp16x16.cairo | 22 - src/tests/nodes/greater_fp16x16/input_0.cairo | 46 -- src/tests/nodes/greater_fp16x16/input_1.cairo | 46 -- .../nodes/greater_fp16x16/output_0.cairo | 43 -- .../nodes/greater_fp16x16_broadcast.cairo | 22 - .../greater_fp16x16_broadcast/input_0.cairo | 22 - .../greater_fp16x16_broadcast/input_1.cairo | 20 - .../greater_fp16x16_broadcast/output_0.cairo | 19 - src/tests/nodes/greater_fp8x23.cairo | 22 - src/tests/nodes/greater_fp8x23/input_0.cairo | 44 -- src/tests/nodes/greater_fp8x23/input_1.cairo | 44 -- src/tests/nodes/greater_fp8x23/output_0.cairo | 43 -- .../nodes/greater_fp8x23_broadcast.cairo | 22 - .../greater_fp8x23_broadcast/input_0.cairo | 21 - .../greater_fp8x23_broadcast/input_1.cairo | 19 - .../greater_fp8x23_broadcast/output_0.cairo | 19 - src/tests/nodes/greater_i32.cairo | 22 - src/tests/nodes/greater_i32/input_0.cairo | 44 -- src/tests/nodes/greater_i32/input_1.cairo | 44 -- src/tests/nodes/greater_i32/output_0.cairo | 43 -- src/tests/nodes/greater_i32_broadcast.cairo | 22 - .../nodes/greater_i32_broadcast/input_0.cairo | 20 - .../nodes/greater_i32_broadcast/input_1.cairo | 18 - .../greater_i32_broadcast/output_0.cairo | 19 - src/tests/nodes/greater_i8.cairo | 22 - src/tests/nodes/greater_i8/input_0.cairo | 44 -- src/tests/nodes/greater_i8/input_1.cairo | 44 -- src/tests/nodes/greater_i8/output_0.cairo | 43 -- src/tests/nodes/greater_i8_broadcast.cairo | 22 - .../nodes/greater_i8_broadcast/input_0.cairo | 20 - .../nodes/greater_i8_broadcast/input_1.cairo | 18 - .../nodes/greater_i8_broadcast/output_0.cairo | 19 - src/tests/nodes/greater_u32.cairo | 22 - src/tests/nodes/greater_u32/input_0.cairo | 43 -- src/tests/nodes/greater_u32/input_1.cairo | 43 -- src/tests/nodes/greater_u32/output_0.cairo | 43 -- src/tests/nodes/greater_u32_broadcast.cairo | 22 - .../nodes/greater_u32_broadcast/input_0.cairo | 19 - .../nodes/greater_u32_broadcast/input_1.cairo | 17 - .../greater_u32_broadcast/output_0.cairo | 19 - src/tests/nodes/leaky_relu_fp16x16.cairo | 21 - .../nodes/leaky_relu_fp16x16/input_0.cairo | 22 - .../nodes/leaky_relu_fp16x16/output_0.cairo | 22 - src/tests/nodes/leaky_relu_fp8x23.cairo | 21 - .../nodes/leaky_relu_fp8x23/input_0.cairo | 20 - .../nodes/leaky_relu_fp8x23/output_0.cairo | 20 - src/tests/nodes/leaky_relu_i32_fp16x16.cairo | 20 - .../leaky_relu_i32_fp16x16/input_0.cairo | 20 - .../leaky_relu_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/leaky_relu_i32_fp8x23.cairo | 20 - .../nodes/leaky_relu_i32_fp8x23/input_0.cairo | 20 - .../leaky_relu_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/leaky_relu_i8_fp16x16.cairo | 20 - .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 20 - .../leaky_relu_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/leaky_relu_i8_fp8x23.cairo | 22 - .../nodes/leaky_relu_i8_fp8x23/input_0.cairo | 20 - .../nodes/leaky_relu_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/less_equal_fp16x16.cairo | 22 - .../nodes/less_equal_fp16x16/input_0.cairo | 22 - .../nodes/less_equal_fp16x16/input_1.cairo | 22 - .../nodes/less_equal_fp16x16/output_0.cairo | 19 - .../nodes/less_equal_fp16x16_broadcast.cairo | 22 - .../input_0.cairo | 22 - .../input_1.cairo | 20 - .../output_0.cairo | 19 - src/tests/nodes/less_equal_fp8x23.cairo | 22 - .../nodes/less_equal_fp8x23/input_0.cairo | 20 - .../nodes/less_equal_fp8x23/input_1.cairo | 20 - .../nodes/less_equal_fp8x23/output_0.cairo | 19 - .../nodes/less_equal_fp8x23_broadcast.cairo | 22 - .../less_equal_fp8x23_broadcast/input_0.cairo | 21 - .../less_equal_fp8x23_broadcast/input_1.cairo | 19 - .../output_0.cairo | 19 - src/tests/nodes/less_equal_i32.cairo | 22 - src/tests/nodes/less_equal_i32/input_0.cairo | 20 - src/tests/nodes/less_equal_i32/input_1.cairo | 20 - src/tests/nodes/less_equal_i32/output_0.cairo | 19 - .../nodes/less_equal_i32_broadcast.cairo | 22 - .../less_equal_i32_broadcast/input_0.cairo | 20 - .../less_equal_i32_broadcast/input_1.cairo | 18 - .../less_equal_i32_broadcast/output_0.cairo | 19 - src/tests/nodes/less_equal_i8.cairo | 22 - src/tests/nodes/less_equal_i8/input_0.cairo | 20 - src/tests/nodes/less_equal_i8/input_1.cairo | 20 - src/tests/nodes/less_equal_i8/output_0.cairo | 19 - src/tests/nodes/less_equal_i8_broadcast.cairo | 22 - .../less_equal_i8_broadcast/input_0.cairo | 20 - .../less_equal_i8_broadcast/input_1.cairo | 18 - .../less_equal_i8_broadcast/output_0.cairo | 19 - src/tests/nodes/less_equal_u32.cairo | 22 - src/tests/nodes/less_equal_u32/input_0.cairo | 19 - src/tests/nodes/less_equal_u32/input_1.cairo | 19 - src/tests/nodes/less_equal_u32/output_0.cairo | 19 - .../nodes/less_equal_u32_broadcast.cairo | 22 - .../less_equal_u32_broadcast/input_0.cairo | 19 - .../less_equal_u32_broadcast/input_1.cairo | 17 - .../less_equal_u32_broadcast/output_0.cairo | 19 - src/tests/nodes/less_fp16x16.cairo | 22 - src/tests/nodes/less_fp16x16/input_0.cairo | 46 -- src/tests/nodes/less_fp16x16/input_1.cairo | 46 -- src/tests/nodes/less_fp16x16/output_0.cairo | 43 -- src/tests/nodes/less_fp16x16_broadcast.cairo | 22 - .../less_fp16x16_broadcast/input_0.cairo | 46 -- .../less_fp16x16_broadcast/input_1.cairo | 22 - .../less_fp16x16_broadcast/output_0.cairo | 43 -- src/tests/nodes/less_fp8x23.cairo | 22 - src/tests/nodes/less_fp8x23/input_0.cairo | 44 -- src/tests/nodes/less_fp8x23/input_1.cairo | 44 -- src/tests/nodes/less_fp8x23/output_0.cairo | 43 -- src/tests/nodes/less_fp8x23_broadcast.cairo | 22 - .../nodes/less_fp8x23_broadcast/input_0.cairo | 45 -- .../nodes/less_fp8x23_broadcast/input_1.cairo | 21 - .../less_fp8x23_broadcast/output_0.cairo | 43 -- src/tests/nodes/less_i32.cairo | 22 - src/tests/nodes/less_i32/input_0.cairo | 44 -- src/tests/nodes/less_i32/input_1.cairo | 44 -- src/tests/nodes/less_i32/output_0.cairo | 43 -- src/tests/nodes/less_i32_broadcast.cairo | 22 - .../nodes/less_i32_broadcast/input_0.cairo | 44 -- .../nodes/less_i32_broadcast/input_1.cairo | 20 - .../nodes/less_i32_broadcast/output_0.cairo | 43 -- src/tests/nodes/less_i8.cairo | 22 - src/tests/nodes/less_i8/input_0.cairo | 44 -- src/tests/nodes/less_i8/input_1.cairo | 44 -- src/tests/nodes/less_i8/output_0.cairo | 43 -- src/tests/nodes/less_i8_broadcast.cairo | 22 - .../nodes/less_i8_broadcast/input_0.cairo | 44 -- .../nodes/less_i8_broadcast/input_1.cairo | 20 - .../nodes/less_i8_broadcast/output_0.cairo | 43 -- src/tests/nodes/less_u32.cairo | 22 - src/tests/nodes/less_u32/input_0.cairo | 43 -- src/tests/nodes/less_u32/input_1.cairo | 43 -- src/tests/nodes/less_u32/output_0.cairo | 43 -- src/tests/nodes/less_u32_broadcast.cairo | 22 - .../nodes/less_u32_broadcast/input_0.cairo | 43 -- .../nodes/less_u32_broadcast/input_1.cairo | 19 - .../nodes/less_u32_broadcast/output_0.cairo | 43 -- src/tests/nodes/linear_fp16x16.cairo | 25 - src/tests/nodes/linear_fp16x16/input_0.cairo | 20 - src/tests/nodes/linear_fp16x16/input_1.cairo | 24 - src/tests/nodes/linear_fp16x16/input_2.cairo | 19 - src/tests/nodes/linear_fp16x16/output_0.cairo | 19 - src/tests/nodes/linear_fp8x23.cairo | 25 - src/tests/nodes/linear_fp8x23/input_0.cairo | 18 - src/tests/nodes/linear_fp8x23/input_1.cairo | 22 - src/tests/nodes/linear_fp8x23/input_2.cairo | 17 - src/tests/nodes/linear_fp8x23/output_0.cairo | 17 - src/tests/nodes/linear_i32.cairo | 24 - src/tests/nodes/linear_i32/input_0.cairo | 18 - src/tests/nodes/linear_i32/input_1.cairo | 22 - src/tests/nodes/linear_i32/input_2.cairo | 17 - src/tests/nodes/linear_i32/output_0.cairo | 17 - src/tests/nodes/linear_i8.cairo | 24 - src/tests/nodes/linear_i8/input_0.cairo | 18 - src/tests/nodes/linear_i8/input_1.cairo | 22 - src/tests/nodes/linear_i8/input_2.cairo | 17 - src/tests/nodes/linear_i8/output_0.cairo | 17 - src/tests/nodes/linear_u32.cairo | 23 - src/tests/nodes/linear_u32/input_0.cairo | 17 - src/tests/nodes/linear_u32/input_1.cairo | 21 - src/tests/nodes/linear_u32/input_2.cairo | 16 - src/tests/nodes/linear_u32/output_0.cairo | 16 - src/tests/nodes/log_fp16x16.cairo | 21 - src/tests/nodes/log_fp16x16/input_0.cairo | 22 - src/tests/nodes/log_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_fp8x23.cairo | 21 - src/tests/nodes/log_fp8x23/input_0.cairo | 20 - src/tests/nodes/log_fp8x23/output_0.cairo | 20 - src/tests/nodes/log_i32_fp16x16.cairo | 19 - src/tests/nodes/log_i32_fp16x16/input_0.cairo | 20 - .../nodes/log_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_i32_fp8x23.cairo | 20 - src/tests/nodes/log_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/log_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/log_i8_fp16x16.cairo | 20 - src/tests/nodes/log_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/log_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_i8_fp8x23.cairo | 21 - src/tests/nodes/log_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/log_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/log_u32_fp16x16.cairo | 20 - src/tests/nodes/log_u32_fp16x16/input_0.cairo | 19 - .../nodes/log_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_u32_fp8x23.cairo | 19 - src/tests/nodes/log_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/log_u32_fp8x23/output_0.cairo | 20 - .../nodes/logsoftmax_fp16x16_axis_0.cairo | 21 - .../logsoftmax_fp16x16_axis_0/input_0.cairo | 22 - .../logsoftmax_fp16x16_axis_0/output_0.cairo | 22 - .../nodes/logsoftmax_fp16x16_axis_1.cairo | 21 - .../logsoftmax_fp16x16_axis_1/input_0.cairo | 22 - .../logsoftmax_fp16x16_axis_1/output_0.cairo | 22 - .../nodes/logsoftmax_fp8x23_axis_0.cairo | 21 - .../logsoftmax_fp8x23_axis_0/input_0.cairo | 21 - .../logsoftmax_fp8x23_axis_0/output_0.cairo | 21 - .../nodes/logsoftmax_fp8x23_axis_1.cairo | 21 - .../logsoftmax_fp8x23_axis_1/input_0.cairo | 21 - .../logsoftmax_fp8x23_axis_1/output_0.cairo | 21 - .../nodes/logsoftmax_i32_fp16x16_axis_0.cairo | 19 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i32_fp16x16_axis_1.cairo | 19 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i32_fp8x23_axis_0.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i32_fp8x23_axis_1.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i8_fp16x16_axis_0.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i8_fp16x16_axis_1.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i8_fp8x23_axis_0.cairo | 21 - .../logsoftmax_i8_fp8x23_axis_0/input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i8_fp8x23_axis_1.cairo | 21 - .../logsoftmax_i8_fp8x23_axis_1/input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_u32_fp16x16_axis_0.cairo | 21 - .../input_0.cairo | 19 - .../output_0.cairo | 22 - .../nodes/logsoftmax_u32_fp16x16_axis_1.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 22 - .../nodes/logsoftmax_u32_fp8x23_axis_0.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 21 - .../nodes/logsoftmax_u32_fp8x23_axis_1.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 21 - src/tests/nodes/matmul_fp16x16_1d.cairo | 23 - .../nodes/matmul_fp16x16_1d/input_0.cairo | 20 - .../nodes/matmul_fp16x16_1d/input_1.cairo | 20 - .../nodes/matmul_fp16x16_1d/output_0.cairo | 18 - src/tests/nodes/matmul_fp16x16_1x2.cairo | 23 - .../nodes/matmul_fp16x16_1x2/input_0.cairo | 20 - .../nodes/matmul_fp16x16_1x2/input_1.cairo | 20 - .../nodes/matmul_fp16x16_1x2/output_0.cairo | 19 - src/tests/nodes/matmul_fp16x16_2x1.cairo | 23 - .../nodes/matmul_fp16x16_2x1/input_0.cairo | 20 - .../nodes/matmul_fp16x16_2x1/input_1.cairo | 20 - .../nodes/matmul_fp16x16_2x1/output_0.cairo | 22 - src/tests/nodes/matmul_fp16x16_2x2.cairo | 23 - .../nodes/matmul_fp16x16_2x2/input_0.cairo | 22 - .../nodes/matmul_fp16x16_2x2/input_1.cairo | 22 - .../nodes/matmul_fp16x16_2x2/output_0.cairo | 22 - src/tests/nodes/matmul_fp8x23_1d.cairo | 22 - .../nodes/matmul_fp8x23_1d/input_0.cairo | 19 - .../nodes/matmul_fp8x23_1d/input_1.cairo | 19 - .../nodes/matmul_fp8x23_1d/output_0.cairo | 17 - src/tests/nodes/matmul_fp8x23_1x2.cairo | 22 - .../nodes/matmul_fp8x23_1x2/input_0.cairo | 19 - .../nodes/matmul_fp8x23_1x2/input_1.cairo | 19 - .../nodes/matmul_fp8x23_1x2/output_0.cairo | 18 - src/tests/nodes/matmul_fp8x23_2x1.cairo | 22 - .../nodes/matmul_fp8x23_2x1/input_0.cairo | 19 - .../nodes/matmul_fp8x23_2x1/input_1.cairo | 19 - .../nodes/matmul_fp8x23_2x1/output_0.cairo | 21 - src/tests/nodes/matmul_fp8x23_2x2.cairo | 22 - .../nodes/matmul_fp8x23_2x2/input_0.cairo | 21 - .../nodes/matmul_fp8x23_2x2/input_1.cairo | 21 - .../nodes/matmul_fp8x23_2x2/output_0.cairo | 21 - src/tests/nodes/matmul_i32_1d.cairo | 23 - src/tests/nodes/matmul_i32_1d/input_0.cairo | 18 - src/tests/nodes/matmul_i32_1d/input_1.cairo | 18 - src/tests/nodes/matmul_i32_1d/output_0.cairo | 16 - src/tests/nodes/matmul_i32_1x2.cairo | 23 - src/tests/nodes/matmul_i32_1x2/input_0.cairo | 18 - src/tests/nodes/matmul_i32_1x2/input_1.cairo | 18 - src/tests/nodes/matmul_i32_1x2/output_0.cairo | 17 - src/tests/nodes/matmul_i32_2x1.cairo | 23 - src/tests/nodes/matmul_i32_2x1/input_0.cairo | 18 - src/tests/nodes/matmul_i32_2x1/input_1.cairo | 18 - src/tests/nodes/matmul_i32_2x1/output_0.cairo | 20 - src/tests/nodes/matmul_i32_2x2.cairo | 23 - src/tests/nodes/matmul_i32_2x2/input_0.cairo | 20 - src/tests/nodes/matmul_i32_2x2/input_1.cairo | 20 - src/tests/nodes/matmul_i32_2x2/output_0.cairo | 20 - src/tests/nodes/matmul_i8_1d.cairo | 23 - src/tests/nodes/matmul_i8_1d/input_0.cairo | 18 - src/tests/nodes/matmul_i8_1d/input_1.cairo | 18 - src/tests/nodes/matmul_i8_1d/output_0.cairo | 16 - src/tests/nodes/matmul_i8_1x2.cairo | 23 - src/tests/nodes/matmul_i8_1x2/input_0.cairo | 18 - src/tests/nodes/matmul_i8_1x2/input_1.cairo | 18 - src/tests/nodes/matmul_i8_1x2/output_0.cairo | 17 - src/tests/nodes/matmul_i8_2x1.cairo | 23 - src/tests/nodes/matmul_i8_2x1/input_0.cairo | 18 - src/tests/nodes/matmul_i8_2x1/input_1.cairo | 18 - src/tests/nodes/matmul_i8_2x1/output_0.cairo | 20 - src/tests/nodes/matmul_i8_2x2.cairo | 23 - src/tests/nodes/matmul_i8_2x2/input_0.cairo | 20 - src/tests/nodes/matmul_i8_2x2/input_1.cairo | 20 - src/tests/nodes/matmul_i8_2x2/output_0.cairo | 20 - src/tests/nodes/matmul_u32_1d.cairo | 22 - src/tests/nodes/matmul_u32_1d/input_0.cairo | 17 - src/tests/nodes/matmul_u32_1d/input_1.cairo | 17 - src/tests/nodes/matmul_u32_1d/output_0.cairo | 15 - src/tests/nodes/matmul_u32_1x2.cairo | 22 - src/tests/nodes/matmul_u32_1x2/input_0.cairo | 17 - src/tests/nodes/matmul_u32_1x2/input_1.cairo | 17 - src/tests/nodes/matmul_u32_1x2/output_0.cairo | 16 - src/tests/nodes/matmul_u32_2x1.cairo | 22 - src/tests/nodes/matmul_u32_2x1/input_0.cairo | 17 - src/tests/nodes/matmul_u32_2x1/input_1.cairo | 17 - src/tests/nodes/matmul_u32_2x1/output_0.cairo | 19 - src/tests/nodes/matmul_u32_2x2.cairo | 22 - src/tests/nodes/matmul_u32_2x2/input_0.cairo | 19 - src/tests/nodes/matmul_u32_2x2/input_1.cairo | 19 - src/tests/nodes/matmul_u32_2x2/output_0.cairo | 19 - src/tests/nodes/mul_fp16x16.cairo | 22 - src/tests/nodes/mul_fp16x16/input_0.cairo | 46 -- src/tests/nodes/mul_fp16x16/input_1.cairo | 46 -- src/tests/nodes/mul_fp16x16/output_0.cairo | 46 -- src/tests/nodes/mul_fp16x16_broadcast.cairo | 22 - .../nodes/mul_fp16x16_broadcast/input_0.cairo | 46 -- .../nodes/mul_fp16x16_broadcast/input_1.cairo | 22 - .../mul_fp16x16_broadcast/output_0.cairo | 46 -- src/tests/nodes/mul_fp8x23.cairo | 22 - src/tests/nodes/mul_fp8x23/input_0.cairo | 44 -- src/tests/nodes/mul_fp8x23/input_1.cairo | 44 -- src/tests/nodes/mul_fp8x23/output_0.cairo | 44 -- src/tests/nodes/mul_fp8x23_broadcast.cairo | 22 - .../nodes/mul_fp8x23_broadcast/input_0.cairo | 45 -- .../nodes/mul_fp8x23_broadcast/input_1.cairo | 21 - .../nodes/mul_fp8x23_broadcast/output_0.cairo | 45 -- src/tests/nodes/mul_i32.cairo | 22 - src/tests/nodes/mul_i32/input_0.cairo | 44 -- src/tests/nodes/mul_i32/input_1.cairo | 44 -- src/tests/nodes/mul_i32/output_0.cairo | 44 -- src/tests/nodes/mul_i32_broadcast.cairo | 23 - .../nodes/mul_i32_broadcast/input_0.cairo | 44 -- .../nodes/mul_i32_broadcast/input_1.cairo | 20 - .../nodes/mul_i32_broadcast/output_0.cairo | 44 -- src/tests/nodes/mul_i8.cairo | 23 - src/tests/nodes/mul_i8/input_0.cairo | 44 -- src/tests/nodes/mul_i8/input_1.cairo | 44 -- src/tests/nodes/mul_i8/output_0.cairo | 44 -- src/tests/nodes/mul_i8_broadcast.cairo | 22 - .../nodes/mul_i8_broadcast/input_0.cairo | 44 -- .../nodes/mul_i8_broadcast/input_1.cairo | 20 - .../nodes/mul_i8_broadcast/output_0.cairo | 44 -- src/tests/nodes/mul_u32.cairo | 22 - src/tests/nodes/mul_u32/input_0.cairo | 43 -- src/tests/nodes/mul_u32/input_1.cairo | 43 -- src/tests/nodes/mul_u32/output_0.cairo | 43 -- src/tests/nodes/mul_u32_broadcast.cairo | 22 - .../nodes/mul_u32_broadcast/input_0.cairo | 43 -- .../nodes/mul_u32_broadcast/input_1.cairo | 19 - .../nodes/mul_u32_broadcast/output_0.cairo | 43 -- src/tests/nodes/or_fp16x16.cairo | 22 - src/tests/nodes/or_fp16x16/input_0.cairo | 46 -- src/tests/nodes/or_fp16x16/input_1.cairo | 46 -- src/tests/nodes/or_fp16x16/output_0.cairo | 43 -- src/tests/nodes/or_fp16x16_broadcast.cairo | 22 - .../nodes/or_fp16x16_broadcast/input_0.cairo | 22 - .../nodes/or_fp16x16_broadcast/input_1.cairo | 20 - .../nodes/or_fp16x16_broadcast/output_0.cairo | 19 - src/tests/nodes/or_fp8x23.cairo | 22 - src/tests/nodes/or_fp8x23/input_0.cairo | 44 -- src/tests/nodes/or_fp8x23/input_1.cairo | 44 -- src/tests/nodes/or_fp8x23/output_0.cairo | 43 -- src/tests/nodes/or_fp8x23_broadcast.cairo | 22 - .../nodes/or_fp8x23_broadcast/input_0.cairo | 21 - .../nodes/or_fp8x23_broadcast/input_1.cairo | 19 - .../nodes/or_fp8x23_broadcast/output_0.cairo | 19 - src/tests/nodes/or_i32.cairo | 22 - src/tests/nodes/or_i32/input_0.cairo | 44 -- src/tests/nodes/or_i32/input_1.cairo | 44 -- src/tests/nodes/or_i32/output_0.cairo | 43 -- src/tests/nodes/or_i32_broadcast.cairo | 22 - .../nodes/or_i32_broadcast/input_0.cairo | 20 - .../nodes/or_i32_broadcast/input_1.cairo | 18 - .../nodes/or_i32_broadcast/output_0.cairo | 19 - src/tests/nodes/or_i8.cairo | 22 - src/tests/nodes/or_i8/input_0.cairo | 44 -- src/tests/nodes/or_i8/input_1.cairo | 44 -- src/tests/nodes/or_i8/output_0.cairo | 43 -- src/tests/nodes/or_i8_broadcast.cairo | 22 - src/tests/nodes/or_i8_broadcast/input_0.cairo | 20 - src/tests/nodes/or_i8_broadcast/input_1.cairo | 18 - .../nodes/or_i8_broadcast/output_0.cairo | 19 - src/tests/nodes/or_u32.cairo | 22 - src/tests/nodes/or_u32/input_0.cairo | 43 -- src/tests/nodes/or_u32/input_1.cairo | 43 -- src/tests/nodes/or_u32/output_0.cairo | 43 -- src/tests/nodes/or_u32_broadcast.cairo | 22 - .../nodes/or_u32_broadcast/input_0.cairo | 19 - .../nodes/or_u32_broadcast/input_1.cairo | 17 - .../nodes/or_u32_broadcast/output_0.cairo | 19 - src/tests/nodes/reduce_sum_fp16x16_1D.cairo | 21 - .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 20 - .../reduce_sum_fp16x16_1D/output_0.cairo | 18 - .../nodes/reduce_sum_fp16x16_2D_axis_1.cairo | 21 - .../input_0.cairo | 22 - .../output_0.cairo | 19 - .../nodes/reduce_sum_fp16x16_2D_default.cairo | 21 - .../input_0.cairo | 22 - .../output_0.cairo | 19 - .../reduce_sum_fp16x16_2D_keepdims.cairo | 21 - .../input_0.cairo | 22 - .../output_0.cairo | 20 - src/tests/nodes/reduce_sum_fp8x23_1D.cairo | 20 - .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 19 - .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 17 - .../nodes/reduce_sum_fp8x23_2D_axis_1.cairo | 20 - .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 21 - .../output_0.cairo | 18 - .../nodes/reduce_sum_fp8x23_2D_default.cairo | 20 - .../input_0.cairo | 21 - .../output_0.cairo | 18 - .../nodes/reduce_sum_fp8x23_2D_keepdims.cairo | 20 - .../input_0.cairo | 21 - .../output_0.cairo | 19 - src/tests/nodes/reduce_sum_i32_1D.cairo | 21 - .../nodes/reduce_sum_i32_1D/input_0.cairo | 18 - .../nodes/reduce_sum_i32_1D/output_0.cairo | 16 - .../nodes/reduce_sum_i32_2D_axis_1.cairo | 21 - .../reduce_sum_i32_2D_axis_1/input_0.cairo | 20 - .../reduce_sum_i32_2D_axis_1/output_0.cairo | 17 - .../nodes/reduce_sum_i32_2D_default.cairo | 21 - .../reduce_sum_i32_2D_default/input_0.cairo | 20 - .../reduce_sum_i32_2D_default/output_0.cairo | 17 - .../nodes/reduce_sum_i32_2D_keepdims.cairo | 21 - .../reduce_sum_i32_2D_keepdims/input_0.cairo | 20 - .../reduce_sum_i32_2D_keepdims/output_0.cairo | 18 - src/tests/nodes/reduce_sum_i8_1D.cairo | 20 - .../nodes/reduce_sum_i8_1D/input_0.cairo | 19 - .../nodes/reduce_sum_i8_1D/output_0.cairo | 16 - src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 20 - .../reduce_sum_i8_2D_axis_1/input_0.cairo | 20 - .../reduce_sum_i8_2D_axis_1/output_0.cairo | 17 - .../nodes/reduce_sum_i8_2D_default.cairo | 20 - .../reduce_sum_i8_2D_default/input_0.cairo | 20 - .../reduce_sum_i8_2D_default/output_0.cairo | 17 - .../nodes/reduce_sum_i8_2D_keepdims.cairo | 20 - .../reduce_sum_i8_2D_keepdims/input_0.cairo | 20 - .../reduce_sum_i8_2D_keepdims/output_0.cairo | 18 - src/tests/nodes/reduce_sum_u32_1D.cairo | 20 - .../nodes/reduce_sum_u32_1D/input_0.cairo | 17 - .../nodes/reduce_sum_u32_1D/output_0.cairo | 15 - .../nodes/reduce_sum_u32_2D_axis_1.cairo | 20 - .../reduce_sum_u32_2D_axis_1/input_0.cairo | 19 - .../reduce_sum_u32_2D_axis_1/output_0.cairo | 16 - .../nodes/reduce_sum_u32_2D_default.cairo | 20 - .../reduce_sum_u32_2D_default/input_0.cairo | 19 - .../reduce_sum_u32_2D_default/output_0.cairo | 16 - .../nodes/reduce_sum_u32_2D_keepdims.cairo | 20 - .../reduce_sum_u32_2D_keepdims/input_0.cairo | 19 - .../reduce_sum_u32_2D_keepdims/output_0.cairo | 17 - src/tests/nodes/relu_fp16x16.cairo | 21 - src/tests/nodes/relu_fp16x16/input_0.cairo | 22 - src/tests/nodes/relu_fp16x16/output_0.cairo | 22 - src/tests/nodes/relu_fp8x23.cairo | 21 - src/tests/nodes/relu_fp8x23/input_0.cairo | 20 - src/tests/nodes/relu_fp8x23/output_0.cairo | 20 - src/tests/nodes/relu_i32.cairo | 20 - src/tests/nodes/relu_i32/input_0.cairo | 20 - src/tests/nodes/relu_i32/output_0.cairo | 20 - src/tests/nodes/relu_i8.cairo | 20 - src/tests/nodes/relu_i8/input_0.cairo | 20 - src/tests/nodes/relu_i8/output_0.cairo | 20 - src/tests/nodes/sigmoid_fp16x16.cairo | 21 - src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 22 - .../nodes/sigmoid_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_fp8x23.cairo | 21 - src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 20 - src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 20 - src/tests/nodes/sigmoid_i32_fp16x16.cairo | 19 - .../nodes/sigmoid_i32_fp16x16/input_0.cairo | 20 - .../nodes/sigmoid_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_i32_fp8x23.cairo | 20 - .../nodes/sigmoid_i32_fp8x23/input_0.cairo | 20 - .../nodes/sigmoid_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sigmoid_i8_fp16x16.cairo | 20 - .../nodes/sigmoid_i8_fp16x16/input_0.cairo | 20 - .../nodes/sigmoid_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_i8_fp8x23.cairo | 21 - .../nodes/sigmoid_i8_fp8x23/input_0.cairo | 20 - .../nodes/sigmoid_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sigmoid_u32_fp16x16.cairo | 20 - .../nodes/sigmoid_u32_fp16x16/input_0.cairo | 19 - .../nodes/sigmoid_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_u32_fp8x23.cairo | 20 - .../nodes/sigmoid_u32_fp8x23/input_0.cairo | 19 - .../nodes/sigmoid_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_fp16x16.cairo | 21 - src/tests/nodes/sin_fp16x16/input_0.cairo | 22 - src/tests/nodes/sin_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_fp8x23.cairo | 21 - src/tests/nodes/sin_fp8x23/input_0.cairo | 20 - src/tests/nodes/sin_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_i32_fp16x16.cairo | 19 - src/tests/nodes/sin_i32_fp16x16/input_0.cairo | 20 - .../nodes/sin_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_i32_fp8x23.cairo | 20 - src/tests/nodes/sin_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/sin_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_i8_fp16x16.cairo | 20 - src/tests/nodes/sin_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/sin_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_i8_fp8x23.cairo | 21 - src/tests/nodes/sin_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sin_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_u32_fp16x16.cairo | 20 - src/tests/nodes/sin_u32_fp16x16/input_0.cairo | 19 - .../nodes/sin_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_u32_fp8x23.cairo | 19 - src/tests/nodes/sin_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/sin_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_fp16x16.cairo | 21 - src/tests/nodes/sinh_fp16x16/input_0.cairo | 22 - src/tests/nodes/sinh_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_fp8x23.cairo | 21 - src/tests/nodes/sinh_fp8x23/input_0.cairo | 20 - src/tests/nodes/sinh_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_i32_fp16x16.cairo | 19 - .../nodes/sinh_i32_fp16x16/input_0.cairo | 20 - .../nodes/sinh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_i32_fp8x23.cairo | 20 - src/tests/nodes/sinh_i32_fp8x23/input_0.cairo | 20 - .../nodes/sinh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_i8_fp16x16.cairo | 20 - src/tests/nodes/sinh_i8_fp16x16/input_0.cairo | 20 - .../nodes/sinh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_i8_fp8x23.cairo | 21 - src/tests/nodes/sinh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sinh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_u32_fp16x16.cairo | 20 - .../nodes/sinh_u32_fp16x16/input_0.cairo | 19 - .../nodes/sinh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_u32_fp8x23.cairo | 19 - src/tests/nodes/sinh_u32_fp8x23/input_0.cairo | 19 - .../nodes/sinh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_fp16x16.cairo | 21 - src/tests/nodes/softmax_fp16x16/input_0.cairo | 22 - .../nodes/softmax_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_fp8x23.cairo | 21 - src/tests/nodes/softmax_fp8x23/input_0.cairo | 20 - src/tests/nodes/softmax_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_i32_fp16x16.cairo | 19 - .../nodes/softmax_i32_fp16x16/input_0.cairo | 20 - .../nodes/softmax_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_i32_fp8x23.cairo | 20 - .../nodes/softmax_i32_fp8x23/input_0.cairo | 20 - .../nodes/softmax_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_i8_fp16x16.cairo | 20 - .../nodes/softmax_i8_fp16x16/input_0.cairo | 20 - .../nodes/softmax_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_i8_fp8x23.cairo | 21 - .../nodes/softmax_i8_fp8x23/input_0.cairo | 20 - .../nodes/softmax_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_u32_fp16x16.cairo | 20 - .../nodes/softmax_u32_fp16x16/input_0.cairo | 19 - .../nodes/softmax_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_u32_fp8x23.cairo | 20 - .../nodes/softmax_u32_fp8x23/input_0.cairo | 19 - .../nodes/softmax_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_fp16x16.cairo | 21 - .../nodes/softplus_fp16x16/input_0.cairo | 22 - .../nodes/softplus_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_fp8x23.cairo | 21 - src/tests/nodes/softplus_fp8x23/input_0.cairo | 20 - .../nodes/softplus_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_i32_fp16x16.cairo | 19 - .../nodes/softplus_i32_fp16x16/input_0.cairo | 20 - .../nodes/softplus_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_i32_fp8x23.cairo | 20 - .../nodes/softplus_i32_fp8x23/input_0.cairo | 20 - .../nodes/softplus_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_i8_fp16x16.cairo | 20 - .../nodes/softplus_i8_fp16x16/input_0.cairo | 20 - .../nodes/softplus_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_i8_fp8x23.cairo | 21 - .../nodes/softplus_i8_fp8x23/input_0.cairo | 20 - .../nodes/softplus_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_u32_fp16x16.cairo | 20 - .../nodes/softplus_u32_fp16x16/input_0.cairo | 19 - .../nodes/softplus_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_u32_fp8x23.cairo | 20 - .../nodes/softplus_u32_fp8x23/input_0.cairo | 19 - .../nodes/softplus_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_fp16x16.cairo | 21 - .../nodes/softsign_fp16x16/input_0.cairo | 22 - .../nodes/softsign_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_fp8x23.cairo | 21 - src/tests/nodes/softsign_fp8x23/input_0.cairo | 20 - .../nodes/softsign_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_i32_fp16x16.cairo | 19 - .../nodes/softsign_i32_fp16x16/input_0.cairo | 20 - .../nodes/softsign_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_i32_fp8x23.cairo | 20 - .../nodes/softsign_i32_fp8x23/input_0.cairo | 20 - .../nodes/softsign_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_i8_fp16x16.cairo | 20 - .../nodes/softsign_i8_fp16x16/input_0.cairo | 20 - .../nodes/softsign_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_i8_fp8x23.cairo | 21 - .../nodes/softsign_i8_fp8x23/input_0.cairo | 20 - .../nodes/softsign_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_u32_fp16x16.cairo | 20 - .../nodes/softsign_u32_fp16x16/input_0.cairo | 19 - .../nodes/softsign_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_u32_fp8x23.cairo | 20 - .../nodes/softsign_u32_fp8x23/input_0.cairo | 19 - .../nodes/softsign_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_fp16x16.cairo | 21 - src/tests/nodes/sqrt_fp16x16/input_0.cairo | 22 - src/tests/nodes/sqrt_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_fp8x23.cairo | 21 - src/tests/nodes/sqrt_fp8x23/input_0.cairo | 20 - src/tests/nodes/sqrt_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_i32_fp16x16.cairo | 19 - .../nodes/sqrt_i32_fp16x16/input_0.cairo | 20 - .../nodes/sqrt_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_i32_fp8x23.cairo | 20 - src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo | 20 - .../nodes/sqrt_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_i8_fp16x16.cairo | 20 - src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo | 20 - .../nodes/sqrt_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_i8_fp8x23.cairo | 21 - src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_u32_fp16x16.cairo | 20 - .../nodes/sqrt_u32_fp16x16/input_0.cairo | 19 - .../nodes/sqrt_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_u32_fp8x23.cairo | 19 - src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo | 19 - .../nodes/sqrt_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sub_fp16x16.cairo | 22 - src/tests/nodes/sub_fp16x16/input_0.cairo | 46 -- src/tests/nodes/sub_fp16x16/input_1.cairo | 46 -- src/tests/nodes/sub_fp16x16/output_0.cairo | 46 -- src/tests/nodes/sub_fp16x16_broadcast.cairo | 22 - .../nodes/sub_fp16x16_broadcast/input_0.cairo | 46 -- .../nodes/sub_fp16x16_broadcast/input_1.cairo | 22 - .../sub_fp16x16_broadcast/output_0.cairo | 46 -- src/tests/nodes/sub_fp8x23.cairo | 22 - src/tests/nodes/sub_fp8x23/input_0.cairo | 44 -- src/tests/nodes/sub_fp8x23/input_1.cairo | 44 -- src/tests/nodes/sub_fp8x23/output_0.cairo | 44 -- src/tests/nodes/sub_fp8x23_broadcast.cairo | 22 - .../nodes/sub_fp8x23_broadcast/input_0.cairo | 45 -- .../nodes/sub_fp8x23_broadcast/input_1.cairo | 21 - .../nodes/sub_fp8x23_broadcast/output_0.cairo | 45 -- src/tests/nodes/sub_i32.cairo | 22 - src/tests/nodes/sub_i32/input_0.cairo | 44 -- src/tests/nodes/sub_i32/input_1.cairo | 44 -- src/tests/nodes/sub_i32/output_0.cairo | 44 -- src/tests/nodes/sub_i32_broadcast.cairo | 22 - .../nodes/sub_i32_broadcast/input_0.cairo | 44 -- .../nodes/sub_i32_broadcast/input_1.cairo | 20 - .../nodes/sub_i32_broadcast/output_0.cairo | 44 -- src/tests/nodes/sub_i8.cairo | 22 - src/tests/nodes/sub_i8/input_0.cairo | 44 -- src/tests/nodes/sub_i8/input_1.cairo | 44 -- src/tests/nodes/sub_i8/output_0.cairo | 44 -- src/tests/nodes/sub_i8_broadcast.cairo | 22 - .../nodes/sub_i8_broadcast/input_0.cairo | 44 -- .../nodes/sub_i8_broadcast/input_1.cairo | 20 - .../nodes/sub_i8_broadcast/output_0.cairo | 44 -- src/tests/nodes/sub_u32.cairo | 24 - src/tests/nodes/sub_u32/input_0.cairo | 43 -- src/tests/nodes/sub_u32/input_1.cairo | 43 -- src/tests/nodes/sub_u32/output_0.cairo | 43 -- src/tests/nodes/sub_u32_broadcast.cairo | 24 - .../nodes/sub_u32_broadcast/input_0.cairo | 43 -- .../nodes/sub_u32_broadcast/input_1.cairo | 19 - .../nodes/sub_u32_broadcast/output_0.cairo | 43 -- src/tests/nodes/tanh_fp16x16.cairo | 21 - src/tests/nodes/tanh_fp16x16/input_0.cairo | 22 - src/tests/nodes/tanh_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_fp8x23.cairo | 21 - src/tests/nodes/tanh_fp8x23/input_0.cairo | 20 - src/tests/nodes/tanh_fp8x23/output_0.cairo | 20 - src/tests/nodes/tanh_i32_fp16x16.cairo | 19 - .../nodes/tanh_i32_fp16x16/input_0.cairo | 20 - .../nodes/tanh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_i32_fp8x23.cairo | 20 - src/tests/nodes/tanh_i32_fp8x23/input_0.cairo | 20 - .../nodes/tanh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/tanh_i8_fp16x16.cairo | 20 - src/tests/nodes/tanh_i8_fp16x16/input_0.cairo | 20 - .../nodes/tanh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_i8_fp8x23.cairo | 21 - src/tests/nodes/tanh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/tanh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/tanh_u32_fp16x16.cairo | 20 - .../nodes/tanh_u32_fp16x16/input_0.cairo | 19 - .../nodes/tanh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_u32_fp8x23.cairo | 19 - src/tests/nodes/tanh_u32_fp8x23/input_0.cairo | 19 - .../nodes/tanh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/transpose_fp16x16_2d.cairo | 21 - .../nodes/transpose_fp16x16_2d/input_0.cairo | 22 - .../nodes/transpose_fp16x16_2d/output_0.cairo | 22 - src/tests/nodes/transpose_fp16x16_3d.cairo | 21 - .../nodes/transpose_fp16x16_3d/input_0.cairo | 27 -- .../nodes/transpose_fp16x16_3d/output_0.cairo | 27 -- src/tests/nodes/transpose_fp8x23_2d.cairo | 20 - .../nodes/transpose_fp8x23_2d/input_0.cairo | 21 - .../nodes/transpose_fp8x23_2d/output_0.cairo | 21 - src/tests/nodes/transpose_fp8x23_3d.cairo | 20 - .../nodes/transpose_fp8x23_3d/input_0.cairo | 26 - .../nodes/transpose_fp8x23_3d/output_0.cairo | 26 - src/tests/nodes/transpose_i32_2d.cairo | 21 - .../nodes/transpose_i32_2d/input_0.cairo | 20 - .../nodes/transpose_i32_2d/output_0.cairo | 20 - src/tests/nodes/transpose_i32_3d.cairo | 21 - .../nodes/transpose_i32_3d/input_0.cairo | 25 - .../nodes/transpose_i32_3d/output_0.cairo | 25 - src/tests/nodes/transpose_i8_2d.cairo | 21 - src/tests/nodes/transpose_i8_2d/input_0.cairo | 20 - .../nodes/transpose_i8_2d/output_0.cairo | 20 - src/tests/nodes/transpose_i8_3d.cairo | 21 - src/tests/nodes/transpose_i8_3d/input_0.cairo | 25 - .../nodes/transpose_i8_3d/output_0.cairo | 25 - src/tests/nodes/transpose_u32_2d.cairo | 20 - .../nodes/transpose_u32_2d/input_0.cairo | 19 - .../nodes/transpose_u32_2d/output_0.cairo | 19 - src/tests/nodes/transpose_u32_3d.cairo | 20 - .../nodes/transpose_u32_3d/input_0.cairo | 24 - .../nodes/transpose_u32_3d/output_0.cairo | 24 - src/tests/nodes/xor_fp16x16.cairo | 22 - src/tests/nodes/xor_fp16x16/input_0.cairo | 22 - src/tests/nodes/xor_fp16x16/input_1.cairo | 20 - src/tests/nodes/xor_fp16x16/output_0.cairo | 19 - src/tests/nodes/xor_fp16x16_broadcast.cairo | 22 - .../nodes/xor_fp16x16_broadcast/input_0.cairo | 22 - .../nodes/xor_fp16x16_broadcast/input_1.cairo | 20 - .../xor_fp16x16_broadcast/output_0.cairo | 19 - src/tests/nodes/xor_fp8x23.cairo | 22 - src/tests/nodes/xor_fp8x23/input_0.cairo | 44 -- src/tests/nodes/xor_fp8x23/input_1.cairo | 44 -- src/tests/nodes/xor_fp8x23/output_0.cairo | 43 -- src/tests/nodes/xor_fp8x23_broadcast.cairo | 22 - .../nodes/xor_fp8x23_broadcast/input_0.cairo | 21 - .../nodes/xor_fp8x23_broadcast/input_1.cairo | 19 - .../nodes/xor_fp8x23_broadcast/output_0.cairo | 19 - src/tests/nodes/xor_i32.cairo | 22 - src/tests/nodes/xor_i32/input_0.cairo | 44 -- src/tests/nodes/xor_i32/input_1.cairo | 44 -- src/tests/nodes/xor_i32/output_0.cairo | 43 -- src/tests/nodes/xor_i32_broadcast.cairo | 22 - .../nodes/xor_i32_broadcast/input_0.cairo | 20 - .../nodes/xor_i32_broadcast/input_1.cairo | 18 - .../nodes/xor_i32_broadcast/output_0.cairo | 19 - src/tests/nodes/xor_i8.cairo | 22 - src/tests/nodes/xor_i8/input_0.cairo | 44 -- src/tests/nodes/xor_i8/input_1.cairo | 44 -- src/tests/nodes/xor_i8/output_0.cairo | 43 -- src/tests/nodes/xor_i8_broadcast.cairo | 22 - .../nodes/xor_i8_broadcast/input_0.cairo | 20 - .../nodes/xor_i8_broadcast/input_1.cairo | 18 - .../nodes/xor_i8_broadcast/output_0.cairo | 19 - src/tests/nodes/xor_u32.cairo | 22 - src/tests/nodes/xor_u32/input_0.cairo | 43 -- src/tests/nodes/xor_u32/input_1.cairo | 43 -- src/tests/nodes/xor_u32/output_0.cairo | 43 -- src/tests/nodes/xor_u32_broadcast.cairo | 22 - .../nodes/xor_u32_broadcast/input_0.cairo | 19 - .../nodes/xor_u32_broadcast/input_1.cairo | 17 - .../nodes/xor_u32_broadcast/output_0.cairo | 19 - 1585 files changed, 1 insertion(+), 39942 deletions(-) delete mode 100644 src/tests/nodes/abs_fp16x16.cairo delete mode 100644 src/tests/nodes/abs_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/abs_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/abs_fp8x23.cairo delete mode 100644 src/tests/nodes/abs_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/abs_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/abs_i32.cairo delete mode 100644 src/tests/nodes/abs_i32/input_0.cairo delete mode 100644 src/tests/nodes/abs_i32/output_0.cairo delete mode 100644 src/tests/nodes/abs_i8.cairo delete mode 100644 src/tests/nodes/abs_i8/input_0.cairo delete mode 100644 src/tests/nodes/abs_i8/output_0.cairo delete mode 100644 src/tests/nodes/acos_fp16x16.cairo delete mode 100644 src/tests/nodes/acos_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acos_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acos_fp8x23.cairo delete mode 100644 src/tests/nodes/acos_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acos_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/add_fp16x16.cairo delete mode 100644 src/tests/nodes/add_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/add_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/add_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/add_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/add_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/add_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/add_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/add_fp8x23.cairo delete mode 100644 src/tests/nodes/add_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/add_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/add_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/add_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/add_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/add_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/add_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/add_i32.cairo delete mode 100644 src/tests/nodes/add_i32/input_0.cairo delete mode 100644 src/tests/nodes/add_i32/input_1.cairo delete mode 100644 src/tests/nodes/add_i32/output_0.cairo delete mode 100644 src/tests/nodes/add_i32_broadcast.cairo delete mode 100644 src/tests/nodes/add_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/add_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/add_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/add_i8.cairo delete mode 100644 src/tests/nodes/add_i8/input_0.cairo delete mode 100644 src/tests/nodes/add_i8/input_1.cairo delete mode 100644 src/tests/nodes/add_i8/output_0.cairo delete mode 100644 src/tests/nodes/add_i8_broadcast.cairo delete mode 100644 src/tests/nodes/add_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/add_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/add_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/add_u32.cairo delete mode 100644 src/tests/nodes/add_u32/input_0.cairo delete mode 100644 src/tests/nodes/add_u32/input_1.cairo delete mode 100644 src/tests/nodes/add_u32/output_0.cairo delete mode 100644 src/tests/nodes/add_u32_broadcast.cairo delete mode 100644 src/tests/nodes/add_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/add_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/add_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_default.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_default.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_default.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_default.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_default.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_default.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_default.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_default.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_default.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_default.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_default.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_default.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_default.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_default.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_default.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_default.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_default.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_default.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_default.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_default.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_default/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_default/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_last_index.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo delete mode 100644 src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo delete mode 100644 src/tests/nodes/asin_fp16x16.cairo delete mode 100644 src/tests/nodes/asin_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asin_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asin_fp8x23.cairo delete mode 100644 src/tests/nodes/asin_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asin_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/ceil_fp16x16.cairo delete mode 100644 src/tests/nodes/ceil_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/ceil_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/ceil_fp8x23.cairo delete mode 100644 src/tests/nodes/ceil_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/ceil_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_1d.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_1d/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_1d/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_1d/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_2d.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_2d/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_2d/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_2d/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_default.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo delete mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_1d.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_1d/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_1d/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_1d/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_2d.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_2d/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_2d/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_2d/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_default.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo delete mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_1d.cairo delete mode 100644 src/tests/nodes/concat_i32_1d/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_1d/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_1d/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_2d.cairo delete mode 100644 src/tests/nodes/concat_i32_2d/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_2d/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_2d/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_2.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_default.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_default/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_default/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_default/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo delete mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_1d.cairo delete mode 100644 src/tests/nodes/concat_u32_1d/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_1d/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_1d/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_2d.cairo delete mode 100644 src/tests/nodes/concat_u32_2d/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_2d/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_2d/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_2.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_default.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_default/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_default/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_default/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo delete mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/cos_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_default.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_default/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_default/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_default.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_default/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_default/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_default.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_default/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_default/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/div_fp16x16.cairo delete mode 100644 src/tests/nodes/div_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/div_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/div_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/div_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/div_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/div_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/div_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/div_fp8x23.cairo delete mode 100644 src/tests/nodes/div_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/div_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/div_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/div_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/div_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/div_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/div_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/div_i32.cairo delete mode 100644 src/tests/nodes/div_i32/input_0.cairo delete mode 100644 src/tests/nodes/div_i32/input_1.cairo delete mode 100644 src/tests/nodes/div_i32/output_0.cairo delete mode 100644 src/tests/nodes/div_i32_broadcast.cairo delete mode 100644 src/tests/nodes/div_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/div_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/div_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/div_i8.cairo delete mode 100644 src/tests/nodes/div_i8/input_0.cairo delete mode 100644 src/tests/nodes/div_i8/input_1.cairo delete mode 100644 src/tests/nodes/div_i8/output_0.cairo delete mode 100644 src/tests/nodes/div_i8_broadcast.cairo delete mode 100644 src/tests/nodes/div_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/div_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/div_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/div_u32.cairo delete mode 100644 src/tests/nodes/div_u32/input_0.cairo delete mode 100644 src/tests/nodes/div_u32/input_1.cairo delete mode 100644 src/tests/nodes/div_u32/output_0.cairo delete mode 100644 src/tests/nodes/div_u32_broadcast.cairo delete mode 100644 src/tests/nodes/div_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/div_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/div_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/equal_fp16x16.cairo delete mode 100644 src/tests/nodes/equal_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/equal_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/equal_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/equal_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/equal_fp8x23.cairo delete mode 100644 src/tests/nodes/equal_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/equal_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/equal_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/equal_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/equal_i32.cairo delete mode 100644 src/tests/nodes/equal_i32/input_0.cairo delete mode 100644 src/tests/nodes/equal_i32/input_1.cairo delete mode 100644 src/tests/nodes/equal_i32/output_0.cairo delete mode 100644 src/tests/nodes/equal_i32_broadcast.cairo delete mode 100644 src/tests/nodes/equal_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/equal_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/equal_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/equal_i8.cairo delete mode 100644 src/tests/nodes/equal_i8/input_0.cairo delete mode 100644 src/tests/nodes/equal_i8/input_1.cairo delete mode 100644 src/tests/nodes/equal_i8/output_0.cairo delete mode 100644 src/tests/nodes/equal_i8_broadcast.cairo delete mode 100644 src/tests/nodes/equal_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/equal_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/equal_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/equal_u32.cairo delete mode 100644 src/tests/nodes/equal_u32/input_0.cairo delete mode 100644 src/tests/nodes/equal_u32/input_1.cairo delete mode 100644 src/tests/nodes/equal_u32/output_0.cairo delete mode 100644 src/tests/nodes/equal_u32_broadcast.cairo delete mode 100644 src/tests/nodes/equal_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/equal_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/equal_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/exp_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i32.cairo delete mode 100644 src/tests/nodes/greater_equal_i32/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i32/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_i32/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i32_broadcast.cairo delete mode 100644 src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i8.cairo delete mode 100644 src/tests/nodes/greater_equal_i8/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i8/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_i8/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i8_broadcast.cairo delete mode 100644 src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_u32.cairo delete mode 100644 src/tests/nodes/greater_equal_u32/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_u32/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_u32/output_0.cairo delete mode 100644 src/tests/nodes/greater_equal_u32_broadcast.cairo delete mode 100644 src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_fp16x16.cairo delete mode 100644 src/tests/nodes/greater_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/greater_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/greater_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/greater_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_fp8x23.cairo delete mode 100644 src/tests/nodes/greater_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/greater_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/greater_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/greater_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_i32.cairo delete mode 100644 src/tests/nodes/greater_i32/input_0.cairo delete mode 100644 src/tests/nodes/greater_i32/input_1.cairo delete mode 100644 src/tests/nodes/greater_i32/output_0.cairo delete mode 100644 src/tests/nodes/greater_i32_broadcast.cairo delete mode 100644 src/tests/nodes/greater_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_i8.cairo delete mode 100644 src/tests/nodes/greater_i8/input_0.cairo delete mode 100644 src/tests/nodes/greater_i8/input_1.cairo delete mode 100644 src/tests/nodes/greater_i8/output_0.cairo delete mode 100644 src/tests/nodes/greater_i8_broadcast.cairo delete mode 100644 src/tests/nodes/greater_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/greater_u32.cairo delete mode 100644 src/tests/nodes/greater_u32/input_0.cairo delete mode 100644 src/tests/nodes/greater_u32/input_1.cairo delete mode 100644 src/tests/nodes/greater_u32/output_0.cairo delete mode 100644 src/tests/nodes/greater_u32_broadcast.cairo delete mode 100644 src/tests/nodes/greater_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/greater_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/greater_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp16x16.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp8x23.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_i32.cairo delete mode 100644 src/tests/nodes/less_equal_i32/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_i32/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_i32/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_i32_broadcast.cairo delete mode 100644 src/tests/nodes/less_equal_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_i8.cairo delete mode 100644 src/tests/nodes/less_equal_i8/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_i8/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_i8/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_i8_broadcast.cairo delete mode 100644 src/tests/nodes/less_equal_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_u32.cairo delete mode 100644 src/tests/nodes/less_equal_u32/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_u32/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_u32/output_0.cairo delete mode 100644 src/tests/nodes/less_equal_u32_broadcast.cairo delete mode 100644 src/tests/nodes/less_equal_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_equal_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_equal_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_fp16x16.cairo delete mode 100644 src/tests/nodes/less_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/less_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/less_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/less_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/less_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_fp8x23.cairo delete mode 100644 src/tests/nodes/less_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/less_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/less_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/less_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/less_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_i32.cairo delete mode 100644 src/tests/nodes/less_i32/input_0.cairo delete mode 100644 src/tests/nodes/less_i32/input_1.cairo delete mode 100644 src/tests/nodes/less_i32/output_0.cairo delete mode 100644 src/tests/nodes/less_i32_broadcast.cairo delete mode 100644 src/tests/nodes/less_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_i8.cairo delete mode 100644 src/tests/nodes/less_i8/input_0.cairo delete mode 100644 src/tests/nodes/less_i8/input_1.cairo delete mode 100644 src/tests/nodes/less_i8/output_0.cairo delete mode 100644 src/tests/nodes/less_i8_broadcast.cairo delete mode 100644 src/tests/nodes/less_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/less_u32.cairo delete mode 100644 src/tests/nodes/less_u32/input_0.cairo delete mode 100644 src/tests/nodes/less_u32/input_1.cairo delete mode 100644 src/tests/nodes/less_u32/output_0.cairo delete mode 100644 src/tests/nodes/less_u32_broadcast.cairo delete mode 100644 src/tests/nodes/less_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/less_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/less_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/linear_fp16x16.cairo delete mode 100644 src/tests/nodes/linear_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/linear_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/linear_fp16x16/input_2.cairo delete mode 100644 src/tests/nodes/linear_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/linear_fp8x23.cairo delete mode 100644 src/tests/nodes/linear_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/linear_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/linear_fp8x23/input_2.cairo delete mode 100644 src/tests/nodes/linear_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/linear_i32.cairo delete mode 100644 src/tests/nodes/linear_i32/input_0.cairo delete mode 100644 src/tests/nodes/linear_i32/input_1.cairo delete mode 100644 src/tests/nodes/linear_i32/input_2.cairo delete mode 100644 src/tests/nodes/linear_i32/output_0.cairo delete mode 100644 src/tests/nodes/linear_i8.cairo delete mode 100644 src/tests/nodes/linear_i8/input_0.cairo delete mode 100644 src/tests/nodes/linear_i8/input_1.cairo delete mode 100644 src/tests/nodes/linear_i8/input_2.cairo delete mode 100644 src/tests/nodes/linear_i8/output_0.cairo delete mode 100644 src/tests/nodes/linear_u32.cairo delete mode 100644 src/tests/nodes/linear_u32/input_0.cairo delete mode 100644 src/tests/nodes/linear_u32/input_1.cairo delete mode 100644 src/tests/nodes/linear_u32/input_2.cairo delete mode 100644 src/tests/nodes/linear_u32/output_0.cairo delete mode 100644 src/tests/nodes/log_fp16x16.cairo delete mode 100644 src/tests/nodes/log_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_fp8x23.cairo delete mode 100644 src/tests/nodes/log_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1d.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1d/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1d/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1d/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1x2.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x1.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x2.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1d.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1d/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1d/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1d/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1x2.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x1.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x2.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_1d.cairo delete mode 100644 src/tests/nodes/matmul_i32_1d/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_1d/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i32_1d/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_1x2.cairo delete mode 100644 src/tests/nodes/matmul_i32_1x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_1x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i32_1x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x1.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x1/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x1/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x2.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i32_2x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_1d.cairo delete mode 100644 src/tests/nodes/matmul_i8_1d/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_1d/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i8_1d/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_1x2.cairo delete mode 100644 src/tests/nodes/matmul_i8_1x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_1x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i8_1x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x1.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x1/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x1/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x2.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_i8_2x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_1d.cairo delete mode 100644 src/tests/nodes/matmul_u32_1d/input_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_1d/input_1.cairo delete mode 100644 src/tests/nodes/matmul_u32_1d/output_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_1x2.cairo delete mode 100644 src/tests/nodes/matmul_u32_1x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_1x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_u32_1x2/output_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x1.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x1/input_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x1/input_1.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x1/output_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x2.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x2/input_0.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x2/input_1.cairo delete mode 100644 src/tests/nodes/matmul_u32_2x2/output_0.cairo delete mode 100644 src/tests/nodes/mul_fp16x16.cairo delete mode 100644 src/tests/nodes/mul_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/mul_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/mul_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/mul_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/mul_fp8x23.cairo delete mode 100644 src/tests/nodes/mul_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/mul_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/mul_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/mul_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/mul_i32.cairo delete mode 100644 src/tests/nodes/mul_i32/input_0.cairo delete mode 100644 src/tests/nodes/mul_i32/input_1.cairo delete mode 100644 src/tests/nodes/mul_i32/output_0.cairo delete mode 100644 src/tests/nodes/mul_i32_broadcast.cairo delete mode 100644 src/tests/nodes/mul_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/mul_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/mul_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/mul_i8.cairo delete mode 100644 src/tests/nodes/mul_i8/input_0.cairo delete mode 100644 src/tests/nodes/mul_i8/input_1.cairo delete mode 100644 src/tests/nodes/mul_i8/output_0.cairo delete mode 100644 src/tests/nodes/mul_i8_broadcast.cairo delete mode 100644 src/tests/nodes/mul_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/mul_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/mul_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/mul_u32.cairo delete mode 100644 src/tests/nodes/mul_u32/input_0.cairo delete mode 100644 src/tests/nodes/mul_u32/input_1.cairo delete mode 100644 src/tests/nodes/mul_u32/output_0.cairo delete mode 100644 src/tests/nodes/mul_u32_broadcast.cairo delete mode 100644 src/tests/nodes/mul_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/mul_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/mul_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/or_fp16x16.cairo delete mode 100644 src/tests/nodes/or_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/or_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/or_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/or_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/or_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/or_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/or_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/or_fp8x23.cairo delete mode 100644 src/tests/nodes/or_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/or_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/or_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/or_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/or_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/or_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/or_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/or_i32.cairo delete mode 100644 src/tests/nodes/or_i32/input_0.cairo delete mode 100644 src/tests/nodes/or_i32/input_1.cairo delete mode 100644 src/tests/nodes/or_i32/output_0.cairo delete mode 100644 src/tests/nodes/or_i32_broadcast.cairo delete mode 100644 src/tests/nodes/or_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/or_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/or_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/or_i8.cairo delete mode 100644 src/tests/nodes/or_i8/input_0.cairo delete mode 100644 src/tests/nodes/or_i8/input_1.cairo delete mode 100644 src/tests/nodes/or_i8/output_0.cairo delete mode 100644 src/tests/nodes/or_i8_broadcast.cairo delete mode 100644 src/tests/nodes/or_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/or_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/or_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/or_u32.cairo delete mode 100644 src/tests/nodes/or_u32/input_0.cairo delete mode 100644 src/tests/nodes/or_u32/input_1.cairo delete mode 100644 src/tests/nodes/or_u32/output_0.cairo delete mode 100644 src/tests/nodes/or_u32_broadcast.cairo delete mode 100644 src/tests/nodes/or_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/or_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/or_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_1D.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_1D/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_1D/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_default.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_1D.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_1D/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_1D/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_default.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_1D.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_1D/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_1D/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_default.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo delete mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo delete mode 100644 src/tests/nodes/relu_fp16x16.cairo delete mode 100644 src/tests/nodes/relu_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/relu_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/relu_fp8x23.cairo delete mode 100644 src/tests/nodes/relu_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/relu_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/relu_i32.cairo delete mode 100644 src/tests/nodes/relu_i32/input_0.cairo delete mode 100644 src/tests/nodes/relu_i32/output_0.cairo delete mode 100644 src/tests/nodes/relu_i8.cairo delete mode 100644 src/tests/nodes/relu_i8/input_0.cairo delete mode 100644 src/tests/nodes/relu_i8/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sub_fp16x16.cairo delete mode 100644 src/tests/nodes/sub_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sub_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/sub_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sub_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/sub_fp8x23.cairo delete mode 100644 src/tests/nodes/sub_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sub_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/sub_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sub_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/sub_i32.cairo delete mode 100644 src/tests/nodes/sub_i32/input_0.cairo delete mode 100644 src/tests/nodes/sub_i32/input_1.cairo delete mode 100644 src/tests/nodes/sub_i32/output_0.cairo delete mode 100644 src/tests/nodes/sub_i32_broadcast.cairo delete mode 100644 src/tests/nodes/sub_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/sub_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/sub_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/sub_i8.cairo delete mode 100644 src/tests/nodes/sub_i8/input_0.cairo delete mode 100644 src/tests/nodes/sub_i8/input_1.cairo delete mode 100644 src/tests/nodes/sub_i8/output_0.cairo delete mode 100644 src/tests/nodes/sub_i8_broadcast.cairo delete mode 100644 src/tests/nodes/sub_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/sub_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/sub_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/sub_u32.cairo delete mode 100644 src/tests/nodes/sub_u32/input_0.cairo delete mode 100644 src/tests/nodes/sub_u32/input_1.cairo delete mode 100644 src/tests/nodes/sub_u32/output_0.cairo delete mode 100644 src/tests/nodes/sub_u32_broadcast.cairo delete mode 100644 src/tests/nodes/sub_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/sub_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/sub_u32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/tanh_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_2d.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_2d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_2d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_3d.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_3d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_fp16x16_3d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_2d.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_2d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_2d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_3d.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_3d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_fp8x23_3d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_i32_2d.cairo delete mode 100644 src/tests/nodes/transpose_i32_2d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_i32_2d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_i32_3d.cairo delete mode 100644 src/tests/nodes/transpose_i32_3d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_i32_3d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_i8_2d.cairo delete mode 100644 src/tests/nodes/transpose_i8_2d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_i8_2d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_i8_3d.cairo delete mode 100644 src/tests/nodes/transpose_i8_3d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_i8_3d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_u32_2d.cairo delete mode 100644 src/tests/nodes/transpose_u32_2d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_u32_2d/output_0.cairo delete mode 100644 src/tests/nodes/transpose_u32_3d.cairo delete mode 100644 src/tests/nodes/transpose_u32_3d/input_0.cairo delete mode 100644 src/tests/nodes/transpose_u32_3d/output_0.cairo delete mode 100644 src/tests/nodes/xor_fp16x16.cairo delete mode 100644 src/tests/nodes/xor_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/xor_fp16x16/input_1.cairo delete mode 100644 src/tests/nodes/xor_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/xor_fp16x16_broadcast.cairo delete mode 100644 src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/xor_fp8x23.cairo delete mode 100644 src/tests/nodes/xor_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/xor_fp8x23/input_1.cairo delete mode 100644 src/tests/nodes/xor_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/xor_fp8x23_broadcast.cairo delete mode 100644 src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/xor_i32.cairo delete mode 100644 src/tests/nodes/xor_i32/input_0.cairo delete mode 100644 src/tests/nodes/xor_i32/input_1.cairo delete mode 100644 src/tests/nodes/xor_i32/output_0.cairo delete mode 100644 src/tests/nodes/xor_i32_broadcast.cairo delete mode 100644 src/tests/nodes/xor_i32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/xor_i32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/xor_i32_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/xor_i8.cairo delete mode 100644 src/tests/nodes/xor_i8/input_0.cairo delete mode 100644 src/tests/nodes/xor_i8/input_1.cairo delete mode 100644 src/tests/nodes/xor_i8/output_0.cairo delete mode 100644 src/tests/nodes/xor_i8_broadcast.cairo delete mode 100644 src/tests/nodes/xor_i8_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/xor_i8_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/xor_i8_broadcast/output_0.cairo delete mode 100644 src/tests/nodes/xor_u32.cairo delete mode 100644 src/tests/nodes/xor_u32/input_0.cairo delete mode 100644 src/tests/nodes/xor_u32/input_1.cairo delete mode 100644 src/tests/nodes/xor_u32/output_0.cairo delete mode 100644 src/tests/nodes/xor_u32_broadcast.cairo delete mode 100644 src/tests/nodes/xor_u32_broadcast/input_0.cairo delete mode 100644 src/tests/nodes/xor_u32_broadcast/input_1.cairo delete mode 100644 src/tests/nodes/xor_u32_broadcast/output_0.cairo diff --git a/src/tests.cairo b/src/tests.cairo index 51f345ec5..8463adb0a 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -1,5 +1,5 @@ mod numbers; mod performance; mod tensor_core; -// mod nodes; +mod nodes; mod helpers; diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 27e9d74e7..e69de29bb 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -1,449 +0,0 @@ -mod abs_fp16x16; -mod abs_fp8x23; -mod abs_i32; -mod abs_i8; -mod acos_fp8x23; -mod acos_fp16x16; -mod argmax_fp16x16_1D_default; -mod argmax_fp16x16_1D_keepdims_false; -mod argmax_fp16x16_1D_last_index; -mod argmax_fp16x16_2D_default; -mod argmax_fp16x16_2D_keepdims_false; -mod argmax_fp16x16_2D_last_index; -mod argmax_fp16x16_3D_default; -mod argmax_fp16x16_3D_keepdims_false; -mod argmax_fp16x16_3D_last_index; -mod argmax_fp8x23_1D_default; -mod argmax_fp8x23_1D_keepdims_false; -mod argmax_fp8x23_1D_last_index; -mod argmax_fp8x23_2D_default; -mod argmax_fp8x23_2D_keepdims_false; -mod argmax_fp8x23_2D_last_index; -mod argmax_fp8x23_3D_default; -mod argmax_fp8x23_3D_keepdims_false; -mod argmax_fp8x23_3D_last_index; -mod argmax_i32_1D_default; -mod argmax_i32_1D_keepdims_false; -mod argmax_i32_1D_last_index; -mod argmax_i32_2D_default; -mod argmax_i32_2D_keepdims_false; -mod argmax_i32_2D_last_index; -mod argmax_i32_3D_default; -mod argmax_i32_3D_keepdims_false; -mod argmax_i32_3D_last_index; -mod argmax_i8_1D_default; -mod argmax_i8_1D_keepdims_false; -mod argmax_i8_1D_last_index; -mod argmax_i8_2D_default; -mod argmax_i8_2D_keepdims_false; -mod argmax_i8_2D_last_index; -mod argmax_i8_3D_default; -mod argmax_i8_3D_keepdims_false; -mod argmax_i8_3D_last_index; -mod argmax_u32_1D_default; -mod argmax_u32_1D_keepdims_false; -mod argmax_u32_1D_last_index; -mod argmax_u32_2D_default; -mod argmax_u32_2D_keepdims_false; -mod argmax_u32_2D_last_index; -mod argmax_u32_3D_default; -mod argmax_u32_3D_keepdims_false; -mod argmax_u32_3D_last_index; -mod argmin_fp16x16_1D_default; -mod argmin_fp16x16_1D_keepdims_false; -mod argmin_fp16x16_1D_last_index; -mod argmin_fp16x16_2D_default; -mod argmin_fp16x16_2D_keepdims_false; -mod argmin_fp16x16_2D_last_index; -mod argmin_fp16x16_3D_default; -mod argmin_fp16x16_3D_keepdims_false; -mod argmin_fp16x16_3D_last_index; -mod argmin_fp8x23_1D_default; -mod argmin_fp8x23_1D_keepdims_false; -mod argmin_fp8x23_1D_last_index; -mod argmin_fp8x23_2D_default; -mod argmin_fp8x23_2D_keepdims_false; -mod argmin_fp8x23_2D_last_index; -mod argmin_fp8x23_3D_default; -mod argmin_fp8x23_3D_keepdims_false; -mod argmin_fp8x23_3D_last_index; -mod argmin_i32_1D_default; -mod argmin_i32_1D_keepdims_false; -mod argmin_i32_1D_last_index; -mod argmin_i32_2D_default; -mod argmin_i32_2D_keepdims_false; -mod argmin_i32_2D_last_index; -mod argmin_i32_3D_default; -mod argmin_i32_3D_keepdims_false; -mod argmin_i32_3D_last_index; -mod argmin_i8_1D_default; -mod argmin_i8_1D_keepdims_false; -mod argmin_i8_1D_last_index; -mod argmin_i8_2D_default; -mod argmin_i8_2D_keepdims_false; -mod argmin_i8_2D_last_index; -mod argmin_i8_3D_default; -mod argmin_i8_3D_keepdims_false; -mod argmin_i8_3D_last_index; -mod argmin_u32_1D_default; -mod argmin_u32_1D_keepdims_false; -mod argmin_u32_1D_last_index; -mod argmin_u32_2D_default; -mod argmin_u32_2D_keepdims_false; -mod argmin_u32_2D_last_index; -mod argmin_u32_3D_default; -mod argmin_u32_3D_keepdims_false; -mod argmin_u32_3D_last_index; -mod transpose_fp16x16_2d; -mod transpose_fp16x16_3d; -mod transpose_fp8x23_2d; -mod transpose_fp8x23_3d; -mod transpose_i32_2d; -mod transpose_i32_3d; -mod transpose_i8_2d; -mod transpose_i8_3d; -mod transpose_u32_2d; -mod transpose_u32_3d; -mod asin_fp16x16; -mod asin_fp8x23; -mod atan_fp16x16; -mod atan_fp8x23; -mod atan_i32_fp8x23; -mod atan_i32_fp16x16; -mod atan_i8_fp8x23; -mod atan_i8_fp16x16; -mod atan_u32_fp8x23; -mod atan_u32_fp16x16; -mod ceil_fp16x16; -mod ceil_fp8x23; -mod cos_fp16x16; -mod cos_fp8x23; -mod cos_i32_fp8x23; -mod cos_i32_fp16x16; -mod cos_i8_fp8x23; -mod cos_i8_fp16x16; -mod cos_u32_fp8x23; -mod cos_u32_fp16x16; -mod cumsum_fp16x16_1d_default; -mod cumsum_fp16x16_1d_exclusive; -mod cumsum_fp16x16_1d_reverse; -mod cumsum_fp16x16_1d_reverse_exclusive; -mod cumsum_fp16x16_2d_axis_0; -mod cumsum_fp16x16_2d_axis_1; -mod cumsum_fp8x23_1d_default; -mod cumsum_fp8x23_1d_exclusive; -mod cumsum_fp8x23_1d_reverse; -mod cumsum_fp8x23_1d_reverse_exclusive; -mod cumsum_fp8x23_2d_axis_0; -mod cumsum_fp8x23_2d_axis_1; -mod cumsum_i32_1d_default; -mod cumsum_i32_1d_exclusive; -mod cumsum_i32_1d_reverse; -mod cumsum_i32_1d_reverse_exclusive; -mod cumsum_i32_2d_axis_0; -mod cumsum_i32_2d_axis_1; -mod cumsum_i8_1d_default; -mod cumsum_i8_1d_exclusive; -mod cumsum_i8_1d_reverse; -mod cumsum_i8_1d_reverse_exclusive; -mod cumsum_i8_2d_axis_0; -mod cumsum_i8_2d_axis_1; -mod cumsum_u32_1d_default; -mod cumsum_u32_1d_exclusive; -mod cumsum_u32_1d_reverse; -mod cumsum_u32_1d_reverse_exclusive; -mod cumsum_u32_2d_axis_0; -mod cumsum_u32_2d_axis_1; -mod cosh_fp16x16; -mod cosh_fp8x23; -mod cosh_i32_fp8x23; -mod cosh_i32_fp16x16; -mod cosh_i8_fp8x23; -mod cosh_i8_fp16x16; -mod cosh_u32_fp8x23; -mod cosh_u32_fp16x16; -mod sinh_fp16x16; -mod sinh_fp8x23; -mod sinh_i32_fp8x23; -mod sinh_i32_fp16x16; -mod sinh_i8_fp8x23; -mod sinh_i8_fp16x16; -mod sinh_u32_fp8x23; -mod sinh_u32_fp16x16; -mod tanh_fp16x16; -mod tanh_fp8x23; -mod tanh_i32_fp8x23; -mod tanh_i32_fp16x16; -mod tanh_i8_fp8x23; -mod tanh_i8_fp16x16; -mod tanh_u32_fp8x23; -mod tanh_u32_fp16x16; -mod log_fp16x16; -mod log_fp8x23; -mod log_i32_fp8x23; -mod log_i32_fp16x16; -mod log_i8_fp8x23; -mod log_i8_fp16x16; -mod log_u32_fp8x23; -mod log_u32_fp16x16; -mod reduce_sum_fp16x16_1D; -mod reduce_sum_fp16x16_2D_default; -mod reduce_sum_fp16x16_2D_keepdims; -mod reduce_sum_fp16x16_2D_axis_1; -mod reduce_sum_fp8x23_1D; -mod reduce_sum_fp8x23_2D_default; -mod reduce_sum_fp8x23_2D_keepdims; -mod reduce_sum_fp8x23_2D_axis_1; -mod reduce_sum_i32_1D; -mod reduce_sum_i32_2D_default; -mod reduce_sum_i32_2D_keepdims; -mod reduce_sum_i32_2D_axis_1; -mod reduce_sum_i8_1D; -mod reduce_sum_i8_2D_default; -mod reduce_sum_i8_2D_keepdims; -mod reduce_sum_i8_2D_axis_1; -mod reduce_sum_u32_1D; -mod reduce_sum_u32_2D_default; -mod reduce_sum_u32_2D_keepdims; -mod reduce_sum_u32_2D_axis_1; -mod exp_fp16x16; -mod exp_fp8x23; -mod exp_i32_fp8x23; -mod exp_i32_fp16x16; -mod exp_i8_fp8x23; -mod exp_i8_fp16x16; -mod exp_u32_fp8x23; -mod exp_u32_fp16x16; -mod equal_fp16x16; -mod equal_fp16x16_broadcast; -mod equal_fp8x23; -mod equal_fp8x23_broadcast; -mod equal_i32; -mod equal_i32_broadcast; -mod equal_i8; -mod equal_i8_broadcast; -mod equal_u32; -mod equal_u32_broadcast; -mod greater_fp16x16; -mod greater_fp16x16_broadcast; -mod greater_fp8x23; -mod greater_fp8x23_broadcast; -mod greater_i32; -mod greater_i32_broadcast; -mod greater_i8; -mod greater_i8_broadcast; -mod greater_u32; -mod greater_u32_broadcast; -mod less_equal_fp16x16; -mod less_equal_fp16x16_broadcast; -mod less_equal_fp8x23; -mod less_equal_fp8x23_broadcast; -mod less_equal_i32; -mod less_equal_i32_broadcast; -mod less_equal_i8; -mod less_equal_i8_broadcast; -mod less_equal_u32; -mod less_equal_u32_broadcast; -mod sqrt_fp16x16; -mod sqrt_fp8x23; -mod sqrt_i32_fp8x23; -mod sqrt_i32_fp16x16; -mod sqrt_i8_fp8x23; -mod sqrt_i8_fp16x16; -mod sqrt_u32_fp8x23; -mod sqrt_u32_fp16x16; -mod or_fp16x16; -mod or_fp16x16_broadcast; -mod or_fp8x23; -mod or_fp8x23_broadcast; -mod or_i32; -mod or_i32_broadcast; -mod or_i8; -mod or_i8_broadcast; -mod or_u32; -mod or_u32_broadcast; -mod xor_fp16x16; -mod xor_fp16x16_broadcast; -mod xor_fp8x23; -mod xor_fp8x23_broadcast; -mod xor_i32; -mod xor_i32_broadcast; -mod xor_i8; -mod xor_i8_broadcast; -mod xor_u32; -mod xor_u32_broadcast; -mod matmul_fp16x16_1d; -mod matmul_fp16x16_2x2; -mod matmul_fp16x16_2x1; -mod matmul_fp16x16_1x2; -mod matmul_fp8x23_1d; -mod matmul_fp8x23_2x2; -mod matmul_fp8x23_2x1; -mod matmul_fp8x23_1x2; -mod matmul_i32_1d; -mod matmul_i32_2x2; -mod matmul_i32_2x1; -mod matmul_i32_1x2; -mod matmul_i8_1d; -mod matmul_i8_2x2; -mod matmul_i8_2x1; -mod matmul_i8_1x2; -mod matmul_u32_1d; -mod matmul_u32_2x2; -mod matmul_u32_2x1; -mod matmul_u32_1x2; -mod acosh_fp16x16; -mod acosh_fp8x23; -mod acosh_i32_fp8x23; -mod acosh_i32_fp16x16; -mod acosh_i8_fp8x23; -mod acosh_i8_fp16x16; -mod acosh_u32_fp8x23; -mod acosh_u32_fp16x16; -mod asinh_fp16x16; -mod asinh_fp8x23; -mod asinh_i32_fp8x23; -mod asinh_i32_fp16x16; -mod asinh_i8_fp8x23; -mod asinh_i8_fp16x16; -mod asinh_u32_fp8x23; -mod asinh_u32_fp16x16; -mod add_fp16x16; -mod add_fp16x16_broadcast; -mod add_fp8x23; -mod add_fp8x23_broadcast; -mod add_i32; -mod add_i32_broadcast; -mod add_i8; -mod add_i8_broadcast; -mod add_u32; -mod add_u32_broadcast; -mod sub_fp16x16; -mod sub_fp16x16_broadcast; -mod sub_fp8x23; -mod sub_fp8x23_broadcast; -mod sub_i32; -mod sub_i32_broadcast; -mod sub_i8; -mod sub_i8_broadcast; -mod sub_u32; -mod sub_u32_broadcast; -mod mul_fp16x16; -mod mul_fp16x16_broadcast; -mod mul_fp8x23; -mod mul_fp8x23_broadcast; -mod mul_i32; -mod mul_i32_broadcast; -mod mul_i8; -mod mul_i8_broadcast; -mod mul_u32; -mod mul_u32_broadcast; -mod div_fp16x16; -mod div_fp16x16_broadcast; -mod div_fp8x23; -mod div_fp8x23_broadcast; -mod div_i32; -mod div_i32_broadcast; -mod div_i8; -mod div_i8_broadcast; -mod div_u32; -mod div_u32_broadcast; -mod leaky_relu_fp16x16; -mod leaky_relu_fp8x23; -mod leaky_relu_i32_fp8x23; -mod leaky_relu_i32_fp16x16; -mod leaky_relu_i8_fp8x23; -mod leaky_relu_i8_fp16x16; -mod linear_fp16x16; -mod linear_fp8x23; -mod linear_i32; -mod linear_i8; -mod linear_u32; -mod logsoftmax_fp16x16_axis_0; -mod logsoftmax_fp16x16_axis_1; -mod logsoftmax_fp8x23_axis_0; -mod logsoftmax_fp8x23_axis_1; -mod logsoftmax_i32_fp8x23_axis_0; -mod logsoftmax_i32_fp8x23_axis_1; -mod logsoftmax_i32_fp16x16_axis_0; -mod logsoftmax_i32_fp16x16_axis_1; -mod logsoftmax_i8_fp8x23_axis_0; -mod logsoftmax_i8_fp8x23_axis_1; -mod logsoftmax_i8_fp16x16_axis_0; -mod logsoftmax_i8_fp16x16_axis_1; -mod logsoftmax_u32_fp8x23_axis_0; -mod logsoftmax_u32_fp8x23_axis_1; -mod logsoftmax_u32_fp16x16_axis_0; -mod logsoftmax_u32_fp16x16_axis_1; -mod relu_fp16x16; -mod relu_fp8x23; -mod relu_i32; -mod relu_i8; -mod sigmoid_fp8x23; -mod sigmoid_fp16x16; -mod sigmoid_i32_fp8x23; -mod sigmoid_i32_fp16x16; -mod sigmoid_i8_fp8x23; -mod sigmoid_i8_fp16x16; -mod sigmoid_u32_fp8x23; -mod sigmoid_u32_fp16x16; -mod softmax_fp8x23; -mod softmax_fp16x16; -mod softmax_i32_fp8x23; -mod softmax_i32_fp16x16; -mod softmax_i8_fp8x23; -mod softmax_i8_fp16x16; -mod softmax_u32_fp8x23; -mod softmax_u32_fp16x16; -mod softplus_fp8x23; -mod softplus_fp16x16; -mod softplus_i32_fp8x23; -mod softplus_i32_fp16x16; -mod softplus_i8_fp8x23; -mod softplus_i8_fp16x16; -mod softplus_u32_fp8x23; -mod softplus_u32_fp16x16; -mod softsign_fp8x23; -mod softsign_fp16x16; -mod softsign_i32_fp8x23; -mod softsign_i32_fp16x16; -mod softsign_i8_fp8x23; -mod softsign_i8_fp16x16; -mod softsign_u32_fp8x23; -mod softsign_u32_fp16x16; -mod sin_fp16x16; -mod sin_fp8x23; -mod sin_i32_fp8x23; -mod sin_i32_fp16x16; -mod sin_i8_fp8x23; -mod sin_i8_fp16x16; -mod sin_u32_fp8x23; -mod sin_u32_fp16x16; -mod concat_fp16x16_1d; -mod concat_fp16x16_2d; -mod concat_fp16x16_3d_default; -mod concat_fp16x16_3d_axis_1; -mod concat_fp16x16_3d_axis_2; -mod concat_fp16x16_3d_three_tensors_axis_1; -mod concat_fp16x16_3d_three_tensors_axis_2; -mod concat_fp8x23_1d; -mod concat_fp8x23_2d; -mod concat_fp8x23_3d_default; -mod concat_fp8x23_3d_axis_1; -mod concat_fp8x23_3d_axis_2; -mod concat_fp8x23_3d_three_tensors_axis_1; -mod concat_fp8x23_3d_three_tensors_axis_2; -mod concat_i32_1d; -mod concat_i32_2d; -mod concat_i32_3d_default; -mod concat_i32_3d_axis_1; -mod concat_i32_3d_axis_2; -mod concat_i32_3d_three_tensors_axis_1; -mod concat_i32_3d_three_tensors_axis_2; -mod concat_u32_1d; -mod concat_u32_2d; -mod concat_u32_3d_default; -mod concat_u32_3d_axis_1; -mod concat_u32_3d_axis_2; -mod concat_u32_3d_three_tensors_axis_1; -mod concat_u32_3d_three_tensors_axis_2; diff --git a/src/tests/nodes/abs_fp16x16.cairo b/src/tests/nodes/abs_fp16x16.cairo deleted file mode 100644 index 7070a8862..000000000 --- a/src/tests/nodes/abs_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_abs_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.abs(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo deleted file mode 100644 index 761c33202..000000000 --- a/src/tests/nodes/abs_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: true }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 7536640, sign: true }); - data.append(FP16x16 { mag: 7929856, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo deleted file mode 100644 index 419e63a5f..000000000 --- a/src/tests/nodes/abs_fp16x16/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 7536640, sign: false }); - data.append(FP16x16 { mag: 7929856, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} diff --git a/src/tests/nodes/abs_fp8x23.cairo b/src/tests/nodes/abs_fp8x23.cairo deleted file mode 100644 index 0256aff33..000000000 --- a/src/tests/nodes/abs_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_abs_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.abs(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo deleted file mode 100644 index d44bcc906..000000000 --- a/src/tests/nodes/abs_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 788529152, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo deleted file mode 100644 index 8b32cd208..000000000 --- a/src/tests/nodes/abs_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 788529152, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32.cairo b/src/tests/nodes/abs_i32.cairo deleted file mode 100644 index 3b3660668..000000000 --- a/src/tests/nodes/abs_i32.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ - Tensor_i32_fp8x23, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_abs_i32() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.abs(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo deleted file mode 100644 index 8b7409509..000000000 --- a/src/tests/nodes/abs_i32/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 101, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo deleted file mode 100644 index beb6167a5..000000000 --- a/src/tests/nodes/abs_i32/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 101, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} diff --git a/src/tests/nodes/abs_i8.cairo b/src/tests/nodes/abs_i8.cairo deleted file mode 100644 index 411d404ac..000000000 --- a/src/tests/nodes/abs_i8.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_abs_i8() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.abs(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo deleted file mode 100644 index b033927c7..000000000 --- a/src/tests/nodes/abs_i8/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 41, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo deleted file mode 100644 index 10779ddb3..000000000 --- a/src/tests/nodes/abs_i8/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 41, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16.cairo b/src/tests/nodes/acos_fp16x16.cairo deleted file mode 100644 index 4ecfa9f22..000000000 --- a/src/tests/nodes/acos_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acos_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acos(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo deleted file mode 100644 index 27ee8b248..000000000 --- a/src/tests/nodes/acos_fp16x16/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57673, sign: false }); - data.append(FP16x16 { mag: 46735, sign: false }); - data.append(FP16x16 { mag: 47892, sign: false }); - data.append(FP16x16 { mag: 52526, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo deleted file mode 100644 index ba8b241e3..000000000 --- a/src/tests/nodes/acos_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 32432, sign: false }); - data.append(FP16x16 { mag: 50911, sign: false }); - data.append(FP16x16 { mag: 49239, sign: false }); - data.append(FP16x16 { mag: 42008, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23.cairo b/src/tests/nodes/acos_fp8x23.cairo deleted file mode 100644 index 96893b374..000000000 --- a/src/tests/nodes/acos_fp8x23.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use core::traits::Into; -use core::array::SpanTrait; -use debug::PrintTrait; -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acos_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acos(); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo deleted file mode 100644 index db8531bb1..000000000 --- a/src/tests/nodes/acos_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 3385979, sign: true }); - data.append(FP8x23 { mag: 6224397, sign: false }); - data.append(FP8x23 { mag: 190013, sign: true }); - data.append(FP8x23 { mag: 8257919, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo deleted file mode 100644 index 3ec1d287c..000000000 --- a/src/tests/nodes/acos_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16662195, sign: false }); - data.append(FP8x23 { mag: 6163433, sign: false }); - data.append(FP8x23 { mag: 13366824, sign: false }); - data.append(FP8x23 { mag: 24870922, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16.cairo b/src/tests/nodes/acosh_fp16x16.cairo deleted file mode 100644 index b7a438965..000000000 --- a/src/tests/nodes/acosh_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo deleted file mode 100644 index 005c79368..000000000 --- a/src/tests/nodes/acosh_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 141514, sign: false }); - data.append(FP16x16 { mag: 155360, sign: false }); - data.append(FP16x16 { mag: 119042, sign: false }); - data.append(FP16x16 { mag: 312767, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo deleted file mode 100644 index ebf93bb2d..000000000 --- a/src/tests/nodes/acosh_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 92040, sign: false }); - data.append(FP16x16 { mag: 98861, sign: false }); - data.append(FP16x16 { mag: 78893, sign: false }); - data.append(FP16x16 { mag: 147118, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23.cairo b/src/tests/nodes/acosh_fp8x23.cairo deleted file mode 100644 index 35a44a30f..000000000 --- a/src/tests/nodes/acosh_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo deleted file mode 100644 index 98f3cfe10..000000000 --- a/src/tests/nodes/acosh_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9774601, sign: false }); - data.append(FP8x23 { mag: 29725534, sign: false }); - data.append(FP8x23 { mag: 20607627, sign: false }); - data.append(FP8x23 { mag: 39982645, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo deleted file mode 100644 index fbcb11487..000000000 --- a/src/tests/nodes/acosh_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4758107, sign: false }); - data.append(FP8x23 { mag: 16255001, sign: false }); - data.append(FP8x23 { mag: 12982783, sign: false }); - data.append(FP8x23 { mag: 18820070, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16.cairo b/src/tests/nodes/acosh_i32_fp16x16.cairo deleted file mode 100644 index 323841edc..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_acosh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 7cd6ec7b2..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 384956057..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 135229, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23.cairo b/src/tests/nodes/acosh_i32_fp8x23.cairo deleted file mode 100644 index 5bdc98f9e..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo deleted file mode 100644 index e644620a9..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo deleted file mode 100644 index e4a7a362c..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 14786995, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16.cairo b/src/tests/nodes/acosh_i8_fp16x16.cairo deleted file mode 100644 index 15921d2b4..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 84c25957a..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 01cef149c..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23.cairo b/src/tests/nodes/acosh_i8_fp8x23.cairo deleted file mode 100644 index 6695da49d..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo deleted file mode 100644 index 120099750..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo deleted file mode 100644 index 5fd33378f..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786560, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 17301504, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16.cairo b/src/tests/nodes/acosh_u32_fp16x16.cairo deleted file mode 100644 index 6c920968b..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo deleted file mode 100644 index a1d34cbd9..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo deleted file mode 100644 index a57fc637b..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 135229, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23.cairo b/src/tests/nodes/acosh_u32_fp8x23.cairo deleted file mode 100644 index e06ad030f..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_acosh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo deleted file mode 100644 index 8af2f99c6..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(2); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo deleted file mode 100644 index de43f374c..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo deleted file mode 100644 index 9685475e7..000000000 --- a/src/tests/nodes/add_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo deleted file mode 100644 index 1ccbb06cf..000000000 --- a/src/tests/nodes/add_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo deleted file mode 100644 index 4f4448274..000000000 --- a/src/tests/nodes/add_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo deleted file mode 100644 index 3b95a46c0..000000000 --- a/src/tests/nodes/add_fp16x16/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 327680, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 327680, sign: true }); - data.append(FP16x16 { mag: 327680, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo deleted file mode 100644 index 244febbc4..000000000 --- a/src/tests/nodes/add_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 28a653686..000000000 --- a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 044239d81..000000000 --- a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 1ddfac80a..000000000 --- a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo deleted file mode 100644 index f3c6f8c37..000000000 --- a/src/tests/nodes/add_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo deleted file mode 100644 index 71a56b601..000000000 --- a/src/tests/nodes/add_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo deleted file mode 100644 index 141f869ff..000000000 --- a/src/tests/nodes/add_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo deleted file mode 100644 index 88c282e5e..000000000 --- a/src/tests/nodes/add_fp8x23/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo deleted file mode 100644 index 642422627..000000000 --- a/src/tests/nodes/add_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 1a1806b60..000000000 --- a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 195bbb66a..000000000 --- a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index eb3d29705..000000000 --- a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32.cairo b/src/tests/nodes/add_i32.cairo deleted file mode 100644 index 7ac3e7c1f..000000000 --- a/src/tests/nodes/add_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo deleted file mode 100644 index 7296175ff..000000000 --- a/src/tests/nodes/add_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo deleted file mode 100644 index 583908a5f..000000000 --- a/src/tests/nodes/add_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo deleted file mode 100644 index d2288e1d6..000000000 --- a/src/tests/nodes/add_i32/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast.cairo b/src/tests/nodes/add_i32_broadcast.cairo deleted file mode 100644 index cfe007309..000000000 --- a/src/tests/nodes/add_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo deleted file mode 100644 index 448346ee1..000000000 --- a/src/tests/nodes/add_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo deleted file mode 100644 index db807b285..000000000 --- a/src/tests/nodes/add_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo deleted file mode 100644 index 118ef7d34..000000000 --- a/src/tests/nodes/add_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 6, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8.cairo b/src/tests/nodes/add_i8.cairo deleted file mode 100644 index fa7dbd131..000000000 --- a/src/tests/nodes/add_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo deleted file mode 100644 index c45ae21f4..000000000 --- a/src/tests/nodes/add_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo deleted file mode 100644 index a66c7dc7a..000000000 --- a/src/tests/nodes/add_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo deleted file mode 100644 index c83eef625..000000000 --- a/src/tests/nodes/add_i8/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast.cairo b/src/tests/nodes/add_i8_broadcast.cairo deleted file mode 100644 index 156c401f7..000000000 --- a/src/tests/nodes/add_i8_broadcast.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} - diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo deleted file mode 100644 index 72363ac41..000000000 --- a/src/tests/nodes/add_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo deleted file mode 100644 index 2a3d1a042..000000000 --- a/src/tests/nodes/add_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo deleted file mode 100644 index 1e90591b9..000000000 --- a/src/tests/nodes/add_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32.cairo b/src/tests/nodes/add_u32.cairo deleted file mode 100644 index 195a158ea..000000000 --- a/src/tests/nodes/add_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo deleted file mode 100644 index c9667084d..000000000 --- a/src/tests/nodes/add_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - data.append(0); - data.append(2); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(0); - data.append(2); - data.append(0); - data.append(2); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo deleted file mode 100644 index f6cc717db..000000000 --- a/src/tests/nodes/add_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(2); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(2); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo deleted file mode 100644 index ac5a7d75e..000000000 --- a/src/tests/nodes/add_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(4); - data.append(3); - data.append(2); - data.append(3); - data.append(2); - data.append(2); - data.append(4); - data.append(2); - data.append(2); - data.append(3); - data.append(3); - data.append(2); - data.append(0); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(3); - data.append(2); - data.append(3); - data.append(1); - data.append(2); - data.append(1); - data.append(3); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast.cairo b/src/tests/nodes/add_u32_broadcast.cairo deleted file mode 100644 index 24752ac2b..000000000 --- a/src/tests/nodes/add_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_add_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 + input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo deleted file mode 100644 index e8d081cb8..000000000 --- a/src/tests/nodes/add_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(2); - data.append(0); - data.append(1); - data.append(2); - data.append(1); - data.append(0); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(2); - data.append(2); - data.append(0); - data.append(0); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo deleted file mode 100644 index 868ed9207..000000000 --- a/src/tests/nodes/add_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo deleted file mode 100644 index fbfbe85c8..000000000 --- a/src/tests/nodes/add_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(3); - data.append(2); - data.append(3); - data.append(4); - data.append(3); - data.append(2); - data.append(4); - data.append(3); - data.append(2); - data.append(2); - data.append(4); - data.append(3); - data.append(2); - data.append(2); - data.append(3); - data.append(3); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(4); - data.append(4); - data.append(2); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default.cairo b/src/tests/nodes/argmax_fp16x16_1D_default.cairo deleted file mode 100644 index 2ee539d03..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo deleted file mode 100644 index b8d5ccebc..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8257536, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo deleted file mode 100644 index 53df6c3ee..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo deleted file mode 100644 index fd1fda8b9..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 6684672, sign: true }); - data.append(FP16x16 { mag: 7733248, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo deleted file mode 100644 index c7778b918..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo deleted file mode 100644 index afcbaebb6..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default.cairo b/src/tests/nodes/argmax_fp16x16_2D_default.cairo deleted file mode 100644 index aba188ce4..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo deleted file mode 100644 index b2089a0b8..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6422528, sign: true }); - data.append(FP16x16 { mag: 5373952, sign: true }); - data.append(FP16x16 { mag: 3473408, sign: true }); - data.append(FP16x16 { mag: 5505024, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo deleted file mode 100644 index d861d39b2..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 319ff8005..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: true }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: true }); - data.append(FP16x16 { mag: 7340032, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 8f134e3c8..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo deleted file mode 100644 index 15fc8f60f..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo deleted file mode 100644 index c37c8a7a4..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8126464, sign: true }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 6619136, sign: false }); - data.append(FP16x16 { mag: 6488064, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default.cairo b/src/tests/nodes/argmax_fp16x16_3D_default.cairo deleted file mode 100644 index 29b26d7c8..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo deleted file mode 100644 index 04e2bab8a..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7143424, sign: false }); - data.append(FP16x16 { mag: 7471104, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: true }); - data.append(FP16x16 { mag: 3145728, sign: true }); - data.append(FP16x16 { mag: 4521984, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo deleted file mode 100644 index 136e09853..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo deleted file mode 100644 index ae376eb62..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 295a3e6ca..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: true }); - data.append(FP16x16 { mag: 7274496, sign: true }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 6684672, sign: true }); - data.append(FP16x16 { mag: 2818048, sign: true }); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 3407872, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 860fbeac5..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo deleted file mode 100644 index 6874c9c1d..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp16x16_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo deleted file mode 100644 index d9f34e465..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 6750208, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 6160384, sign: true }); - data.append(FP16x16 { mag: 4063232, sign: true }); - data.append(FP16x16 { mag: 3932160, sign: true }); - data.append(FP16x16 { mag: 8257536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo deleted file mode 100644 index 68bc671ca..000000000 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default.cairo b/src/tests/nodes/argmax_fp8x23_1D_default.cairo deleted file mode 100644 index ebeaf8ad5..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo deleted file mode 100644 index 6ec1eec20..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 754974720, sign: true }); - data.append(FP8x23 { mag: 763363328, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo deleted file mode 100644 index 734558e18..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo deleted file mode 100644 index f5745319a..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 4341eba2d..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 989855744, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 0709371b3..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo deleted file mode 100644 index cf87c113c..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo deleted file mode 100644 index c45587f2f..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 1056964608, sign: true }); - data.append(FP8x23 { mag: 109051904, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo deleted file mode 100644 index c850344f8..000000000 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default.cairo b/src/tests/nodes/argmax_fp8x23_2D_default.cairo deleted file mode 100644 index 4d93f88f9..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo deleted file mode 100644 index 31a5c2ac8..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 956301312, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo deleted file mode 100644 index b7e846fe6..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo deleted file mode 100644 index 2cb0142d0..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 09e28cc1e..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 780140544, sign: true }); - data.append(FP8x23 { mag: 897581056, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: true }); - data.append(FP8x23 { mag: 662700032, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 4be933eda..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo deleted file mode 100644 index 568d41665..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo deleted file mode 100644 index b546e99ae..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 503316480, sign: true }); - data.append(FP8x23 { mag: 914358272, sign: false }); - data.append(FP8x23 { mag: 754974720, sign: true }); - data.append(FP8x23 { mag: 696254464, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo deleted file mode 100644 index f1299f304..000000000 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default.cairo b/src/tests/nodes/argmax_fp8x23_3D_default.cairo deleted file mode 100644 index 2acc6df0a..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo deleted file mode 100644 index 2fda70e0e..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1031798784, sign: false }); - data.append(FP8x23 { mag: 687865856, sign: true }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 822083584, sign: true }); - data.append(FP8x23 { mag: 746586112, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo deleted file mode 100644 index f5542d724..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo deleted file mode 100644 index 647d77ee8..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 57a41cf88..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 721420288, sign: true }); - data.append(FP8x23 { mag: 796917760, sign: false }); - data.append(FP8x23 { mag: 1040187392, sign: true }); - data.append(FP8x23 { mag: 109051904, sign: true }); - data.append(FP8x23 { mag: 1056964608, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo deleted file mode 100644 index fc226dcc7..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo deleted file mode 100644 index 1f349a9b0..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_fp8x23_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo deleted file mode 100644 index cb84f459e..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 268435456, sign: true }); - data.append(FP8x23 { mag: 939524096, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: true }); - data.append(FP8x23 { mag: 964689920, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 897581056, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo deleted file mode 100644 index 877bec739..000000000 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default.cairo b/src/tests/nodes/argmax_i32_1D_default.cairo deleted file mode 100644 index 50f3d7612..000000000 --- a/src/tests/nodes/argmax_i32_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo deleted file mode 100644 index bcb89a996..000000000 --- a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo deleted file mode 100644 index d5f560f65..000000000 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 3da193dfd..000000000 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8, sign: true }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 62, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index.cairo b/src/tests/nodes/argmax_i32_1D_last_index.cairo deleted file mode 100644 index e9571136b..000000000 --- a/src/tests/nodes/argmax_i32_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo deleted file mode 100644 index e20ef8d50..000000000 --- a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 243, sign: false }); - data.append(i32 { mag: 101, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default.cairo b/src/tests/nodes/argmax_i32_2D_default.cairo deleted file mode 100644 index 54a81f5f3..000000000 --- a/src/tests/nodes/argmax_i32_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo deleted file mode 100644 index 5450e2ac1..000000000 --- a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 124, sign: true }); - data.append(i32 { mag: 84, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo deleted file mode 100644 index ccb5073f0..000000000 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 9bb6d1e8e..000000000 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 65, sign: true }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 119, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 821960a5c..000000000 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index.cairo b/src/tests/nodes/argmax_i32_2D_last_index.cairo deleted file mode 100644 index 9d16ace4f..000000000 --- a/src/tests/nodes/argmax_i32_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo deleted file mode 100644 index b0090ee48..000000000 --- a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 25, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default.cairo b/src/tests/nodes/argmax_i32_3D_default.cairo deleted file mode 100644 index 7e6174116..000000000 --- a/src/tests/nodes/argmax_i32_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo deleted file mode 100644 index b4114fa43..000000000 --- a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 39, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 63, sign: true }); - data.append(i32 { mag: 95, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo deleted file mode 100644 index e1528e820..000000000 --- a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo deleted file mode 100644 index ac97c59e5..000000000 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo deleted file mode 100644 index d8212af7d..000000000 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 30, sign: true }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 60, sign: true }); - data.append(i32 { mag: 59, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 6e8d900c2..000000000 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index.cairo b/src/tests/nodes/argmax_i32_3D_last_index.cairo deleted file mode 100644 index b42810169..000000000 --- a/src/tests/nodes/argmax_i32_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i32_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo deleted file mode 100644 index 8d77ea9af..000000000 --- a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 21, sign: true }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 12, sign: true }); - data.append(i32 { mag: 77, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo deleted file mode 100644 index 2e3cdb18c..000000000 --- a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default.cairo b/src/tests/nodes/argmax_i8_1D_default.cairo deleted file mode 100644 index 0354b2727..000000000 --- a/src/tests/nodes/argmax_i8_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo deleted file mode 100644 index 815140cd8..000000000 --- a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 58, sign: true }); - data.append(i8 { mag: 52, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo deleted file mode 100644 index a7c78053d..000000000 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo deleted file mode 100644 index c91a2f367..000000000 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 53, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index.cairo b/src/tests/nodes/argmax_i8_1D_last_index.cairo deleted file mode 100644 index 4a971e89e..000000000 --- a/src/tests/nodes/argmax_i8_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo deleted file mode 100644 index 35fce7574..000000000 --- a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 94, sign: true }); - data.append(i8 { mag: 81, sign: true }); - data.append(i8 { mag: 119, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo deleted file mode 100644 index 0e55dcd93..000000000 --- a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default.cairo b/src/tests/nodes/argmax_i8_2D_default.cairo deleted file mode 100644 index 0ad1685af..000000000 --- a/src/tests/nodes/argmax_i8_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo deleted file mode 100644 index 9a3b18bd1..000000000 --- a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 95, sign: true }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 118, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo deleted file mode 100644 index 9184122c0..000000000 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 376497746..000000000 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 80, sign: true }); - data.append(i8 { mag: 111, sign: true }); - data.append(i8 { mag: 47, sign: false }); - data.append(i8 { mag: 71, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 821960a5c..000000000 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index.cairo b/src/tests/nodes/argmax_i8_2D_last_index.cairo deleted file mode 100644 index 8c2cbd142..000000000 --- a/src/tests/nodes/argmax_i8_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo deleted file mode 100644 index c4b6d1fc2..000000000 --- a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 115, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default.cairo b/src/tests/nodes/argmax_i8_3D_default.cairo deleted file mode 100644 index 444cff643..000000000 --- a/src/tests/nodes/argmax_i8_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo deleted file mode 100644 index bf297a055..000000000 --- a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 29, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 61, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo deleted file mode 100644 index 08b7c7ed2..000000000 --- a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo deleted file mode 100644 index 24f540a3a..000000000 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo deleted file mode 100644 index ec1028455..000000000 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 48, sign: false }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 72, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo deleted file mode 100644 index fc5a7363d..000000000 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index.cairo b/src/tests/nodes/argmax_i8_3D_last_index.cairo deleted file mode 100644 index e475e3dbe..000000000 --- a/src/tests/nodes/argmax_i8_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_i8_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo deleted file mode 100644 index c925b67d2..000000000 --- a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 43, sign: true }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 49, sign: false }); - data.append(i8 { mag: 127, sign: true }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 61, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo deleted file mode 100644 index caf59ad27..000000000 --- a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default.cairo b/src/tests/nodes/argmax_u32_1D_default.cairo deleted file mode 100644 index 30680f085..000000000 --- a/src/tests/nodes/argmax_u32_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo deleted file mode 100644 index 751c1095d..000000000 --- a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(99); - data.append(86); - data.append(10); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo deleted file mode 100644 index f7401e8f1..000000000 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 53191c1ce..000000000 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(146); - data.append(163); - data.append(109); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index.cairo b/src/tests/nodes/argmax_u32_1D_last_index.cairo deleted file mode 100644 index f219cb60f..000000000 --- a/src/tests/nodes/argmax_u32_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo deleted file mode 100644 index ad4204066..000000000 --- a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(116); - data.append(115); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default.cairo b/src/tests/nodes/argmax_u32_2D_default.cairo deleted file mode 100644 index 111141d54..000000000 --- a/src/tests/nodes/argmax_u32_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo deleted file mode 100644 index 1598351f9..000000000 --- a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(99); - data.append(74); - data.append(145); - data.append(211); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo deleted file mode 100644 index 8783e76fe..000000000 --- a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo deleted file mode 100644 index 20c8820fe..000000000 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo deleted file mode 100644 index d130d4b1b..000000000 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(68); - data.append(141); - data.append(8); - data.append(59); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 8f134e3c8..000000000 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index.cairo b/src/tests/nodes/argmax_u32_2D_last_index.cairo deleted file mode 100644 index fae12251b..000000000 --- a/src/tests/nodes/argmax_u32_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo deleted file mode 100644 index 9447daab5..000000000 --- a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(194); - data.append(52); - data.append(102); - data.append(202); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo deleted file mode 100644 index 6b2f74d5a..000000000 --- a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default.cairo b/src/tests/nodes/argmax_u32_3D_default.cairo deleted file mode 100644 index c4feebabb..000000000 --- a/src/tests/nodes/argmax_u32_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo deleted file mode 100644 index 3a4b09fd2..000000000 --- a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(205); - data.append(21); - data.append(93); - data.append(199); - data.append(44); - data.append(76); - data.append(60); - data.append(73); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo deleted file mode 100644 index 136e09853..000000000 --- a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo deleted file mode 100644 index 57491a40e..000000000 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 14fd03bf5..000000000 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(126); - data.append(36); - data.append(190); - data.append(190); - data.append(114); - data.append(158); - data.append(103); - data.append(89); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 5d845ddb5..000000000 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index.cairo b/src/tests/nodes/argmax_u32_3D_last_index.cairo deleted file mode 100644 index 93e274004..000000000 --- a/src/tests/nodes/argmax_u32_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmax_u32_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmax(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo deleted file mode 100644 index be65359d7..000000000 --- a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(238); - data.append(156); - data.append(136); - data.append(146); - data.append(150); - data.append(69); - data.append(43); - data.append(25); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo deleted file mode 100644 index 753c8de31..000000000 --- a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default.cairo b/src/tests/nodes/argmin_fp16x16_1D_default.cairo deleted file mode 100644 index 85c005487..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo deleted file mode 100644 index 2b16cfe23..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7012352, sign: true }); - data.append(FP16x16 { mag: 6029312, sign: false }); - data.append(FP16x16 { mag: 7340032, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo deleted file mode 100644 index 0e55dcd93..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo deleted file mode 100644 index e7d9998d8..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 057c16d02..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 5242880, sign: true }); - data.append(FP16x16 { mag: 2818048, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo deleted file mode 100644 index 424ae1b36..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo deleted file mode 100644 index f93882e41..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 6488064, sign: false }); - data.append(FP16x16 { mag: 7471104, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo deleted file mode 100644 index 0e55dcd93..000000000 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default.cairo b/src/tests/nodes/argmin_fp16x16_2D_default.cairo deleted file mode 100644 index 3a72064da..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo deleted file mode 100644 index 89752ba37..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5898240, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 7208960, sign: false }); - data.append(FP16x16 { mag: 8060928, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo deleted file mode 100644 index ee3b52098..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo deleted file mode 100644 index e248667d1..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6946816, sign: false }); - data.append(FP16x16 { mag: 6029312, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: true }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 821960a5c..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo deleted file mode 100644 index 2fc9cc1b6..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo deleted file mode 100644 index cb4ceef87..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7274496, sign: true }); - data.append(FP16x16 { mag: 1376256, sign: true }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default.cairo b/src/tests/nodes/argmin_fp16x16_3D_default.cairo deleted file mode 100644 index 791adc5d9..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo deleted file mode 100644 index 816accc90..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7995392, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: true }); - data.append(FP16x16 { mag: 5570560, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo deleted file mode 100644 index fe45fc97c..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo deleted file mode 100644 index 66227e308..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo deleted file mode 100644 index bccbc310c..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 5570560, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: true }); - data.append(FP16x16 { mag: 7602176, sign: true }); - data.append(FP16x16 { mag: 5373952, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: true }); - data.append(FP16x16 { mag: 2162688, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 5643a4030..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo deleted file mode 100644 index 9d4fd04e5..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp16x16_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo deleted file mode 100644 index 64507742e..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: false }); - data.append(FP16x16 { mag: 7667712, sign: true }); - data.append(FP16x16 { mag: 6815744, sign: true }); - data.append(FP16x16 { mag: 6488064, sign: true }); - data.append(FP16x16 { mag: 7274496, sign: false }); - data.append(FP16x16 { mag: 6750208, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo deleted file mode 100644 index 753c8de31..000000000 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default.cairo b/src/tests/nodes/argmin_fp8x23_1D_default.cairo deleted file mode 100644 index a85c4dabb..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo deleted file mode 100644 index a316a855b..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 914358272, sign: true }); - data.append(FP8x23 { mag: 570425344, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo deleted file mode 100644 index 734558e18..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo deleted file mode 100644 index 5a6aae05f..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 3852c5aa4..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 360710144, sign: true }); - data.append(FP8x23 { mag: 956301312, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 0709371b3..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo deleted file mode 100644 index c9667ab6d..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo deleted file mode 100644 index 3d4b15ca6..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 805306368, sign: true }); - data.append(FP8x23 { mag: 159383552, sign: true }); - data.append(FP8x23 { mag: 335544320, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo deleted file mode 100644 index 0709371b3..000000000 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default.cairo b/src/tests/nodes/argmin_fp8x23_2D_default.cairo deleted file mode 100644 index a1d3e30f4..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo deleted file mode 100644 index 7a33e65ac..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 125829120, sign: true }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo deleted file mode 100644 index a74486c15..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo deleted file mode 100644 index 36c17e41f..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 0b741cb2d..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 595591168, sign: true }); - data.append(FP8x23 { mag: 922746880, sign: true }); - data.append(FP8x23 { mag: 75497472, sign: true }); - data.append(FP8x23 { mag: 360710144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 689061735..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo deleted file mode 100644 index 0a70312bc..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo deleted file mode 100644 index 465da8805..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 545259520, sign: true }); - data.append(FP8x23 { mag: 763363328, sign: true }); - data.append(FP8x23 { mag: 679477248, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo deleted file mode 100644 index f1299f304..000000000 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default.cairo b/src/tests/nodes/argmin_fp8x23_3D_default.cairo deleted file mode 100644 index 8745d440c..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo deleted file mode 100644 index 1eeb57c4d..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 134217728, sign: true }); - data.append(FP8x23 { mag: 511705088, sign: true }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: true }); - data.append(FP8x23 { mag: 746586112, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: true }); - data.append(FP8x23 { mag: 461373440, sign: true }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo deleted file mode 100644 index d8763819b..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo deleted file mode 100644 index 117574e08..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 1e2e951e4..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: true }); - data.append(FP8x23 { mag: 855638016, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: true }); - data.append(FP8x23 { mag: 209715200, sign: true }); - data.append(FP8x23 { mag: 92274688, sign: true }); - data.append(FP8x23 { mag: 654311424, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo deleted file mode 100644 index fc226dcc7..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo deleted file mode 100644 index 5ea754c34..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_fp8x23_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo deleted file mode 100644 index 6f0ec372b..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: true }); - data.append(FP8x23 { mag: 822083584, sign: false }); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 880803840, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo deleted file mode 100644 index 4aa4de577..000000000 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default.cairo b/src/tests/nodes/argmin_i32_1D_default.cairo deleted file mode 100644 index c66fa16f3..000000000 --- a/src/tests/nodes/argmin_i32_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo deleted file mode 100644 index d8e0dcf0f..000000000 --- a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 10, sign: true }); - data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 18, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo deleted file mode 100644 index 0147a3d7c..000000000 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo deleted file mode 100644 index 9636a0d6b..000000000 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 80, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 0e55dcd93..000000000 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index.cairo b/src/tests/nodes/argmin_i32_1D_last_index.cairo deleted file mode 100644 index a9b869189..000000000 --- a/src/tests/nodes/argmin_i32_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo deleted file mode 100644 index bb2145bfd..000000000 --- a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 201, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 149, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default.cairo b/src/tests/nodes/argmin_i32_2D_default.cairo deleted file mode 100644 index d6d6b873a..000000000 --- a/src/tests/nodes/argmin_i32_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo deleted file mode 100644 index ef5cb411a..000000000 --- a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 64, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 28, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo deleted file mode 100644 index 0a6836f32..000000000 --- a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo deleted file mode 100644 index ea8e70302..000000000 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo deleted file mode 100644 index 72d895f2f..000000000 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 89, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 821960a5c..000000000 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index.cairo b/src/tests/nodes/argmin_i32_2D_last_index.cairo deleted file mode 100644 index 10f4b256f..000000000 --- a/src/tests/nodes/argmin_i32_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo deleted file mode 100644 index 63d5d8713..000000000 --- a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 54, sign: true }); - data.append(i32 { mag: 59, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo deleted file mode 100644 index 8783e76fe..000000000 --- a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default.cairo b/src/tests/nodes/argmin_i32_3D_default.cairo deleted file mode 100644 index 3fd45f9f4..000000000 --- a/src/tests/nodes/argmin_i32_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo deleted file mode 100644 index 90a80274f..000000000 --- a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 40, sign: true }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo deleted file mode 100644 index 50130933c..000000000 --- a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo deleted file mode 100644 index 7416fbd0f..000000000 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 8f6b9a8b1..000000000 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 68, sign: true }); - data.append(i32 { mag: 41, sign: true }); - data.append(i32 { mag: 32, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 860fbeac5..000000000 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index.cairo b/src/tests/nodes/argmin_i32_3D_last_index.cairo deleted file mode 100644 index ce4aecca0..000000000 --- a/src/tests/nodes/argmin_i32_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i32_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo deleted file mode 100644 index 3bea17118..000000000 --- a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo deleted file mode 100644 index c732e39e8..000000000 --- a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default.cairo b/src/tests/nodes/argmin_i8_1D_default.cairo deleted file mode 100644 index 4a4ff4cdf..000000000 --- a/src/tests/nodes/argmin_i8_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo deleted file mode 100644 index fff1574e9..000000000 --- a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 122, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo deleted file mode 100644 index be7059d69..000000000 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo deleted file mode 100644 index de4df70e4..000000000 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 116, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index.cairo b/src/tests/nodes/argmin_i8_1D_last_index.cairo deleted file mode 100644 index 67f46b0ed..000000000 --- a/src/tests/nodes/argmin_i8_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo deleted file mode 100644 index 21e13a88a..000000000 --- a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 48, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default.cairo b/src/tests/nodes/argmin_i8_2D_default.cairo deleted file mode 100644 index 6690d3c6e..000000000 --- a/src/tests/nodes/argmin_i8_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo deleted file mode 100644 index f7487fae0..000000000 --- a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 14, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo deleted file mode 100644 index be7f7de6c..000000000 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo deleted file mode 100644 index cdf00d022..000000000 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 43, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 821960a5c..000000000 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index.cairo b/src/tests/nodes/argmin_i8_2D_last_index.cairo deleted file mode 100644 index 8550cb791..000000000 --- a/src/tests/nodes/argmin_i8_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo deleted file mode 100644 index 58d569c2c..000000000 --- a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 68, sign: true }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 13, sign: false }); - data.append(i8 { mag: 91, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default.cairo b/src/tests/nodes/argmin_i8_3D_default.cairo deleted file mode 100644 index ca990c4fb..000000000 --- a/src/tests/nodes/argmin_i8_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo deleted file mode 100644 index 18494d55b..000000000 --- a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 106, sign: false }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 14, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo deleted file mode 100644 index 753c8de31..000000000 --- a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo deleted file mode 100644 index 7594ecda3..000000000 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 70db0a336..000000000 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 122, sign: true }); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 109, sign: true }); - data.append(i8 { mag: 107, sign: false }); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 78, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 860fbeac5..000000000 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index.cairo b/src/tests/nodes/argmin_i8_3D_last_index.cairo deleted file mode 100644 index dcaffaf8a..000000000 --- a/src/tests/nodes/argmin_i8_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_i8_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo deleted file mode 100644 index dffbe1c88..000000000 --- a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 110, sign: true }); - data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 96, sign: false }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 47, sign: true }); - data.append(i8 { mag: 74, sign: false }); - data.append(i8 { mag: 73, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo deleted file mode 100644 index a4111d63c..000000000 --- a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default.cairo b/src/tests/nodes/argmin_u32_1D_default.cairo deleted file mode 100644 index 1930ca929..000000000 --- a/src/tests/nodes/argmin_u32_1D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_1D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo deleted file mode 100644 index ee3cfbd8c..000000000 --- a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(91); - data.append(218); - data.append(115); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo deleted file mode 100644 index 228325d29..000000000 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_1D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo deleted file mode 100644 index f0b3e0bae..000000000 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(119); - data.append(212); - data.append(167); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo deleted file mode 100644 index 988f810bb..000000000 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index.cairo b/src/tests/nodes/argmin_u32_1D_last_index.cairo deleted file mode 100644 index bd2f4c7d1..000000000 --- a/src/tests/nodes/argmin_u32_1D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_1D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo deleted file mode 100644 index 82699dd3a..000000000 --- a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(235); - data.append(37); - data.append(139); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo deleted file mode 100644 index 49ab81047..000000000 --- a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default.cairo b/src/tests/nodes/argmin_u32_2D_default.cairo deleted file mode 100644 index a90da7654..000000000 --- a/src/tests/nodes/argmin_u32_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo deleted file mode 100644 index f8f5049a4..000000000 --- a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(48); - data.append(65); - data.append(136); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo deleted file mode 100644 index 01918443f..000000000 --- a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo deleted file mode 100644 index 9b8ff3f61..000000000 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_2D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo deleted file mode 100644 index b97b60bf5..000000000 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(119); - data.append(10); - data.append(247); - data.append(85); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo deleted file mode 100644 index 8f134e3c8..000000000 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index.cairo b/src/tests/nodes/argmin_u32_2D_last_index.cairo deleted file mode 100644 index c6ac9d812..000000000 --- a/src/tests/nodes/argmin_u32_2D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_2D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo deleted file mode 100644 index 7af862548..000000000 --- a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(173); - data.append(178); - data.append(94); - data.append(35); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo deleted file mode 100644 index 8783e76fe..000000000 --- a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default.cairo b/src/tests/nodes/argmin_u32_3D_default.cairo deleted file mode 100644 index 65e748c6c..000000000 --- a/src/tests/nodes/argmin_u32_3D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_3D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo deleted file mode 100644 index 120b369f4..000000000 --- a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(137); - data.append(2); - data.append(134); - data.append(142); - data.append(236); - data.append(246); - data.append(96); - data.append(150); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo deleted file mode 100644 index caf59ad27..000000000 --- a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo deleted file mode 100644 index dae2eb375..000000000 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_3D_keepdims_false() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::Some(false), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo deleted file mode 100644 index 66d7bcf5d..000000000 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(136); - data.append(153); - data.append(113); - data.append(185); - data.append(177); - data.append(209); - data.append(38); - data.append(211); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo deleted file mode 100644 index 8a44faccf..000000000 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index.cairo b/src/tests/nodes/argmin_u32_3D_last_index.cairo deleted file mode 100644 index e0cd74fc2..000000000 --- a/src/tests/nodes/argmin_u32_3D_last_index.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_argmin_u32_3D_last_index() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.argmin(0, Option::None(()), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo deleted file mode 100644 index a08deda84..000000000 --- a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(238); - data.append(240); - data.append(209); - data.append(189); - data.append(242); - data.append(56); - data.append(128); - data.append(113); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo deleted file mode 100644 index dbbf113a0..000000000 --- a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16.cairo b/src/tests/nodes/asin_fp16x16.cairo deleted file mode 100644 index 540b32f9d..000000000 --- a/src/tests/nodes/asin_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asin_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo deleted file mode 100644 index 76ca745c2..000000000 --- a/src/tests/nodes/asin_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 39178, sign: true }); - data.append(FP16x16 { mag: 15181, sign: true }); - data.append(FP16x16 { mag: 30205, sign: true }); - data.append(FP16x16 { mag: 13386, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo deleted file mode 100644 index f5dede644..000000000 --- a/src/tests/nodes/asin_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 41993, sign: true }); - data.append(FP16x16 { mag: 15320, sign: true }); - data.append(FP16x16 { mag: 31391, sign: true }); - data.append(FP16x16 { mag: 13480, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23.cairo b/src/tests/nodes/asin_fp8x23.cairo deleted file mode 100644 index ca44a6ac8..000000000 --- a/src/tests/nodes/asin_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asin_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo deleted file mode 100644 index 0bdab3ab9..000000000 --- a/src/tests/nodes/asin_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2340803, sign: true }); - data.append(FP8x23 { mag: 1785691, sign: false }); - data.append(FP8x23 { mag: 1184830, sign: true }); - data.append(FP8x23 { mag: 2276088, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo deleted file mode 100644 index 19443211d..000000000 --- a/src/tests/nodes/asin_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2372298, sign: true }); - data.append(FP8x23 { mag: 1799460, sign: false }); - data.append(FP8x23 { mag: 1188806, sign: true }); - data.append(FP8x23 { mag: 2304984, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16.cairo b/src/tests/nodes/asinh_fp16x16.cairo deleted file mode 100644 index 36bed0dc2..000000000 --- a/src/tests/nodes/asinh_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo deleted file mode 100644 index ca60f8831..000000000 --- a/src/tests/nodes/asinh_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 276699, sign: false }); - data.append(FP16x16 { mag: 249503, sign: false }); - data.append(FP16x16 { mag: 249091, sign: false }); - data.append(FP16x16 { mag: 241997, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo deleted file mode 100644 index cacc8bd6e..000000000 --- a/src/tests/nodes/asinh_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 140720, sign: false }); - data.append(FP16x16 { mag: 134141, sign: false }); - data.append(FP16x16 { mag: 134037, sign: false }); - data.append(FP16x16 { mag: 132207, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23.cairo b/src/tests/nodes/asinh_fp8x23.cairo deleted file mode 100644 index b9f465ff4..000000000 --- a/src/tests/nodes/asinh_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo deleted file mode 100644 index a8f84245f..000000000 --- a/src/tests/nodes/asinh_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33826578, sign: false }); - data.append(FP8x23 { mag: 11114336, sign: false }); - data.append(FP8x23 { mag: 28274183, sign: false }); - data.append(FP8x23 { mag: 11950034, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo deleted file mode 100644 index e56a3bb72..000000000 --- a/src/tests/nodes/asinh_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17637476, sign: false }); - data.append(FP8x23 { mag: 9173457, sign: false }); - data.append(FP8x23 { mag: 16186111, sign: false }); - data.append(FP8x23 { mag: 9665119, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16.cairo b/src/tests/nodes/asinh_i32_fp16x16.cairo deleted file mode 100644 index 9025d2996..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_asinh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo deleted file mode 100644 index c5ce9a22c..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 4c4a15796..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 119173, sign: false }); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 94610, sign: false }); - data.append(FP16x16 { mag: 57761, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23.cairo b/src/tests/nodes/asinh_i32_fp8x23.cairo deleted file mode 100644 index 7f21e2004..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 81b751d80..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 8c74651fd..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12110092, sign: false }); - data.append(FP8x23 { mag: 7393497, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - data.append(FP8x23 { mag: 15254234, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16.cairo b/src/tests/nodes/asinh_i8_fp16x16.cairo deleted file mode 100644 index ad978b521..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 696018232..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo deleted file mode 100644 index e46358617..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 94610, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23.cairo b/src/tests/nodes/asinh_i8_fp8x23.cairo deleted file mode 100644 index a15086cea..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo deleted file mode 100644 index e06af2b23..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo deleted file mode 100644 index 41bd781e5..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7393280, sign: false }); - data.append(FP8x23 { mag: 17563648, sign: false }); - data.append(FP8x23 { mag: 12107776, sign: false }); - data.append(FP8x23 { mag: 17563648, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16.cairo b/src/tests/nodes/asinh_u32_fp16x16.cairo deleted file mode 100644 index 92219cdf7..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 8ade59660..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(3); - data.append(4); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo deleted file mode 100644 index b865e729b..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 119173, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23.cairo b/src/tests/nodes/asinh_u32_fp8x23.cairo deleted file mode 100644 index 7c093315b..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_asinh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo deleted file mode 100644 index a9333ac0e..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(4); - data.append(1); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo deleted file mode 100644 index d30f3b3b7..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15254234, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - data.append(FP8x23 { mag: 7393497, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16.cairo b/src/tests/nodes/atan_fp16x16.cairo deleted file mode 100644 index 0358ce989..000000000 --- a/src/tests/nodes/atan_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo deleted file mode 100644 index 6ba5a0e89..000000000 --- a/src/tests/nodes/atan_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7774631, sign: false }); - data.append(FP16x16 { mag: 6318193, sign: false }); - data.append(FP16x16 { mag: 90137, sign: true }); - data.append(FP16x16 { mag: 3857711, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo deleted file mode 100644 index 5b58b25b4..000000000 --- a/src/tests/nodes/atan_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102391, sign: false }); - data.append(FP16x16 { mag: 102263, sign: false }); - data.append(FP16x16 { mag: 61743, sign: true }); - data.append(FP16x16 { mag: 101830, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23.cairo b/src/tests/nodes/atan_fp8x23.cairo deleted file mode 100644 index effbbcd7d..000000000 --- a/src/tests/nodes/atan_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo deleted file mode 100644 index 91041d0b5..000000000 --- a/src/tests/nodes/atan_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 912484668, sign: false }); - data.append(FP8x23 { mag: 261874397, sign: false }); - data.append(FP8x23 { mag: 35394242, sign: true }); - data.append(FP8x23 { mag: 977878458, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo deleted file mode 100644 index 041b138d5..000000000 --- a/src/tests/nodes/atan_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13099679, sign: false }); - data.append(FP8x23 { mag: 12908174, sign: false }); - data.append(FP8x23 { mag: 11224672, sign: true }); - data.append(FP8x23 { mag: 13104835, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16.cairo b/src/tests/nodes/atan_i32_fp16x16.cairo deleted file mode 100644 index f083336a9..000000000 --- a/src/tests/nodes/atan_i32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo deleted file mode 100644 index 834233def..000000000 --- a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 48, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo deleted file mode 100644 index 8269f606e..000000000 --- a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102358, sign: false }); - data.append(FP16x16 { mag: 102378, sign: false }); - data.append(FP16x16 { mag: 98270, sign: false }); - data.append(FP16x16 { mag: 101578, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23.cairo b/src/tests/nodes/atan_i32_fp8x23.cairo deleted file mode 100644 index 1b367d133..000000000 --- a/src/tests/nodes/atan_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo deleted file mode 100644 index 92e901428..000000000 --- a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 108, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 120, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo deleted file mode 100644 index da7c6cecb..000000000 --- a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11121764, sign: false }); - data.append(FP8x23 { mag: 13099124, sign: false }); - data.append(FP8x23 { mag: 13081473, sign: false }); - data.append(FP8x23 { mag: 13106891, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16.cairo b/src/tests/nodes/atan_i8_fp16x16.cairo deleted file mode 100644 index 100445960..000000000 --- a/src/tests/nodes/atan_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo deleted file mode 100644 index c4a348698..000000000 --- a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 40, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo deleted file mode 100644 index 9e92ca3ac..000000000 --- a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102373, sign: false }); - data.append(FP16x16 { mag: 101658, sign: false }); - data.append(FP16x16 { mag: 102134, sign: false }); - data.append(FP16x16 { mag: 101305, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23.cairo b/src/tests/nodes/atan_i8_fp8x23.cairo deleted file mode 100644 index 9785f3c1b..000000000 --- a/src/tests/nodes/atan_i8_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo deleted file mode 100644 index 08f4eb156..000000000 --- a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 10, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo deleted file mode 100644 index 8d906b5bd..000000000 --- a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12247040, sign: true }); - data.append(FP8x23 { mag: 12337152, sign: true }); - data.append(FP8x23 { mag: 12247040, sign: true }); - data.append(FP8x23 { mag: 10477568, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16.cairo b/src/tests/nodes/atan_u32_fp16x16.cairo deleted file mode 100644 index 3ebe6be46..000000000 --- a/src/tests/nodes/atan_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo deleted file mode 100644 index 6d592527a..000000000 --- a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(92); - data.append(11); - data.append(66); - data.append(123); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo deleted file mode 100644 index 672eb4a25..000000000 --- a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102231, sign: false }); - data.append(FP16x16 { mag: 97002, sign: false }); - data.append(FP16x16 { mag: 101950, sign: false }); - data.append(FP16x16 { mag: 102410, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23.cairo b/src/tests/nodes/atan_u32_fp8x23.cairo deleted file mode 100644 index a82ac8aad..000000000 --- a/src/tests/nodes/atan_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo deleted file mode 100644 index 57abc0486..000000000 --- a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(102); - data.append(114); - data.append(119); - data.append(93); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo deleted file mode 100644 index 6b518d0c7..000000000 --- a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13094556, sign: false }); - data.append(FP8x23 { mag: 13103212, sign: false }); - data.append(FP8x23 { mag: 13106303, sign: false }); - data.append(FP8x23 { mag: 13086598, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16.cairo b/src/tests/nodes/ceil_fp16x16.cairo deleted file mode 100644 index b12288825..000000000 --- a/src/tests/nodes/ceil_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_ceil_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.ceil(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo deleted file mode 100644 index 8e747d175..000000000 --- a/src/tests/nodes/ceil_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 23485, sign: false }); - data.append(FP16x16 { mag: 36237, sign: true }); - data.append(FP16x16 { mag: 31610, sign: false }); - data.append(FP16x16 { mag: 1040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo deleted file mode 100644 index b5432c0f4..000000000 --- a/src/tests/nodes/ceil_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23.cairo b/src/tests/nodes/ceil_fp8x23.cairo deleted file mode 100644 index 528ede834..000000000 --- a/src/tests/nodes/ceil_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_ceil_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.ceil(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo deleted file mode 100644 index 26ea14210..000000000 --- a/src/tests/nodes/ceil_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4332983, sign: true }); - data.append(FP8x23 { mag: 5907229, sign: true }); - data.append(FP8x23 { mag: 7324851, sign: false }); - data.append(FP8x23 { mag: 1964182, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo deleted file mode 100644 index 3117516ad..000000000 --- a/src/tests/nodes/ceil_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo deleted file mode 100644 index e6f2a16b4..000000000 --- a/src/tests/nodes/concat_fp16x16_1d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo deleted file mode 100644 index 27600d35a..000000000 --- a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo deleted file mode 100644 index 2d9d56a63..000000000 --- a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo deleted file mode 100644 index 2a8d6de98..000000000 --- a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo deleted file mode 100644 index 9980d3c0a..000000000 --- a/src/tests/nodes/concat_fp16x16_2d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_2d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo deleted file mode 100644 index 67df4256d..000000000 --- a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo deleted file mode 100644 index fdc0177bd..000000000 --- a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo deleted file mode 100644 index fd5a92c68..000000000 --- a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(4); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo deleted file mode 100644 index ad002ea58..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_3d_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo deleted file mode 100644 index 417a9dacf..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo deleted file mode 100644 index af99a4d3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo deleted file mode 100644 index a7293eb55..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo +++ /dev/null @@ -1,73 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(6); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo deleted file mode 100644 index 774acaeaa..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_3d_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo deleted file mode 100644 index 417a9dacf..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo deleted file mode 100644 index af99a4d3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo deleted file mode 100644 index d25c61cef..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo +++ /dev/null @@ -1,73 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo deleted file mode 100644 index 9a34dfd87..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_default.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_3d_default() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo deleted file mode 100644 index 417a9dacf..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo deleted file mode 100644 index af99a4d3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo deleted file mode 100644 index 04afb32ae..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo +++ /dev/null @@ -1,73 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo deleted file mode 100644 index 529dbab65..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_3d_three_tensors_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo deleted file mode 100644 index 417a9dacf..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo deleted file mode 100644 index af99a4d3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo deleted file mode 100644 index 3a191bf3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3538944, sign: false }); - data.append(FP16x16 { mag: 3604480, sign: false }); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 3735552, sign: false }); - data.append(FP16x16 { mag: 3801088, sign: false }); - data.append(FP16x16 { mag: 3866624, sign: false }); - data.append(FP16x16 { mag: 3932160, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: false }); - data.append(FP16x16 { mag: 4063232, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4194304, sign: false }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 4325376, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: false }); - data.append(FP16x16 { mag: 4521984, sign: false }); - data.append(FP16x16 { mag: 4587520, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 4718592, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - data.append(FP16x16 { mag: 4849664, sign: false }); - data.append(FP16x16 { mag: 4915200, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: false }); - data.append(FP16x16 { mag: 5177344, sign: false }); - data.append(FP16x16 { mag: 5242880, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo deleted file mode 100644 index e4c972355..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo +++ /dev/null @@ -1,100 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(9); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 3538944, sign: false }); - data.append(FP16x16 { mag: 3604480, sign: false }); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 3735552, sign: false }); - data.append(FP16x16 { mag: 3801088, sign: false }); - data.append(FP16x16 { mag: 3866624, sign: false }); - data.append(FP16x16 { mag: 3932160, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: false }); - data.append(FP16x16 { mag: 4063232, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4194304, sign: false }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 4325376, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: false }); - data.append(FP16x16 { mag: 4521984, sign: false }); - data.append(FP16x16 { mag: 4587520, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - data.append(FP16x16 { mag: 4718592, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - data.append(FP16x16 { mag: 4849664, sign: false }); - data.append(FP16x16 { mag: 4915200, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: false }); - data.append(FP16x16 { mag: 5177344, sign: false }); - data.append(FP16x16 { mag: 5242880, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo deleted file mode 100644 index 2ccbb62bc..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp16x16_3d_three_tensors_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo deleted file mode 100644 index 417a9dacf..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo deleted file mode 100644 index af99a4d3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo deleted file mode 100644 index 3a191bf3a..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3538944, sign: false }); - data.append(FP16x16 { mag: 3604480, sign: false }); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 3735552, sign: false }); - data.append(FP16x16 { mag: 3801088, sign: false }); - data.append(FP16x16 { mag: 3866624, sign: false }); - data.append(FP16x16 { mag: 3932160, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: false }); - data.append(FP16x16 { mag: 4063232, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4194304, sign: false }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 4325376, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: false }); - data.append(FP16x16 { mag: 4521984, sign: false }); - data.append(FP16x16 { mag: 4587520, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 4718592, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - data.append(FP16x16 { mag: 4849664, sign: false }); - data.append(FP16x16 { mag: 4915200, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: false }); - data.append(FP16x16 { mag: 5177344, sign: false }); - data.append(FP16x16 { mag: 5242880, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo deleted file mode 100644 index a73b60b12..000000000 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo +++ /dev/null @@ -1,100 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(9); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 1769472, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 3538944, sign: false }); - data.append(FP16x16 { mag: 3604480, sign: false }); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 1966080, sign: false }); - data.append(FP16x16 { mag: 2031616, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: false }); - data.append(FP16x16 { mag: 3735552, sign: false }); - data.append(FP16x16 { mag: 3801088, sign: false }); - data.append(FP16x16 { mag: 3866624, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 524288, sign: false }); - data.append(FP16x16 { mag: 2162688, sign: false }); - data.append(FP16x16 { mag: 2228224, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 3932160, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: false }); - data.append(FP16x16 { mag: 4063232, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - data.append(FP16x16 { mag: 2359296, sign: false }); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 2490368, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4194304, sign: false }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 851968, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 2555904, sign: false }); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - data.append(FP16x16 { mag: 4325376, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 1048576, sign: false }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 2752512, sign: false }); - data.append(FP16x16 { mag: 2818048, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 4521984, sign: false }); - data.append(FP16x16 { mag: 4587520, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 2949120, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: false }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 4718592, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - data.append(FP16x16 { mag: 4849664, sign: false }); - data.append(FP16x16 { mag: 1376256, sign: false }); - data.append(FP16x16 { mag: 1441792, sign: false }); - data.append(FP16x16 { mag: 1507328, sign: false }); - data.append(FP16x16 { mag: 3145728, sign: false }); - data.append(FP16x16 { mag: 3211264, sign: false }); - data.append(FP16x16 { mag: 3276800, sign: false }); - data.append(FP16x16 { mag: 4915200, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 1572864, sign: false }); - data.append(FP16x16 { mag: 1638400, sign: false }); - data.append(FP16x16 { mag: 1703936, sign: false }); - data.append(FP16x16 { mag: 3342336, sign: false }); - data.append(FP16x16 { mag: 3407872, sign: false }); - data.append(FP16x16 { mag: 3473408, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: false }); - data.append(FP16x16 { mag: 5177344, sign: false }); - data.append(FP16x16 { mag: 5242880, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo deleted file mode 100644 index cfd9d0df9..000000000 --- a/src/tests/nodes/concat_fp8x23_1d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo deleted file mode 100644 index cf36019b6..000000000 --- a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo deleted file mode 100644 index 7625f514c..000000000 --- a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo deleted file mode 100644 index 902420ef1..000000000 --- a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo deleted file mode 100644 index 5ce6c7902..000000000 --- a/src/tests/nodes/concat_fp8x23_2d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_2d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo deleted file mode 100644 index 2477d67f2..000000000 --- a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo deleted file mode 100644 index ff11b21dc..000000000 --- a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo deleted file mode 100644 index bc4aade19..000000000 --- a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(4); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo deleted file mode 100644 index 28b5ae4c9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_3d_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo deleted file mode 100644 index 3d38e6ab9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo deleted file mode 100644 index b6679fdf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo deleted file mode 100644 index 3454dafe8..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo +++ /dev/null @@ -1,72 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(6); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo deleted file mode 100644 index 7e662c0bb..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_3d_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo deleted file mode 100644 index 3d38e6ab9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo deleted file mode 100644 index b6679fdf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo deleted file mode 100644 index e472ddcf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo +++ /dev/null @@ -1,72 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo deleted file mode 100644 index d32913d21..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_default.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_3d_default() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo deleted file mode 100644 index 3d38e6ab9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo deleted file mode 100644 index b6679fdf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo deleted file mode 100644 index 115287e73..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo +++ /dev/null @@ -1,72 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo deleted file mode 100644 index a7e58a46d..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_3d_three_tensors_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo deleted file mode 100644 index 3d38e6ab9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo deleted file mode 100644 index b6679fdf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo deleted file mode 100644 index 05650c299..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 452984832, sign: false }); - data.append(FP8x23 { mag: 461373440, sign: false }); - data.append(FP8x23 { mag: 469762048, sign: false }); - data.append(FP8x23 { mag: 478150656, sign: false }); - data.append(FP8x23 { mag: 486539264, sign: false }); - data.append(FP8x23 { mag: 494927872, sign: false }); - data.append(FP8x23 { mag: 503316480, sign: false }); - data.append(FP8x23 { mag: 511705088, sign: false }); - data.append(FP8x23 { mag: 520093696, sign: false }); - data.append(FP8x23 { mag: 528482304, sign: false }); - data.append(FP8x23 { mag: 536870912, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - data.append(FP8x23 { mag: 562036736, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: false }); - data.append(FP8x23 { mag: 578813952, sign: false }); - data.append(FP8x23 { mag: 587202560, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 620756992, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 654311424, sign: false }); - data.append(FP8x23 { mag: 662700032, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo deleted file mode 100644 index abe1e9f9d..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo +++ /dev/null @@ -1,99 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(9); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 452984832, sign: false }); - data.append(FP8x23 { mag: 461373440, sign: false }); - data.append(FP8x23 { mag: 469762048, sign: false }); - data.append(FP8x23 { mag: 478150656, sign: false }); - data.append(FP8x23 { mag: 486539264, sign: false }); - data.append(FP8x23 { mag: 494927872, sign: false }); - data.append(FP8x23 { mag: 503316480, sign: false }); - data.append(FP8x23 { mag: 511705088, sign: false }); - data.append(FP8x23 { mag: 520093696, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 528482304, sign: false }); - data.append(FP8x23 { mag: 536870912, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - data.append(FP8x23 { mag: 562036736, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: false }); - data.append(FP8x23 { mag: 578813952, sign: false }); - data.append(FP8x23 { mag: 587202560, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 620756992, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 654311424, sign: false }); - data.append(FP8x23 { mag: 662700032, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo deleted file mode 100644 index fa0ac2c8c..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_fp8x23_3d_three_tensors_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo deleted file mode 100644 index 3d38e6ab9..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo deleted file mode 100644 index b6679fdf7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo deleted file mode 100644 index 05650c299..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 452984832, sign: false }); - data.append(FP8x23 { mag: 461373440, sign: false }); - data.append(FP8x23 { mag: 469762048, sign: false }); - data.append(FP8x23 { mag: 478150656, sign: false }); - data.append(FP8x23 { mag: 486539264, sign: false }); - data.append(FP8x23 { mag: 494927872, sign: false }); - data.append(FP8x23 { mag: 503316480, sign: false }); - data.append(FP8x23 { mag: 511705088, sign: false }); - data.append(FP8x23 { mag: 520093696, sign: false }); - data.append(FP8x23 { mag: 528482304, sign: false }); - data.append(FP8x23 { mag: 536870912, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - data.append(FP8x23 { mag: 562036736, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: false }); - data.append(FP8x23 { mag: 578813952, sign: false }); - data.append(FP8x23 { mag: 587202560, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 620756992, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 654311424, sign: false }); - data.append(FP8x23 { mag: 662700032, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo deleted file mode 100644 index 48d6fc0a7..000000000 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo +++ /dev/null @@ -1,99 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(9); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 234881024, sign: false }); - data.append(FP8x23 { mag: 243269632, sign: false }); - data.append(FP8x23 { mag: 452984832, sign: false }); - data.append(FP8x23 { mag: 461373440, sign: false }); - data.append(FP8x23 { mag: 469762048, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 251658240, sign: false }); - data.append(FP8x23 { mag: 260046848, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 478150656, sign: false }); - data.append(FP8x23 { mag: 486539264, sign: false }); - data.append(FP8x23 { mag: 494927872, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 67108864, sign: false }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 285212672, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 503316480, sign: false }); - data.append(FP8x23 { mag: 511705088, sign: false }); - data.append(FP8x23 { mag: 520093696, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: false }); - data.append(FP8x23 { mag: 310378496, sign: false }); - data.append(FP8x23 { mag: 318767104, sign: false }); - data.append(FP8x23 { mag: 528482304, sign: false }); - data.append(FP8x23 { mag: 536870912, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 109051904, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 327155712, sign: false }); - data.append(FP8x23 { mag: 335544320, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - data.append(FP8x23 { mag: 562036736, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 134217728, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 352321536, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: false }); - data.append(FP8x23 { mag: 369098752, sign: false }); - data.append(FP8x23 { mag: 578813952, sign: false }); - data.append(FP8x23 { mag: 587202560, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - data.append(FP8x23 { mag: 394264576, sign: false }); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 620756992, sign: false }); - data.append(FP8x23 { mag: 176160768, sign: false }); - data.append(FP8x23 { mag: 184549376, sign: false }); - data.append(FP8x23 { mag: 192937984, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 419430400, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: false }); - data.append(FP8x23 { mag: 209715200, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: false }); - data.append(FP8x23 { mag: 436207616, sign: false }); - data.append(FP8x23 { mag: 444596224, sign: false }); - data.append(FP8x23 { mag: 654311424, sign: false }); - data.append(FP8x23 { mag: 662700032, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d.cairo b/src/tests/nodes/concat_i32_1d.cairo deleted file mode 100644 index 2f8367b0d..000000000 --- a/src/tests/nodes/concat_i32_1d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo deleted file mode 100644 index 9624df005..000000000 --- a/src/tests/nodes/concat_i32_1d/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo deleted file mode 100644 index f1ecb5589..000000000 --- a/src/tests/nodes/concat_i32_1d/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo deleted file mode 100644 index 02f100bf7..000000000 --- a/src/tests/nodes/concat_i32_1d/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d.cairo b/src/tests/nodes/concat_i32_2d.cairo deleted file mode 100644 index 2543ec4cc..000000000 --- a/src/tests/nodes/concat_i32_2d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_2d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo deleted file mode 100644 index 3e5097679..000000000 --- a/src/tests/nodes/concat_i32_2d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo deleted file mode 100644 index 7b6b525f5..000000000 --- a/src/tests/nodes/concat_i32_2d/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo deleted file mode 100644 index c48e970e5..000000000 --- a/src/tests/nodes/concat_i32_2d/output_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(4); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1.cairo deleted file mode 100644 index d5abf611a..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_1.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_3d_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo deleted file mode 100644 index 61784418d..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo deleted file mode 100644 index 3266738ec..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo deleted file mode 100644 index 58d3e89e6..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(6); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2.cairo b/src/tests/nodes/concat_i32_3d_axis_2.cairo deleted file mode 100644 index 1656922ed..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_3d_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo deleted file mode 100644 index 61784418d..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo deleted file mode 100644 index 3266738ec..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo deleted file mode 100644 index ca65fd4d0..000000000 --- a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default.cairo b/src/tests/nodes/concat_i32_3d_default.cairo deleted file mode 100644 index a6c651e3a..000000000 --- a/src/tests/nodes/concat_i32_3d_default.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_3d_default() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo deleted file mode 100644 index 61784418d..000000000 --- a/src/tests/nodes/concat_i32_3d_default/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo deleted file mode 100644 index 3266738ec..000000000 --- a/src/tests/nodes/concat_i32_3d_default/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo deleted file mode 100644 index e1e094d78..000000000 --- a/src/tests/nodes/concat_i32_3d_default/output_0.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo deleted file mode 100644 index c7a42ba21..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_3d_three_tensors_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo deleted file mode 100644 index 61784418d..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo deleted file mode 100644 index 3266738ec..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo deleted file mode 100644 index dbdd44e79..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 60, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 68, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 74, sign: false }); - data.append(i32 { mag: 75, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 80, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo deleted file mode 100644 index 64d78e35e..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(9); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 60, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 68, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 74, sign: false }); - data.append(i32 { mag: 75, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 80, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo deleted file mode 100644 index 7293314c3..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_i32_3d_three_tensors_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo deleted file mode 100644 index 61784418d..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo deleted file mode 100644 index 3266738ec..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo deleted file mode 100644 index dbdd44e79..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 60, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 68, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 74, sign: false }); - data.append(i32 { mag: 75, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 80, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo deleted file mode 100644 index 0f5b44b6e..000000000 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo +++ /dev/null @@ -1,98 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(9); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 28, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 60, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 68, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 74, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 75, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 53, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 80, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo deleted file mode 100644 index 785a1dbf1..000000000 --- a/src/tests/nodes/concat_u32_1d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo deleted file mode 100644 index f9eb0d735..000000000 --- a/src/tests/nodes/concat_u32_1d/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo deleted file mode 100644 index 33a8a8d3e..000000000 --- a/src/tests/nodes/concat_u32_1d/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo deleted file mode 100644 index 259cbfb62..000000000 --- a/src/tests/nodes/concat_u32_1d/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo deleted file mode 100644 index fa4af1123..000000000 --- a/src/tests/nodes/concat_u32_2d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_2d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo deleted file mode 100644 index e00a217d3..000000000 --- a/src/tests/nodes/concat_u32_2d/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo deleted file mode 100644 index 3ce6b0519..000000000 --- a/src/tests/nodes/concat_u32_2d/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo deleted file mode 100644 index 5a9bb6695..000000000 --- a/src/tests/nodes/concat_u32_2d/output_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(4); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo deleted file mode 100644 index 6d8eddd14..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_3d_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo deleted file mode 100644 index 00c9dd0ea..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo deleted file mode 100644 index 1e959db25..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo deleted file mode 100644 index f14e6cb52..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo +++ /dev/null @@ -1,70 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(6); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo deleted file mode 100644 index ba171a2d9..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_3d_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo deleted file mode 100644 index 00c9dd0ea..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo deleted file mode 100644 index 1e959db25..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo deleted file mode 100644 index 472866a29..000000000 --- a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo +++ /dev/null @@ -1,70 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(6); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(27); - data.append(28); - data.append(29); - data.append(3); - data.append(4); - data.append(5); - data.append(30); - data.append(31); - data.append(32); - data.append(6); - data.append(7); - data.append(8); - data.append(33); - data.append(34); - data.append(35); - data.append(9); - data.append(10); - data.append(11); - data.append(36); - data.append(37); - data.append(38); - data.append(12); - data.append(13); - data.append(14); - data.append(39); - data.append(40); - data.append(41); - data.append(15); - data.append(16); - data.append(17); - data.append(42); - data.append(43); - data.append(44); - data.append(18); - data.append(19); - data.append(20); - data.append(45); - data.append(46); - data.append(47); - data.append(21); - data.append(22); - data.append(23); - data.append(48); - data.append(49); - data.append(50); - data.append(24); - data.append(25); - data.append(26); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo deleted file mode 100644 index e6c8f8317..000000000 --- a/src/tests/nodes/concat_u32_3d_default.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_3d_default() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1].span(), 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo deleted file mode 100644 index 00c9dd0ea..000000000 --- a/src/tests/nodes/concat_u32_3d_default/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo deleted file mode 100644 index 1e959db25..000000000 --- a/src/tests/nodes/concat_u32_3d_default/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo deleted file mode 100644 index d2320f921..000000000 --- a/src/tests/nodes/concat_u32_3d_default/output_0.cairo +++ /dev/null @@ -1,70 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(6); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo deleted file mode 100644 index fa36041d4..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_3d_three_tensors_axis_1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo deleted file mode 100644 index 00c9dd0ea..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo deleted file mode 100644 index 1e959db25..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo deleted file mode 100644 index 7d7318547..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(54); - data.append(55); - data.append(56); - data.append(57); - data.append(58); - data.append(59); - data.append(60); - data.append(61); - data.append(62); - data.append(63); - data.append(64); - data.append(65); - data.append(66); - data.append(67); - data.append(68); - data.append(69); - data.append(70); - data.append(71); - data.append(72); - data.append(73); - data.append(74); - data.append(75); - data.append(76); - data.append(77); - data.append(78); - data.append(79); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo deleted file mode 100644 index 9b02a7a92..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo +++ /dev/null @@ -1,97 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(9); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(54); - data.append(55); - data.append(56); - data.append(57); - data.append(58); - data.append(59); - data.append(60); - data.append(61); - data.append(62); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(63); - data.append(64); - data.append(65); - data.append(66); - data.append(67); - data.append(68); - data.append(69); - data.append(70); - data.append(71); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - data.append(72); - data.append(73); - data.append(74); - data.append(75); - data.append(76); - data.append(77); - data.append(78); - data.append(79); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo deleted file mode 100644 index eeecb91ef..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_concat_u32_3d_three_tensors_axis_2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo deleted file mode 100644 index 00c9dd0ea..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - data.append(7); - data.append(8); - data.append(9); - data.append(10); - data.append(11); - data.append(12); - data.append(13); - data.append(14); - data.append(15); - data.append(16); - data.append(17); - data.append(18); - data.append(19); - data.append(20); - data.append(21); - data.append(22); - data.append(23); - data.append(24); - data.append(25); - data.append(26); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo deleted file mode 100644 index 1e959db25..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(27); - data.append(28); - data.append(29); - data.append(30); - data.append(31); - data.append(32); - data.append(33); - data.append(34); - data.append(35); - data.append(36); - data.append(37); - data.append(38); - data.append(39); - data.append(40); - data.append(41); - data.append(42); - data.append(43); - data.append(44); - data.append(45); - data.append(46); - data.append(47); - data.append(48); - data.append(49); - data.append(50); - data.append(51); - data.append(52); - data.append(53); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo deleted file mode 100644 index 7d7318547..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(54); - data.append(55); - data.append(56); - data.append(57); - data.append(58); - data.append(59); - data.append(60); - data.append(61); - data.append(62); - data.append(63); - data.append(64); - data.append(65); - data.append(66); - data.append(67); - data.append(68); - data.append(69); - data.append(70); - data.append(71); - data.append(72); - data.append(73); - data.append(74); - data.append(75); - data.append(76); - data.append(77); - data.append(78); - data.append(79); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo deleted file mode 100644 index 8c7ff7362..000000000 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo +++ /dev/null @@ -1,97 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(9); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(27); - data.append(28); - data.append(29); - data.append(54); - data.append(55); - data.append(56); - data.append(3); - data.append(4); - data.append(5); - data.append(30); - data.append(31); - data.append(32); - data.append(57); - data.append(58); - data.append(59); - data.append(6); - data.append(7); - data.append(8); - data.append(33); - data.append(34); - data.append(35); - data.append(60); - data.append(61); - data.append(62); - data.append(9); - data.append(10); - data.append(11); - data.append(36); - data.append(37); - data.append(38); - data.append(63); - data.append(64); - data.append(65); - data.append(12); - data.append(13); - data.append(14); - data.append(39); - data.append(40); - data.append(41); - data.append(66); - data.append(67); - data.append(68); - data.append(15); - data.append(16); - data.append(17); - data.append(42); - data.append(43); - data.append(44); - data.append(69); - data.append(70); - data.append(71); - data.append(18); - data.append(19); - data.append(20); - data.append(45); - data.append(46); - data.append(47); - data.append(72); - data.append(73); - data.append(74); - data.append(21); - data.append(22); - data.append(23); - data.append(48); - data.append(49); - data.append(50); - data.append(75); - data.append(76); - data.append(77); - data.append(24); - data.append(25); - data.append(26); - data.append(51); - data.append(52); - data.append(53); - data.append(78); - data.append(79); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16.cairo b/src/tests/nodes/cos_fp16x16.cairo deleted file mode 100644 index 1e31dda0c..000000000 --- a/src/tests/nodes/cos_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo deleted file mode 100644 index f150fdf62..000000000 --- a/src/tests/nodes/cos_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1124701, sign: false }); - data.append(FP16x16 { mag: 8168605, sign: false }); - data.append(FP16x16 { mag: 1101252, sign: false }); - data.append(FP16x16 { mag: 3797411, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo deleted file mode 100644 index 082efa79f..000000000 --- a/src/tests/nodes/cos_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7661, sign: true }); - data.append(FP16x16 { mag: 34261, sign: false }); - data.append(FP16x16 { mag: 29970, sign: true }); - data.append(FP16x16 { mag: 11446, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23.cairo b/src/tests/nodes/cos_fp8x23.cairo deleted file mode 100644 index 59464bd80..000000000 --- a/src/tests/nodes/cos_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo deleted file mode 100644 index 0c0fb872d..000000000 --- a/src/tests/nodes/cos_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 659237788, sign: false }); - data.append(FP8x23 { mag: 648364998, sign: false }); - data.append(FP8x23 { mag: 215345765, sign: false }); - data.append(FP8x23 { mag: 592758692, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo deleted file mode 100644 index 1d93c6bb4..000000000 --- a/src/tests/nodes/cos_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8379165, sign: true }); - data.append(FP8x23 { mag: 2655577, sign: true }); - data.append(FP8x23 { mag: 7201553, sign: false }); - data.append(FP8x23 { mag: 197048, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16.cairo b/src/tests/nodes/cos_i32_fp16x16.cairo deleted file mode 100644 index bc2b62c87..000000000 --- a/src/tests/nodes/cos_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cos_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo deleted file mode 100644 index 01c81e479..000000000 --- a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo deleted file mode 100644 index 6575b9e66..000000000 --- a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 11824, sign: true }); - data.append(FP16x16 { mag: 53692, sign: true }); - data.append(FP16x16 { mag: 64880, sign: true }); - data.append(FP16x16 { mag: 49786, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23.cairo b/src/tests/nodes/cos_i32_fp8x23.cairo deleted file mode 100644 index ddd8fe165..000000000 --- a/src/tests/nodes/cos_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo deleted file mode 100644 index f4fcbf45f..000000000 --- a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 110, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 95, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo deleted file mode 100644 index d2e823112..000000000 --- a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8380393, sign: true }); - data.append(FP8x23 { mag: 2165113, sign: true }); - data.append(FP8x23 { mag: 778263, sign: true }); - data.append(FP8x23 { mag: 6125139, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16.cairo b/src/tests/nodes/cos_i8_fp16x16.cairo deleted file mode 100644 index 7e0b934aa..000000000 --- a/src/tests/nodes/cos_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo deleted file mode 100644 index 41c172c7b..000000000 --- a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 55, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo deleted file mode 100644 index bdebd1a7d..000000000 --- a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 50900, sign: false }); - data.append(FP16x16 { mag: 37339, sign: false }); - data.append(FP16x16 { mag: 59948, sign: false }); - data.append(FP16x16 { mag: 1450, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23.cairo b/src/tests/nodes/cos_i8_fp8x23.cairo deleted file mode 100644 index 43b74051c..000000000 --- a/src/tests/nodes/cos_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_cos_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo deleted file mode 100644 index bf5cb16dd..000000000 --- a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo deleted file mode 100644 index 1362622e7..000000000 --- a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8306688, sign: true }); - data.append(FP8x23 { mag: 2379776, sign: false }); - data.append(FP8x23 { mag: 5484544, sign: true }); - data.append(FP8x23 { mag: 5484544, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16.cairo b/src/tests/nodes/cos_u32_fp16x16.cairo deleted file mode 100644 index c014724bf..000000000 --- a/src/tests/nodes/cos_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo deleted file mode 100644 index 77718b678..000000000 --- a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(63); - data.append(124); - data.append(56); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo deleted file mode 100644 index b8dc520f5..000000000 --- a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 64611, sign: false }); - data.append(FP16x16 { mag: 6080, sign: true }); - data.append(FP16x16 { mag: 55916, sign: false }); - data.append(FP16x16 { mag: 49407, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23.cairo b/src/tests/nodes/cos_u32_fp8x23.cairo deleted file mode 100644 index 0c15ccc9f..000000000 --- a/src/tests/nodes/cos_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cos_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo deleted file mode 100644 index 29fa9f234..000000000 --- a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(35); - data.append(79); - data.append(61); - data.append(114); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo deleted file mode 100644 index edc6cc94e..000000000 --- a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7580719, sign: true }); - data.append(FP8x23 { mag: 7515949, sign: true }); - data.append(FP8x23 { mag: 2165113, sign: true }); - data.append(FP8x23 { mag: 5196915, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16.cairo b/src/tests/nodes/cosh_fp16x16.cairo deleted file mode 100644 index 140c33a36..000000000 --- a/src/tests/nodes/cosh_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo deleted file mode 100644 index 4995a09f8..000000000 --- a/src/tests/nodes/cosh_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 174763, sign: false }); - data.append(FP16x16 { mag: 5569, sign: false }); - data.append(FP16x16 { mag: 19618, sign: true }); - data.append(FP16x16 { mag: 34591, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo deleted file mode 100644 index 9076c3fc8..000000000 --- a/src/tests/nodes/cosh_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 473877, sign: false }); - data.append(FP16x16 { mag: 65772, sign: false }); - data.append(FP16x16 { mag: 68494, sign: false }); - data.append(FP16x16 { mag: 74879, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23.cairo b/src/tests/nodes/cosh_fp8x23.cairo deleted file mode 100644 index 84cf36a75..000000000 --- a/src/tests/nodes/cosh_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo deleted file mode 100644 index addc169c1..000000000 --- a/src/tests/nodes/cosh_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1254371, sign: false }); - data.append(FP8x23 { mag: 21304437, sign: false }); - data.append(FP8x23 { mag: 12450493, sign: true }); - data.append(FP8x23 { mag: 6511071, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo deleted file mode 100644 index b8cb7b53e..000000000 --- a/src/tests/nodes/cosh_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8482567, sign: false }); - data.append(FP8x23 { mag: 53496638, sign: false }); - data.append(FP8x23 { mag: 19453932, sign: false }); - data.append(FP8x23 { mag: 11044927, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16.cairo b/src/tests/nodes/cosh_i32_fp16x16.cairo deleted file mode 100644 index 6c7240e0f..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cosh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo deleted file mode 100644 index e7af7d45e..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 0de69daa4..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 246559, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 659794, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23.cairo b/src/tests/nodes/cosh_i32_fp8x23.cairo deleted file mode 100644 index 410cb506b..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo deleted file mode 100644 index bd1a6a0ff..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 26ae20ae5..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 84453669, sign: false }); - data.append(FP8x23 { mag: 84453669, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16.cairo b/src/tests/nodes/cosh_i8_fp16x16.cairo deleted file mode 100644 index aec99b118..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 6725cb226..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 9448ffc3d..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 246559, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23.cairo b/src/tests/nodes/cosh_i8_fp8x23.cairo deleted file mode 100644 index 67f3917eb..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo deleted file mode 100644 index db78026c0..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo deleted file mode 100644 index 13a4b0922..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16.cairo b/src/tests/nodes/cosh_u32_fp16x16.cairo deleted file mode 100644 index 2d5362e95..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 7e12251c9..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(5); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo deleted file mode 100644 index 87e63156c..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 4863423, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23.cairo b/src/tests/nodes/cosh_u32_fp8x23.cairo deleted file mode 100644 index 3b01a5a6f..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cosh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo deleted file mode 100644 index 0d5461234..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(4); - data.append(1); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo deleted file mode 100644 index 793e947b7..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 229078060, sign: false }); - data.append(FP8x23 { mag: 229078060, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - data.append(FP8x23 { mag: 84453669, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo deleted file mode 100644 index 7a313f572..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_1d_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo deleted file mode 100644 index 39b391cbb..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo deleted file mode 100644 index 1622405e1..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo deleted file mode 100644 index 13a8f3ff9..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_1d_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo deleted file mode 100644 index 39b391cbb..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo deleted file mode 100644 index e9b191e5f..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 655360, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo deleted file mode 100644 index 60caac603..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_1d_reverse() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo deleted file mode 100644 index 39b391cbb..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo deleted file mode 100644 index 8dd2ccdf0..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 983040, sign: false }); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo deleted file mode 100644 index 3fce47035..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_1d_reverse_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo deleted file mode 100644 index 39b391cbb..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo deleted file mode 100644 index 1c33d89ca..000000000 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 917504, sign: false }); - data.append(FP16x16 { mag: 786432, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo deleted file mode 100644 index 466884ae0..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_2d_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo deleted file mode 100644 index 91236fee0..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo deleted file mode 100644 index c0b877cce..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo deleted file mode 100644 index 3aa2110f2..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp16x16_2d_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(1, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo deleted file mode 100644 index 91236fee0..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo deleted file mode 100644 index 2f95b30bc..000000000 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 983040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo deleted file mode 100644 index 1737662f8..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_1d_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo deleted file mode 100644 index f470f24ea..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo deleted file mode 100644 index b339f4cc5..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo deleted file mode 100644 index aedade397..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_1d_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo deleted file mode 100644 index f470f24ea..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo deleted file mode 100644 index 3b8ad4f00..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 83886080, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo deleted file mode 100644 index c154bed5f..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_1d_reverse() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo deleted file mode 100644 index f470f24ea..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo deleted file mode 100644 index 8ea2e2593..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 125829120, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo deleted file mode 100644 index 495849495..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_1d_reverse_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo deleted file mode 100644 index f470f24ea..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo deleted file mode 100644 index 6b8aa986a..000000000 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo deleted file mode 100644 index e38890a1e..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_2d_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo deleted file mode 100644 index 327fa9b04..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo deleted file mode 100644 index 845e1e846..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo deleted file mode 100644 index cd29e9308..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_fp8x23_2d_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(1, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo deleted file mode 100644 index 327fa9b04..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo deleted file mode 100644 index 139d162aa..000000000 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo +++ /dev/null @@ -1,23 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 125829120, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default.cairo b/src/tests/nodes/cumsum_i32_1d_default.cairo deleted file mode 100644 index 23f599828..000000000 --- a/src/tests/nodes/cumsum_i32_1d_default.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_1d_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo deleted file mode 100644 index e38efdd93..000000000 --- a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo deleted file mode 100644 index dab4314d5..000000000 --- a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo deleted file mode 100644 index 51d2e8156..000000000 --- a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_1d_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo deleted file mode 100644 index e38efdd93..000000000 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo deleted file mode 100644 index b45d02d74..000000000 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 10, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse.cairo b/src/tests/nodes/cumsum_i32_1d_reverse.cairo deleted file mode 100644 index cb24b0908..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_1d_reverse() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo deleted file mode 100644 index e38efdd93..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo deleted file mode 100644 index 0aeeeb2ff..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo deleted file mode 100644 index 21b7c46dc..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_1d_reverse_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo deleted file mode 100644 index e38efdd93..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo deleted file mode 100644 index 90d83ae9a..000000000 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo deleted file mode 100644 index 5fd81dc0f..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_2d_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo deleted file mode 100644 index 9374117be..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo deleted file mode 100644 index 037078153..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 9, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo deleted file mode 100644 index 16773fdf2..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i32_2d_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(1, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo deleted file mode 100644 index 9374117be..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo deleted file mode 100644 index 5c8a04a94..000000000 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default.cairo b/src/tests/nodes/cumsum_i8_1d_default.cairo deleted file mode 100644 index 2129d5af4..000000000 --- a/src/tests/nodes/cumsum_i8_1d_default.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_1d_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo deleted file mode 100644 index 1c20a2ff3..000000000 --- a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo deleted file mode 100644 index 4760ab452..000000000 --- a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 10, sign: false }); - data.append(i8 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo deleted file mode 100644 index 91285852c..000000000 --- a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_1d_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo deleted file mode 100644 index 1c20a2ff3..000000000 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo deleted file mode 100644 index 473338b6e..000000000 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 10, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse.cairo b/src/tests/nodes/cumsum_i8_1d_reverse.cairo deleted file mode 100644 index 8ba0b8f8d..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_1d_reverse() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo deleted file mode 100644 index 1c20a2ff3..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo deleted file mode 100644 index f5046a724..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 15, sign: false }); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo deleted file mode 100644 index d8938e077..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_1d_reverse_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo deleted file mode 100644 index 1c20a2ff3..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo deleted file mode 100644 index 320369819..000000000 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo deleted file mode 100644 index f5ad22550..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_2d_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo deleted file mode 100644 index 86f72eef9..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo deleted file mode 100644 index 78eda0683..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 9, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo deleted file mode 100644 index 79d7117db..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_i8_2d_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(1, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo deleted file mode 100644 index 86f72eef9..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo deleted file mode 100644 index 380d698e5..000000000 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default.cairo b/src/tests/nodes/cumsum_u32_1d_default.cairo deleted file mode 100644 index 484d147f8..000000000 --- a/src/tests/nodes/cumsum_u32_1d_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_1d_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo deleted file mode 100644 index c6505ee4f..000000000 --- a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo deleted file mode 100644 index 84b74be03..000000000 --- a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(3); - data.append(6); - data.append(10); - data.append(15); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo deleted file mode 100644 index 4ff0e9bbf..000000000 --- a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_1d_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo deleted file mode 100644 index c6505ee4f..000000000 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo deleted file mode 100644 index 4e0bec73c..000000000 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(3); - data.append(6); - data.append(10); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse.cairo b/src/tests/nodes/cumsum_u32_1d_reverse.cairo deleted file mode 100644 index 08f829d11..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_1d_reverse() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo deleted file mode 100644 index c6505ee4f..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo deleted file mode 100644 index de26bc14e..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(15); - data.append(14); - data.append(12); - data.append(9); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo deleted file mode 100644 index 39876a8ca..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_1d_reverse_exclusive() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo deleted file mode 100644 index c6505ee4f..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo deleted file mode 100644 index af37f94d7..000000000 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(5); - - let mut data = ArrayTrait::new(); - data.append(14); - data.append(12); - data.append(9); - data.append(5); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo deleted file mode 100644 index 8df58fc1b..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_2d_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(0, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo deleted file mode 100644 index 312a8444c..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo deleted file mode 100644 index e7f7e1868..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(5); - data.append(7); - data.append(9); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo deleted file mode 100644 index 527589e8a..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cumsum_u32_2d_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cumsum(1, Option::None(()), Option::None(())); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo deleted file mode 100644 index 312a8444c..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(3); - data.append(4); - data.append(5); - data.append(6); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo deleted file mode 100644 index d70af3640..000000000 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(3); - data.append(6); - data.append(4); - data.append(9); - data.append(15); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo deleted file mode 100644 index 475c7f315..000000000 --- a/src/tests/nodes/div_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo deleted file mode 100644 index 7222de826..000000000 --- a/src/tests/nodes/div_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo deleted file mode 100644 index 4a43a1a69..000000000 --- a/src/tests/nodes/div_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo deleted file mode 100644 index b632aaa95..000000000 --- a/src/tests/nodes/div_fp16x16/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo deleted file mode 100644 index 89722e484..000000000 --- a/src/tests/nodes/div_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 31a178b97..000000000 --- a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index a8bfb31e7..000000000 --- a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 1b82da99b..000000000 --- a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo deleted file mode 100644 index d1a5d2263..000000000 --- a/src/tests/nodes/div_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo deleted file mode 100644 index dd9694783..000000000 --- a/src/tests/nodes/div_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo deleted file mode 100644 index c1d246375..000000000 --- a/src/tests/nodes/div_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo deleted file mode 100644 index 84327ba8e..000000000 --- a/src/tests/nodes/div_fp8x23/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo deleted file mode 100644 index 8661873ad..000000000 --- a/src/tests/nodes/div_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 0a0734e31..000000000 --- a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 4521accca..000000000 --- a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index df85c4b45..000000000 --- a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32.cairo b/src/tests/nodes/div_i32.cairo deleted file mode 100644 index 914589b08..000000000 --- a/src/tests/nodes/div_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo deleted file mode 100644 index 0e5d7b5c9..000000000 --- a/src/tests/nodes/div_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo deleted file mode 100644 index 6bbfde96e..000000000 --- a/src/tests/nodes/div_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo deleted file mode 100644 index 94c38368d..000000000 --- a/src/tests/nodes/div_i32/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast.cairo b/src/tests/nodes/div_i32_broadcast.cairo deleted file mode 100644 index 1c7616d48..000000000 --- a/src/tests/nodes/div_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo deleted file mode 100644 index 1b3bf8456..000000000 --- a/src/tests/nodes/div_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo deleted file mode 100644 index 3d00bb6f9..000000000 --- a/src/tests/nodes/div_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo deleted file mode 100644 index ca12e53fe..000000000 --- a/src/tests/nodes/div_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8.cairo b/src/tests/nodes/div_i8.cairo deleted file mode 100644 index 44ebb02c2..000000000 --- a/src/tests/nodes/div_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo deleted file mode 100644 index e8aa9362f..000000000 --- a/src/tests/nodes/div_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo deleted file mode 100644 index 9f8c7c029..000000000 --- a/src/tests/nodes/div_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo deleted file mode 100644 index 37b830322..000000000 --- a/src/tests/nodes/div_i8/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast.cairo b/src/tests/nodes/div_i8_broadcast.cairo deleted file mode 100644 index 8371bfc94..000000000 --- a/src/tests/nodes/div_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo deleted file mode 100644 index 9d7e1f3f7..000000000 --- a/src/tests/nodes/div_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo deleted file mode 100644 index eae1cd532..000000000 --- a/src/tests/nodes/div_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo deleted file mode 100644 index 3fb34e72f..000000000 --- a/src/tests/nodes/div_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32.cairo b/src/tests/nodes/div_u32.cairo deleted file mode 100644 index 691cf627c..000000000 --- a/src/tests/nodes/div_u32.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_u32_fp16x16, u32TensorDiv -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_div_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo deleted file mode 100644 index 4391c4806..000000000 --- a/src/tests/nodes/div_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(3); - data.append(3); - data.append(3); - data.append(3); - data.append(3); - data.append(4); - data.append(5); - data.append(3); - data.append(5); - data.append(4); - data.append(3); - data.append(4); - data.append(3); - data.append(4); - data.append(3); - data.append(5); - data.append(3); - data.append(3); - data.append(4); - data.append(5); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo deleted file mode 100644 index a7fe24508..000000000 --- a/src/tests/nodes/div_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo deleted file mode 100644 index 1d638fb47..000000000 --- a/src/tests/nodes/div_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(5); - data.append(4); - data.append(2); - data.append(1); - data.append(1); - data.append(1); - data.append(3); - data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(2); - data.append(1); - data.append(2); - data.append(3); - data.append(5); - data.append(1); - data.append(3); - data.append(2); - data.append(2); - data.append(3); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast.cairo b/src/tests/nodes/div_u32_broadcast.cairo deleted file mode 100644 index 8583a9c10..000000000 --- a/src/tests/nodes/div_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorDiv}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_div_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 / input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo deleted file mode 100644 index 34afc8a47..000000000 --- a/src/tests/nodes/div_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(3); - data.append(3); - data.append(5); - data.append(3); - data.append(4); - data.append(3); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(4); - data.append(4); - data.append(3); - data.append(5); - data.append(5); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(3); - data.append(3); - data.append(5); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo deleted file mode 100644 index cb8025485..000000000 --- a/src/tests/nodes/div_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo deleted file mode 100644 index 2ca8f9e5c..000000000 --- a/src/tests/nodes/div_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(5); - data.append(3); - data.append(4); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(4); - data.append(4); - data.append(3); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(4); - data.append(3); - data.append(3); - data.append(2); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16.cairo b/src/tests/nodes/equal_fp16x16.cairo deleted file mode 100644 index f97944c4c..000000000 --- a/src/tests/nodes/equal_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo deleted file mode 100644 index 2dd812e3b..000000000 --- a/src/tests/nodes/equal_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo deleted file mode 100644 index f2256f156..000000000 --- a/src/tests/nodes/equal_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo deleted file mode 100644 index 195f01f3f..000000000 --- a/src/tests/nodes/equal_fp16x16/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast.cairo b/src/tests/nodes/equal_fp16x16_broadcast.cairo deleted file mode 100644 index a99aa1bf1..000000000 --- a/src/tests/nodes/equal_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index c6f09af00..000000000 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 4c73a9f00..000000000 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 93e71b66c..000000000 --- a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23.cairo b/src/tests/nodes/equal_fp8x23.cairo deleted file mode 100644 index 1399eb9e6..000000000 --- a/src/tests/nodes/equal_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo deleted file mode 100644 index ed55b0bf2..000000000 --- a/src/tests/nodes/equal_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo deleted file mode 100644 index c67922000..000000000 --- a/src/tests/nodes/equal_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo deleted file mode 100644 index 277153bde..000000000 --- a/src/tests/nodes/equal_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast.cairo b/src/tests/nodes/equal_fp8x23_broadcast.cairo deleted file mode 100644 index f0dd70dcd..000000000 --- a/src/tests/nodes/equal_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index b67424022..000000000 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index dcf001379..000000000 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 4e5a8296d..000000000 --- a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32.cairo b/src/tests/nodes/equal_i32.cairo deleted file mode 100644 index 00d822856..000000000 --- a/src/tests/nodes/equal_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo deleted file mode 100644 index 94dbd0f6f..000000000 --- a/src/tests/nodes/equal_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo deleted file mode 100644 index 2a43ee275..000000000 --- a/src/tests/nodes/equal_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo deleted file mode 100644 index 9f916a719..000000000 --- a/src/tests/nodes/equal_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast.cairo b/src/tests/nodes/equal_i32_broadcast.cairo deleted file mode 100644 index 1742aa4af..000000000 --- a/src/tests/nodes/equal_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo deleted file mode 100644 index 5044842b3..000000000 --- a/src/tests/nodes/equal_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo deleted file mode 100644 index 59971a2b8..000000000 --- a/src/tests/nodes/equal_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo deleted file mode 100644 index df8ca9f0f..000000000 --- a/src/tests/nodes/equal_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8.cairo b/src/tests/nodes/equal_i8.cairo deleted file mode 100644 index 406e74efe..000000000 --- a/src/tests/nodes/equal_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo deleted file mode 100644 index 128a1e811..000000000 --- a/src/tests/nodes/equal_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo deleted file mode 100644 index 2484362a8..000000000 --- a/src/tests/nodes/equal_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo deleted file mode 100644 index 9920606cb..000000000 --- a/src/tests/nodes/equal_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast.cairo b/src/tests/nodes/equal_i8_broadcast.cairo deleted file mode 100644 index b6ebcc437..000000000 --- a/src/tests/nodes/equal_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo deleted file mode 100644 index 21c8f27d4..000000000 --- a/src/tests/nodes/equal_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo deleted file mode 100644 index f25a822e5..000000000 --- a/src/tests/nodes/equal_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo deleted file mode 100644 index 5d845ddb5..000000000 --- a/src/tests/nodes/equal_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32.cairo b/src/tests/nodes/equal_u32.cairo deleted file mode 100644 index e2328ee8b..000000000 --- a/src/tests/nodes/equal_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo deleted file mode 100644 index e3ec06ebe..000000000 --- a/src/tests/nodes/equal_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(0); - data.append(3); - data.append(3); - data.append(1); - data.append(5); - data.append(3); - data.append(0); - data.append(5); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(4); - data.append(5); - data.append(1); - data.append(2); - data.append(0); - data.append(1); - data.append(4); - data.append(0); - data.append(4); - data.append(1); - data.append(5); - data.append(2); - data.append(5); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo deleted file mode 100644 index 38792aeae..000000000 --- a/src/tests/nodes/equal_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(5); - data.append(2); - data.append(5); - data.append(0); - data.append(2); - data.append(5); - data.append(1); - data.append(3); - data.append(2); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(4); - data.append(4); - data.append(0); - data.append(2); - data.append(0); - data.append(2); - data.append(5); - data.append(2); - data.append(1); - data.append(2); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo deleted file mode 100644 index 0276290f9..000000000 --- a/src/tests/nodes/equal_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast.cairo b/src/tests/nodes/equal_u32_broadcast.cairo deleted file mode 100644 index 11431986f..000000000 --- a/src/tests/nodes/equal_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_equal_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo deleted file mode 100644 index 7d3708044..000000000 --- a/src/tests/nodes/equal_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(4); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo deleted file mode 100644 index c27660263..000000000 --- a/src/tests/nodes/equal_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo deleted file mode 100644 index 93e71b66c..000000000 --- a/src/tests/nodes/equal_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16.cairo b/src/tests/nodes/exp_fp16x16.cairo deleted file mode 100644 index c63959a9c..000000000 --- a/src/tests/nodes/exp_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo deleted file mode 100644 index 108199991..000000000 --- a/src/tests/nodes/exp_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 68670, sign: true }); - data.append(FP16x16 { mag: 37714, sign: true }); - data.append(FP16x16 { mag: 196163, sign: true }); - data.append(FP16x16 { mag: 10079, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo deleted file mode 100644 index f2779c4e3..000000000 --- a/src/tests/nodes/exp_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 22983, sign: false }); - data.append(FP16x16 { mag: 36859, sign: false }); - data.append(FP16x16 { mag: 3285, sign: false }); - data.append(FP16x16 { mag: 76431, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23.cairo b/src/tests/nodes/exp_fp8x23.cairo deleted file mode 100644 index 765bc5c60..000000000 --- a/src/tests/nodes/exp_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo deleted file mode 100644 index d3a948793..000000000 --- a/src/tests/nodes/exp_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 22965160, sign: true }); - data.append(FP8x23 { mag: 15758081, sign: false }); - data.append(FP8x23 { mag: 23575455, sign: true }); - data.append(FP8x23 { mag: 2203079, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo deleted file mode 100644 index 62e5191d4..000000000 --- a/src/tests/nodes/exp_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 542924, sign: false }); - data.append(FP8x23 { mag: 54892916, sign: false }); - data.append(FP8x23 { mag: 504827, sign: false }); - data.append(FP8x23 { mag: 10908061, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16.cairo b/src/tests/nodes/exp_i32_fp16x16.cairo deleted file mode 100644 index f3d3cc83a..000000000 --- a/src/tests/nodes/exp_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_exp_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo deleted file mode 100644 index a78ff95e8..000000000 --- a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo deleted file mode 100644 index d08907c87..000000000 --- a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 484249, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23.cairo b/src/tests/nodes/exp_i32_fp8x23.cairo deleted file mode 100644 index 69d519d95..000000000 --- a/src/tests/nodes/exp_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo deleted file mode 100644 index a7f2eb38e..000000000 --- a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo deleted file mode 100644 index 81f2256ca..000000000 --- a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 61983895, sign: false }); - data.append(FP8x23 { mag: 3085996, sign: false }); - data.append(FP8x23 { mag: 22802600, sign: false }); - data.append(FP8x23 { mag: 61983895, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16.cairo b/src/tests/nodes/exp_i8_fp16x16.cairo deleted file mode 100644 index e686f3ed6..000000000 --- a/src/tests/nodes/exp_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo deleted file mode 100644 index 94d46da17..000000000 --- a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo deleted file mode 100644 index 6db38b681..000000000 --- a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3262, sign: false }); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 3262, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23.cairo b/src/tests/nodes/exp_i8_fp8x23.cairo deleted file mode 100644 index 4b6705c67..000000000 --- a/src/tests/nodes/exp_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_exp_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo deleted file mode 100644 index f54f45ea6..000000000 --- a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo deleted file mode 100644 index ff56ee17a..000000000 --- a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 22806528, sign: false }); - data.append(FP8x23 { mag: 1135616, sign: false }); - data.append(FP8x23 { mag: 22806528, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16.cairo b/src/tests/nodes/exp_u32_fp16x16.cairo deleted file mode 100644 index 33e0998c9..000000000 --- a/src/tests/nodes/exp_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - // assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo deleted file mode 100644 index 63a9af527..000000000 --- a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo deleted file mode 100644 index 46f95c8fc..000000000 --- a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 484249, sign: false }); - data.append(FP16x16 { mag: 3578144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23.cairo b/src/tests/nodes/exp_u32_fp8x23.cairo deleted file mode 100644 index e73bcf308..000000000 --- a/src/tests/nodes/exp_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_exp_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo deleted file mode 100644 index 86159c5d3..000000000 --- a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo deleted file mode 100644 index e4e684f73..000000000 --- a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1244979813, sign: false }); - data.append(FP8x23 { mag: 168489695, sign: false }); - data.append(FP8x23 { mag: 61983895, sign: false }); - data.append(FP8x23 { mag: 458002478, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16.cairo b/src/tests/nodes/greater_equal_fp16x16.cairo deleted file mode 100644 index 272071e56..000000000 --- a/src/tests/nodes/greater_equal_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo deleted file mode 100644 index 2b18fe431..000000000 --- a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo deleted file mode 100644 index be9258306..000000000 --- a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo deleted file mode 100644 index 0938024d8..000000000 --- a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo deleted file mode 100644 index e2f949359..000000000 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 94ed3e710..000000000 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 04cb2f937..000000000 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 2a3395e70..000000000 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23.cairo b/src/tests/nodes/greater_equal_fp8x23.cairo deleted file mode 100644 index b4611358c..000000000 --- a/src/tests/nodes/greater_equal_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo deleted file mode 100644 index aa0db3610..000000000 --- a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo deleted file mode 100644 index 596b3e651..000000000 --- a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo deleted file mode 100644 index 864e5d493..000000000 --- a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo deleted file mode 100644 index bc9742b1f..000000000 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 88561a5b6..000000000 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index cd226ffab..000000000 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 06ca7e946..000000000 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32.cairo b/src/tests/nodes/greater_equal_i32.cairo deleted file mode 100644 index 5ed191eeb..000000000 --- a/src/tests/nodes/greater_equal_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo deleted file mode 100644 index 425b22861..000000000 --- a/src/tests/nodes/greater_equal_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo deleted file mode 100644 index db8f7942f..000000000 --- a/src/tests/nodes/greater_equal_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo deleted file mode 100644 index 519dcd4ba..000000000 --- a/src/tests/nodes/greater_equal_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast.cairo b/src/tests/nodes/greater_equal_i32_broadcast.cairo deleted file mode 100644 index f15e48144..000000000 --- a/src/tests/nodes/greater_equal_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo deleted file mode 100644 index 78c0f6a5f..000000000 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo deleted file mode 100644 index 00ae79e11..000000000 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo deleted file mode 100644 index 17571932c..000000000 --- a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8.cairo b/src/tests/nodes/greater_equal_i8.cairo deleted file mode 100644 index 398bb9be4..000000000 --- a/src/tests/nodes/greater_equal_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo deleted file mode 100644 index c0b9d3a45..000000000 --- a/src/tests/nodes/greater_equal_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo deleted file mode 100644 index adff9998f..000000000 --- a/src/tests/nodes/greater_equal_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo deleted file mode 100644 index 61bcb7445..000000000 --- a/src/tests/nodes/greater_equal_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast.cairo b/src/tests/nodes/greater_equal_i8_broadcast.cairo deleted file mode 100644 index 533e7c972..000000000 --- a/src/tests/nodes/greater_equal_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo deleted file mode 100644 index 434a1136f..000000000 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo deleted file mode 100644 index d568c0e81..000000000 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo deleted file mode 100644 index 958689eef..000000000 --- a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32.cairo b/src/tests/nodes/greater_equal_u32.cairo deleted file mode 100644 index 5e113a6c9..000000000 --- a/src/tests/nodes/greater_equal_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo deleted file mode 100644 index 8d7067f96..000000000 --- a/src/tests/nodes/greater_equal_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(1); - data.append(1); - data.append(3); - data.append(5); - data.append(4); - data.append(2); - data.append(2); - data.append(5); - data.append(5); - data.append(5); - data.append(1); - data.append(5); - data.append(1); - data.append(2); - data.append(5); - data.append(4); - data.append(3); - data.append(4); - data.append(4); - data.append(5); - data.append(3); - data.append(3); - data.append(4); - data.append(1); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo deleted file mode 100644 index 869695e54..000000000 --- a/src/tests/nodes/greater_equal_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(4); - data.append(5); - data.append(1); - data.append(0); - data.append(5); - data.append(0); - data.append(1); - data.append(2); - data.append(5); - data.append(5); - data.append(1); - data.append(1); - data.append(1); - data.append(5); - data.append(3); - data.append(2); - data.append(2); - data.append(0); - data.append(2); - data.append(5); - data.append(2); - data.append(4); - data.append(2); - data.append(4); - data.append(0); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo deleted file mode 100644 index 82ed158c2..000000000 --- a/src/tests/nodes/greater_equal_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast.cairo b/src/tests/nodes/greater_equal_u32_broadcast.cairo deleted file mode 100644 index c6bc449aa..000000000 --- a/src/tests/nodes/greater_equal_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_equal_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo deleted file mode 100644 index f174351a5..000000000 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(2); - data.append(0); - data.append(4); - data.append(2); - data.append(3); - data.append(3); - data.append(2); - data.append(0); - data.append(3); - data.append(2); - data.append(3); - data.append(1); - data.append(5); - data.append(1); - data.append(3); - data.append(5); - data.append(2); - data.append(2); - data.append(3); - data.append(1); - data.append(0); - data.append(1); - data.append(4); - data.append(4); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo deleted file mode 100644 index 7afe7d09a..000000000 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo deleted file mode 100644 index e08fe28e9..000000000 --- a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16.cairo b/src/tests/nodes/greater_fp16x16.cairo deleted file mode 100644 index 56db9ec78..000000000 --- a/src/tests/nodes/greater_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo deleted file mode 100644 index fab13d120..000000000 --- a/src/tests/nodes/greater_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo deleted file mode 100644 index eb34874d0..000000000 --- a/src/tests/nodes/greater_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo deleted file mode 100644 index 6a51e48f9..000000000 --- a/src/tests/nodes/greater_fp16x16/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast.cairo b/src/tests/nodes/greater_fp16x16_broadcast.cairo deleted file mode 100644 index a7174429b..000000000 --- a/src/tests/nodes/greater_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 18317ea76..000000000 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 4ca3a24e0..000000000 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 54043d4af..000000000 --- a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23.cairo b/src/tests/nodes/greater_fp8x23.cairo deleted file mode 100644 index 7b49a8d12..000000000 --- a/src/tests/nodes/greater_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo deleted file mode 100644 index fb29a878e..000000000 --- a/src/tests/nodes/greater_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo deleted file mode 100644 index ebdce3ee3..000000000 --- a/src/tests/nodes/greater_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo deleted file mode 100644 index f5e467fd2..000000000 --- a/src/tests/nodes/greater_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast.cairo b/src/tests/nodes/greater_fp8x23_broadcast.cairo deleted file mode 100644 index f9cc6834c..000000000 --- a/src/tests/nodes/greater_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 8b14cfc49..000000000 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index c1197c188..000000000 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 9f8adfb50..000000000 --- a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32.cairo b/src/tests/nodes/greater_i32.cairo deleted file mode 100644 index 9c2263dc3..000000000 --- a/src/tests/nodes/greater_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo deleted file mode 100644 index e7a9854e1..000000000 --- a/src/tests/nodes/greater_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo deleted file mode 100644 index 2691f3e4d..000000000 --- a/src/tests/nodes/greater_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo deleted file mode 100644 index 09c16cfc3..000000000 --- a/src/tests/nodes/greater_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast.cairo b/src/tests/nodes/greater_i32_broadcast.cairo deleted file mode 100644 index f320a126f..000000000 --- a/src/tests/nodes/greater_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo deleted file mode 100644 index 7d3ec4792..000000000 --- a/src/tests/nodes/greater_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo deleted file mode 100644 index 7325080a0..000000000 --- a/src/tests/nodes/greater_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo deleted file mode 100644 index 54043d4af..000000000 --- a/src/tests/nodes/greater_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8.cairo b/src/tests/nodes/greater_i8.cairo deleted file mode 100644 index 054386201..000000000 --- a/src/tests/nodes/greater_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo deleted file mode 100644 index ef1f978f4..000000000 --- a/src/tests/nodes/greater_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo deleted file mode 100644 index cf3c0a461..000000000 --- a/src/tests/nodes/greater_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo deleted file mode 100644 index 8651ea44f..000000000 --- a/src/tests/nodes/greater_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast.cairo b/src/tests/nodes/greater_i8_broadcast.cairo deleted file mode 100644 index 6007ebbb2..000000000 --- a/src/tests/nodes/greater_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo deleted file mode 100644 index a077d9c9a..000000000 --- a/src/tests/nodes/greater_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo deleted file mode 100644 index 4b86ff635..000000000 --- a/src/tests/nodes/greater_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo deleted file mode 100644 index 2d721c3bc..000000000 --- a/src/tests/nodes/greater_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32.cairo b/src/tests/nodes/greater_u32.cairo deleted file mode 100644 index 77c16ceeb..000000000 --- a/src/tests/nodes/greater_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo deleted file mode 100644 index d0738bad3..000000000 --- a/src/tests/nodes/greater_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(5); - data.append(1); - data.append(3); - data.append(0); - data.append(5); - data.append(4); - data.append(5); - data.append(3); - data.append(3); - data.append(2); - data.append(0); - data.append(0); - data.append(0); - data.append(3); - data.append(0); - data.append(4); - data.append(1); - data.append(1); - data.append(0); - data.append(3); - data.append(1); - data.append(3); - data.append(0); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo deleted file mode 100644 index 0d98744de..000000000 --- a/src/tests/nodes/greater_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(2); - data.append(0); - data.append(1); - data.append(4); - data.append(5); - data.append(2); - data.append(4); - data.append(5); - data.append(3); - data.append(4); - data.append(5); - data.append(3); - data.append(1); - data.append(3); - data.append(0); - data.append(5); - data.append(1); - data.append(5); - data.append(3); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo deleted file mode 100644 index b2afd6f2d..000000000 --- a/src/tests/nodes/greater_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast.cairo b/src/tests/nodes/greater_u32_broadcast.cairo deleted file mode 100644 index 7a3763d33..000000000 --- a/src/tests/nodes/greater_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_greater_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.greater(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo deleted file mode 100644 index 1217ff01a..000000000 --- a/src/tests/nodes/greater_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(4); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo deleted file mode 100644 index cabde4212..000000000 --- a/src/tests/nodes/greater_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo deleted file mode 100644 index edfc188ca..000000000 --- a/src/tests/nodes/greater_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16.cairo b/src/tests/nodes/leaky_relu_fp16x16.cairo deleted file mode 100644 index 4487592f8..000000000 --- a/src/tests/nodes/leaky_relu_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo deleted file mode 100644 index 5278c956c..000000000 --- a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 453171, sign: false }); - data.append(FP16x16 { mag: 73289, sign: false }); - data.append(FP16x16 { mag: 90437, sign: true }); - data.append(FP16x16 { mag: 316640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo deleted file mode 100644 index 51f8b564b..000000000 --- a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 453171, sign: false }); - data.append(FP16x16 { mag: 73289, sign: false }); - data.append(FP16x16 { mag: 9043, sign: true }); - data.append(FP16x16 { mag: 316640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23.cairo b/src/tests/nodes/leaky_relu_fp8x23.cairo deleted file mode 100644 index cf2334fb7..000000000 --- a/src/tests/nodes/leaky_relu_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo deleted file mode 100644 index a3d0b383f..000000000 --- a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 10631720, sign: false }); - data.append(FP8x23 { mag: 50119017, sign: false }); - data.append(FP8x23 { mag: 13888927, sign: false }); - data.append(FP8x23 { mag: 6576321, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo deleted file mode 100644 index f7a3a2394..000000000 --- a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 10631721, sign: false }); - data.append(FP8x23 { mag: 50119016, sign: false }); - data.append(FP8x23 { mag: 13888927, sign: false }); - data.append(FP8x23 { mag: 657632, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16.cairo deleted file mode 100644 index d60811b3c..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo deleted file mode 100644 index 3bf9091c9..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo deleted file mode 100644 index 2b1569cd0..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 13107, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23.cairo deleted file mode 100644 index 4d898c37b..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo deleted file mode 100644 index 32f650d08..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo deleted file mode 100644 index 68de684a1..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16.cairo deleted file mode 100644 index f3db0aa60..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo deleted file mode 100644 index a11c30f0b..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::{i8, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo deleted file mode 100644 index 4207de091..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 19660, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23.cairo deleted file mode 100644 index d019a20f1..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo deleted file mode 100644 index 043f121cc..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo deleted file mode 100644 index fef089ef2..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: true }); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16.cairo b/src/tests/nodes/less_equal_fp16x16.cairo deleted file mode 100644 index 4a810f476..000000000 --- a/src/tests/nodes/less_equal_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo deleted file mode 100644 index 5afc02a45..000000000 --- a/src/tests/nodes/less_equal_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo deleted file mode 100644 index 622220d18..000000000 --- a/src/tests/nodes/less_equal_fp16x16/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/less_equal_fp16x16/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo deleted file mode 100644 index 9787d1ef3..000000000 --- a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index c764315ad..000000000 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 4c73a9f00..000000000 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index b2b9896af..000000000 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23.cairo b/src/tests/nodes/less_equal_fp8x23.cairo deleted file mode 100644 index f1eb72d22..000000000 --- a/src/tests/nodes/less_equal_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo deleted file mode 100644 index 43c360a28..000000000 --- a/src/tests/nodes/less_equal_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo deleted file mode 100644 index 009b36fd7..000000000 --- a/src/tests/nodes/less_equal_fp8x23/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo deleted file mode 100644 index 229d62683..000000000 --- a/src/tests/nodes/less_equal_fp8x23/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo deleted file mode 100644 index 07ee3587e..000000000 --- a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index e45f29929..000000000 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index c1197c188..000000000 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 803855ca6..000000000 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32.cairo b/src/tests/nodes/less_equal_i32.cairo deleted file mode 100644 index 2b39e8c1d..000000000 --- a/src/tests/nodes/less_equal_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo deleted file mode 100644 index 74558c823..000000000 --- a/src/tests/nodes/less_equal_i32/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo deleted file mode 100644 index 85345ea37..000000000 --- a/src/tests/nodes/less_equal_i32/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo deleted file mode 100644 index 6e8d900c2..000000000 --- a/src/tests/nodes/less_equal_i32/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast.cairo b/src/tests/nodes/less_equal_i32_broadcast.cairo deleted file mode 100644 index 164a05c14..000000000 --- a/src/tests/nodes/less_equal_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo deleted file mode 100644 index 44a41170c..000000000 --- a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo deleted file mode 100644 index fe3fa7759..000000000 --- a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo deleted file mode 100644 index 180389d2b..000000000 --- a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8.cairo b/src/tests/nodes/less_equal_i8.cairo deleted file mode 100644 index d54e6ba76..000000000 --- a/src/tests/nodes/less_equal_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo deleted file mode 100644 index e2e849163..000000000 --- a/src/tests/nodes/less_equal_i8/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo deleted file mode 100644 index d17abf35a..000000000 --- a/src/tests/nodes/less_equal_i8/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo deleted file mode 100644 index 8a44faccf..000000000 --- a/src/tests/nodes/less_equal_i8/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast.cairo b/src/tests/nodes/less_equal_i8_broadcast.cairo deleted file mode 100644 index 988888f0f..000000000 --- a/src/tests/nodes/less_equal_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo deleted file mode 100644 index 5ffb1b603..000000000 --- a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo deleted file mode 100644 index 4b86ff635..000000000 --- a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo deleted file mode 100644 index 6147252f2..000000000 --- a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32.cairo b/src/tests/nodes/less_equal_u32.cairo deleted file mode 100644 index 3da51fff7..000000000 --- a/src/tests/nodes/less_equal_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo deleted file mode 100644 index 1c359adeb..000000000 --- a/src/tests/nodes/less_equal_u32/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo deleted file mode 100644 index 94ecbbf6c..000000000 --- a/src/tests/nodes/less_equal_u32/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(5); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/less_equal_u32/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast.cairo b/src/tests/nodes/less_equal_u32_broadcast.cairo deleted file mode 100644 index fbeb82c21..000000000 --- a/src/tests/nodes/less_equal_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_equal_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less_equal(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo deleted file mode 100644 index 2632c62ea..000000000 --- a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(0); - data.append(4); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo deleted file mode 100644 index 87056020f..000000000 --- a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo deleted file mode 100644 index 6147252f2..000000000 --- a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16.cairo b/src/tests/nodes/less_fp16x16.cairo deleted file mode 100644 index 76f1383d2..000000000 --- a/src/tests/nodes/less_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo deleted file mode 100644 index 3e7d7e7ab..000000000 --- a/src/tests/nodes/less_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo deleted file mode 100644 index 91f99e522..000000000 --- a/src/tests/nodes/less_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo deleted file mode 100644 index c4a74578b..000000000 --- a/src/tests/nodes/less_fp16x16/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast.cairo b/src/tests/nodes/less_fp16x16_broadcast.cairo deleted file mode 100644 index 6269a1e0a..000000000 --- a/src/tests/nodes/less_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 7eca8a5fb..000000000 --- a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 7f6907f11..000000000 --- a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index d64dfda5f..000000000 --- a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23.cairo b/src/tests/nodes/less_fp8x23.cairo deleted file mode 100644 index 660a7919d..000000000 --- a/src/tests/nodes/less_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo deleted file mode 100644 index bedc75e89..000000000 --- a/src/tests/nodes/less_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo deleted file mode 100644 index 336322c8f..000000000 --- a/src/tests/nodes/less_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo deleted file mode 100644 index a6e9670eb..000000000 --- a/src/tests/nodes/less_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast.cairo b/src/tests/nodes/less_fp8x23_broadcast.cairo deleted file mode 100644 index e9594e474..000000000 --- a/src/tests/nodes/less_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index a3c5f36f5..000000000 --- a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 131225329..000000000 --- a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 6ee2fe20e..000000000 --- a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32.cairo b/src/tests/nodes/less_i32.cairo deleted file mode 100644 index d0902f211..000000000 --- a/src/tests/nodes/less_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo deleted file mode 100644 index 6953357f1..000000000 --- a/src/tests/nodes/less_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo deleted file mode 100644 index 507854555..000000000 --- a/src/tests/nodes/less_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo deleted file mode 100644 index ab576aa1d..000000000 --- a/src/tests/nodes/less_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast.cairo b/src/tests/nodes/less_i32_broadcast.cairo deleted file mode 100644 index e3c9cdd53..000000000 --- a/src/tests/nodes/less_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo deleted file mode 100644 index 2acfae742..000000000 --- a/src/tests/nodes/less_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo deleted file mode 100644 index 1bc322d90..000000000 --- a/src/tests/nodes/less_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo deleted file mode 100644 index 219970281..000000000 --- a/src/tests/nodes/less_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8.cairo b/src/tests/nodes/less_i8.cairo deleted file mode 100644 index dbbed410b..000000000 --- a/src/tests/nodes/less_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo deleted file mode 100644 index 8317436c1..000000000 --- a/src/tests/nodes/less_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo deleted file mode 100644 index f92c368d9..000000000 --- a/src/tests/nodes/less_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo deleted file mode 100644 index a21a003e6..000000000 --- a/src/tests/nodes/less_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast.cairo b/src/tests/nodes/less_i8_broadcast.cairo deleted file mode 100644 index 4aace83e4..000000000 --- a/src/tests/nodes/less_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo deleted file mode 100644 index 61cc01be1..000000000 --- a/src/tests/nodes/less_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo deleted file mode 100644 index 68d0125d4..000000000 --- a/src/tests/nodes/less_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo deleted file mode 100644 index a1aee4480..000000000 --- a/src/tests/nodes/less_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32.cairo b/src/tests/nodes/less_u32.cairo deleted file mode 100644 index 032bc3ffc..000000000 --- a/src/tests/nodes/less_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo deleted file mode 100644 index 38b4f8a3c..000000000 --- a/src/tests/nodes/less_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(4); - data.append(3); - data.append(3); - data.append(5); - data.append(3); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(2); - data.append(2); - data.append(5); - data.append(3); - data.append(0); - data.append(1); - data.append(4); - data.append(2); - data.append(0); - data.append(2); - data.append(5); - data.append(2); - data.append(2); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo deleted file mode 100644 index 38d6a8263..000000000 --- a/src/tests/nodes/less_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(0); - data.append(4); - data.append(3); - data.append(5); - data.append(2); - data.append(4); - data.append(2); - data.append(5); - data.append(1); - data.append(5); - data.append(2); - data.append(3); - data.append(3); - data.append(2); - data.append(5); - data.append(5); - data.append(5); - data.append(0); - data.append(1); - data.append(0); - data.append(4); - data.append(3); - data.append(1); - data.append(2); - data.append(0); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo deleted file mode 100644 index 33d2fc5ca..000000000 --- a/src/tests/nodes/less_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast.cairo b/src/tests/nodes/less_u32_broadcast.cairo deleted file mode 100644 index 8ae776a37..000000000 --- a/src/tests/nodes/less_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_less_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.less(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo deleted file mode 100644 index 3d563c796..000000000 --- a/src/tests/nodes/less_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(1); - data.append(0); - data.append(2); - data.append(1); - data.append(3); - data.append(3); - data.append(3); - data.append(3); - data.append(0); - data.append(1); - data.append(3); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(5); - data.append(4); - data.append(2); - data.append(2); - data.append(0); - data.append(3); - data.append(2); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo deleted file mode 100644 index 0e9116fd7..000000000 --- a/src/tests/nodes/less_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(3); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo deleted file mode 100644 index c16cf8771..000000000 --- a/src/tests/nodes/less_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16.cairo b/src/tests/nodes/linear_fp16x16.cairo deleted file mode 100644 index 0726b2015..000000000 --- a/src/tests/nodes/linear_fp16x16.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_linear_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = NNTrait::linear(input_0, input_1, input_2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo deleted file mode 100644 index 957cc2f4d..000000000 --- a/src/tests/nodes/linear_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 243480, sign: false }); - data.append(FP16x16 { mag: 81530, sign: false }); - data.append(FP16x16 { mag: 33568, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo deleted file mode 100644 index 911ffdee7..000000000 --- a/src/tests/nodes/linear_fp16x16/input_1.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 406504, sign: false }); - data.append(FP16x16 { mag: 169826, sign: true }); - data.append(FP16x16 { mag: 286936, sign: false }); - data.append(FP16x16 { mag: 216587, sign: true }); - data.append(FP16x16 { mag: 320888, sign: true }); - data.append(FP16x16 { mag: 186065, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo deleted file mode 100644 index 56ebfef13..000000000 --- a/src/tests/nodes/linear_fp16x16/input_2.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 17100, sign: true }); - data.append(FP16x16 { mag: 360167, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo deleted file mode 100644 index 873e48752..000000000 --- a/src/tests/nodes/linear_fp16x16/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1134904, sign: false }); - data.append(FP16x16 { mag: 939012, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23.cairo b/src/tests/nodes/linear_fp8x23.cairo deleted file mode 100644 index 903828561..000000000 --- a/src/tests/nodes/linear_fp8x23.cairo +++ /dev/null @@ -1,25 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_linear_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = NNTrait::linear(input_0, input_1, input_2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo deleted file mode 100644 index 561c55c86..000000000 --- a/src/tests/nodes/linear_fp8x23/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16576692, sign: false }); - data.append(FP8x23 { mag: 41797636, sign: false }); - data.append(FP8x23 { mag: 10487655, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo deleted file mode 100644 index 8233e6e05..000000000 --- a/src/tests/nodes/linear_fp8x23/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1236715, sign: false }); - data.append(FP8x23 { mag: 4771319, sign: false }); - data.append(FP8x23 { mag: 8392691, sign: false }); - data.append(FP8x23 { mag: 36629024, sign: true }); - data.append(FP8x23 { mag: 34768195, sign: false }); - data.append(FP8x23 { mag: 2858178, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo deleted file mode 100644 index ff8712325..000000000 --- a/src/tests/nodes/linear_fp8x23/input_2.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 34671437, sign: true }); - data.append(FP8x23 { mag: 27817938, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo deleted file mode 100644 index 4e72468a4..000000000 --- a/src/tests/nodes/linear_fp8x23/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 18946433, sign: true }); - data.append(FP8x23 { mag: 125100432, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32.cairo b/src/tests/nodes/linear_i32.cairo deleted file mode 100644 index d32135be7..000000000 --- a/src/tests/nodes/linear_i32.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_linear_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = NNTrait::linear(input_0, input_1, input_2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo deleted file mode 100644 index 497c8a723..000000000 --- a/src/tests/nodes/linear_i32/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 5, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo deleted file mode 100644 index 79d61c565..000000000 --- a/src/tests/nodes/linear_i32/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo deleted file mode 100644 index 1018678ce..000000000 --- a/src/tests/nodes/linear_i32/input_2.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo deleted file mode 100644 index a5d72eb8b..000000000 --- a/src/tests/nodes/linear_i32/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8.cairo b/src/tests/nodes/linear_i8.cairo deleted file mode 100644 index 832141470..000000000 --- a/src/tests/nodes/linear_i8.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_linear_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = NNTrait::linear(input_0, input_1, input_2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo deleted file mode 100644 index 1084d0423..000000000 --- a/src/tests/nodes/linear_i8/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo deleted file mode 100644 index 894c77a4b..000000000 --- a/src/tests/nodes/linear_i8/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo deleted file mode 100644 index 39d8f3aed..000000000 --- a/src/tests/nodes/linear_i8/input_2.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo deleted file mode 100644 index 496683fa3..000000000 --- a/src/tests/nodes/linear_i8/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32.cairo b/src/tests/nodes/linear_u32.cairo deleted file mode 100644 index a5ada4f83..000000000 --- a/src/tests/nodes/linear_u32.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_linear_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let input_2 = input_2::input_2(); - let z = output_0::output_0(); - - let y = NNTrait::linear(input_0, input_1, input_2); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo deleted file mode 100644 index 487e5b1b4..000000000 --- a/src/tests/nodes/linear_u32/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo deleted file mode 100644 index 98f597953..000000000 --- a/src/tests/nodes/linear_u32/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(0); - data.append(3); - data.append(0); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo deleted file mode 100644 index c08c8818c..000000000 --- a/src/tests/nodes/linear_u32/input_2.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_2() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo deleted file mode 100644 index e39b6956d..000000000 --- a/src/tests/nodes/linear_u32/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(24); - data.append(21); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16.cairo b/src/tests/nodes/log_fp16x16.cairo deleted file mode 100644 index 742716792..000000000 --- a/src/tests/nodes/log_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo deleted file mode 100644 index 0108f09c5..000000000 --- a/src/tests/nodes/log_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1128814, sign: false }); - data.append(FP16x16 { mag: 6863846, sign: false }); - data.append(FP16x16 { mag: 920075, sign: false }); - data.append(FP16x16 { mag: 7713567, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo deleted file mode 100644 index f38c6d20a..000000000 --- a/src/tests/nodes/log_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 186536, sign: false }); - data.append(FP16x16 { mag: 304835, sign: false }); - data.append(FP16x16 { mag: 173136, sign: false }); - data.append(FP16x16 { mag: 312484, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23.cairo b/src/tests/nodes/log_fp8x23.cairo deleted file mode 100644 index 2d1d9e9fc..000000000 --- a/src/tests/nodes/log_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo deleted file mode 100644 index 47f76e26e..000000000 --- a/src/tests/nodes/log_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 529321914, sign: false }); - data.append(FP8x23 { mag: 645273413, sign: false }); - data.append(FP8x23 { mag: 920206991, sign: false }); - data.append(FP8x23 { mag: 949171945, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo deleted file mode 100644 index 35d97375e..000000000 --- a/src/tests/nodes/log_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 34768449, sign: false }); - data.append(FP8x23 { mag: 36430042, sign: false }); - data.append(FP8x23 { mag: 39407365, sign: false }); - data.append(FP8x23 { mag: 39667339, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16.cairo b/src/tests/nodes/log_i32_fp16x16.cairo deleted file mode 100644 index 98a77e2f2..000000000 --- a/src/tests/nodes/log_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_log_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/input_0.cairo b/src/tests/nodes/log_i32_fp16x16/input_0.cairo deleted file mode 100644 index 96ec86221..000000000 --- a/src/tests/nodes/log_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 85, sign: false }); - data.append(i32 { mag: 94, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/output_0.cairo b/src/tests/nodes/log_i32_fp16x16/output_0.cairo deleted file mode 100644 index d99b5c4f3..000000000 --- a/src/tests/nodes/log_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 311531, sign: false }); - data.append(FP16x16 { mag: 293426, sign: false }); - data.append(FP16x16 { mag: 291153, sign: false }); - data.append(FP16x16 { mag: 297749, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23.cairo b/src/tests/nodes/log_i32_fp8x23.cairo deleted file mode 100644 index 2878f99a1..000000000 --- a/src/tests/nodes/log_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/input_0.cairo b/src/tests/nodes/log_i32_fp8x23/input_0.cairo deleted file mode 100644 index 3d369d64f..000000000 --- a/src/tests/nodes/log_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 85, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/output_0.cairo b/src/tests/nodes/log_i32_fp8x23/output_0.cairo deleted file mode 100644 index 11da5d5ba..000000000 --- a/src/tests/nodes/log_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25130023, sign: false }); - data.append(FP8x23 { mag: 30944563, sign: false }); - data.append(FP8x23 { mag: 34204863, sign: false }); - data.append(FP8x23 { mag: 37267659, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16.cairo b/src/tests/nodes/log_i8_fp16x16.cairo deleted file mode 100644 index 3a29b8c57..000000000 --- a/src/tests/nodes/log_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/input_0.cairo b/src/tests/nodes/log_i8_fp16x16/input_0.cairo deleted file mode 100644 index 29fd507b4..000000000 --- a/src/tests/nodes/log_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 37, sign: false }); - data.append(i8 { mag: 68, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/output_0.cairo b/src/tests/nodes/log_i8_fp16x16/output_0.cairo deleted file mode 100644 index e4ec8654c..000000000 --- a/src/tests/nodes/log_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 275558, sign: false }); - data.append(FP16x16 { mag: 303741, sign: false }); - data.append(FP16x16 { mag: 236645, sign: false }); - data.append(FP16x16 { mag: 276529, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23.cairo b/src/tests/nodes/log_i8_fp8x23.cairo deleted file mode 100644 index 999e9727b..000000000 --- a/src/tests/nodes/log_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_log_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/input_0.cairo b/src/tests/nodes/log_i8_fp8x23/input_0.cairo deleted file mode 100644 index 3d30917fd..000000000 --- a/src/tests/nodes/log_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/output_0.cairo b/src/tests/nodes/log_i8_fp8x23/output_0.cairo deleted file mode 100644 index 3de1f46e0..000000000 --- a/src/tests/nodes/log_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9216000, sign: false }); - data.append(FP8x23 { mag: 5816320, sign: false }); - data.append(FP8x23 { mag: 9216000, sign: false }); - data.append(FP8x23 { mag: 11632640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16.cairo b/src/tests/nodes/log_u32_fp16x16.cairo deleted file mode 100644 index afce23f72..000000000 --- a/src/tests/nodes/log_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/input_0.cairo b/src/tests/nodes/log_u32_fp16x16/input_0.cairo deleted file mode 100644 index 80854b406..000000000 --- a/src/tests/nodes/log_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(18); - data.append(112); - data.append(41); - data.append(31); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/output_0.cairo b/src/tests/nodes/log_u32_fp16x16/output_0.cairo deleted file mode 100644 index 1de71a2e6..000000000 --- a/src/tests/nodes/log_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 189423, sign: false }); - data.append(FP16x16 { mag: 309231, sign: false }); - data.append(FP16x16 { mag: 243372, sign: false }); - data.append(FP16x16 { mag: 225049, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23.cairo b/src/tests/nodes/log_u32_fp8x23.cairo deleted file mode 100644 index ea20a550a..000000000 --- a/src/tests/nodes/log_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_log_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/input_0.cairo b/src/tests/nodes/log_u32_fp8x23/input_0.cairo deleted file mode 100644 index 376fc7a0a..000000000 --- a/src/tests/nodes/log_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(12); - data.append(111); - data.append(35); - data.append(111); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/output_0.cairo b/src/tests/nodes/log_u32_fp8x23/output_0.cairo deleted file mode 100644 index b52db2414..000000000 --- a/src/tests/nodes/log_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 20844907, sign: false }); - data.append(FP8x23 { mag: 39506402, sign: false }); - data.append(FP8x23 { mag: 29824421, sign: false }); - data.append(FP8x23 { mag: 39506402, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo deleted file mode 100644 index b6b7493f3..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index 99c17af4b..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 116037, sign: false }); - data.append(FP16x16 { mag: 94428, sign: false }); - data.append(FP16x16 { mag: 182052, sign: false }); - data.append(FP16x16 { mag: 91686, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index b48cc7511..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86416, sign: true }); - data.append(FP16x16 { mag: 3721, sign: true }); - data.append(FP16x16 { mag: 20401, sign: true }); - data.append(FP16x16 { mag: 189836, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo deleted file mode 100644 index 6568d26fc..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index 9e122cb4c..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 37143, sign: true }); - data.append(FP16x16 { mag: 194436, sign: true }); - data.append(FP16x16 { mag: 74078, sign: true }); - data.append(FP16x16 { mag: 43388, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index 2808bc50d..000000000 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5690, sign: true }); - data.append(FP16x16 { mag: 162983, sign: true }); - data.append(FP16x16 { mag: 127562, sign: true }); - data.append(FP16x16 { mag: 10096, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo deleted file mode 100644 index 3a6d301f8..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index 651a079b7..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9437097, sign: false }); - data.append(FP8x23 { mag: 439107, sign: true }); - data.append(FP8x23 { mag: 8701053, sign: false }); - data.append(FP8x23 { mag: 11846800, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index 139c146e6..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5454588, sign: true }); - data.append(FP8x23 { mag: 14030456, sign: true }); - data.append(FP8x23 { mag: 6190632, sign: true }); - data.append(FP8x23 { mag: 1744548, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo deleted file mode 100644 index b68a9a0ea..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index e077c4de9..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6023735, sign: true }); - data.append(FP8x23 { mag: 7861841, sign: false }); - data.append(FP8x23 { mag: 20034366, sign: true }); - data.append(FP8x23 { mag: 4664398, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index 227b96407..000000000 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15352108, sign: true }); - data.append(FP8x23 { mag: 1466530, sign: true }); - data.append(FP8x23 { mag: 25129093, sign: true }); - data.append(FP8x23 { mag: 430328, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo deleted file mode 100644 index 06627d01f..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index f66676771..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index a9025f599..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo deleted file mode 100644 index 228e76326..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index dc47775c8..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index cc2416077..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo deleted file mode 100644 index 8959640df..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index f8b2f6ebf..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index 260ef17c9..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo deleted file mode 100644 index 3b2abfa33..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index b90417ff6..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index 81e97e847..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo deleted file mode 100644 index f3b20da9c..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index ede71260a..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index 343e50e81..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 3184, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 199792, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo deleted file mode 100644 index b2e77797b..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index a3dd92746..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index dd78e0de3..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3184, sign: true }); - data.append(FP16x16 { mag: 199792, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo deleted file mode 100644 index ce7d4da01..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index b21d95311..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index 1a7ed2187..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo deleted file mode 100644 index a5a53f329..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index f044e4ad4..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index f8c3b83dd..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 33706684, sign: true }); - data.append(FP8x23 { mag: 152252, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo deleted file mode 100644 index b4d650ba9..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index e60e786c9..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index ed8f143da..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo deleted file mode 100644 index 3ce6c3d95..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index 82ee05a7f..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(0); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index ba45ca63a..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo deleted file mode 100644 index 9462d37e6..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index 75b34128a..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index da12feb1f..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo deleted file mode 100644 index 40099d6b9..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index 950a39012..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index fda467366..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d.cairo b/src/tests/nodes/matmul_fp16x16_1d.cairo deleted file mode 100644 index 24be4db30..000000000 --- a/src/tests/nodes/matmul_fp16x16_1d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp16x16_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo deleted file mode 100644 index ab502bcdb..000000000 --- a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo deleted file mode 100644 index 765303e82..000000000 --- a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo deleted file mode 100644 index 6d577b145..000000000 --- a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2.cairo b/src/tests/nodes/matmul_fp16x16_1x2.cairo deleted file mode 100644 index f4377c513..000000000 --- a/src/tests/nodes/matmul_fp16x16_1x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp16x16_1x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo deleted file mode 100644 index e10d6551a..000000000 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo deleted file mode 100644 index cf9a1aa92..000000000 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo deleted file mode 100644 index 22dbef96b..000000000 --- a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1.cairo b/src/tests/nodes/matmul_fp16x16_2x1.cairo deleted file mode 100644 index f45009611..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x1.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp16x16_2x1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo deleted file mode 100644 index 42393acac..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo deleted file mode 100644 index 0b3d134b5..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo deleted file mode 100644 index d8a4a37b6..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2.cairo b/src/tests/nodes/matmul_fp16x16_2x2.cairo deleted file mode 100644 index a8d91c33c..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp16x16_2x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo deleted file mode 100644 index 3bd275f59..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo deleted file mode 100644 index 90bf57259..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo deleted file mode 100644 index bea19e5c9..000000000 --- a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 655360, sign: true }); - data.append(FP16x16 { mag: 720896, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d.cairo b/src/tests/nodes/matmul_fp8x23_1d.cairo deleted file mode 100644 index a0f6f06dc..000000000 --- a/src/tests/nodes/matmul_fp8x23_1d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp8x23_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo deleted file mode 100644 index f9b8e9b16..000000000 --- a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo deleted file mode 100644 index 8a3295aa9..000000000 --- a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo deleted file mode 100644 index 8d28bb17b..000000000 --- a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2.cairo b/src/tests/nodes/matmul_fp8x23_1x2.cairo deleted file mode 100644 index 917077bdc..000000000 --- a/src/tests/nodes/matmul_fp8x23_1x2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp8x23_1x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo deleted file mode 100644 index aaecf20b6..000000000 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo deleted file mode 100644 index 01d9c442a..000000000 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo deleted file mode 100644 index 37368c096..000000000 --- a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 75497472, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1.cairo b/src/tests/nodes/matmul_fp8x23_2x1.cairo deleted file mode 100644 index 28897f7a7..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp8x23_2x1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo deleted file mode 100644 index 9fa618a1a..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo deleted file mode 100644 index dee47a74f..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo deleted file mode 100644 index afc5f989b..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2.cairo b/src/tests/nodes/matmul_fp8x23_2x2.cairo deleted file mode 100644 index eec6e3841..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_fp8x23_2x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo deleted file mode 100644 index a3e9e8e9c..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo deleted file mode 100644 index d36a67981..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo deleted file mode 100644 index 238a9e08a..000000000 --- a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 67108864, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d.cairo b/src/tests/nodes/matmul_i32_1d.cairo deleted file mode 100644 index c06d06f18..000000000 --- a/src/tests/nodes/matmul_i32_1d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i32_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo deleted file mode 100644 index 1c369cc59..000000000 --- a/src/tests/nodes/matmul_i32_1d/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 61, sign: true }); - data.append(i32 { mag: 113, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo deleted file mode 100644 index b2eb68b26..000000000 --- a/src/tests/nodes/matmul_i32_1d/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 97, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo deleted file mode 100644 index 7acc6b511..000000000 --- a/src/tests/nodes/matmul_i32_1d/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 774, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2.cairo b/src/tests/nodes/matmul_i32_1x2.cairo deleted file mode 100644 index a523d326f..000000000 --- a/src/tests/nodes/matmul_i32_1x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i32_1x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo deleted file mode 100644 index 9fb9f7614..000000000 --- a/src/tests/nodes/matmul_i32_1x2/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 116, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo deleted file mode 100644 index c79bf40d4..000000000 --- a/src/tests/nodes/matmul_i32_1x2/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 49, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo deleted file mode 100644 index b0db023aa..000000000 --- a/src/tests/nodes/matmul_i32_1x2/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 14837, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1.cairo b/src/tests/nodes/matmul_i32_2x1.cairo deleted file mode 100644 index 2d9339ef8..000000000 --- a/src/tests/nodes/matmul_i32_2x1.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i32_2x1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo deleted file mode 100644 index bfe54ea87..000000000 --- a/src/tests/nodes/matmul_i32_2x1/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 126, sign: true }); - data.append(i32 { mag: 29, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo deleted file mode 100644 index 4cc4a1326..000000000 --- a/src/tests/nodes/matmul_i32_2x1/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 18, sign: true }); - data.append(i32 { mag: 22, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo deleted file mode 100644 index ea03de14b..000000000 --- a/src/tests/nodes/matmul_i32_2x1/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2268, sign: false }); - data.append(i32 { mag: 2772, sign: true }); - data.append(i32 { mag: 522, sign: true }); - data.append(i32 { mag: 638, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2.cairo b/src/tests/nodes/matmul_i32_2x2.cairo deleted file mode 100644 index 31ab7f222..000000000 --- a/src/tests/nodes/matmul_i32_2x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i32_2x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo deleted file mode 100644 index ec94cc957..000000000 --- a/src/tests/nodes/matmul_i32_2x2/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 8, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo deleted file mode 100644 index 8a8a37edc..000000000 --- a/src/tests/nodes/matmul_i32_2x2/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 105, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo deleted file mode 100644 index d2e2d7949..000000000 --- a/src/tests/nodes/matmul_i32_2x2/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8106, sign: true }); - data.append(i32 { mag: 2776, sign: false }); - data.append(i32 { mag: 1236, sign: true }); - data.append(i32 { mag: 3356, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d.cairo b/src/tests/nodes/matmul_i8_1d.cairo deleted file mode 100644 index 2cd44dc1c..000000000 --- a/src/tests/nodes/matmul_i8_1d.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i8_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo deleted file mode 100644 index 7c2f63a43..000000000 --- a/src/tests/nodes/matmul_i8_1d/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo deleted file mode 100644 index 9067510cb..000000000 --- a/src/tests/nodes/matmul_i8_1d/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo deleted file mode 100644 index c4167bdd3..000000000 --- a/src/tests/nodes/matmul_i8_1d/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 9, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2.cairo b/src/tests/nodes/matmul_i8_1x2.cairo deleted file mode 100644 index a09072f47..000000000 --- a/src/tests/nodes/matmul_i8_1x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i8_1x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo deleted file mode 100644 index 12bcf2716..000000000 --- a/src/tests/nodes/matmul_i8_1x2/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo deleted file mode 100644 index daf6bcad2..000000000 --- a/src/tests/nodes/matmul_i8_1x2/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo deleted file mode 100644 index 582a19dab..000000000 --- a/src/tests/nodes/matmul_i8_1x2/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1.cairo b/src/tests/nodes/matmul_i8_2x1.cairo deleted file mode 100644 index b8267f98d..000000000 --- a/src/tests/nodes/matmul_i8_2x1.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i8_2x1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo deleted file mode 100644 index 7d6f49afb..000000000 --- a/src/tests/nodes/matmul_i8_2x1/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo deleted file mode 100644 index 3564cfb32..000000000 --- a/src/tests/nodes/matmul_i8_2x1/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo deleted file mode 100644 index 8756347a1..000000000 --- a/src/tests/nodes/matmul_i8_2x1/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2.cairo b/src/tests/nodes/matmul_i8_2x2.cairo deleted file mode 100644 index c030e373e..000000000 --- a/src/tests/nodes/matmul_i8_2x2.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_i8_2x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo deleted file mode 100644 index bd16a02b8..000000000 --- a/src/tests/nodes/matmul_i8_2x2/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo deleted file mode 100644 index d8dd2b79c..000000000 --- a/src/tests/nodes/matmul_i8_2x2/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo deleted file mode 100644 index b2b553de9..000000000 --- a/src/tests/nodes/matmul_i8_2x2/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 18, sign: false }); - data.append(i8 { mag: 14, sign: true }); - data.append(i8 { mag: 20, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d.cairo b/src/tests/nodes/matmul_u32_1d.cairo deleted file mode 100644 index fac93202b..000000000 --- a/src/tests/nodes/matmul_u32_1d.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_u32_1d() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo deleted file mode 100644 index 91831eea5..000000000 --- a/src/tests/nodes/matmul_u32_1d/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(78); - data.append(41); - data.append(143); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo deleted file mode 100644 index d246c275b..000000000 --- a/src/tests/nodes/matmul_u32_1d/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(177); - data.append(153); - data.append(86); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo deleted file mode 100644 index 9ee66a4f3..000000000 --- a/src/tests/nodes/matmul_u32_1d/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(32377); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2.cairo b/src/tests/nodes/matmul_u32_1x2.cairo deleted file mode 100644 index b6055e676..000000000 --- a/src/tests/nodes/matmul_u32_1x2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_u32_1x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo deleted file mode 100644 index 04ed2a6bf..000000000 --- a/src/tests/nodes/matmul_u32_1x2/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(8); - data.append(229); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo deleted file mode 100644 index bcb37f5f3..000000000 --- a/src/tests/nodes/matmul_u32_1x2/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(230); - data.append(197); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo deleted file mode 100644 index dbc07696e..000000000 --- a/src/tests/nodes/matmul_u32_1x2/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(46953); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1.cairo b/src/tests/nodes/matmul_u32_2x1.cairo deleted file mode 100644 index fe9718e53..000000000 --- a/src/tests/nodes/matmul_u32_2x1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_u32_2x1() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo deleted file mode 100644 index a2fcb5539..000000000 --- a/src/tests/nodes/matmul_u32_2x1/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(238); - data.append(25); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo deleted file mode 100644 index 67dd60eef..000000000 --- a/src/tests/nodes/matmul_u32_2x1/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(50); - data.append(113); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo deleted file mode 100644 index 1a8924a87..000000000 --- a/src/tests/nodes/matmul_u32_2x1/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(11900); - data.append(26894); - data.append(1250); - data.append(2825); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2.cairo b/src/tests/nodes/matmul_u32_2x2.cairo deleted file mode 100644 index cbbadee2f..000000000 --- a/src/tests/nodes/matmul_u32_2x2.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_matmul_u32_2x2() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.matmul(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo deleted file mode 100644 index c73eafec0..000000000 --- a/src/tests/nodes/matmul_u32_2x2/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(244); - data.append(99); - data.append(109); - data.append(162); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo deleted file mode 100644 index eaa08c3c5..000000000 --- a/src/tests/nodes/matmul_u32_2x2/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(151); - data.append(68); - data.append(121); - data.append(170); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo deleted file mode 100644 index 5634e6398..000000000 --- a/src/tests/nodes/matmul_u32_2x2/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(48823); - data.append(33422); - data.append(36061); - data.append(34952); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo deleted file mode 100644 index f30de968f..000000000 --- a/src/tests/nodes/mul_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorMul}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo deleted file mode 100644 index 46e1a0173..000000000 --- a/src/tests/nodes/mul_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo deleted file mode 100644 index ab6d68502..000000000 --- a/src/tests/nodes/mul_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo deleted file mode 100644 index 8303b5b76..000000000 --- a/src/tests/nodes/mul_fp16x16/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo deleted file mode 100644 index 13eb0d3f0..000000000 --- a/src/tests/nodes/mul_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorMul}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index e55d66442..000000000 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index d62343f47..000000000 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index a70489936..000000000 --- a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 393216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo deleted file mode 100644 index b5ff09c3e..000000000 --- a/src/tests/nodes/mul_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorMul}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo deleted file mode 100644 index bb364f1ab..000000000 --- a/src/tests/nodes/mul_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo deleted file mode 100644 index 751982ba9..000000000 --- a/src/tests/nodes/mul_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo deleted file mode 100644 index 805f08c11..000000000 --- a/src/tests/nodes/mul_fp8x23/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo deleted file mode 100644 index d73cb8ff6..000000000 --- a/src/tests/nodes/mul_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorMul}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 3312730d1..000000000 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 871bb230a..000000000 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index fdc2a7376..000000000 --- a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32.cairo b/src/tests/nodes/mul_i32.cairo deleted file mode 100644 index ae1c81d32..000000000 --- a/src/tests/nodes/mul_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo deleted file mode 100644 index 245fe1ea2..000000000 --- a/src/tests/nodes/mul_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo deleted file mode 100644 index c3afa3a84..000000000 --- a/src/tests/nodes/mul_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo deleted file mode 100644 index 8d1b0c885..000000000 --- a/src/tests/nodes/mul_i32/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast.cairo b/src/tests/nodes/mul_i32_broadcast.cairo deleted file mode 100644 index fc928cd3d..000000000 --- a/src/tests/nodes/mul_i32_broadcast.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_mul_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo deleted file mode 100644 index 2614b2d06..000000000 --- a/src/tests/nodes/mul_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo deleted file mode 100644 index cc7759abf..000000000 --- a/src/tests/nodes/mul_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo deleted file mode 100644 index 6f32cbb37..000000000 --- a/src/tests/nodes/mul_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8.cairo b/src/tests/nodes/mul_i8.cairo deleted file mode 100644 index cfc4cc58e..000000000 --- a/src/tests/nodes/mul_i8.cairo +++ /dev/null @@ -1,23 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_mul_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo deleted file mode 100644 index 01df7f53e..000000000 --- a/src/tests/nodes/mul_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo deleted file mode 100644 index bcebf3b5c..000000000 --- a/src/tests/nodes/mul_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo deleted file mode 100644 index c498e53c2..000000000 --- a/src/tests/nodes/mul_i8/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast.cairo b/src/tests/nodes/mul_i8_broadcast.cairo deleted file mode 100644 index 713a9ec0b..000000000 --- a/src/tests/nodes/mul_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo deleted file mode 100644 index 84360e083..000000000 --- a/src/tests/nodes/mul_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo deleted file mode 100644 index 42c0a21b3..000000000 --- a/src/tests/nodes/mul_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo deleted file mode 100644 index e16882b8d..000000000 --- a/src/tests/nodes/mul_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32.cairo b/src/tests/nodes/mul_u32.cairo deleted file mode 100644 index a61137a71..000000000 --- a/src/tests/nodes/mul_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo deleted file mode 100644 index bae9c3b76..000000000 --- a/src/tests/nodes/mul_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(5); - data.append(4); - data.append(3); - data.append(5); - data.append(3); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(3); - data.append(5); - data.append(3); - data.append(5); - data.append(4); - data.append(4); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(5); - data.append(5); - data.append(3); - data.append(3); - data.append(4); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo deleted file mode 100644 index b40d1b863..000000000 --- a/src/tests/nodes/mul_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(2); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(2); - data.append(0); - data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo deleted file mode 100644 index 9743e9666..000000000 --- a/src/tests/nodes/mul_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(5); - data.append(4); - data.append(0); - data.append(5); - data.append(6); - data.append(8); - data.append(0); - data.append(5); - data.append(5); - data.append(0); - data.append(0); - data.append(6); - data.append(0); - data.append(4); - data.append(4); - data.append(0); - data.append(4); - data.append(10); - data.append(0); - data.append(5); - data.append(5); - data.append(6); - data.append(6); - data.append(8); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast.cairo b/src/tests/nodes/mul_u32_broadcast.cairo deleted file mode 100644 index 470ca1566..000000000 --- a/src/tests/nodes/mul_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_mul_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 * input_1; - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo deleted file mode 100644 index 3f6f1febd..000000000 --- a/src/tests/nodes/mul_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(3); - data.append(4); - data.append(3); - data.append(4); - data.append(5); - data.append(3); - data.append(5); - data.append(3); - data.append(5); - data.append(5); - data.append(3); - data.append(5); - data.append(5); - data.append(5); - data.append(5); - data.append(3); - data.append(4); - data.append(3); - data.append(3); - data.append(3); - data.append(3); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo deleted file mode 100644 index b4c0b55bb..000000000 --- a/src/tests/nodes/mul_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(0); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo deleted file mode 100644 index 15deb75b2..000000000 --- a/src/tests/nodes/mul_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(10); - data.append(10); - data.append(8); - data.append(0); - data.append(0); - data.append(0); - data.append(6); - data.append(8); - data.append(10); - data.append(6); - data.append(10); - data.append(6); - data.append(0); - data.append(0); - data.append(0); - data.append(10); - data.append(10); - data.append(10); - data.append(10); - data.append(6); - data.append(8); - data.append(0); - data.append(0); - data.append(0); - data.append(6); - data.append(8); - data.append(6); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16.cairo b/src/tests/nodes/or_fp16x16.cairo deleted file mode 100644 index 89bd34c5b..000000000 --- a/src/tests/nodes/or_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo deleted file mode 100644 index b924b44e2..000000000 --- a/src/tests/nodes/or_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo deleted file mode 100644 index bfe1f8987..000000000 --- a/src/tests/nodes/or_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo deleted file mode 100644 index 2d266e42d..000000000 --- a/src/tests/nodes/or_fp16x16/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast.cairo b/src/tests/nodes/or_fp16x16_broadcast.cairo deleted file mode 100644 index 1f86096ac..000000000 --- a/src/tests/nodes/or_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 3717f8bf8..000000000 --- a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index e773dba79..000000000 --- a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23.cairo b/src/tests/nodes/or_fp8x23.cairo deleted file mode 100644 index 7a8c4e3c0..000000000 --- a/src/tests/nodes/or_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo deleted file mode 100644 index e6a86e0a3..000000000 --- a/src/tests/nodes/or_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo deleted file mode 100644 index 232918288..000000000 --- a/src/tests/nodes/or_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo deleted file mode 100644 index f6699346a..000000000 --- a/src/tests/nodes/or_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast.cairo b/src/tests/nodes/or_fp8x23_broadcast.cairo deleted file mode 100644 index 46451914c..000000000 --- a/src/tests/nodes/or_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 5875d3a48..000000000 --- a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 7c903a7b1..000000000 --- a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index bd196cf3c..000000000 --- a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32.cairo b/src/tests/nodes/or_i32.cairo deleted file mode 100644 index 217a49069..000000000 --- a/src/tests/nodes/or_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo deleted file mode 100644 index daee2cd25..000000000 --- a/src/tests/nodes/or_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo deleted file mode 100644 index 29e1ef774..000000000 --- a/src/tests/nodes/or_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo deleted file mode 100644 index abc95e344..000000000 --- a/src/tests/nodes/or_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast.cairo b/src/tests/nodes/or_i32_broadcast.cairo deleted file mode 100644 index 368331e42..000000000 --- a/src/tests/nodes/or_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo deleted file mode 100644 index aa07975d9..000000000 --- a/src/tests/nodes/or_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo deleted file mode 100644 index 4d2e8fcc9..000000000 --- a/src/tests/nodes/or_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo deleted file mode 100644 index d8b1b5b6b..000000000 --- a/src/tests/nodes/or_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8.cairo b/src/tests/nodes/or_i8.cairo deleted file mode 100644 index 6c3344085..000000000 --- a/src/tests/nodes/or_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo deleted file mode 100644 index c90d07ebe..000000000 --- a/src/tests/nodes/or_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo deleted file mode 100644 index 104f34b13..000000000 --- a/src/tests/nodes/or_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo deleted file mode 100644 index e06d29e92..000000000 --- a/src/tests/nodes/or_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast.cairo b/src/tests/nodes/or_i8_broadcast.cairo deleted file mode 100644 index 4b711bbc9..000000000 --- a/src/tests/nodes/or_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo deleted file mode 100644 index e4723c948..000000000 --- a/src/tests/nodes/or_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo deleted file mode 100644 index a8a4ab7ea..000000000 --- a/src/tests/nodes/or_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/or_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32.cairo b/src/tests/nodes/or_u32.cairo deleted file mode 100644 index 5f5cf85c8..000000000 --- a/src/tests/nodes/or_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo deleted file mode 100644 index 83dd23c18..000000000 --- a/src/tests/nodes/or_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(5); - data.append(0); - data.append(2); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - data.append(1); - data.append(3); - data.append(5); - data.append(2); - data.append(4); - data.append(1); - data.append(4); - data.append(0); - data.append(1); - data.append(5); - data.append(4); - data.append(3); - data.append(2); - data.append(2); - data.append(4); - data.append(3); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo deleted file mode 100644 index f47e1a46a..000000000 --- a/src/tests/nodes/or_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); - data.append(3); - data.append(5); - data.append(3); - data.append(2); - data.append(5); - data.append(4); - data.append(2); - data.append(2); - data.append(5); - data.append(0); - data.append(5); - data.append(3); - data.append(4); - data.append(4); - data.append(0); - data.append(1); - data.append(3); - data.append(3); - data.append(2); - data.append(0); - data.append(5); - data.append(0); - data.append(1); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo deleted file mode 100644 index fabf22102..000000000 --- a/src/tests/nodes/or_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast.cairo b/src/tests/nodes/or_u32_broadcast.cairo deleted file mode 100644 index f51a9bf29..000000000 --- a/src/tests/nodes/or_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_or_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.or(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo deleted file mode 100644 index 914d3f569..000000000 --- a/src/tests/nodes/or_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(2); - data.append(3); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo deleted file mode 100644 index 96422a60d..000000000 --- a/src/tests/nodes/or_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/or_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo deleted file mode 100644 index 9df10344c..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp16x16_1D() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo deleted file mode 100644 index 27600d35a..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo deleted file mode 100644 index 67f34f79f..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo deleted file mode 100644 index 3a9435591..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp16x16_2D_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(1, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo deleted file mode 100644 index 67df4256d..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo deleted file mode 100644 index 97d085c82..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo deleted file mode 100644 index db5a7f34d..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp16x16_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo deleted file mode 100644 index 67df4256d..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo deleted file mode 100644 index 8c2d74e4f..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo deleted file mode 100644 index d8eb48d76..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp16x16_2D_keepdims() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, true); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo deleted file mode 100644 index 67df4256d..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo deleted file mode 100644 index 68c73da75..000000000 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo deleted file mode 100644 index 69950fe25..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp8x23_1D() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo deleted file mode 100644 index cf36019b6..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo deleted file mode 100644 index d09df6d26..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo deleted file mode 100644 index e7e022b95..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp8x23_2D_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(1, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo deleted file mode 100644 index 2477d67f2..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo deleted file mode 100644 index c1a779e53..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo deleted file mode 100644 index f9fbac82b..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp8x23_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo deleted file mode 100644 index 2477d67f2..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo deleted file mode 100644 index c9534e9d5..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo deleted file mode 100644 index 1a61500c4..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_fp8x23_2D_keepdims() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, true); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo deleted file mode 100644 index 2477d67f2..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo deleted file mode 100644 index 252227bf1..000000000 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D.cairo b/src/tests/nodes/reduce_sum_i32_1D.cairo deleted file mode 100644 index a4bd2cf69..000000000 --- a/src/tests/nodes/reduce_sum_i32_1D.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i32_1D() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo deleted file mode 100644 index 9624df005..000000000 --- a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo deleted file mode 100644 index 6a233dd79..000000000 --- a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo deleted file mode 100644 index c45951735..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i32_2D_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(1, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo deleted file mode 100644 index 3e5097679..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo deleted file mode 100644 index 96601be08..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default.cairo b/src/tests/nodes/reduce_sum_i32_2D_default.cairo deleted file mode 100644 index 0463a5316..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_default.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo deleted file mode 100644 index 3e5097679..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo deleted file mode 100644 index 257e9ed47..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo deleted file mode 100644 index 7cc27dbe5..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i32_2D_keepdims() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, true); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo deleted file mode 100644 index 3e5097679..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo deleted file mode 100644 index ceb7a72bb..000000000 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo deleted file mode 100644 index 4ac731eb3..000000000 --- a/src/tests/nodes/reduce_sum_i8_1D.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i8_1D() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo deleted file mode 100644 index 2b523b042..000000000 --- a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo deleted file mode 100644 index a7f1fb94c..000000000 --- a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo deleted file mode 100644 index d29891f30..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i8_2D_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(1, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo deleted file mode 100644 index 3feeb101a..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo deleted file mode 100644 index 923daa0ed..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo deleted file mode 100644 index 41ea95187..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i8_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo deleted file mode 100644 index 3feeb101a..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo deleted file mode 100644 index 622ef7cb7..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo deleted file mode 100644 index 7de25186e..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_i8_2D_keepdims() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, true); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo deleted file mode 100644 index 3feeb101a..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo deleted file mode 100644 index 31670a5c3..000000000 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D.cairo b/src/tests/nodes/reduce_sum_u32_1D.cairo deleted file mode 100644 index 54e336df7..000000000 --- a/src/tests/nodes/reduce_sum_u32_1D.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_u32_1D() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo deleted file mode 100644 index f9eb0d735..000000000 --- a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo deleted file mode 100644 index ad666dae7..000000000 --- a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo +++ /dev/null @@ -1,15 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo deleted file mode 100644 index 47239a485..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_u32_2D_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(1, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo deleted file mode 100644 index e00a217d3..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo deleted file mode 100644 index 026127699..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default.cairo b/src/tests/nodes/reduce_sum_u32_2D_default.cairo deleted file mode 100644 index 1c7c48815..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_default.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_u32_2D_default() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, false); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo deleted file mode 100644 index e00a217d3..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo deleted file mode 100644 index 2ddf146d8..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo +++ /dev/null @@ -1,16 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo deleted file mode 100644 index 9270d5893..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_reduce_sum_u32_2D_keepdims() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.reduce_sum(0, true); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo deleted file mode 100644 index e00a217d3..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo deleted file mode 100644 index de4da0924..000000000 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16.cairo b/src/tests/nodes/relu_fp16x16.cairo deleted file mode 100644 index 2ffcb34d5..000000000 --- a/src/tests/nodes/relu_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_relu_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::relu(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo deleted file mode 100644 index 8b2af6459..000000000 --- a/src/tests/nodes/relu_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 241623, sign: false }); - data.append(FP16x16 { mag: 135784, sign: false }); - data.append(FP16x16 { mag: 91618, sign: true }); - data.append(FP16x16 { mag: 52199, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo deleted file mode 100644 index 68347d5fc..000000000 --- a/src/tests/nodes/relu_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 241623, sign: false }); - data.append(FP16x16 { mag: 135784, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 52199, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23.cairo b/src/tests/nodes/relu_fp8x23.cairo deleted file mode 100644 index 217ce23c8..000000000 --- a/src/tests/nodes/relu_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_relu_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::relu(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo deleted file mode 100644 index b06411d55..000000000 --- a/src/tests/nodes/relu_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 23718869, sign: false }); - data.append(FP8x23 { mag: 34552664, sign: true }); - data.append(FP8x23 { mag: 34211188, sign: true }); - data.append(FP8x23 { mag: 16610226, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo deleted file mode 100644 index 9ddd451fa..000000000 --- a/src/tests/nodes/relu_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 23718870, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32.cairo b/src/tests/nodes/relu_i32.cairo deleted file mode 100644 index a8e941f40..000000000 --- a/src/tests/nodes/relu_i32.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_relu_i32() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::relu(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo deleted file mode 100644 index 68e0b8271..000000000 --- a/src/tests/nodes/relu_i32/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo deleted file mode 100644 index fe08ca50a..000000000 --- a/src/tests/nodes/relu_i32/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8.cairo b/src/tests/nodes/relu_i8.cairo deleted file mode 100644 index 087b6bac1..000000000 --- a/src/tests/nodes/relu_i8.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_relu_i8() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::relu(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo deleted file mode 100644 index a2a473c2e..000000000 --- a/src/tests/nodes/relu_i8/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo deleted file mode 100644 index 929f1a3a2..000000000 --- a/src/tests/nodes/relu_i8/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16.cairo b/src/tests/nodes/sigmoid_fp16x16.cairo deleted file mode 100644 index 12835e44f..000000000 --- a/src/tests/nodes/sigmoid_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo deleted file mode 100644 index bfb2c66b4..000000000 --- a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 40935, sign: true }); - data.append(FP16x16 { mag: 33897, sign: false }); - data.append(FP16x16 { mag: 97672, sign: true }); - data.append(FP16x16 { mag: 73532, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo deleted file mode 100644 index b4145ab87..000000000 --- a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 22854, sign: false }); - data.append(FP16x16 { mag: 41058, sign: false }); - data.append(FP16x16 { mag: 12049, sign: false }); - data.append(FP16x16 { mag: 49437, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23.cairo b/src/tests/nodes/sigmoid_fp8x23.cairo deleted file mode 100644 index 25cf33e3f..000000000 --- a/src/tests/nodes/sigmoid_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo deleted file mode 100644 index 50ae1d44f..000000000 --- a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13876472, sign: true }); - data.append(FP8x23 { mag: 18112152, sign: false }); - data.append(FP8x23 { mag: 21105010, sign: true }); - data.append(FP8x23 { mag: 17882688, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo deleted file mode 100644 index 3d3145a5b..000000000 --- a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1346720, sign: false }); - data.append(FP8x23 { mag: 7520550, sign: false }); - data.append(FP8x23 { mag: 627049, sign: false }); - data.append(FP8x23 { mag: 889577, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16.cairo b/src/tests/nodes/sigmoid_i32_fp16x16.cairo deleted file mode 100644 index 5db6c853d..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo deleted file mode 100644 index 900f82ac2..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo deleted file mode 100644 index b0863f3b2..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 57723, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 17625, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23.cairo b/src/tests/nodes/sigmoid_i32_fp8x23.cairo deleted file mode 100644 index b99620ea5..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo deleted file mode 100644 index 2c34d4543..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo deleted file mode 100644 index 2d556bc5b..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 397837, sign: false }); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 397837, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16.cairo b/src/tests/nodes/sigmoid_i8_fp16x16.cairo deleted file mode 100644 index 38629388a..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo deleted file mode 100644 index ab6e721de..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo deleted file mode 100644 index 38f601433..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3108, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23.cairo b/src/tests/nodes/sigmoid_i8_fp8x23.cairo deleted file mode 100644 index 7f46e589d..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo deleted file mode 100644 index cb2feb918..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo deleted file mode 100644 index a4a248dfd..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 2256044, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16.cairo b/src/tests/nodes/sigmoid_u32_fp16x16.cairo deleted file mode 100644 index e3baabf94..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo deleted file mode 100644 index 8ff7d31e7..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo deleted file mode 100644 index 7de14684f..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23.cairo b/src/tests/nodes/sigmoid_u32_fp8x23.cairo deleted file mode 100644 index 34db8bad6..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo deleted file mode 100644 index 8cef2b8ea..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo deleted file mode 100644 index c296e0925..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 6132564, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16.cairo b/src/tests/nodes/sin_fp16x16.cairo deleted file mode 100644 index b30fb7648..000000000 --- a/src/tests/nodes/sin_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo deleted file mode 100644 index bd03b9a6f..000000000 --- a/src/tests/nodes/sin_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 187441, sign: true }); - data.append(FP16x16 { mag: 123153, sign: false }); - data.append(FP16x16 { mag: 59844, sign: true }); - data.append(FP16x16 { mag: 76013, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo deleted file mode 100644 index 1ff0c63f0..000000000 --- a/src/tests/nodes/sin_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 18203, sign: true }); - data.append(FP16x16 { mag: 62444, sign: false }); - data.append(FP16x16 { mag: 51867, sign: true }); - data.append(FP16x16 { mag: 60080, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23.cairo b/src/tests/nodes/sin_fp8x23.cairo deleted file mode 100644 index 5b25b37f9..000000000 --- a/src/tests/nodes/sin_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo deleted file mode 100644 index f2268cf33..000000000 --- a/src/tests/nodes/sin_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15411983, sign: false }); - data.append(FP8x23 { mag: 1403069, sign: false }); - data.append(FP8x23 { mag: 11223653, sign: true }); - data.append(FP8x23 { mag: 30290440, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo deleted file mode 100644 index 0603301c5..000000000 --- a/src/tests/nodes/sin_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8092576, sign: false }); - data.append(FP8x23 { mag: 1396536, sign: false }); - data.append(FP8x23 { mag: 8162255, sign: true }); - data.append(FP8x23 { mag: 3793918, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16.cairo b/src/tests/nodes/sin_i32_fp16x16.cairo deleted file mode 100644 index dbf5bdc71..000000000 --- a/src/tests/nodes/sin_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sin_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo deleted file mode 100644 index f74593395..000000000 --- a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 105, sign: false }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 109, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo deleted file mode 100644 index 4650c276d..000000000 --- a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 15509, sign: false }); - data.append(FP16x16 { mag: 63605, sign: true }); - data.append(FP16x16 { mag: 58588, sign: false }); - data.append(FP16x16 { mag: 53526, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23.cairo b/src/tests/nodes/sin_i32_fp8x23.cairo deleted file mode 100644 index 05f4b9e7a..000000000 --- a/src/tests/nodes/sin_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo deleted file mode 100644 index 9824ce0e6..000000000 --- a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 111, sign: false }); - data.append(i32 { mag: 96, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo deleted file mode 100644 index 75c5ebc13..000000000 --- a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 222727, sign: true }); - data.append(FP8x23 { mag: 4563579, sign: true }); - data.append(FP8x23 { mag: 7252383, sign: true }); - data.append(FP8x23 { mag: 8250932, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16.cairo b/src/tests/nodes/sin_i8_fp16x16.cairo deleted file mode 100644 index 264ffa70b..000000000 --- a/src/tests/nodes/sin_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo deleted file mode 100644 index 3a8f196af..000000000 --- a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 75, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo deleted file mode 100644 index b5d193890..000000000 --- a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 55764, sign: false }); - data.append(FP16x16 { mag: 64920, sign: false }); - data.append(FP16x16 { mag: 60294, sign: false }); - data.append(FP16x16 { mag: 25413, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23.cairo b/src/tests/nodes/sin_i8_fp8x23.cairo deleted file mode 100644 index 2dcc22542..000000000 --- a/src/tests/nodes/sin_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sin_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo deleted file mode 100644 index 63c4cd2a8..000000000 --- a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo deleted file mode 100644 index e3daf33fd..000000000 --- a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6348800, sign: false }); - data.append(FP8x23 { mag: 2342912, sign: false }); - data.append(FP8x23 { mag: 7626752, sign: false }); - data.append(FP8x23 { mag: 1183744, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16.cairo b/src/tests/nodes/sin_u32_fp16x16.cairo deleted file mode 100644 index 714cce1ef..000000000 --- a/src/tests/nodes/sin_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo deleted file mode 100644 index d24d6e90b..000000000 --- a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(84); - data.append(64); - data.append(55); - data.append(91); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo deleted file mode 100644 index 1d7ae5924..000000000 --- a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 48050, sign: false }); - data.append(FP16x16 { mag: 60294, sign: false }); - data.append(FP16x16 { mag: 65519, sign: true }); - data.append(FP16x16 { mag: 6945, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23.cairo b/src/tests/nodes/sin_u32_fp8x23.cairo deleted file mode 100644 index 56a077154..000000000 --- a/src/tests/nodes/sin_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sin_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo deleted file mode 100644 index 0feed4ec4..000000000 --- a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(103); - data.append(98); - data.append(86); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo deleted file mode 100644 index 5d7c4e488..000000000 --- a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5226007, sign: false }); - data.append(FP8x23 { mag: 4809875, sign: true }); - data.append(FP8x23 { mag: 7746530, sign: true }); - data.append(FP8x23 { mag: 8337342, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16.cairo b/src/tests/nodes/sinh_fp16x16.cairo deleted file mode 100644 index d0a785790..000000000 --- a/src/tests/nodes/sinh_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo deleted file mode 100644 index cb301abc6..000000000 --- a/src/tests/nodes/sinh_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 191221, sign: true }); - data.append(FP16x16 { mag: 176805, sign: true }); - data.append(FP16x16 { mag: 179634, sign: false }); - data.append(FP16x16 { mag: 177006, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo deleted file mode 100644 index 97573fb94..000000000 --- a/src/tests/nodes/sinh_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 604463, sign: true }); - data.append(FP16x16 { mag: 484320, sign: true }); - data.append(FP16x16 { mag: 505875, sign: false }); - data.append(FP16x16 { mag: 485818, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23.cairo b/src/tests/nodes/sinh_fp8x23.cairo deleted file mode 100644 index e51a4ec81..000000000 --- a/src/tests/nodes/sinh_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo deleted file mode 100644 index 704e8fa73..000000000 --- a/src/tests/nodes/sinh_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2356323, sign: true }); - data.append(FP8x23 { mag: 4204899, sign: false }); - data.append(FP8x23 { mag: 21037695, sign: false }); - data.append(FP8x23 { mag: 20483758, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo deleted file mode 100644 index a39774287..000000000 --- a/src/tests/nodes/sinh_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2387433, sign: true }); - data.append(FP8x23 { mag: 4383215, sign: false }); - data.append(FP8x23 { mag: 51160183, sign: false }); - data.append(FP8x23 { mag: 47845830, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16.cairo b/src/tests/nodes/sinh_i32_fp16x16.cairo deleted file mode 100644 index 7e6670fc0..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sinh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 81c3df257..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo deleted file mode 100644 index bac42d2eb..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: true }); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 237689, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23.cairo b/src/tests/nodes/sinh_i32_fp8x23.cairo deleted file mode 100644 index 2e893d486..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 4272b7c70..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 348aefde3..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 30424310, sign: false }); - data.append(FP8x23 { mag: 30424310, sign: false }); - data.append(FP8x23 { mag: 84036025, sign: true }); - data.append(FP8x23 { mag: 9858302, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16.cairo b/src/tests/nodes/sinh_i8_fp16x16.cairo deleted file mode 100644 index f46919a68..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 82d35a470..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 78295a8ad..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - data.append(FP16x16 { mag: 77017, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23.cairo b/src/tests/nodes/sinh_i8_fp8x23.cairo deleted file mode 100644 index 19c214567..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo deleted file mode 100644 index 0e7e43479..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo deleted file mode 100644 index 6db67fd6d..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 84017152, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 30425088, sign: false }); - data.append(FP8x23 { mag: 9854976, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16.cairo b/src/tests/nodes/sinh_u32_fp16x16.cairo deleted file mode 100644 index ae0dccee7..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 42c5fa605..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(5); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo deleted file mode 100644 index 6262a7334..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 4862981, sign: false }); - data.append(FP16x16 { mag: 237689, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23.cairo b/src/tests/nodes/sinh_u32_fp8x23.cairo deleted file mode 100644 index e6d7775b5..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sinh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo deleted file mode 100644 index 8ae4884fe..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo deleted file mode 100644 index c37f8d53b..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 622461645, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 9858302, sign: false }); - data.append(FP8x23 { mag: 9858302, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16.cairo b/src/tests/nodes/softmax_fp16x16.cairo deleted file mode 100644 index 75d37d47a..000000000 --- a/src/tests/nodes/softmax_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo deleted file mode 100644 index 8f9595579..000000000 --- a/src/tests/nodes/softmax_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 11810, sign: true }); - data.append(FP16x16 { mag: 193132, sign: false }); - data.append(FP16x16 { mag: 147644, sign: false }); - data.append(FP16x16 { mag: 123955, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo deleted file mode 100644 index 22f5a06ad..000000000 --- a/src/tests/nodes/softmax_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2752, sign: false }); - data.append(FP16x16 { mag: 62783, sign: false }); - data.append(FP16x16 { mag: 64513, sign: false }); - data.append(FP16x16 { mag: 1022, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23.cairo b/src/tests/nodes/softmax_fp8x23.cairo deleted file mode 100644 index 43fcd5451..000000000 --- a/src/tests/nodes/softmax_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo deleted file mode 100644 index 65058c0f7..000000000 --- a/src/tests/nodes/softmax_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 18916324, sign: false }); - data.append(FP8x23 { mag: 24318116, sign: false }); - data.append(FP8x23 { mag: 4760436, sign: true }); - data.append(FP8x23 { mag: 15132412, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo deleted file mode 100644 index 35331ff12..000000000 --- a/src/tests/nodes/softmax_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7917831, sign: false }); - data.append(FP8x23 { mag: 8313213, sign: false }); - data.append(FP8x23 { mag: 470776, sign: false }); - data.append(FP8x23 { mag: 75394, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16.cairo b/src/tests/nodes/softmax_i32_fp16x16.cairo deleted file mode 100644 index 562aa7184..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softmax_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo deleted file mode 100644 index d439bd874..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo deleted file mode 100644 index 6cf881369..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 62427, sign: false }); - data.append(FP16x16 { mag: 3108, sign: false }); - data.append(FP16x16 { mag: 57723, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23.cairo b/src/tests/nodes/softmax_i32_fp8x23.cairo deleted file mode 100644 index 1cebfac1f..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo deleted file mode 100644 index dd6cf8ce4..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo deleted file mode 100644 index 1bb14d2a6..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16.cairo b/src/tests/nodes/softmax_i8_fp16x16.cairo deleted file mode 100644 index 65e01f9ee..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo deleted file mode 100644 index c668bcb8a..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo deleted file mode 100644 index 4ca9fe8fd..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 57696, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23.cairo b/src/tests/nodes/softmax_i8_fp8x23.cairo deleted file mode 100644 index 8d959ab33..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo deleted file mode 100644 index 54c5c38e0..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo deleted file mode 100644 index f7a847406..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 150784, sign: false }); - data.append(FP8x23 { mag: 8237056, sign: false }); - data.append(FP8x23 { mag: 150784, sign: false }); - data.append(FP8x23 { mag: 8237056, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16.cairo b/src/tests/nodes/softmax_u32_fp16x16.cairo deleted file mode 100644 index 83089c6a5..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo deleted file mode 100644 index 1f98644d5..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo deleted file mode 100644 index 03aea3cc1..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 17625, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23.cairo b/src/tests/nodes/softmax_u32_fp8x23.cairo deleted file mode 100644 index 0ea4e4595..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo deleted file mode 100644 index 5a0febf43..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(2); - data.append(0); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo deleted file mode 100644 index 4e7676d56..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16.cairo b/src/tests/nodes/softplus_fp16x16.cairo deleted file mode 100644 index 08f247238..000000000 --- a/src/tests/nodes/softplus_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo deleted file mode 100644 index 2ae94ce54..000000000 --- a/src/tests/nodes/softplus_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 38394, sign: false }); - data.append(FP16x16 { mag: 18964, sign: false }); - data.append(FP16x16 { mag: 98498, sign: false }); - data.append(FP16x16 { mag: 52313, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo deleted file mode 100644 index 4c11a1de6..000000000 --- a/src/tests/nodes/softplus_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 67396, sign: false }); - data.append(FP16x16 { mag: 55591, sign: false }); - data.append(FP16x16 { mag: 111662, sign: false }); - data.append(FP16x16 { mag: 76669, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23.cairo b/src/tests/nodes/softplus_fp8x23.cairo deleted file mode 100644 index 14f8c7cfd..000000000 --- a/src/tests/nodes/softplus_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo deleted file mode 100644 index 3af622a02..000000000 --- a/src/tests/nodes/softplus_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12544105, sign: false }); - data.append(FP8x23 { mag: 14326838, sign: true }); - data.append(FP8x23 { mag: 20577317, sign: false }); - data.append(FP8x23 { mag: 12791075, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo deleted file mode 100644 index d74d142dd..000000000 --- a/src/tests/nodes/softplus_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14240775, sign: false }); - data.append(FP8x23 { mag: 1397299, sign: false }); - data.append(FP8x23 { mag: 21269654, sign: false }); - data.append(FP8x23 { mag: 1651985, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16.cairo b/src/tests/nodes/softplus_i32_fp16x16.cairo deleted file mode 100644 index f6a6e6d8a..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softplus_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo deleted file mode 100644 index d1a22af92..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo deleted file mode 100644 index 3531d12ba..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23.cairo b/src/tests/nodes/softplus_i32_fp8x23.cairo deleted file mode 100644 index c8bd283ce..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo deleted file mode 100644 index 6f8606cad..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo deleted file mode 100644 index 960ea9cdf..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: false }); - data.append(FP8x23 { mag: 2627829, sign: false }); - data.append(FP8x23 { mag: 407580, sign: false }); - data.append(FP8x23 { mag: 11016437, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16.cairo b/src/tests/nodes/softplus_i8_fp16x16.cairo deleted file mode 100644 index a6dd6fa03..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo deleted file mode 100644 index 948d1da0f..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo deleted file mode 100644 index 7fe1f29d2..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86080, sign: false }); - data.append(FP16x16 { mag: 45440, sign: false }); - data.append(FP16x16 { mag: 45440, sign: false }); - data.append(FP16x16 { mag: 8344, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23.cairo b/src/tests/nodes/softplus_i8_fp8x23.cairo deleted file mode 100644 index 1e120a98c..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo deleted file mode 100644 index 53f1719d9..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo deleted file mode 100644 index 52bfff2a8..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5816320, sign: false }); - data.append(FP8x23 { mag: 17842176, sign: false }); - data.append(FP8x23 { mag: 407808, sign: false }); - data.append(FP8x23 { mag: 2629632, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16.cairo b/src/tests/nodes/softplus_u32_fp16x16.cairo deleted file mode 100644 index 280fb82bc..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo deleted file mode 100644 index a1d34cbd9..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo deleted file mode 100644 index 8269f105f..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 263333, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23.cairo b/src/tests/nodes/softplus_u32_fp8x23.cairo deleted file mode 100644 index 792bcb222..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo deleted file mode 100644 index fda3d5946..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(1); - data.append(2); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo deleted file mode 100644 index db922ab91..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25573404, sign: false }); - data.append(FP8x23 { mag: 11016437, sign: false }); - data.append(FP8x23 { mag: 17841965, sign: false }); - data.append(FP8x23 { mag: 41999372, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16.cairo b/src/tests/nodes/softsign_fp16x16.cairo deleted file mode 100644 index 73955b5d7..000000000 --- a/src/tests/nodes/softsign_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo deleted file mode 100644 index 8e05177c4..000000000 --- a/src/tests/nodes/softsign_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 422146, sign: false }); - data.append(FP16x16 { mag: 240652, sign: false }); - data.append(FP16x16 { mag: 153455, sign: false }); - data.append(FP16x16 { mag: 269993, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo deleted file mode 100644 index d2d593454..000000000 --- a/src/tests/nodes/softsign_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 56729, sign: false }); - data.append(FP16x16 { mag: 51508, sign: false }); - data.append(FP16x16 { mag: 45923, sign: false }); - data.append(FP16x16 { mag: 52735, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23.cairo b/src/tests/nodes/softsign_fp8x23.cairo deleted file mode 100644 index 2b39f1bd2..000000000 --- a/src/tests/nodes/softsign_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo deleted file mode 100644 index 7e1d74c03..000000000 --- a/src/tests/nodes/softsign_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13239928, sign: false }); - data.append(FP8x23 { mag: 30467697, sign: true }); - data.append(FP8x23 { mag: 7575559, sign: false }); - data.append(FP8x23 { mag: 22798419, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo deleted file mode 100644 index 445b41dd6..000000000 --- a/src/tests/nodes/softsign_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5135094, sign: false }); - data.append(FP8x23 { mag: 6577608, sign: true }); - data.append(FP8x23 { mag: 3980689, sign: false }); - data.append(FP8x23 { mag: 6132261, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16.cairo b/src/tests/nodes/softsign_i32_fp16x16.cairo deleted file mode 100644 index 11f1d313c..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softsign_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo deleted file mode 100644 index dc9085f7c..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo deleted file mode 100644 index 8d1dd9548..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 52428, sign: false }); - data.append(FP16x16 { mag: 54613, sign: true }); - data.append(FP16x16 { mag: 54613, sign: true }); - data.append(FP16x16 { mag: 54613, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23.cairo b/src/tests/nodes/softsign_i32_fp8x23.cairo deleted file mode 100644 index ffbd7a83b..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo deleted file mode 100644 index b5cc0488e..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo deleted file mode 100644 index 44f65c526..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 6291456, sign: true }); - data.append(FP8x23 { mag: 6291456, sign: false }); - data.append(FP8x23 { mag: 6710886, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16.cairo b/src/tests/nodes/softsign_i8_fp16x16.cairo deleted file mode 100644 index cd228c1bc..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo deleted file mode 100644 index adf27b956..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo deleted file mode 100644 index b57081c8c..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 52428, sign: false }); - data.append(FP16x16 { mag: 32768, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 43690, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23.cairo b/src/tests/nodes/softsign_i8_fp8x23.cairo deleted file mode 100644 index 57b76899b..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo deleted file mode 100644 index a7496cabc..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo deleted file mode 100644 index a002b1e5e..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5592405, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 6710886, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16.cairo b/src/tests/nodes/softsign_u32_fp16x16.cairo deleted file mode 100644 index fd84ba502..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo deleted file mode 100644 index 3e092792c..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(6); - data.append(6); - data.append(6); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo deleted file mode 100644 index fd862ce92..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 49152, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23.cairo b/src/tests/nodes/softsign_u32_fp8x23.cairo deleted file mode 100644 index 7aa28881d..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo deleted file mode 100644 index c20cebbf0..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(5); - data.append(0); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo deleted file mode 100644 index fdd572ff7..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6291456, sign: false }); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 7340032, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16.cairo b/src/tests/nodes/sqrt_fp16x16.cairo deleted file mode 100644 index 9d2da13a4..000000000 --- a/src/tests/nodes/sqrt_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo deleted file mode 100644 index a96888b3d..000000000 --- a/src/tests/nodes/sqrt_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 372701, sign: false }); - data.append(FP16x16 { mag: 96937, sign: false }); - data.append(FP16x16 { mag: 172145, sign: false }); - data.append(FP16x16 { mag: 5219, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo deleted file mode 100644 index e094f212a..000000000 --- a/src/tests/nodes/sqrt_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 156286, sign: false }); - data.append(FP16x16 { mag: 79704, sign: false }); - data.append(FP16x16 { mag: 106215, sign: false }); - data.append(FP16x16 { mag: 18494, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23.cairo b/src/tests/nodes/sqrt_fp8x23.cairo deleted file mode 100644 index c73e5b717..000000000 --- a/src/tests/nodes/sqrt_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo deleted file mode 100644 index 3fb85e1f5..000000000 --- a/src/tests/nodes/sqrt_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 38292032, sign: false }); - data.append(FP8x23 { mag: 45839538, sign: false }); - data.append(FP8x23 { mag: 48823512, sign: false }); - data.append(FP8x23 { mag: 48128484, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo deleted file mode 100644 index 55feba2e1..000000000 --- a/src/tests/nodes/sqrt_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17922523, sign: false }); - data.append(FP8x23 { mag: 19609434, sign: false }); - data.append(FP8x23 { mag: 20237621, sign: false }); - data.append(FP8x23 { mag: 20093058, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16.cairo b/src/tests/nodes/sqrt_i32_fp16x16.cairo deleted file mode 100644 index b6ba0d1a4..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo deleted file mode 100644 index 7b98c9ffd..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo deleted file mode 100644 index 777a3defd..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 92681, sign: false }); - data.append(FP16x16 { mag: 146542, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23.cairo b/src/tests/nodes/sqrt_i32_fp8x23.cairo deleted file mode 100644 index c86c826bf..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo deleted file mode 100644 index f8228d8f1..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo deleted file mode 100644 index fbbf08a50..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 14529495, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16.cairo b/src/tests/nodes/sqrt_i8_fp16x16.cairo deleted file mode 100644 index 1d883b9da..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo deleted file mode 100644 index e035f8764..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo deleted file mode 100644 index 175b505fe..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 113511, sign: false }); - data.append(FP16x16 { mag: 146542, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23.cairo b/src/tests/nodes/sqrt_i8_fp8x23.cairo deleted file mode 100644 index c733457a3..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo deleted file mode 100644 index 7fdbc3e45..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo deleted file mode 100644 index b5facfa3c..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 18759680, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16.cairo b/src/tests/nodes/sqrt_u32_fp16x16.cairo deleted file mode 100644 index 95e936ca3..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo deleted file mode 100644 index a1dff326d..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(4); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo deleted file mode 100644 index 1b62fbda0..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 113511, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23.cairo b/src/tests/nodes/sqrt_u32_fp8x23.cairo deleted file mode 100644 index af42a5339..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sqrt_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo deleted file mode 100644 index 75b76137b..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo deleted file mode 100644 index ae13720b0..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 14529495, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo deleted file mode 100644 index c23af0f02..000000000 --- a/src/tests/nodes/sub_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorSub}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo deleted file mode 100644 index cc23e4d24..000000000 --- a/src/tests/nodes/sub_fp16x16/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo deleted file mode 100644 index 4151de57d..000000000 --- a/src/tests/nodes/sub_fp16x16/input_1.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo deleted file mode 100644 index 4268e2a72..000000000 --- a/src/tests/nodes/sub_fp16x16/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo deleted file mode 100644 index 18dd83805..000000000 --- a/src/tests/nodes/sub_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{FP16x16Tensor, FP16x16TensorSub}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 179955bd6..000000000 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 894aae74b..000000000 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 6adeb1ede..000000000 --- a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,46 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo deleted file mode 100644 index f7d0a02fd..000000000 --- a/src/tests/nodes/sub_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorSub}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo deleted file mode 100644 index 51ecc175e..000000000 --- a/src/tests/nodes/sub_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo deleted file mode 100644 index a0f42ee28..000000000 --- a/src/tests/nodes/sub_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo deleted file mode 100644 index 492a45129..000000000 --- a/src/tests/nodes/sub_fp8x23/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo deleted file mode 100644 index f7c7e3ac9..000000000 --- a/src/tests/nodes/sub_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{FP8x23Tensor, FP8x23TensorSub}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index 9d9a924bc..000000000 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 544813ff3..000000000 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index 6b8456ba9..000000000 --- a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,45 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32.cairo b/src/tests/nodes/sub_i32.cairo deleted file mode 100644 index 214a5b9c5..000000000 --- a/src/tests/nodes/sub_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo deleted file mode 100644 index a454c6b3d..000000000 --- a/src/tests/nodes/sub_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo deleted file mode 100644 index c5fccc3d2..000000000 --- a/src/tests/nodes/sub_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo deleted file mode 100644 index 579b76211..000000000 --- a/src/tests/nodes/sub_i32/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast.cairo b/src/tests/nodes/sub_i32_broadcast.cairo deleted file mode 100644 index c3b2e0826..000000000 --- a/src/tests/nodes/sub_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo deleted file mode 100644 index 933aa3732..000000000 --- a/src/tests/nodes/sub_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo deleted file mode 100644 index 0b29a840d..000000000 --- a/src/tests/nodes/sub_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo deleted file mode 100644 index f536dbb84..000000000 --- a/src/tests/nodes/sub_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8.cairo b/src/tests/nodes/sub_i8.cairo deleted file mode 100644 index 4077c0c94..000000000 --- a/src/tests/nodes/sub_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo deleted file mode 100644 index dfd91850d..000000000 --- a/src/tests/nodes/sub_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo deleted file mode 100644 index 055bfa359..000000000 --- a/src/tests/nodes/sub_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo deleted file mode 100644 index 9a2280bfa..000000000 --- a/src/tests/nodes/sub_i8/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast.cairo b/src/tests/nodes/sub_i8_broadcast.cairo deleted file mode 100644 index 94d70cb85..000000000 --- a/src/tests/nodes/sub_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo deleted file mode 100644 index ade7249f8..000000000 --- a/src/tests/nodes/sub_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo deleted file mode 100644 index b31bebb23..000000000 --- a/src/tests/nodes/sub_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo deleted file mode 100644 index 27ab497ce..000000000 --- a/src/tests/nodes/sub_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32.cairo b/src/tests/nodes/sub_u32.cairo deleted file mode 100644 index 4e4dfeda2..000000000 --- a/src/tests/nodes/sub_u32.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_i32_fp16x16, u32TensorSub -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo deleted file mode 100644 index a62766b6a..000000000 --- a/src/tests/nodes/sub_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(5); - data.append(3); - data.append(3); - data.append(5); - data.append(5); - data.append(4); - data.append(4); - data.append(5); - data.append(3); - data.append(4); - data.append(5); - data.append(4); - data.append(3); - data.append(5); - data.append(3); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(3); - data.append(3); - data.append(5); - data.append(4); - data.append(4); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo deleted file mode 100644 index a500725f3..000000000 --- a/src/tests/nodes/sub_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(2); - data.append(1); - data.append(2); - data.append(1); - data.append(0); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - data.append(2); - data.append(1); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo deleted file mode 100644 index 3ed5a2dfa..000000000 --- a/src/tests/nodes/sub_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(3); - data.append(2); - data.append(1); - data.append(4); - data.append(5); - data.append(2); - data.append(2); - data.append(4); - data.append(2); - data.append(4); - data.append(4); - data.append(3); - data.append(3); - data.append(5); - data.append(2); - data.append(3); - data.append(3); - data.append(3); - data.append(4); - data.append(3); - data.append(2); - data.append(2); - data.append(5); - data.append(4); - data.append(4); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast.cairo b/src/tests/nodes/sub_u32_broadcast.cairo deleted file mode 100644 index a5ce30873..000000000 --- a/src/tests/nodes/sub_u32_broadcast.cairo +++ /dev/null @@ -1,24 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_i32_fp16x16, u32TensorSub -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sub_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0 - input_1; - - assert_eq(y, z); -} diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo deleted file mode 100644 index da618283c..000000000 --- a/src/tests/nodes/sub_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(4); - data.append(3); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(3); - data.append(5); - data.append(5); - data.append(5); - data.append(4); - data.append(5); - data.append(5); - data.append(5); - data.append(3); - data.append(3); - data.append(3); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo deleted file mode 100644 index 03d203849..000000000 --- a/src/tests/nodes/sub_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(3); - shape.append(1); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo deleted file mode 100644 index 723f0aa71..000000000 --- a/src/tests/nodes/sub_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(3); - data.append(2); - data.append(4); - data.append(4); - data.append(5); - data.append(4); - data.append(3); - data.append(4); - data.append(4); - data.append(3); - data.append(3); - data.append(4); - data.append(5); - data.append(5); - data.append(2); - data.append(4); - data.append(4); - data.append(4); - data.append(3); - data.append(4); - data.append(5); - data.append(5); - data.append(3); - data.append(2); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16.cairo b/src/tests/nodes/tanh_fp16x16.cairo deleted file mode 100644 index 8b53e5a7d..000000000 --- a/src/tests/nodes/tanh_fp16x16.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo deleted file mode 100644 index 2afbc53a7..000000000 --- a/src/tests/nodes/tanh_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 30249, sign: true }); - data.append(FP16x16 { mag: 165174, sign: true }); - data.append(FP16x16 { mag: 145036, sign: false }); - data.append(FP16x16 { mag: 81100, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo deleted file mode 100644 index c1b3c4637..000000000 --- a/src/tests/nodes/tanh_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 28269, sign: true }); - data.append(FP16x16 { mag: 64693, sign: true }); - data.append(FP16x16 { mag: 63986, sign: false }); - data.append(FP16x16 { mag: 55360, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23.cairo b/src/tests/nodes/tanh_fp8x23.cairo deleted file mode 100644 index aa6cd2dd2..000000000 --- a/src/tests/nodes/tanh_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - FP8x23Tensor, FP8x23TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo deleted file mode 100644 index 487610095..000000000 --- a/src/tests/nodes/tanh_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17641894, sign: true }); - data.append(FP8x23 { mag: 8395817, sign: true }); - data.append(FP8x23 { mag: 24711252, sign: true }); - data.append(FP8x23 { mag: 1922655, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo deleted file mode 100644 index 6e7d132f4..000000000 --- a/src/tests/nodes/tanh_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8142239, sign: true }); - data.append(FP8x23 { mag: 6391740, sign: true }); - data.append(FP8x23 { mag: 8342388, sign: true }); - data.append(FP8x23 { mag: 1889681, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16.cairo b/src/tests/nodes/tanh_i32_fp16x16.cairo deleted file mode 100644 index a8bcc81e8..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_tanh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 8d28d7382..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 6a39e6923..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 63178, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 63178, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23.cairo b/src/tests/nodes/tanh_i32_fp8x23.cairo deleted file mode 100644 index e14e5eaaa..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo deleted file mode 100644 index d21a25dae..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 8e68ae91b..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6388714, sign: true }); - data.append(FP8x23 { mag: 8086849, sign: false }); - data.append(FP8x23 { mag: 8086849, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16.cairo b/src/tests/nodes/tanh_i8_fp16x16.cairo deleted file mode 100644 index 933cabacc..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 09ea4bfc6..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo deleted file mode 100644 index b8fbaa5a8..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 49911, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23.cairo b/src/tests/nodes/tanh_i8_fp8x23.cairo deleted file mode 100644 index 2ebd7d5d8..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo deleted file mode 100644 index 4fc9c0b85..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo deleted file mode 100644 index f84795874..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6389760, sign: true }); - data.append(FP8x23 { mag: 6389760, sign: true }); - data.append(FP8x23 { mag: 6389760, sign: false }); - data.append(FP8x23 { mag: 6389760, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16.cairo b/src/tests/nodes/tanh_u32_fp16x16.cairo deleted file mode 100644 index 0d8b47a30..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo deleted file mode 100644 index fed0724b1..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); - data.append(4); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo deleted file mode 100644 index 490acdefd..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65492, sign: false }); - data.append(FP16x16 { mag: 65492, sign: false }); - data.append(FP16x16 { mag: 63178, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23.cairo b/src/tests/nodes/tanh_u32_fp8x23.cairo deleted file mode 100644 index 104a56b84..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_tanh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo deleted file mode 100644 index 3500947fa..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo deleted file mode 100644 index 1f3f8ded7..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8387846, sign: false }); - data.append(FP8x23 { mag: 8347124, sign: false }); - data.append(FP8x23 { mag: 8382981, sign: false }); - data.append(FP8x23 { mag: 8347124, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d.cairo b/src/tests/nodes/transpose_fp16x16_2d.cairo deleted file mode 100644 index d8b59e3ca..000000000 --- a/src/tests/nodes/transpose_fp16x16_2d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_fp16x16_2d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo deleted file mode 100644 index 4b1e3682c..000000000 --- a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 4325376, sign: true }); - data.append(FP16x16 { mag: 7864320, sign: true }); - data.append(FP16x16 { mag: 4587520, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo deleted file mode 100644 index 371a37677..000000000 --- a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 7864320, sign: true }); - data.append(FP16x16 { mag: 4325376, sign: true }); - data.append(FP16x16 { mag: 4587520, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d.cairo b/src/tests/nodes/transpose_fp16x16_3d.cairo deleted file mode 100644 index 25fb6587d..000000000 --- a/src/tests/nodes/transpose_fp16x16_3d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - FP16x16Tensor, FP16x16TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_fp16x16_3d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 2, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo deleted file mode 100644 index 09511a484..000000000 --- a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 7012352, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 3866624, sign: true }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo deleted file mode 100644 index a3f081067..000000000 --- a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo +++ /dev/null @@ -1,27 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 7012352, sign: true }); - data.append(FP16x16 { mag: 3866624, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d.cairo b/src/tests/nodes/transpose_fp8x23_2d.cairo deleted file mode 100644 index a956056f8..000000000 --- a/src/tests/nodes/transpose_fp8x23_2d.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_fp8x23_2d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo deleted file mode 100644 index f60cf6123..000000000 --- a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo deleted file mode 100644 index 451188469..000000000 --- a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d.cairo b/src/tests/nodes/transpose_fp8x23_3d.cairo deleted file mode 100644 index e8c59b302..000000000 --- a/src/tests/nodes/transpose_fp8x23_3d.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_fp8x23_3d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 2, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo deleted file mode 100644 index f802eb8fd..000000000 --- a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 905969664, sign: false }); - data.append(FP8x23 { mag: 838860800, sign: true }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: true }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo deleted file mode 100644 index c42619425..000000000 --- a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo +++ /dev/null @@ -1,26 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 905969664, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: true }); - data.append(FP8x23 { mag: 838860800, sign: true }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d.cairo b/src/tests/nodes/transpose_i32_2d.cairo deleted file mode 100644 index 7fba5bfda..000000000 --- a/src/tests/nodes/transpose_i32_2d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_i32_2d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo deleted file mode 100644 index 303348a4c..000000000 --- a/src/tests/nodes/transpose_i32_2d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 104, sign: true }); - data.append(i32 { mag: 99, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo deleted file mode 100644 index 549fd3e7f..000000000 --- a/src/tests/nodes/transpose_i32_2d/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 104, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 99, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d.cairo b/src/tests/nodes/transpose_i32_3d.cairo deleted file mode 100644 index 34e32772d..000000000 --- a/src/tests/nodes/transpose_i32_3d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_i32_3d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 2, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo deleted file mode 100644 index d30187fb9..000000000 --- a/src/tests/nodes/transpose_i32_3d/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 70, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo deleted file mode 100644 index 579d195a9..000000000 --- a/src/tests/nodes/transpose_i32_3d/output_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 70, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d.cairo b/src/tests/nodes/transpose_i8_2d.cairo deleted file mode 100644 index ffda08d78..000000000 --- a/src/tests/nodes/transpose_i8_2d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_i8_2d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo deleted file mode 100644 index ae41c45ad..000000000 --- a/src/tests/nodes/transpose_i8_2d/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 41, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo deleted file mode 100644 index 0bc30234c..000000000 --- a/src/tests/nodes/transpose_i8_2d/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 41, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d.cairo b/src/tests/nodes/transpose_i8_3d.cairo deleted file mode 100644 index 9cb8c0a1e..000000000 --- a/src/tests/nodes/transpose_i8_3d.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_i8_3d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 2, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo deleted file mode 100644 index 2bd90f187..000000000 --- a/src/tests/nodes/transpose_i8_3d/input_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 30, sign: true }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 28, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo deleted file mode 100644 index 2e2f427c3..000000000 --- a/src/tests/nodes/transpose_i8_3d/output_0.cairo +++ /dev/null @@ -1,25 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 30, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 28, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d.cairo b/src/tests/nodes/transpose_u32_2d.cairo deleted file mode 100644 index 7361e5543..000000000 --- a/src/tests/nodes/transpose_u32_2d.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_u32_2d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo deleted file mode 100644 index 377408d4d..000000000 --- a/src/tests/nodes/transpose_u32_2d/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(201); - data.append(13); - data.append(203); - data.append(125); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo deleted file mode 100644 index acf45884f..000000000 --- a/src/tests/nodes/transpose_u32_2d/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(201); - data.append(203); - data.append(13); - data.append(125); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d.cairo b/src/tests/nodes/transpose_u32_3d.cairo deleted file mode 100644 index 34d076ad7..000000000 --- a/src/tests/nodes/transpose_u32_3d.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_transpose_u32_3d() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.transpose(array![1, 2, 0].span()); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo deleted file mode 100644 index bc616e439..000000000 --- a/src/tests/nodes/transpose_u32_3d/input_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(180); - data.append(20); - data.append(198); - data.append(208); - data.append(61); - data.append(240); - data.append(165); - data.append(75); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo deleted file mode 100644 index d345ed817..000000000 --- a/src/tests/nodes/transpose_u32_3d/output_0.cairo +++ /dev/null @@ -1,24 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(180); - data.append(61); - data.append(20); - data.append(240); - data.append(198); - data.append(165); - data.append(208); - data.append(75); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16.cairo b/src/tests/nodes/xor_fp16x16.cairo deleted file mode 100644 index cd2409c28..000000000 --- a/src/tests/nodes/xor_fp16x16.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_fp16x16() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo deleted file mode 100644 index 84d334bcf..000000000 --- a/src/tests/nodes/xor_fp16x16/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo deleted file mode 100644 index d0ab3e715..000000000 --- a/src/tests/nodes/xor_fp16x16/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo deleted file mode 100644 index fc5a7363d..000000000 --- a/src/tests/nodes/xor_fp16x16/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast.cairo b/src/tests/nodes/xor_fp16x16_broadcast.cairo deleted file mode 100644 index d4246d42a..000000000 --- a/src/tests/nodes/xor_fp16x16_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_fp16x16_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo deleted file mode 100644 index 8af3b0551..000000000 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo deleted file mode 100644 index 5b5792dee..000000000 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; -use orion::numbers::FP16x16; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo deleted file mode 100644 index 1d0d3e4e8..000000000 --- a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23.cairo b/src/tests/nodes/xor_fp8x23.cairo deleted file mode 100644 index 13b17c930..000000000 --- a/src/tests/nodes/xor_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_fp8x23() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo deleted file mode 100644 index df9bc4560..000000000 --- a/src/tests/nodes/xor_fp8x23/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo deleted file mode 100644 index 42fb3e066..000000000 --- a/src/tests/nodes/xor_fp8x23/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo deleted file mode 100644 index c9175b03b..000000000 --- a/src/tests/nodes/xor_fp8x23/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast.cairo b/src/tests/nodes/xor_fp8x23_broadcast.cairo deleted file mode 100644 index 163c3060f..000000000 --- a/src/tests/nodes/xor_fp8x23_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_fp8x23_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo deleted file mode 100644 index f2d149aca..000000000 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo deleted file mode 100644 index 6e8cb0955..000000000 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor;use orion::numbers::FP8x23; - - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo deleted file mode 100644 index f0e06cebf..000000000 --- a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32.cairo b/src/tests/nodes/xor_i32.cairo deleted file mode 100644 index 5c05a0c65..000000000 --- a/src/tests/nodes/xor_i32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_i32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo deleted file mode 100644 index 390a54df3..000000000 --- a/src/tests/nodes/xor_i32/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo deleted file mode 100644 index b9b25dc94..000000000 --- a/src/tests/nodes/xor_i32/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo deleted file mode 100644 index cc18d5805..000000000 --- a/src/tests/nodes/xor_i32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast.cairo b/src/tests/nodes/xor_i32_broadcast.cairo deleted file mode 100644 index 37fd7db74..000000000 --- a/src/tests/nodes/xor_i32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_i32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo deleted file mode 100644 index 46aa56b66..000000000 --- a/src/tests/nodes/xor_i32_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo deleted file mode 100644 index bf452db2c..000000000 --- a/src/tests/nodes/xor_i32_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I32Tensor; -use orion::numbers::{i32, FP16x16}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo deleted file mode 100644 index fc5a7363d..000000000 --- a/src/tests/nodes/xor_i32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8.cairo b/src/tests/nodes/xor_i8.cairo deleted file mode 100644 index 58dc31f44..000000000 --- a/src/tests/nodes/xor_i8.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_i8() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo deleted file mode 100644 index ade70cc22..000000000 --- a/src/tests/nodes/xor_i8/input_0.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo deleted file mode 100644 index 06bce8e58..000000000 --- a/src/tests/nodes/xor_i8/input_1.cairo +++ /dev/null @@ -1,44 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo deleted file mode 100644 index db236b160..000000000 --- a/src/tests/nodes/xor_i8/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast.cairo b/src/tests/nodes/xor_i8_broadcast.cairo deleted file mode 100644 index fadb808ee..000000000 --- a/src/tests/nodes/xor_i8_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::I8Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_i8_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo deleted file mode 100644 index fff4396a6..000000000 --- a/src/tests/nodes/xor_i8_broadcast/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo deleted file mode 100644 index 8a8cf3815..000000000 --- a/src/tests/nodes/xor_i8_broadcast/input_1.cairo +++ /dev/null @@ -1,18 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::I8Tensor; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo deleted file mode 100644 index fc5a7363d..000000000 --- a/src/tests/nodes/xor_i8_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32.cairo b/src/tests/nodes/xor_u32.cairo deleted file mode 100644 index 779514951..000000000 --- a/src/tests/nodes/xor_u32.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_u32() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo deleted file mode 100644 index 8b7e67c73..000000000 --- a/src/tests/nodes/xor_u32/input_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(2); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(5); - data.append(4); - data.append(0); - data.append(4); - data.append(4); - data.append(2); - data.append(5); - data.append(3); - data.append(5); - data.append(0); - data.append(3); - data.append(1); - data.append(3); - data.append(2); - data.append(5); - data.append(0); - data.append(1); - data.append(0); - data.append(4); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo deleted file mode 100644 index 6aed8ce64..000000000 --- a/src/tests/nodes/xor_u32/input_1.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(5); - data.append(0); - data.append(2); - data.append(3); - data.append(4); - data.append(4); - data.append(3); - data.append(5); - data.append(2); - data.append(1); - data.append(1); - data.append(1); - data.append(3); - data.append(3); - data.append(3); - data.append(3); - data.append(4); - data.append(3); - data.append(1); - data.append(3); - data.append(5); - data.append(1); - data.append(2); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo deleted file mode 100644 index 85e23933c..000000000 --- a/src/tests/nodes/xor_u32/output_0.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(3); - shape.append(3); - shape.append(3); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast.cairo b/src/tests/nodes/xor_u32_broadcast.cairo deleted file mode 100644 index aa30bd52e..000000000 --- a/src/tests/nodes/xor_u32_broadcast.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod input_1; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::U32Tensor; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_xor_u32_broadcast() { - let input_0 = input_0::input_0(); - let input_1 = input_1::input_1(); - let z = output_0::output_0(); - - let y = input_0.xor(@input_1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo deleted file mode 100644 index d152c6059..000000000 --- a/src/tests/nodes/xor_u32_broadcast/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(3); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo deleted file mode 100644 index 89f8ee9af..000000000 --- a/src/tests/nodes/xor_u32_broadcast/input_1.cairo +++ /dev/null @@ -1,17 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn input_1() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(1); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo deleted file mode 100644 index fc5a7363d..000000000 --- a/src/tests/nodes/xor_u32_broadcast/output_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::{TensorTrait, Tensor}; - -use orion::operators::tensor::U32Tensor; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file From 5516ddbb1c868a0ceb47cec0c65df9ea0312c240 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:06:03 +0300 Subject: [PATCH 116/179] update nodegen helper --- nodegen/helpers.py | 175 ++++++++++++--------------------------------- src/tests.cairo | 1 + 2 files changed, 47 insertions(+), 129 deletions(-) diff --git a/nodegen/helpers.py b/nodegen/helpers.py index 0020f8513..0a3099c1b 100644 --- a/nodegen/helpers.py +++ b/nodegen/helpers.py @@ -23,11 +23,10 @@ class FixedImpl(Enum): class Tensor: - def __init__(self, dtype: Dtype, shape: [], data: [], extra_fp=FixedImpl.FP16x16): + def __init__(self, dtype: Dtype, shape: [], data: []): self.dtype = dtype self.shape = shape self.data = data - self.extra_fp = extra_fp class Trait(Enum): @@ -64,138 +63,71 @@ def make_test(inputs: [Tensor], output: Tensor, func_sig: str, file_name: str, t code.append("use orion::operators::tensor::TensorTrait;\n") match type_of_first_input: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_u32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_u32_fp16x16;\n") + code.append( + "use orion::operators::tensor::U32Tensor;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_i32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_i32_fp16x16;\n") + code.append( + "use orion::operators::tensor::I32Tensor;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_i8_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_i8_fp16x16;\n") + code.append( + "use orion::operators::tensor::I8Tensor;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::Tensor_fp8x23;\n") + "use orion::operators::tensor::FP8x23Tensor;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::Tensor_fp16x16;\n") + "use orion::operators::tensor::FP16x16Tensor;\n") match type_of_output: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::U32TensorPartialEq;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I32TensorPartialEq;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") + "use orion::operators::tensor::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") + "use orion::operators::tensor::FP8x23TensorPartialEq;\n") case Trait.NN: - code.append("\n\nuse orion::operators::nn::core::NNTrait;\n") + code.append("\n\nuse orion::operators::nn::NNTrait;\n") code.append("use orion::numbers::FixedTrait;\n") match type_of_first_input: case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_i32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_i32_fp16x16;\n") + code.append( + "use orion::operators::nn::I32NN;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_i8_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_i8_fp16x16;\n") + code.append( + "use orion::operators::nn::I8NN;\n") case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_u32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_u32_fp16x16;\n") + code.append( + "use orion::operators::nn::U32NN;\n") case Dtype.FP8x23: code.append( - "use orion::operators::nn::NN_fp8x23;\n") + "use orion::operators::nn::FP8x23NN;\n") case Dtype.FP16x16: code.append( - "use orion::operators::nn::NN_fp16x16;\n") - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::numbers::FP8x23Impl;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::numbers::FP16x16Impl;\n") + "use orion::operators::nn::FP16x16NN;\n") match type_of_output: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::U32TensorPartialEq;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I32TensorPartialEq;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") + "use orion::operators::tensor::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") + "use orion::operators::tensor::FP8x23TensorPartialEq;\n") code.append("use orion::utils::assert_eq;\n\n") code.append("#[test]\n") @@ -238,45 +170,30 @@ def __build_tensor_code(tensor: Tensor, name: str, type_string: str, is_fixed: b match tensor.dtype: case Dtype.U32: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_u32_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_u32_fp16x16;\n") + result.append( + "use orion::operators::tensor::U32Tensor;\n") case Dtype.I32: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_i32_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_i32_fp16x16;\n") result.append( - "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32};\n") + "use orion::operators::tensor::I32Tensor;\n") + result.append( + "use orion::numbers::{IntegerTrait, i32};\n") case Dtype.I8: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_i8_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_i8_fp16x16;\n") result.append( - "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8};\n") + "use orion::operators::tensor::I8Tensor;\n") + result.append( + "use orion::numbers::{IntegerTrait, i8};\n") case Dtype.FP8x23: result.append( - "use orion::operators::tensor::Tensor_fp8x23;\n") + "use orion::operators::tensor::FP8x23Tensor;\n") result.append( - "use orion::numbers::fixed_point::core::{FixedTrait};\n") + "use orion::numbers::FixedTrait;\n") result.append( "use orion::numbers::FP8x23;\n") case Dtype.FP16x16: result.append( - "use orion::operators::tensor::Tensor_fp16x16;\n") + "use orion::operators::tensor::FP16x16Tensor;\n") result.append( - "use orion::numbers::fixed_point::core::{FixedTrait};\n") + "use orion::numbers::FixedTrait;\n") result.append( "use orion::numbers::FP16x16;\n") diff --git a/src/tests.cairo b/src/tests.cairo index 8463adb0a..ca676bffd 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -3,3 +3,4 @@ mod performance; mod tensor_core; mod nodes; mod helpers; + From 8921ecc251c1e1abe2febc6158e32e00d4484920 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:09:13 +0300 Subject: [PATCH 117/179] test abs --- nodegen/node/abs.py | 8 ++++---- src/tests/nodes.cairo | 4 ++++ src/tests/nodes/abs_fp16x16.cairo | 20 ++++++++++++++++++++ src/tests/nodes/abs_fp16x16/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/abs_fp16x16/output_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/abs_fp8x23.cairo | 20 ++++++++++++++++++++ src/tests/nodes/abs_fp8x23/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/abs_fp8x23/output_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/abs_i32.cairo | 20 ++++++++++++++++++++ src/tests/nodes/abs_i32/input_0.cairo | 17 +++++++++++++++++ src/tests/nodes/abs_i32/output_0.cairo | 17 +++++++++++++++++ src/tests/nodes/abs_i8.cairo | 20 ++++++++++++++++++++ src/tests/nodes/abs_i8/input_0.cairo | 17 +++++++++++++++++ src/tests/nodes/abs_i8/output_0.cairo | 17 +++++++++++++++++ 14 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 src/tests/nodes/abs_fp16x16.cairo create mode 100644 src/tests/nodes/abs_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/abs_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/abs_fp8x23.cairo create mode 100644 src/tests/nodes/abs_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/abs_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/abs_i32.cairo create mode 100644 src/tests/nodes/abs_i32/input_0.cairo create mode 100644 src/tests/nodes/abs_i32/output_0.cairo create mode 100644 src/tests/nodes/abs_i8.cairo create mode 100644 src/tests/nodes/abs_i8/input_0.cairo create mode 100644 src/tests/nodes/abs_i8/output_0.cairo diff --git a/nodegen/node/abs.py b/nodegen/node/abs.py index 75a3e668f..a07ee30b4 100644 --- a/nodegen/node/abs.py +++ b/nodegen/node/abs.py @@ -34,8 +34,8 @@ def abs_fp8x23(): ).astype(np.int64), FixedImpl.FP8x23) y = abs(x) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "abs_fp8x23" make_node([x], [y], name) @@ -47,8 +47,8 @@ def abs_fp16x16(): ).astype(np.int64), FixedImpl.FP16x16) y = abs(x) - x = Tensor(Dtype.FP16x16, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, y.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, x.flatten()) + y = Tensor(Dtype.FP16x16, y.shape, y.flatten()) name = "abs_fp16x16" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index e69de29bb..8f930bb65 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -0,0 +1,4 @@ +mod abs_fp16x16; +mod abs_fp8x23; +mod abs_i32; +mod abs_i8; diff --git a/src/tests/nodes/abs_fp16x16.cairo b/src/tests/nodes/abs_fp16x16.cairo new file mode 100644 index 000000000..70d99c0bd --- /dev/null +++ b/src/tests/nodes/abs_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_abs_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.abs(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo new file mode 100644 index 000000000..b7b95b898 --- /dev/null +++ b/src/tests/nodes/abs_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 8192000, sign: true }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo new file mode 100644 index 000000000..d48f57bdd --- /dev/null +++ b/src/tests/nodes/abs_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23.cairo b/src/tests/nodes/abs_fp8x23.cairo new file mode 100644 index 000000000..cd8851f74 --- /dev/null +++ b/src/tests/nodes/abs_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_abs_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.abs(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo new file mode 100644 index 000000000..399e80f63 --- /dev/null +++ b/src/tests/nodes/abs_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo new file mode 100644 index 000000000..060e575b3 --- /dev/null +++ b/src/tests/nodes/abs_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32.cairo b/src/tests/nodes/abs_i32.cairo new file mode 100644 index 000000000..8a9e21e62 --- /dev/null +++ b/src/tests/nodes/abs_i32.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_abs_i32() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.abs(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo new file mode 100644 index 000000000..38b5eacd5 --- /dev/null +++ b/src/tests/nodes/abs_i32/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 67, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo new file mode 100644 index 000000000..043732383 --- /dev/null +++ b/src/tests/nodes/abs_i32/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 67, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8.cairo b/src/tests/nodes/abs_i8.cairo new file mode 100644 index 000000000..60ddd91ec --- /dev/null +++ b/src/tests/nodes/abs_i8.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_abs_i8() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.abs(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo new file mode 100644 index 000000000..b746a1d05 --- /dev/null +++ b/src/tests/nodes/abs_i8/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 24, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo new file mode 100644 index 000000000..447c92e0c --- /dev/null +++ b/src/tests/nodes/abs_i8/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 24, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From c1063af152b93fc2ff7cbcbcacd9f4ddaaf5e3d6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:16:29 +0300 Subject: [PATCH 118/179] test acos --- nodegen/node/acos.py | 8 ++--- .../implementations/tensor_fp16x16.cairo | 33 ++++++++++--------- .../implementations/tensor_fp8x23.cairo | 30 +++++++++-------- src/tests/nodes.cairo | 2 ++ src/tests/nodes/acos_fp16x16.cairo | 20 +++++++++++ src/tests/nodes/acos_fp16x16/input_0.cairo | 18 ++++++++++ src/tests/nodes/acos_fp16x16/output_0.cairo | 18 ++++++++++ src/tests/nodes/acos_fp8x23.cairo | 20 +++++++++++ src/tests/nodes/acos_fp8x23/input_0.cairo | 18 ++++++++++ src/tests/nodes/acos_fp8x23/output_0.cairo | 18 ++++++++++ 10 files changed, 152 insertions(+), 33 deletions(-) create mode 100644 src/tests/nodes/acos_fp16x16.cairo create mode 100644 src/tests/nodes/acos_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/acos_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/acos_fp8x23.cairo create mode 100644 src/tests/nodes/acos_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/acos_fp8x23/output_0.cairo diff --git a/nodegen/node/acos.py b/nodegen/node/acos.py index 224c5f53d..61ed4e781 100644 --- a/nodegen/node/acos.py +++ b/nodegen/node/acos.py @@ -9,8 +9,8 @@ def acos_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arccos(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "acos_fp8x23" make_node([x], [y], name) @@ -21,8 +21,8 @@ def acos_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arccos(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "acos_fp16x16" make_node([x], [y], name) diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 9fde3f95e..7e8375c52 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -280,13 +280,7 @@ impl FP16x16TensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl FP16x16TensorPartialEq< - FP16x16, - impl FP16x16Tensor: TensorTrait, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop -> of PartialEq> { +impl FP16x16TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -310,15 +304,22 @@ impl TensorI8IntoTensorFP16x16 of Into, Tensor> { // Internals +const PRECISION: u32 = 589; // 0.009 -fn tensor_eq< - FP16x16, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop ->( - mut lhs: Tensor, mut rhs: Tensor, -) -> bool { +fn relative_eq(lhs: @FP16x16, rhs: @FP16x16) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { let mut is_eq = true; loop { @@ -338,7 +339,7 @@ fn tensor_eq< break; } - is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); }; return is_eq; diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 0fa7e4ea4..9ddc0f6a5 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -280,13 +280,7 @@ impl FP8x23TensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl FP8x23TensorPartialEq< - FP8x23, - impl FP8x23Tensor: TensorTrait, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop -> of PartialEq> { +impl FP8x23TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -311,11 +305,21 @@ impl TensorI8IntoTensorFP8x23 of Into, Tensor> { // Internals -fn tensor_eq< - FP8x23, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop ->( - mut lhs: Tensor, mut rhs: Tensor, -) -> bool { +const PRECISION: u32 = 75497; // 0.009 + +fn relative_eq(lhs: @FP8x23, rhs: @FP8x23) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { let mut is_eq = true; loop { @@ -335,7 +339,7 @@ fn tensor_eq< break; } - is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); }; return is_eq; diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 8f930bb65..fe05d71d6 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -2,3 +2,5 @@ mod abs_fp16x16; mod abs_fp8x23; mod abs_i32; mod abs_i8; +mod acos_fp16x16; +mod acos_fp8x23; diff --git a/src/tests/nodes/acos_fp16x16.cairo b/src/tests/nodes/acos_fp16x16.cairo new file mode 100644 index 000000000..51d2ba037 --- /dev/null +++ b/src/tests/nodes/acos_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_acos_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.acos(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo new file mode 100644 index 000000000..d8cfb2281 --- /dev/null +++ b/src/tests/nodes/acos_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 47767, sign: false }); + data.append(FP16x16 { mag: 33238, sign: true }); + data.append(FP16x16 { mag: 47744, sign: false }); + data.append(FP16x16 { mag: 21178, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo new file mode 100644 index 000000000..3b9cb8230 --- /dev/null +++ b/src/tests/nodes/acos_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 49421, sign: false }); + data.append(FP16x16 { mag: 137802, sign: false }); + data.append(FP16x16 { mag: 49455, sign: false }); + data.append(FP16x16 { mag: 124509, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23.cairo b/src/tests/nodes/acos_fp8x23.cairo new file mode 100644 index 000000000..3efe7353a --- /dev/null +++ b/src/tests/nodes/acos_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_acos_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.acos(); + + assert_eq(y, z); +} diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo new file mode 100644 index 000000000..b948c697b --- /dev/null +++ b/src/tests/nodes/acos_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 3985911, sign: false }); + data.append(FP8x23 { mag: 4254306, sign: true }); + data.append(FP8x23 { mag: 5997528, sign: true }); + data.append(FP8x23 { mag: 3494756, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo new file mode 100644 index 000000000..41234983f --- /dev/null +++ b/src/tests/nodes/acos_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 9023232, sign: false }); + data.append(FP8x23 { mag: 17638511, sign: false }); + data.append(FP8x23 { mag: 19858895, sign: false }); + data.append(FP8x23 { mag: 16781466, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 776bf4a59eb89816747933c2b34fb4a6a9b48e28 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:19:30 +0300 Subject: [PATCH 119/179] test acosh --- nodegen/node/acosh.py | 99 +------------------- nodegen/node/asinh.py | 8 +- nodegen/node/atan.py | 8 +- nodegen/node/cos.py | 8 +- nodegen/node/cosh.py | 8 +- nodegen/node/exp.py | 8 +- nodegen/node/leaky_relu.py | 8 +- nodegen/node/linear.py | 4 +- nodegen/node/log.py | 8 +- nodegen/node/relu.py | 8 +- nodegen/node/sin.py | 8 +- nodegen/node/sinh.py | 8 +- nodegen/node/sqrt.py | 8 +- nodegen/node/tanh.py | 8 +- src/tests/nodes.cairo | 2 + src/tests/nodes/acosh_fp16x16.cairo | 20 ++++ src/tests/nodes/acosh_fp16x16/input_0.cairo | 18 ++++ src/tests/nodes/acosh_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/acosh_fp8x23.cairo | 20 ++++ src/tests/nodes/acosh_fp8x23/input_0.cairo | 18 ++++ src/tests/nodes/acosh_fp8x23/output_0.cairo | 18 ++++ 21 files changed, 168 insertions(+), 145 deletions(-) create mode 100644 src/tests/nodes/acosh_fp16x16.cairo create mode 100644 src/tests/nodes/acosh_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/acosh_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/acosh_fp8x23.cairo create mode 100644 src/tests/nodes/acosh_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/acosh_fp8x23/output_0.cairo diff --git a/nodegen/node/acosh.py b/nodegen/node/acosh.py index d55bbb033..ebf898688 100644 --- a/nodegen/node/acosh.py +++ b/nodegen/node/acosh.py @@ -4,106 +4,15 @@ class Acosh(RunAll): - - @staticmethod - def acosh_i32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def acosh_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.arccosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def acosh_u32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arccosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arccosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - @staticmethod def acosh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) y = np.arccosh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "acosh_fp8x23" make_node([x], [y], name) @@ -115,9 +24,9 @@ def acosh_fp16x16(): y = np.arccosh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "acosh_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/asinh.py b/nodegen/node/asinh.py index 036ad5155..ba37b9b72 100644 --- a/nodegen/node/asinh.py +++ b/nodegen/node/asinh.py @@ -101,9 +101,9 @@ def asinh_fp8x23(): y = np.arcsinh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "asinh_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def asinh_fp16x16(): y = np.arcsinh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "asinh_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/atan.py b/nodegen/node/atan.py index eee25e59f..1233f7e6c 100644 --- a/nodegen/node/atan.py +++ b/nodegen/node/atan.py @@ -101,9 +101,9 @@ def atan_fp8x23(): y = np.arctan(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "atan_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def atan_fp16x16(): y = np.arctan(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "atan_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/cos.py b/nodegen/node/cos.py index 7e75cd393..e4c84ec68 100644 --- a/nodegen/node/cos.py +++ b/nodegen/node/cos.py @@ -101,9 +101,9 @@ def cos_fp8x23(): y = np.cos(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cos_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def cos_fp16x16(): y = np.cos(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cos_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/cosh.py b/nodegen/node/cosh.py index 129ff87e2..71fd68109 100644 --- a/nodegen/node/cosh.py +++ b/nodegen/node/cosh.py @@ -101,9 +101,9 @@ def cosh_fp8x23(): y = np.cosh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cosh_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def cosh_fp16x16(): y = np.cosh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cosh_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/exp.py b/nodegen/node/exp.py index e13103c5b..0576f9e93 100644 --- a/nodegen/node/exp.py +++ b/nodegen/node/exp.py @@ -101,9 +101,9 @@ def exp_fp8x23(): y = np.exp(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "exp_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def exp_fp16x16(): y = np.exp(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "exp_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/leaky_relu.py b/nodegen/node/leaky_relu.py index 9119d192e..8d08303c4 100644 --- a/nodegen/node/leaky_relu.py +++ b/nodegen/node/leaky_relu.py @@ -80,9 +80,9 @@ def leaky_relu_fp8x23(): y = layer(x).numpy() x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "leaky_relu_fp8x23" make_node([x], [y], name) @@ -97,9 +97,9 @@ def leaky_relu_fp16x16(): y = layer(x).numpy() x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "leaky_relu_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/linear.py b/nodegen/node/linear.py index 1b577fd32..9822d9084 100644 --- a/nodegen/node/linear.py +++ b/nodegen/node/linear.py @@ -80,7 +80,7 @@ def linear_fp8x23(): b = Tensor(Dtype.FP8x23, b.shape, to_fp( b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "linear_fp8x23" make_node([i, w, b], [y], name) @@ -101,7 +101,7 @@ def linear_fp16x16(): b = Tensor(Dtype.FP16x16, b.shape, to_fp( b.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "linear_fp16x16" make_node([i, w, b], [y], name) diff --git a/nodegen/node/log.py b/nodegen/node/log.py index c25256154..88488740d 100644 --- a/nodegen/node/log.py +++ b/nodegen/node/log.py @@ -101,9 +101,9 @@ def log_fp8x23(): y = np.log(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "log_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def log_fp16x16(): y = np.log(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "log_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/relu.py b/nodegen/node/relu.py index eb1032906..5e72850b5 100644 --- a/nodegen/node/relu.py +++ b/nodegen/node/relu.py @@ -41,9 +41,9 @@ def relu_fp8x23(): y = layer(x).numpy() x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "relu_fp8x23" make_node([x], [y], name) @@ -57,9 +57,9 @@ def relu_fp16x16(): y = layer(x).numpy() x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "relu_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sin.py b/nodegen/node/sin.py index da1995ce1..39abbb433 100644 --- a/nodegen/node/sin.py +++ b/nodegen/node/sin.py @@ -101,9 +101,9 @@ def sin_fp8x23(): y = np.sin(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sin_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def sin_fp16x16(): y = np.sin(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sin_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sinh.py b/nodegen/node/sinh.py index 6b2117a59..c5296b871 100644 --- a/nodegen/node/sinh.py +++ b/nodegen/node/sinh.py @@ -101,9 +101,9 @@ def sinh_fp8x23(): y = np.sinh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sinh_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def sinh_fp16x16(): y = np.sinh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sinh_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sqrt.py b/nodegen/node/sqrt.py index 7bc150944..021ea31b9 100644 --- a/nodegen/node/sqrt.py +++ b/nodegen/node/sqrt.py @@ -100,9 +100,9 @@ def sqrt_fp8x23(): y = np.sqrt(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sqrt_fp8x23" make_node([x], [y], name) @@ -114,9 +114,9 @@ def sqrt_fp16x16(): y = np.sqrt(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sqrt_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/tanh.py b/nodegen/node/tanh.py index 70813a516..1a10500bc 100644 --- a/nodegen/node/tanh.py +++ b/nodegen/node/tanh.py @@ -101,9 +101,9 @@ def tanh_fp8x23(): y = np.tanh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "tanh_fp8x23" make_node([x], [y], name) @@ -115,9 +115,9 @@ def tanh_fp16x16(): y = np.tanh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "tanh_fp16x16" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index fe05d71d6..f38df0dc1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -4,3 +4,5 @@ mod abs_i32; mod abs_i8; mod acos_fp16x16; mod acos_fp8x23; +mod acosh_fp16x16; +mod acosh_fp8x23; diff --git a/src/tests/nodes/acosh_fp16x16.cairo b/src/tests/nodes/acosh_fp16x16.cairo new file mode 100644 index 000000000..b72263a43 --- /dev/null +++ b/src/tests/nodes/acosh_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_acosh_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.acosh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo new file mode 100644 index 000000000..bcc909846 --- /dev/null +++ b/src/tests/nodes/acosh_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 257246, sign: false }); + data.append(FP16x16 { mag: 273870, sign: false }); + data.append(FP16x16 { mag: 185580, sign: false }); + data.append(FP16x16 { mag: 308003, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo new file mode 100644 index 000000000..a6be6f408 --- /dev/null +++ b/src/tests/nodes/acosh_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 133952, sign: false }); + data.append(FP16x16 { mag: 138187, sign: false }); + data.append(FP16x16 { mag: 111495, sign: false }); + data.append(FP16x16 { mag: 146089, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23.cairo b/src/tests/nodes/acosh_fp8x23.cairo new file mode 100644 index 000000000..d416a1ca8 --- /dev/null +++ b/src/tests/nodes/acosh_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_acosh_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.acosh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo new file mode 100644 index 000000000..66b687af8 --- /dev/null +++ b/src/tests/nodes/acosh_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 26479692, sign: false }); + data.append(FP8x23 { mag: 34552514, sign: false }); + data.append(FP8x23 { mag: 21028116, sign: false }); + data.append(FP8x23 { mag: 39741582, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo new file mode 100644 index 000000000..34ed86b13 --- /dev/null +++ b/src/tests/nodes/acosh_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 15238413, sign: false }); + data.append(FP8x23 { mag: 17563067, sign: false }); + data.append(FP8x23 { mag: 13167925, sign: false }); + data.append(FP8x23 { mag: 18768178, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 646f0f60e4c3398cb4bf5f8e0b5d4e964cad3269 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:29:01 +0300 Subject: [PATCH 120/179] test tensor add --- nodegen/node/add.py | 44 +++++++++---------- nodegen/node/concat.py | 2 +- nodegen/node/div.py | 24 +++++----- nodegen/node/equal.py | 16 +++---- nodegen/node/greater.py | 16 +++---- nodegen/node/greater_equal.py | 16 +++---- nodegen/node/less.py | 16 +++---- nodegen/node/less_equal.py | 16 +++---- nodegen/node/logsoftmax.py | 8 ++-- nodegen/node/mul.py | 24 +++++----- nodegen/node/or.py | 16 +++---- nodegen/node/reduce_sum.py | 4 +- nodegen/node/sigmoid.py | 4 +- nodegen/node/softmax.py | 4 +- nodegen/node/softplus.py | 4 +- nodegen/node/softsign.py | 4 +- nodegen/node/sub.py | 24 +++++----- nodegen/node/xor.py | 16 +++---- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/add_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/add_fp16x16/input_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp16x16/input_1.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp16x16/output_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp16x16_broadcast.cairo | 22 ++++++++++ .../nodes/add_fp16x16_broadcast/input_0.cairo | 42 ++++++++++++++++++ .../nodes/add_fp16x16_broadcast/input_1.cairo | 18 ++++++++ .../add_fp16x16_broadcast/output_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/add_fp8x23/input_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp8x23/input_1.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp8x23/output_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/add_fp8x23_broadcast/input_0.cairo | 42 ++++++++++++++++++ .../nodes/add_fp8x23_broadcast/input_1.cairo | 18 ++++++++ .../nodes/add_fp8x23_broadcast/output_0.cairo | 42 ++++++++++++++++++ src/tests/nodes/add_i32.cairo | 22 ++++++++++ src/tests/nodes/add_i32/input_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i32/input_1.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i32/output_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i32_broadcast.cairo | 22 ++++++++++ .../nodes/add_i32_broadcast/input_0.cairo | 41 +++++++++++++++++ .../nodes/add_i32_broadcast/input_1.cairo | 17 +++++++ .../nodes/add_i32_broadcast/output_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i8.cairo | 22 ++++++++++ src/tests/nodes/add_i8/input_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i8/input_1.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i8/output_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_i8_broadcast.cairo | 22 ++++++++++ .../nodes/add_i8_broadcast/input_0.cairo | 41 +++++++++++++++++ .../nodes/add_i8_broadcast/input_1.cairo | 17 +++++++ .../nodes/add_i8_broadcast/output_0.cairo | 41 +++++++++++++++++ src/tests/nodes/add_u32.cairo | 22 ++++++++++ src/tests/nodes/add_u32/input_0.cairo | 40 +++++++++++++++++ src/tests/nodes/add_u32/input_1.cairo | 40 +++++++++++++++++ src/tests/nodes/add_u32/output_0.cairo | 40 +++++++++++++++++ src/tests/nodes/add_u32_broadcast.cairo | 22 ++++++++++ .../nodes/add_u32_broadcast/input_0.cairo | 40 +++++++++++++++++ .../nodes/add_u32_broadcast/input_1.cairo | 16 +++++++ .../nodes/add_u32_broadcast/output_0.cairo | 40 +++++++++++++++++ 59 files changed, 1475 insertions(+), 129 deletions(-) create mode 100644 src/tests/nodes/add_fp16x16.cairo create mode 100644 src/tests/nodes/add_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/add_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/add_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/add_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/add_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/add_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/add_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/add_fp8x23.cairo create mode 100644 src/tests/nodes/add_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/add_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/add_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/add_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/add_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/add_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/add_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/add_i32.cairo create mode 100644 src/tests/nodes/add_i32/input_0.cairo create mode 100644 src/tests/nodes/add_i32/input_1.cairo create mode 100644 src/tests/nodes/add_i32/output_0.cairo create mode 100644 src/tests/nodes/add_i32_broadcast.cairo create mode 100644 src/tests/nodes/add_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/add_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/add_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/add_i8.cairo create mode 100644 src/tests/nodes/add_i8/input_0.cairo create mode 100644 src/tests/nodes/add_i8/input_1.cairo create mode 100644 src/tests/nodes/add_i8/output_0.cairo create mode 100644 src/tests/nodes/add_i8_broadcast.cairo create mode 100644 src/tests/nodes/add_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/add_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/add_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/add_u32.cairo create mode 100644 src/tests/nodes/add_u32/input_0.cairo create mode 100644 src/tests/nodes/add_u32/input_1.cairo create mode 100644 src/tests/nodes/add_u32/output_0.cairo create mode 100644 src/tests/nodes/add_u32_broadcast.cairo create mode 100644 src/tests/nodes/add_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/add_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/add_u32_broadcast/output_0.cairo diff --git a/nodegen/node/add.py b/nodegen/node/add.py index 2a77a88a3..1f274208c 100644 --- a/nodegen/node/add.py +++ b/nodegen/node/add.py @@ -17,7 +17,7 @@ def default(): name = "add_u32" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(0, 3, (3, 3, 3)).astype(np.uint32) @@ -30,7 +30,7 @@ def broadcast(): name = "add_u32_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -48,7 +48,7 @@ def default(): name = "add_i32" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.int32) @@ -61,7 +61,7 @@ def broadcast(): name = "add_i32_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -79,7 +79,7 @@ def default(): name = "add_i8" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.int8) @@ -92,7 +92,7 @@ def broadcast(): name = "add_i8_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -105,15 +105,15 @@ def default(): z = x + y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "add_fp8x23" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.float64) @@ -121,15 +121,15 @@ def broadcast(): z = x + y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "add_fp8x23_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -142,15 +142,15 @@ def default(): z = x + y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "add_fp16x16" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.float64) @@ -158,15 +158,15 @@ def broadcast(): z = x + y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "add_fp16x16_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() diff --git a/nodegen/node/concat.py b/nodegen/node/concat.py index 3df9decce..c79dffb79 100644 --- a/nodegen/node/concat.py +++ b/nodegen/node/concat.py @@ -397,7 +397,7 @@ def concat_1D(): x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_1d" make_node([x1, x2], [y], name) diff --git a/nodegen/node/div.py b/nodegen/node/div.py index b9ddbb69a..92fe6cc1a 100644 --- a/nodegen/node/div.py +++ b/nodegen/node/div.py @@ -105,11 +105,11 @@ def default(): z = x / y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "div_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x / y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "div_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x / y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "div_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x / y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "div_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/equal.py b/nodegen/node/equal.py index 0ce6c7327..a4b6c070a 100644 --- a/nodegen/node/equal.py +++ b/nodegen/node/equal.py @@ -105,9 +105,9 @@ def default(): z = np.equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp16x16_broadcast" diff --git a/nodegen/node/greater.py b/nodegen/node/greater.py index fb534db36..8abf66f47 100644 --- a/nodegen/node/greater.py +++ b/nodegen/node/greater.py @@ -105,9 +105,9 @@ def default(): z = np.greater(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.greater(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.greater(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.greater(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp16x16_broadcast" diff --git a/nodegen/node/greater_equal.py b/nodegen/node/greater_equal.py index 3a6a08e75..1606150ff 100644 --- a/nodegen/node/greater_equal.py +++ b/nodegen/node/greater_equal.py @@ -105,9 +105,9 @@ def default(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp16x16_broadcast" diff --git a/nodegen/node/less.py b/nodegen/node/less.py index c6a2c8f35..8b694ef5d 100644 --- a/nodegen/node/less.py +++ b/nodegen/node/less.py @@ -105,9 +105,9 @@ def default(): z = np.less(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.less(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.less(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.less(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp16x16_broadcast" diff --git a/nodegen/node/less_equal.py b/nodegen/node/less_equal.py index e041ab0ad..26cef6453 100644 --- a/nodegen/node/less_equal.py +++ b/nodegen/node/less_equal.py @@ -105,9 +105,9 @@ def default(): z = np.less_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.less_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.less_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.less_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp16x16_broadcast" diff --git a/nodegen/node/logsoftmax.py b/nodegen/node/logsoftmax.py index 942dc52ed..9469dcce6 100644 --- a/nodegen/node/logsoftmax.py +++ b/nodegen/node/logsoftmax.py @@ -191,7 +191,7 @@ def axis_0(): y = logsoftmax(x, 0) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -205,7 +205,7 @@ def axis_1(): y = logsoftmax(x, 1) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -223,7 +223,7 @@ def axis_0(): y = logsoftmax(x, 0) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) @@ -237,7 +237,7 @@ def axis_1(): y = logsoftmax(x, 1) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/mul.py b/nodegen/node/mul.py index bd070eeb0..2922c6bc1 100644 --- a/nodegen/node/mul.py +++ b/nodegen/node/mul.py @@ -105,11 +105,11 @@ def default(): z = x * y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "mul_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x * y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "mul_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x * y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "mul_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x * y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "mul_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/or.py b/nodegen/node/or.py index 7bacf76ac..f67778749 100644 --- a/nodegen/node/or.py +++ b/nodegen/node/or.py @@ -105,9 +105,9 @@ def default(): z = np.logical_or(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.logical_or(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.logical_or(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.logical_or(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp16x16_broadcast" diff --git a/nodegen/node/reduce_sum.py b/nodegen/node/reduce_sum.py index 8647f3e5b..7305d4e20 100644 --- a/nodegen/node/reduce_sum.py +++ b/nodegen/node/reduce_sum.py @@ -182,7 +182,7 @@ def reduce_sum_1D(): y = np.array([3]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -248,7 +248,7 @@ def reduce_sum_1D(): y = np.array([3]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/sigmoid.py b/nodegen/node/sigmoid.py index 5a4090473..fe35ee2c1 100644 --- a/nodegen/node/sigmoid.py +++ b/nodegen/node/sigmoid.py @@ -106,7 +106,7 @@ def fp8x23(): y = tf.keras.activations.sigmoid(x).numpy() x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -120,7 +120,7 @@ def fp16x16(): y = tf.keras.activations.sigmoid(x).numpy() x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/softmax.py b/nodegen/node/softmax.py index 041c21a72..27e114600 100644 --- a/nodegen/node/softmax.py +++ b/nodegen/node/softmax.py @@ -112,7 +112,7 @@ def fp8x23(): y = softmax(x, 0) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -126,7 +126,7 @@ def fp16x16(): y = softmax(x, 1) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/softplus.py b/nodegen/node/softplus.py index 0783f39cb..4d50f3ce4 100644 --- a/nodegen/node/softplus.py +++ b/nodegen/node/softplus.py @@ -109,7 +109,7 @@ def fp8x23(): y = softplus(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -123,7 +123,7 @@ def fp16x16(): y = softplus(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/softsign.py b/nodegen/node/softsign.py index 6d00955b2..fd14d5b46 100644 --- a/nodegen/node/softsign.py +++ b/nodegen/node/softsign.py @@ -109,7 +109,7 @@ def fp8x23(): y = softsign(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) @@ -123,7 +123,7 @@ def fp16x16(): y = softsign(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) diff --git a/nodegen/node/sub.py b/nodegen/node/sub.py index f941b6668..b16ef020f 100644 --- a/nodegen/node/sub.py +++ b/nodegen/node/sub.py @@ -105,11 +105,11 @@ def default(): z = x - y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "sub_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x - y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "sub_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x - y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "sub_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x - y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "sub_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/xor.py b/nodegen/node/xor.py index 5d5a7466a..0b77a0f5a 100644 --- a/nodegen/node/xor.py +++ b/nodegen/node/xor.py @@ -106,9 +106,9 @@ def default(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp8x23" @@ -121,9 +121,9 @@ def broadcast(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp8x23_broadcast" @@ -141,9 +141,9 @@ def default(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp16x16" @@ -156,9 +156,9 @@ def broadcast(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp16x16_broadcast" diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f38df0dc1..d5d51e6a7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -6,3 +6,13 @@ mod acos_fp16x16; mod acos_fp8x23; mod acosh_fp16x16; mod acosh_fp8x23; +mod add_fp16x16; +mod add_fp16x16_broadcast; +mod add_fp8x23; +mod add_fp8x23_broadcast; +mod add_i32; +mod add_i32_broadcast; +mod add_i8; +mod add_i8_broadcast; +mod add_u32; +mod add_u32_broadcast; diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo new file mode 100644 index 000000000..e9b665573 --- /dev/null +++ b/src/tests/nodes/add_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo new file mode 100644 index 000000000..f8a4ff052 --- /dev/null +++ b/src/tests/nodes/add_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo new file mode 100644 index 000000000..74ed543f4 --- /dev/null +++ b/src/tests/nodes/add_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo new file mode 100644 index 000000000..564b17a50 --- /dev/null +++ b/src/tests/nodes/add_fp16x16/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo new file mode 100644 index 000000000..8e5aa2265 --- /dev/null +++ b/src/tests/nodes/add_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..da0ed021d --- /dev/null +++ b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..c9f1cf735 --- /dev/null +++ b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..7b3c06bad --- /dev/null +++ b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo new file mode 100644 index 000000000..036664ec7 --- /dev/null +++ b/src/tests/nodes/add_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo new file mode 100644 index 000000000..bebbe1f55 --- /dev/null +++ b/src/tests/nodes/add_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo new file mode 100644 index 000000000..f931fac67 --- /dev/null +++ b/src/tests/nodes/add_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo new file mode 100644 index 000000000..b19076e39 --- /dev/null +++ b/src/tests/nodes/add_fp8x23/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo new file mode 100644 index 000000000..be1d3f286 --- /dev/null +++ b/src/tests/nodes/add_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..4ed90ce0f --- /dev/null +++ b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..cf8066ef2 --- /dev/null +++ b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..daf198e84 --- /dev/null +++ b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32.cairo b/src/tests/nodes/add_i32.cairo new file mode 100644 index 000000000..cd7821e3b --- /dev/null +++ b/src/tests/nodes/add_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorAdd}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo new file mode 100644 index 000000000..c61672795 --- /dev/null +++ b/src/tests/nodes/add_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo new file mode 100644 index 000000000..3a48a3bab --- /dev/null +++ b/src/tests/nodes/add_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo new file mode 100644 index 000000000..7ba2f56ba --- /dev/null +++ b/src/tests/nodes/add_i32/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast.cairo b/src/tests/nodes/add_i32_broadcast.cairo new file mode 100644 index 000000000..73678c376 --- /dev/null +++ b/src/tests/nodes/add_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorAdd}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..33350ec16 --- /dev/null +++ b/src/tests/nodes/add_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..190e0eb30 --- /dev/null +++ b/src/tests/nodes/add_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..b30c8eddc --- /dev/null +++ b/src/tests/nodes/add_i32_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8.cairo b/src/tests/nodes/add_i8.cairo new file mode 100644 index 000000000..64c8eb2ae --- /dev/null +++ b/src/tests/nodes/add_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorAdd}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo new file mode 100644 index 000000000..bc2d2b810 --- /dev/null +++ b/src/tests/nodes/add_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo new file mode 100644 index 000000000..f135bdbbf --- /dev/null +++ b/src/tests/nodes/add_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo new file mode 100644 index 000000000..c46103db2 --- /dev/null +++ b/src/tests/nodes/add_i8/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast.cairo b/src/tests/nodes/add_i8_broadcast.cairo new file mode 100644 index 000000000..83644ae26 --- /dev/null +++ b/src/tests/nodes/add_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorAdd}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..8d4d4d989 --- /dev/null +++ b/src/tests/nodes/add_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..4df125dec --- /dev/null +++ b/src/tests/nodes/add_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..49e3377a1 --- /dev/null +++ b/src/tests/nodes/add_i8_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32.cairo b/src/tests/nodes/add_u32.cairo new file mode 100644 index 000000000..8aa827616 --- /dev/null +++ b/src/tests/nodes/add_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorAdd}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo new file mode 100644 index 000000000..00c1a646a --- /dev/null +++ b/src/tests/nodes/add_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(0); + data.append(1); + data.append(0); + data.append(2); + data.append(0); + data.append(1); + data.append(2); + data.append(2); + data.append(0); + data.append(1); + data.append(1); + data.append(2); + data.append(0); + data.append(1); + data.append(2); + data.append(1); + data.append(2); + data.append(2); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo new file mode 100644 index 000000000..7b3139dc5 --- /dev/null +++ b/src/tests/nodes/add_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(0); + data.append(2); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(2); + data.append(1); + data.append(0); + data.append(2); + data.append(1); + data.append(2); + data.append(1); + data.append(2); + data.append(2); + data.append(2); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo new file mode 100644 index 000000000..d85c4172f --- /dev/null +++ b/src/tests/nodes/add_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(1); + data.append(2); + data.append(1); + data.append(3); + data.append(1); + data.append(2); + data.append(1); + data.append(4); + data.append(0); + data.append(3); + data.append(3); + data.append(3); + data.append(0); + data.append(2); + data.append(2); + data.append(4); + data.append(1); + data.append(1); + data.append(4); + data.append(2); + data.append(4); + data.append(3); + data.append(2); + data.append(2); + data.append(2); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast.cairo b/src/tests/nodes/add_u32_broadcast.cairo new file mode 100644 index 000000000..447dba22f --- /dev/null +++ b/src/tests/nodes/add_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorAdd}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_add_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 + input_1; + + assert_eq(y, z); +} diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..95f2dd5bf --- /dev/null +++ b/src/tests/nodes/add_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(2); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(2); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(2); + data.append(0); + data.append(2); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..79e305aa6 --- /dev/null +++ b/src/tests/nodes/add_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..ed0af4825 --- /dev/null +++ b/src/tests/nodes/add_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(1); + data.append(3); + data.append(0); + data.append(0); + data.append(0); + data.append(2); + data.append(2); + data.append(1); + data.append(2); + data.append(3); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(3); + data.append(1); + data.append(3); + data.append(1); + data.append(1); + data.append(2); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(2); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 3d2c8306356406c7de0a7b190264d46887b76342 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:31:43 +0300 Subject: [PATCH 121/179] test argmax --- nodegen/node/argmax.py | 16 +++---- nodegen/node/argmin.py | 16 +++---- src/tests/nodes.cairo | 45 +++++++++++++++++++ .../nodes/argmax_fp16x16_1D_default.cairo | 20 +++++++++ .../argmax_fp16x16_1D_default/input_0.cairo | 16 +++++++ .../argmax_fp16x16_1D_default/output_0.cairo | 12 +++++ .../argmax_fp16x16_1D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 16 +++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_fp16x16_1D_last_index.cairo | 20 +++++++++ .../input_0.cairo | 16 +++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_fp16x16_2D_default.cairo | 20 +++++++++ .../argmax_fp16x16_2D_default/input_0.cairo | 18 ++++++++ .../argmax_fp16x16_2D_default/output_0.cairo | 14 ++++++ .../argmax_fp16x16_2D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 18 ++++++++ .../output_0.cairo | 13 ++++++ .../nodes/argmax_fp16x16_2D_last_index.cairo | 20 +++++++++ .../input_0.cairo | 18 ++++++++ .../output_0.cairo | 14 ++++++ .../nodes/argmax_fp16x16_3D_default.cairo | 20 +++++++++ .../argmax_fp16x16_3D_default/input_0.cairo | 23 ++++++++++ .../argmax_fp16x16_3D_default/output_0.cairo | 17 +++++++ .../argmax_fp16x16_3D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 23 ++++++++++ .../output_0.cairo | 16 +++++++ .../nodes/argmax_fp16x16_3D_last_index.cairo | 20 +++++++++ .../input_0.cairo | 23 ++++++++++ .../output_0.cairo | 17 +++++++ .../nodes/argmax_fp8x23_1D_default.cairo | 20 +++++++++ .../argmax_fp8x23_1D_default/input_0.cairo | 16 +++++++ .../argmax_fp8x23_1D_default/output_0.cairo | 12 +++++ .../argmax_fp8x23_1D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 16 +++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_fp8x23_1D_last_index.cairo | 20 +++++++++ .../argmax_fp8x23_1D_last_index/input_0.cairo | 16 +++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_fp8x23_2D_default.cairo | 20 +++++++++ .../argmax_fp8x23_2D_default/input_0.cairo | 18 ++++++++ .../argmax_fp8x23_2D_default/output_0.cairo | 14 ++++++ .../argmax_fp8x23_2D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 18 ++++++++ .../output_0.cairo | 13 ++++++ .../nodes/argmax_fp8x23_2D_last_index.cairo | 20 +++++++++ .../argmax_fp8x23_2D_last_index/input_0.cairo | 18 ++++++++ .../output_0.cairo | 14 ++++++ .../nodes/argmax_fp8x23_3D_default.cairo | 20 +++++++++ .../argmax_fp8x23_3D_default/input_0.cairo | 23 ++++++++++ .../argmax_fp8x23_3D_default/output_0.cairo | 17 +++++++ .../argmax_fp8x23_3D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 23 ++++++++++ .../output_0.cairo | 16 +++++++ .../nodes/argmax_fp8x23_3D_last_index.cairo | 20 +++++++++ .../argmax_fp8x23_3D_last_index/input_0.cairo | 23 ++++++++++ .../output_0.cairo | 17 +++++++ src/tests/nodes/argmax_i32_1D_default.cairo | 20 +++++++++ .../nodes/argmax_i32_1D_default/input_0.cairo | 15 +++++++ .../argmax_i32_1D_default/output_0.cairo | 12 +++++ .../nodes/argmax_i32_1D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 15 +++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_i32_1D_last_index.cairo | 20 +++++++++ .../argmax_i32_1D_last_index/input_0.cairo | 15 +++++++ .../argmax_i32_1D_last_index/output_0.cairo | 12 +++++ src/tests/nodes/argmax_i32_2D_default.cairo | 20 +++++++++ .../nodes/argmax_i32_2D_default/input_0.cairo | 17 +++++++ .../argmax_i32_2D_default/output_0.cairo | 14 ++++++ .../nodes/argmax_i32_2D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 17 +++++++ .../output_0.cairo | 13 ++++++ .../nodes/argmax_i32_2D_last_index.cairo | 20 +++++++++ .../argmax_i32_2D_last_index/input_0.cairo | 17 +++++++ .../argmax_i32_2D_last_index/output_0.cairo | 14 ++++++ src/tests/nodes/argmax_i32_3D_default.cairo | 20 +++++++++ .../nodes/argmax_i32_3D_default/input_0.cairo | 22 +++++++++ .../argmax_i32_3D_default/output_0.cairo | 17 +++++++ .../nodes/argmax_i32_3D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 22 +++++++++ .../output_0.cairo | 16 +++++++ .../nodes/argmax_i32_3D_last_index.cairo | 20 +++++++++ .../argmax_i32_3D_last_index/input_0.cairo | 22 +++++++++ .../argmax_i32_3D_last_index/output_0.cairo | 17 +++++++ src/tests/nodes/argmax_i8_1D_default.cairo | 20 +++++++++ .../nodes/argmax_i8_1D_default/input_0.cairo | 15 +++++++ .../nodes/argmax_i8_1D_default/output_0.cairo | 12 +++++ .../nodes/argmax_i8_1D_keepdims_false.cairo | 20 +++++++++ .../argmax_i8_1D_keepdims_false/input_0.cairo | 15 +++++++ .../output_0.cairo | 12 +++++ src/tests/nodes/argmax_i8_1D_last_index.cairo | 20 +++++++++ .../argmax_i8_1D_last_index/input_0.cairo | 15 +++++++ .../argmax_i8_1D_last_index/output_0.cairo | 12 +++++ src/tests/nodes/argmax_i8_2D_default.cairo | 20 +++++++++ .../nodes/argmax_i8_2D_default/input_0.cairo | 17 +++++++ .../nodes/argmax_i8_2D_default/output_0.cairo | 14 ++++++ .../nodes/argmax_i8_2D_keepdims_false.cairo | 20 +++++++++ .../argmax_i8_2D_keepdims_false/input_0.cairo | 17 +++++++ .../output_0.cairo | 13 ++++++ src/tests/nodes/argmax_i8_2D_last_index.cairo | 20 +++++++++ .../argmax_i8_2D_last_index/input_0.cairo | 17 +++++++ .../argmax_i8_2D_last_index/output_0.cairo | 14 ++++++ src/tests/nodes/argmax_i8_3D_default.cairo | 20 +++++++++ .../nodes/argmax_i8_3D_default/input_0.cairo | 22 +++++++++ .../nodes/argmax_i8_3D_default/output_0.cairo | 17 +++++++ .../nodes/argmax_i8_3D_keepdims_false.cairo | 20 +++++++++ .../argmax_i8_3D_keepdims_false/input_0.cairo | 22 +++++++++ .../output_0.cairo | 16 +++++++ src/tests/nodes/argmax_i8_3D_last_index.cairo | 20 +++++++++ .../argmax_i8_3D_last_index/input_0.cairo | 22 +++++++++ .../argmax_i8_3D_last_index/output_0.cairo | 17 +++++++ src/tests/nodes/argmax_u32_1D_default.cairo | 20 +++++++++ .../nodes/argmax_u32_1D_default/input_0.cairo | 14 ++++++ .../argmax_u32_1D_default/output_0.cairo | 12 +++++ .../nodes/argmax_u32_1D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 14 ++++++ .../output_0.cairo | 12 +++++ .../nodes/argmax_u32_1D_last_index.cairo | 20 +++++++++ .../argmax_u32_1D_last_index/input_0.cairo | 14 ++++++ .../argmax_u32_1D_last_index/output_0.cairo | 12 +++++ src/tests/nodes/argmax_u32_2D_default.cairo | 20 +++++++++ .../nodes/argmax_u32_2D_default/input_0.cairo | 16 +++++++ .../argmax_u32_2D_default/output_0.cairo | 14 ++++++ .../nodes/argmax_u32_2D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 16 +++++++ .../output_0.cairo | 13 ++++++ .../nodes/argmax_u32_2D_last_index.cairo | 20 +++++++++ .../argmax_u32_2D_last_index/input_0.cairo | 16 +++++++ .../argmax_u32_2D_last_index/output_0.cairo | 14 ++++++ src/tests/nodes/argmax_u32_3D_default.cairo | 20 +++++++++ .../nodes/argmax_u32_3D_default/input_0.cairo | 21 +++++++++ .../argmax_u32_3D_default/output_0.cairo | 17 +++++++ .../nodes/argmax_u32_3D_keepdims_false.cairo | 20 +++++++++ .../input_0.cairo | 21 +++++++++ .../output_0.cairo | 16 +++++++ .../nodes/argmax_u32_3D_last_index.cairo | 20 +++++++++ .../argmax_u32_3D_last_index/input_0.cairo | 21 +++++++++ .../argmax_u32_3D_last_index/output_0.cairo | 17 +++++++ 138 files changed, 2415 insertions(+), 16 deletions(-) create mode 100644 src/tests/nodes/argmax_fp16x16_1D_default.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_default.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_default.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_default.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_default.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_default.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_default.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_default.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_default.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_default.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_default.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_default.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_last_index.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_default.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_last_index.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_default.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_last_index.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_default.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_last_index.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo diff --git a/nodegen/node/argmax.py b/nodegen/node/argmax.py index 433be1064..74c410966 100644 --- a/nodegen/node/argmax.py +++ b/nodegen/node/argmax.py @@ -577,7 +577,7 @@ def default_params(): y = argmax_use_numpy(x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_default" @@ -592,7 +592,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_keepdims_false" @@ -607,7 +607,7 @@ def last_index(): x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_last_index" @@ -641,7 +641,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_2D_keepdims_false" @@ -656,7 +656,7 @@ def last_index(): x, dtype=np.int8) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_2D_last_index" @@ -676,7 +676,7 @@ def default_params(): y = argmax_use_numpy(x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_default" @@ -691,7 +691,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_keepdims_false" @@ -706,7 +706,7 @@ def last_index(): x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_last_index" diff --git a/nodegen/node/argmin.py b/nodegen/node/argmin.py index e81fb205d..d76b6491c 100644 --- a/nodegen/node/argmin.py +++ b/nodegen/node/argmin.py @@ -577,7 +577,7 @@ def default_params(): y = argmin_use_numpy(x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_default" @@ -592,7 +592,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_keepdims_false" @@ -607,7 +607,7 @@ def last_index(): x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_last_index" @@ -641,7 +641,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_2D_keepdims_false" @@ -656,7 +656,7 @@ def last_index(): x, dtype=np.int8) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_2D_last_index" @@ -676,7 +676,7 @@ def default_params(): y = argmin_use_numpy(x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_default" @@ -691,7 +691,7 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_keepdims_false" @@ -706,7 +706,7 @@ def last_index(): x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_last_index" diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index d5d51e6a7..2456b9246 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -16,3 +16,48 @@ mod add_i8; mod add_i8_broadcast; mod add_u32; mod add_u32_broadcast; +mod argmax_fp16x16_1D_default; +mod argmax_fp16x16_1D_keepdims_false; +mod argmax_fp16x16_1D_last_index; +mod argmax_fp16x16_2D_default; +mod argmax_fp16x16_2D_keepdims_false; +mod argmax_fp16x16_2D_last_index; +mod argmax_fp16x16_3D_default; +mod argmax_fp16x16_3D_keepdims_false; +mod argmax_fp16x16_3D_last_index; +mod argmax_fp8x23_1D_default; +mod argmax_fp8x23_1D_keepdims_false; +mod argmax_fp8x23_1D_last_index; +mod argmax_fp8x23_2D_default; +mod argmax_fp8x23_2D_keepdims_false; +mod argmax_fp8x23_2D_last_index; +mod argmax_fp8x23_3D_default; +mod argmax_fp8x23_3D_keepdims_false; +mod argmax_fp8x23_3D_last_index; +mod argmax_i32_1D_default; +mod argmax_i32_1D_keepdims_false; +mod argmax_i32_1D_last_index; +mod argmax_i32_2D_default; +mod argmax_i32_2D_keepdims_false; +mod argmax_i32_2D_last_index; +mod argmax_i32_3D_default; +mod argmax_i32_3D_keepdims_false; +mod argmax_i32_3D_last_index; +mod argmax_i8_1D_default; +mod argmax_i8_1D_keepdims_false; +mod argmax_i8_1D_last_index; +mod argmax_i8_2D_default; +mod argmax_i8_2D_keepdims_false; +mod argmax_i8_2D_last_index; +mod argmax_i8_3D_default; +mod argmax_i8_3D_keepdims_false; +mod argmax_i8_3D_last_index; +mod argmax_u32_1D_default; +mod argmax_u32_1D_keepdims_false; +mod argmax_u32_1D_last_index; +mod argmax_u32_2D_default; +mod argmax_u32_2D_keepdims_false; +mod argmax_u32_2D_last_index; +mod argmax_u32_3D_default; +mod argmax_u32_3D_keepdims_false; +mod argmax_u32_3D_last_index; diff --git a/src/tests/nodes/argmax_fp16x16_1D_default.cairo b/src/tests/nodes/argmax_fp16x16_1D_default.cairo new file mode 100644 index 000000000..58b6a68a3 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo new file mode 100644 index 000000000..f23d32b16 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 5832704, sign: true }); + data.append(FP16x16 { mag: 8323072, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo new file mode 100644 index 000000000..a315caa9b --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..f514f7acb --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo new file mode 100644 index 000000000..c12d59b17 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo new file mode 100644 index 000000000..1ee7073b4 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default.cairo b/src/tests/nodes/argmax_fp16x16_2D_default.cairo new file mode 100644 index 000000000..4ce5de2e6 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo new file mode 100644 index 000000000..cd8f41c61 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo new file mode 100644 index 000000000..18c2bb3fe --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo new file mode 100644 index 000000000..8bbde673a --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..f1f9169ed --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..af0e54527 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo new file mode 100644 index 000000000..f91b15c85 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo new file mode 100644 index 000000000..1243376fe --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: true }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo new file mode 100644 index 000000000..4fb656f2a --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default.cairo b/src/tests/nodes/argmax_fp16x16_3D_default.cairo new file mode 100644 index 000000000..f8c7c1589 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo new file mode 100644 index 000000000..cacca75ec --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo new file mode 100644 index 000000000..b5312855b --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo new file mode 100644 index 000000000..54243bd59 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..540435864 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: true }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..fdae52d6a --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo new file mode 100644 index 000000000..4d633778d --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp16x16_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo new file mode 100644 index 000000000..57d1f9c07 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5636096, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo new file mode 100644 index 000000000..0a783bab9 --- /dev/null +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default.cairo b/src/tests/nodes/argmax_fp8x23_1D_default.cairo new file mode 100644 index 000000000..173032fc3 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo new file mode 100644 index 000000000..f456b6a3e --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo new file mode 100644 index 000000000..1dde67779 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..690040b55 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo new file mode 100644 index 000000000..9b2094325 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo new file mode 100644 index 000000000..530bfdf08 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default.cairo b/src/tests/nodes/argmax_fp8x23_2D_default.cairo new file mode 100644 index 000000000..b5e22f49d --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo new file mode 100644 index 000000000..1075d4252 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo new file mode 100644 index 000000000..c8e819a0a --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..15b48a8d1 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 805306368, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..d895ba817 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo new file mode 100644 index 000000000..871ba2be0 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo new file mode 100644 index 000000000..d7f58ab66 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo new file mode 100644 index 000000000..4fb656f2a --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default.cairo b/src/tests/nodes/argmax_fp8x23_3D_default.cairo new file mode 100644 index 000000000..478037446 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo new file mode 100644 index 000000000..6d7523e62 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo new file mode 100644 index 000000000..9763d507f --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo new file mode 100644 index 000000000..23414b00c --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..af97ff18f --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..2094003c4 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo new file mode 100644 index 000000000..940bc9669 --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_fp8x23_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo new file mode 100644 index 000000000..1fe0ce7fe --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 536870912, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo new file mode 100644 index 000000000..1cb8809eb --- /dev/null +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default.cairo b/src/tests/nodes/argmax_i32_1D_default.cairo new file mode 100644 index 000000000..8a5a5d5b5 --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo new file mode 100644 index 000000000..c12dae57e --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 108, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo new file mode 100644 index 000000000..13dbb21a4 --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..a465f823f --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 92, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index.cairo b/src/tests/nodes/argmax_i32_1D_last_index.cairo new file mode 100644 index 000000000..1a1e84a2e --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo new file mode 100644 index 000000000..76e714b0d --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 232, sign: false }); + data.append(i32 { mag: 204, sign: false }); + data.append(i32 { mag: 189, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default.cairo b/src/tests/nodes/argmax_i32_2D_default.cairo new file mode 100644 index 000000000..b2638c25e --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo new file mode 100644 index 000000000..4f06af5d9 --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 103, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo new file mode 100644 index 000000000..4fb656f2a --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo new file mode 100644 index 000000000..c4dd18979 --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..4a58a036d --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 108, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..d895ba817 --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index.cairo b/src/tests/nodes/argmax_i32_2D_last_index.cairo new file mode 100644 index 000000000..93143b8e3 --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo new file mode 100644 index 000000000..0199493ad --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 127, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo new file mode 100644 index 000000000..5541876d4 --- /dev/null +++ b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default.cairo b/src/tests/nodes/argmax_i32_3D_default.cairo new file mode 100644 index 000000000..669db2212 --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo new file mode 100644 index 000000000..f534aa0f0 --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 120, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 70, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo new file mode 100644 index 000000000..a698fcbf9 --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo new file mode 100644 index 000000000..7b3d014fa --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..bdcee588b --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 124, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..0cc7de207 --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index.cairo b/src/tests/nodes/argmax_i32_3D_last_index.cairo new file mode 100644 index 000000000..2855ba0cd --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i32_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo new file mode 100644 index 000000000..ebcfa868e --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 110, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo new file mode 100644 index 000000000..49547e6c9 --- /dev/null +++ b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default.cairo b/src/tests/nodes/argmax_i8_1D_default.cairo new file mode 100644 index 000000000..14112acf6 --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo new file mode 100644 index 000000000..011898e90 --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 109, sign: true }); + data.append(i8 { mag: 77, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo new file mode 100644 index 000000000..05baf1c96 --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..8cec9600d --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 78, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 52, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index.cairo b/src/tests/nodes/argmax_i8_1D_last_index.cairo new file mode 100644 index 000000000..f4c00289c --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo new file mode 100644 index 000000000..a8c356d5e --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 63, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default.cairo b/src/tests/nodes/argmax_i8_2D_default.cairo new file mode 100644 index 000000000..d0b9881cc --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo new file mode 100644 index 000000000..aba762fd1 --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 123, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo new file mode 100644 index 000000000..5541876d4 --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo new file mode 100644 index 000000000..06c55c802 --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..6d532e7b6 --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 66, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..eb0060f3e --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index.cairo b/src/tests/nodes/argmax_i8_2D_last_index.cairo new file mode 100644 index 000000000..6a9ebb9bc --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo new file mode 100644 index 000000000..ab4f8f6fa --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 15, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default.cairo b/src/tests/nodes/argmax_i8_3D_default.cairo new file mode 100644 index 000000000..fd4bfaf05 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo new file mode 100644 index 000000000..9f5b78aea --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 49, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo new file mode 100644 index 000000000..47371f78a --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo new file mode 100644 index 000000000..c477a9858 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..7086d8dd8 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 39, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..b7f7a3c83 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index.cairo b/src/tests/nodes/argmax_i8_3D_last_index.cairo new file mode 100644 index 000000000..1c1006fa6 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_i8_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo new file mode 100644 index 000000000..a18462dc9 --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 87, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo new file mode 100644 index 000000000..9763d507f --- /dev/null +++ b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default.cairo b/src/tests/nodes/argmax_u32_1D_default.cairo new file mode 100644 index 000000000..0bbfe1dc7 --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo new file mode 100644 index 000000000..baf00496a --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(22); + data.append(149); + data.append(157); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo new file mode 100644 index 000000000..1b4410a8d --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..3508dd9f2 --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(159); + data.append(31); + data.append(202); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index.cairo b/src/tests/nodes/argmax_u32_1D_last_index.cairo new file mode 100644 index 000000000..0065e3f25 --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo new file mode 100644 index 000000000..28eabceaf --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(177); + data.append(78); + data.append(187); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default.cairo b/src/tests/nodes/argmax_u32_2D_default.cairo new file mode 100644 index 000000000..e2416badc --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo new file mode 100644 index 000000000..90fd94e8b --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(208); + data.append(4); + data.append(108); + data.append(60); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo new file mode 100644 index 000000000..ddda36dda --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..a2c436dbd --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(229); + data.append(129); + data.append(171); + data.append(10); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..af0e54527 --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index.cairo b/src/tests/nodes/argmax_u32_2D_last_index.cairo new file mode 100644 index 000000000..97f5bd13b --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo new file mode 100644 index 000000000..91083cbff --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(162); + data.append(67); + data.append(147); + data.append(150); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default.cairo b/src/tests/nodes/argmax_u32_3D_default.cairo new file mode 100644 index 000000000..2115a9d15 --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo new file mode 100644 index 000000000..cc7a436d2 --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(113); + data.append(207); + data.append(34); + data.append(249); + data.append(186); + data.append(56); + data.append(153); + data.append(92); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo new file mode 100644 index 000000000..b0d2c103c --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo new file mode 100644 index 000000000..402adf2d7 --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..00aba455e --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(37); + data.append(156); + data.append(115); + data.append(212); + data.append(45); + data.append(237); + data.append(24); + data.append(136); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..386b678ef --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index.cairo b/src/tests/nodes/argmax_u32_3D_last_index.cairo new file mode 100644 index 000000000..a670579ec --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmax_u32_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmax(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo new file mode 100644 index 000000000..f9a0aa88e --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(39); + data.append(86); + data.append(127); + data.append(185); + data.append(36); + data.append(197); + data.append(160); + data.append(37); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo new file mode 100644 index 000000000..1970e5f5a --- /dev/null +++ b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From a235b4028e24584a81463dd35cc71f0384a6dcf0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:34:14 +0300 Subject: [PATCH 122/179] test asin --- nodegen/node/asin.py | 8 +- nodegen/node/asinh.py | 90 ------------------- nodegen/node/ceil.py | 8 +- src/tests/nodes.cairo | 47 ++++++++++ .../nodes/argmin_fp16x16_1D_default.cairo | 20 +++++ .../argmin_fp16x16_1D_default/input_0.cairo | 16 ++++ .../argmin_fp16x16_1D_default/output_0.cairo | 12 +++ .../argmin_fp16x16_1D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 16 ++++ .../output_0.cairo | 12 +++ .../nodes/argmin_fp16x16_1D_last_index.cairo | 20 +++++ .../input_0.cairo | 16 ++++ .../output_0.cairo | 12 +++ .../nodes/argmin_fp16x16_2D_default.cairo | 20 +++++ .../argmin_fp16x16_2D_default/input_0.cairo | 18 ++++ .../argmin_fp16x16_2D_default/output_0.cairo | 14 +++ .../argmin_fp16x16_2D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 18 ++++ .../output_0.cairo | 13 +++ .../nodes/argmin_fp16x16_2D_last_index.cairo | 20 +++++ .../input_0.cairo | 18 ++++ .../output_0.cairo | 14 +++ .../nodes/argmin_fp16x16_3D_default.cairo | 20 +++++ .../argmin_fp16x16_3D_default/input_0.cairo | 23 +++++ .../argmin_fp16x16_3D_default/output_0.cairo | 17 ++++ .../argmin_fp16x16_3D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 23 +++++ .../output_0.cairo | 16 ++++ .../nodes/argmin_fp16x16_3D_last_index.cairo | 20 +++++ .../input_0.cairo | 23 +++++ .../output_0.cairo | 17 ++++ .../nodes/argmin_fp8x23_1D_default.cairo | 20 +++++ .../argmin_fp8x23_1D_default/input_0.cairo | 16 ++++ .../argmin_fp8x23_1D_default/output_0.cairo | 12 +++ .../argmin_fp8x23_1D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 16 ++++ .../output_0.cairo | 12 +++ .../nodes/argmin_fp8x23_1D_last_index.cairo | 20 +++++ .../argmin_fp8x23_1D_last_index/input_0.cairo | 16 ++++ .../output_0.cairo | 12 +++ .../nodes/argmin_fp8x23_2D_default.cairo | 20 +++++ .../argmin_fp8x23_2D_default/input_0.cairo | 18 ++++ .../argmin_fp8x23_2D_default/output_0.cairo | 14 +++ .../argmin_fp8x23_2D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 18 ++++ .../output_0.cairo | 13 +++ .../nodes/argmin_fp8x23_2D_last_index.cairo | 20 +++++ .../argmin_fp8x23_2D_last_index/input_0.cairo | 18 ++++ .../output_0.cairo | 14 +++ .../nodes/argmin_fp8x23_3D_default.cairo | 20 +++++ .../argmin_fp8x23_3D_default/input_0.cairo | 23 +++++ .../argmin_fp8x23_3D_default/output_0.cairo | 17 ++++ .../argmin_fp8x23_3D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 23 +++++ .../output_0.cairo | 16 ++++ .../nodes/argmin_fp8x23_3D_last_index.cairo | 20 +++++ .../argmin_fp8x23_3D_last_index/input_0.cairo | 23 +++++ .../output_0.cairo | 17 ++++ src/tests/nodes/argmin_i32_1D_default.cairo | 20 +++++ .../nodes/argmin_i32_1D_default/input_0.cairo | 15 ++++ .../argmin_i32_1D_default/output_0.cairo | 12 +++ .../nodes/argmin_i32_1D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 15 ++++ .../output_0.cairo | 12 +++ .../nodes/argmin_i32_1D_last_index.cairo | 20 +++++ .../argmin_i32_1D_last_index/input_0.cairo | 15 ++++ .../argmin_i32_1D_last_index/output_0.cairo | 12 +++ src/tests/nodes/argmin_i32_2D_default.cairo | 20 +++++ .../nodes/argmin_i32_2D_default/input_0.cairo | 17 ++++ .../argmin_i32_2D_default/output_0.cairo | 14 +++ .../nodes/argmin_i32_2D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 17 ++++ .../output_0.cairo | 13 +++ .../nodes/argmin_i32_2D_last_index.cairo | 20 +++++ .../argmin_i32_2D_last_index/input_0.cairo | 17 ++++ .../argmin_i32_2D_last_index/output_0.cairo | 14 +++ src/tests/nodes/argmin_i32_3D_default.cairo | 20 +++++ .../nodes/argmin_i32_3D_default/input_0.cairo | 22 +++++ .../argmin_i32_3D_default/output_0.cairo | 17 ++++ .../nodes/argmin_i32_3D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 22 +++++ .../output_0.cairo | 16 ++++ .../nodes/argmin_i32_3D_last_index.cairo | 20 +++++ .../argmin_i32_3D_last_index/input_0.cairo | 22 +++++ .../argmin_i32_3D_last_index/output_0.cairo | 17 ++++ src/tests/nodes/argmin_i8_1D_default.cairo | 20 +++++ .../nodes/argmin_i8_1D_default/input_0.cairo | 15 ++++ .../nodes/argmin_i8_1D_default/output_0.cairo | 12 +++ .../nodes/argmin_i8_1D_keepdims_false.cairo | 20 +++++ .../argmin_i8_1D_keepdims_false/input_0.cairo | 15 ++++ .../output_0.cairo | 12 +++ src/tests/nodes/argmin_i8_1D_last_index.cairo | 20 +++++ .../argmin_i8_1D_last_index/input_0.cairo | 15 ++++ .../argmin_i8_1D_last_index/output_0.cairo | 12 +++ src/tests/nodes/argmin_i8_2D_default.cairo | 20 +++++ .../nodes/argmin_i8_2D_default/input_0.cairo | 17 ++++ .../nodes/argmin_i8_2D_default/output_0.cairo | 14 +++ .../nodes/argmin_i8_2D_keepdims_false.cairo | 20 +++++ .../argmin_i8_2D_keepdims_false/input_0.cairo | 17 ++++ .../output_0.cairo | 13 +++ src/tests/nodes/argmin_i8_2D_last_index.cairo | 20 +++++ .../argmin_i8_2D_last_index/input_0.cairo | 17 ++++ .../argmin_i8_2D_last_index/output_0.cairo | 14 +++ src/tests/nodes/argmin_i8_3D_default.cairo | 20 +++++ .../nodes/argmin_i8_3D_default/input_0.cairo | 22 +++++ .../nodes/argmin_i8_3D_default/output_0.cairo | 17 ++++ .../nodes/argmin_i8_3D_keepdims_false.cairo | 20 +++++ .../argmin_i8_3D_keepdims_false/input_0.cairo | 22 +++++ .../output_0.cairo | 16 ++++ src/tests/nodes/argmin_i8_3D_last_index.cairo | 20 +++++ .../argmin_i8_3D_last_index/input_0.cairo | 22 +++++ .../argmin_i8_3D_last_index/output_0.cairo | 17 ++++ src/tests/nodes/argmin_u32_1D_default.cairo | 20 +++++ .../nodes/argmin_u32_1D_default/input_0.cairo | 14 +++ .../argmin_u32_1D_default/output_0.cairo | 12 +++ .../nodes/argmin_u32_1D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 14 +++ .../output_0.cairo | 12 +++ .../nodes/argmin_u32_1D_last_index.cairo | 20 +++++ .../argmin_u32_1D_last_index/input_0.cairo | 14 +++ .../argmin_u32_1D_last_index/output_0.cairo | 12 +++ src/tests/nodes/argmin_u32_2D_default.cairo | 20 +++++ .../nodes/argmin_u32_2D_default/input_0.cairo | 16 ++++ .../argmin_u32_2D_default/output_0.cairo | 14 +++ .../nodes/argmin_u32_2D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 16 ++++ .../output_0.cairo | 13 +++ .../nodes/argmin_u32_2D_last_index.cairo | 20 +++++ .../argmin_u32_2D_last_index/input_0.cairo | 16 ++++ .../argmin_u32_2D_last_index/output_0.cairo | 14 +++ src/tests/nodes/argmin_u32_3D_default.cairo | 20 +++++ .../nodes/argmin_u32_3D_default/input_0.cairo | 21 +++++ .../argmin_u32_3D_default/output_0.cairo | 17 ++++ .../nodes/argmin_u32_3D_keepdims_false.cairo | 20 +++++ .../input_0.cairo | 21 +++++ .../output_0.cairo | 16 ++++ .../nodes/argmin_u32_3D_last_index.cairo | 20 +++++ .../argmin_u32_3D_last_index/input_0.cairo | 21 +++++ .../argmin_u32_3D_last_index/output_0.cairo | 17 ++++ src/tests/nodes/asin_fp16x16.cairo | 20 +++++ src/tests/nodes/asin_fp16x16/input_0.cairo | 18 ++++ src/tests/nodes/asin_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/asin_fp8x23.cairo | 20 +++++ src/tests/nodes/asin_fp8x23/input_0.cairo | 18 ++++ src/tests/nodes/asin_fp8x23/output_0.cairo | 18 ++++ 145 files changed, 2521 insertions(+), 98 deletions(-) create mode 100644 src/tests/nodes/argmin_fp16x16_1D_default.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_default.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_default.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_default.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_default.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_default.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_default.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_default.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_default.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_default.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_default.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_default.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_last_index.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_default.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_last_index.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_default.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_last_index.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_default.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_default/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_default/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_last_index.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo create mode 100644 src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo create mode 100644 src/tests/nodes/asin_fp16x16.cairo create mode 100644 src/tests/nodes/asin_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/asin_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/asin_fp8x23.cairo create mode 100644 src/tests/nodes/asin_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/asin_fp8x23/output_0.cairo diff --git a/nodegen/node/asin.py b/nodegen/node/asin.py index a8874e133..2c4036e3f 100644 --- a/nodegen/node/asin.py +++ b/nodegen/node/asin.py @@ -9,8 +9,8 @@ def asin_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arcsin(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "asin_fp8x23" make_node([x], [y], name) @@ -21,8 +21,8 @@ def asin_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arcsin(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "asin_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/asinh.py b/nodegen/node/asinh.py index ba37b9b72..85d49ac7b 100644 --- a/nodegen/node/asinh.py +++ b/nodegen/node/asinh.py @@ -5,96 +5,6 @@ class Asinh(RunAll): - @staticmethod - def asinh_i32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def asinh_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.arcsinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def asinh_u32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arcsinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arcsinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - @staticmethod def asinh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) diff --git a/nodegen/node/ceil.py b/nodegen/node/ceil.py index 1bf58a2ff..cef759d91 100644 --- a/nodegen/node/ceil.py +++ b/nodegen/node/ceil.py @@ -9,8 +9,8 @@ def ceil_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.ceil(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "ceil_fp8x23" make_node([x], [y], name) @@ -21,8 +21,8 @@ def ceil_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.ceil(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "ceil_fp16x16" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 2456b9246..511b07628 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -61,3 +61,50 @@ mod argmax_u32_2D_last_index; mod argmax_u32_3D_default; mod argmax_u32_3D_keepdims_false; mod argmax_u32_3D_last_index; +mod argmin_fp16x16_1D_default; +mod argmin_fp16x16_1D_keepdims_false; +mod argmin_fp16x16_1D_last_index; +mod argmin_fp16x16_2D_default; +mod argmin_fp16x16_2D_keepdims_false; +mod argmin_fp16x16_2D_last_index; +mod argmin_fp16x16_3D_default; +mod argmin_fp16x16_3D_keepdims_false; +mod argmin_fp16x16_3D_last_index; +mod argmin_fp8x23_1D_default; +mod argmin_fp8x23_1D_keepdims_false; +mod argmin_fp8x23_1D_last_index; +mod argmin_fp8x23_2D_default; +mod argmin_fp8x23_2D_keepdims_false; +mod argmin_fp8x23_2D_last_index; +mod argmin_fp8x23_3D_default; +mod argmin_fp8x23_3D_keepdims_false; +mod argmin_fp8x23_3D_last_index; +mod argmin_i32_1D_default; +mod argmin_i32_1D_keepdims_false; +mod argmin_i32_1D_last_index; +mod argmin_i32_2D_default; +mod argmin_i32_2D_keepdims_false; +mod argmin_i32_2D_last_index; +mod argmin_i32_3D_default; +mod argmin_i32_3D_keepdims_false; +mod argmin_i32_3D_last_index; +mod argmin_i8_1D_default; +mod argmin_i8_1D_keepdims_false; +mod argmin_i8_1D_last_index; +mod argmin_i8_2D_default; +mod argmin_i8_2D_keepdims_false; +mod argmin_i8_2D_last_index; +mod argmin_i8_3D_default; +mod argmin_i8_3D_keepdims_false; +mod argmin_i8_3D_last_index; +mod argmin_u32_1D_default; +mod argmin_u32_1D_keepdims_false; +mod argmin_u32_1D_last_index; +mod argmin_u32_2D_default; +mod argmin_u32_2D_keepdims_false; +mod argmin_u32_2D_last_index; +mod argmin_u32_3D_default; +mod argmin_u32_3D_keepdims_false; +mod argmin_u32_3D_last_index; +mod asin_fp16x16; +mod asin_fp8x23; diff --git a/src/tests/nodes/argmin_fp16x16_1D_default.cairo b/src/tests/nodes/argmin_fp16x16_1D_default.cairo new file mode 100644 index 000000000..1b1ca67e6 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo new file mode 100644 index 000000000..dcc350ee5 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1114112, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo new file mode 100644 index 000000000..699b99db3 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..dd5476cd9 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo new file mode 100644 index 000000000..52d96accc --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo new file mode 100644 index 000000000..c5dfb9f2b --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default.cairo b/src/tests/nodes/argmin_fp16x16_2D_default.cairo new file mode 100644 index 000000000..8890ede98 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo new file mode 100644 index 000000000..456fb9a91 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 8060928, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo new file mode 100644 index 000000000..18c2bb3fe --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo new file mode 100644 index 000000000..115a5dbd5 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..8b660c61b --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..d895ba817 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo new file mode 100644 index 000000000..151f78614 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo new file mode 100644 index 000000000..c42a678da --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 8060928, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default.cairo b/src/tests/nodes/argmin_fp16x16_3D_default.cairo new file mode 100644 index 000000000..7a69bd614 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo new file mode 100644 index 000000000..ea0cdb441 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo new file mode 100644 index 000000000..bfea2aecb --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo new file mode 100644 index 000000000..1c3ed9e49 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..d4ceeab3f --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: true }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..ea6cc3c4d --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo new file mode 100644 index 000000000..66fa5aee2 --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp16x16_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo new file mode 100644 index 000000000..21be41b2b --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo new file mode 100644 index 000000000..9763d507f --- /dev/null +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default.cairo b/src/tests/nodes/argmin_fp8x23_1D_default.cairo new file mode 100644 index 000000000..2e591e8dc --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo new file mode 100644 index 000000000..5b477194d --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo new file mode 100644 index 000000000..21b291ae2 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..b1b78c84d --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo new file mode 100644 index 000000000..52fac5d7c --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo new file mode 100644 index 000000000..5d61a20e0 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 738197504, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default.cairo b/src/tests/nodes/argmin_fp8x23_2D_default.cairo new file mode 100644 index 000000000..e0f07cc0c --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo new file mode 100644 index 000000000..750ea8e95 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo new file mode 100644 index 000000000..18c2bb3fe --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo new file mode 100644 index 000000000..365e0fd30 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..448042f28 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..2f17092da --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo new file mode 100644 index 000000000..3eac0de88 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo new file mode 100644 index 000000000..87198252b --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 738197504, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default.cairo b/src/tests/nodes/argmin_fp8x23_3D_default.cairo new file mode 100644 index 000000000..29bd82f7c --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo new file mode 100644 index 000000000..cf05b975c --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo new file mode 100644 index 000000000..8851cfbb7 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo new file mode 100644 index 000000000..f5478105e --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..08e88c4de --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 729808896, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..386b678ef --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo new file mode 100644 index 000000000..fcf5ebef3 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_fp8x23_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo new file mode 100644 index 000000000..6c6ee884c --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 713031680, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo new file mode 100644 index 000000000..8851cfbb7 --- /dev/null +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default.cairo b/src/tests/nodes/argmin_i32_1D_default.cairo new file mode 100644 index 000000000..1c5becbe1 --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo new file mode 100644 index 000000000..6bee6657d --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 117, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo new file mode 100644 index 000000000..8fb6cfbb7 --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..eb195d6dd --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 39, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..56f9cff0f --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index.cairo b/src/tests/nodes/argmin_i32_1D_last_index.cairo new file mode 100644 index 000000000..bdd262983 --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo new file mode 100644 index 000000000..963804af6 --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 249, sign: false }); + data.append(i32 { mag: 73, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default.cairo b/src/tests/nodes/argmin_i32_2D_default.cairo new file mode 100644 index 000000000..a47464d74 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo new file mode 100644 index 000000000..6c2ecdc75 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 52, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo new file mode 100644 index 000000000..4fb656f2a --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo new file mode 100644 index 000000000..f350ee0c0 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..cb4190105 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 68, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..af0e54527 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index.cairo b/src/tests/nodes/argmin_i32_2D_last_index.cairo new file mode 100644 index 000000000..f845bfb3b --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo new file mode 100644 index 000000000..893757290 --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 14, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo new file mode 100644 index 000000000..18c2bb3fe --- /dev/null +++ b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default.cairo b/src/tests/nodes/argmin_i32_3D_default.cairo new file mode 100644 index 000000000..e7f363236 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo new file mode 100644 index 000000000..2c763628a --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 108, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo new file mode 100644 index 000000000..8851cfbb7 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo new file mode 100644 index 000000000..39acd02cf --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..96a3094b8 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 122, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..8304bcded --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index.cairo b/src/tests/nodes/argmin_i32_3D_last_index.cairo new file mode 100644 index 000000000..619963622 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i32_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo new file mode 100644 index 000000000..672970547 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 33, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo new file mode 100644 index 000000000..a698fcbf9 --- /dev/null +++ b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default.cairo b/src/tests/nodes/argmin_i8_1D_default.cairo new file mode 100644 index 000000000..de5a94bc9 --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo new file mode 100644 index 000000000..6dbaca36a --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 94, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo new file mode 100644 index 000000000..a5b9b2b46 --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..78b033855 --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 72, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index.cairo b/src/tests/nodes/argmin_i8_1D_last_index.cairo new file mode 100644 index 000000000..7e7105583 --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo new file mode 100644 index 000000000..276a97682 --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 17, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default.cairo b/src/tests/nodes/argmin_i8_2D_default.cairo new file mode 100644 index 000000000..a29c862d7 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo new file mode 100644 index 000000000..2e4de7245 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 73, sign: true }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 113, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo new file mode 100644 index 000000000..6e8934615 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo new file mode 100644 index 000000000..986a30216 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..023aabe50 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 103, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..2f17092da --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index.cairo b/src/tests/nodes/argmin_i8_2D_last_index.cairo new file mode 100644 index 000000000..55a20cbb2 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo new file mode 100644 index 000000000..8831598a9 --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 24, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo new file mode 100644 index 000000000..18c2bb3fe --- /dev/null +++ b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default.cairo b/src/tests/nodes/argmin_i8_3D_default.cairo new file mode 100644 index 000000000..76eaa3aa0 --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo new file mode 100644 index 000000000..ecb9c7434 --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 70, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo new file mode 100644 index 000000000..b0d2c103c --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo new file mode 100644 index 000000000..58a17208a --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..cf55d4fa2 --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 89, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..8304bcded --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index.cairo b/src/tests/nodes/argmin_i8_3D_last_index.cairo new file mode 100644 index 000000000..68d7ff9e8 --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_i8_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo new file mode 100644 index 000000000..fbc71e6ef --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 114, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo new file mode 100644 index 000000000..451c4b7ce --- /dev/null +++ b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default.cairo b/src/tests/nodes/argmin_u32_1D_default.cairo new file mode 100644 index 000000000..4c50c9862 --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_1D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo new file mode 100644 index 000000000..64da2a068 --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(97); + data.append(18); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo new file mode 100644 index 000000000..eda6965eb --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo new file mode 100644 index 000000000..bb48fb618 --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_1D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..bf6f439f7 --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(36); + data.append(24); + data.append(185); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index.cairo b/src/tests/nodes/argmin_u32_1D_last_index.cairo new file mode 100644 index 000000000..ff0a959c2 --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_1D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo new file mode 100644 index 000000000..e8fc6e12b --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(202); + data.append(105); + data.append(177); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo new file mode 100644 index 000000000..1565560fe --- /dev/null +++ b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default.cairo b/src/tests/nodes/argmin_u32_2D_default.cairo new file mode 100644 index 000000000..ca41d100b --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo new file mode 100644 index 000000000..b90f77a87 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(250); + data.append(71); + data.append(159); + data.append(119); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo new file mode 100644 index 000000000..5541876d4 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo new file mode 100644 index 000000000..0f689a77c --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_2D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..8a488d6a4 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(205); + data.append(39); + data.append(206); + data.append(94); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..af0e54527 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index.cairo b/src/tests/nodes/argmin_u32_2D_last_index.cairo new file mode 100644 index 000000000..358077442 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_2D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo new file mode 100644 index 000000000..4282a704b --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(182); + data.append(6); + data.append(161); + data.append(123); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo new file mode 100644 index 000000000..5541876d4 --- /dev/null +++ b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default.cairo b/src/tests/nodes/argmin_u32_3D_default.cairo new file mode 100644 index 000000000..a68092a38 --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_3D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo new file mode 100644 index 000000000..3e8155d19 --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(183); + data.append(101); + data.append(207); + data.append(197); + data.append(120); + data.append(204); + data.append(156); + data.append(234); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo new file mode 100644 index 000000000..b0d2c103c --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo new file mode 100644 index 000000000..d4cc43f00 --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_3D_keepdims_false() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::Some(false), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo new file mode 100644 index 000000000..24ab83d7e --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(15); + data.append(205); + data.append(192); + data.append(220); + data.append(182); + data.append(184); + data.append(11); + data.append(97); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo new file mode 100644 index 000000000..fdae52d6a --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index.cairo b/src/tests/nodes/argmin_u32_3D_last_index.cairo new file mode 100644 index 000000000..1bf0bf127 --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_last_index.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_argmin_u32_3D_last_index() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.argmin(0, Option::None(()), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo new file mode 100644 index 000000000..0182a32a3 --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(153); + data.append(28); + data.append(204); + data.append(0); + data.append(69); + data.append(220); + data.append(126); + data.append(80); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo new file mode 100644 index 000000000..b0d2c103c --- /dev/null +++ b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16.cairo b/src/tests/nodes/asin_fp16x16.cairo new file mode 100644 index 000000000..4ed6e61f5 --- /dev/null +++ b/src/tests/nodes/asin_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_asin_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.asin(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo new file mode 100644 index 000000000..7fc563b23 --- /dev/null +++ b/src/tests/nodes/asin_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 24425, sign: false }); + data.append(FP16x16 { mag: 40100, sign: true }); + data.append(FP16x16 { mag: 37592, sign: true }); + data.append(FP16x16 { mag: 55159, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo new file mode 100644 index 000000000..1501342b1 --- /dev/null +++ b/src/tests/nodes/asin_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 25029, sign: false }); + data.append(FP16x16 { mag: 43152, sign: true }); + data.append(FP16x16 { mag: 40036, sign: true }); + data.append(FP16x16 { mag: 65559, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23.cairo b/src/tests/nodes/asin_fp8x23.cairo new file mode 100644 index 000000000..1ab699444 --- /dev/null +++ b/src/tests/nodes/asin_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_asin_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.asin(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo new file mode 100644 index 000000000..8e3fe6424 --- /dev/null +++ b/src/tests/nodes/asin_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 5018963, sign: true }); + data.append(FP8x23 { mag: 1475178, sign: false }); + data.append(FP8x23 { mag: 4332453, sign: false }); + data.append(FP8x23 { mag: 3833460, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo new file mode 100644 index 000000000..114fd9150 --- /dev/null +++ b/src/tests/nodes/asin_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 5380341, sign: true }); + data.append(FP8x23 { mag: 1482889, sign: false }); + data.append(FP8x23 { mag: 4552681, sign: false }); + data.append(FP8x23 { mag: 3981246, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 52ea375fa03732629702c7a7fc74dc94d3591f12 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:35:26 +0300 Subject: [PATCH 123/179] test asinh --- src/tests/nodes.cairo | 2 ++ src/tests/nodes/asinh_fp16x16.cairo | 20 +++++++++++++++++++ src/tests/nodes/asinh_fp16x16/input_0.cairo | 18 +++++++++++++++++ src/tests/nodes/asinh_fp16x16/output_0.cairo | 18 +++++++++++++++++ src/tests/nodes/asinh_fp8x23.cairo | 20 +++++++++++++++++++ src/tests/nodes/asinh_fp8x23/input_0.cairo | 18 +++++++++++++++++ src/tests/nodes/asinh_fp8x23/output_0.cairo | 18 +++++++++++++++++ .../quantize_linear_i32_test.cairo | 2 -- 8 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 src/tests/nodes/asinh_fp16x16.cairo create mode 100644 src/tests/nodes/asinh_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/asinh_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/asinh_fp8x23.cairo create mode 100644 src/tests/nodes/asinh_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/asinh_fp8x23/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 511b07628..6e9e23338 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -108,3 +108,5 @@ mod argmin_u32_3D_keepdims_false; mod argmin_u32_3D_last_index; mod asin_fp16x16; mod asin_fp8x23; +mod asinh_fp16x16; +mod asinh_fp8x23; diff --git a/src/tests/nodes/asinh_fp16x16.cairo b/src/tests/nodes/asinh_fp16x16.cairo new file mode 100644 index 000000000..1a94c21d4 --- /dev/null +++ b/src/tests/nodes/asinh_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_asinh_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.asinh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo new file mode 100644 index 000000000..94ef84d7a --- /dev/null +++ b/src/tests/nodes/asinh_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 184210, sign: false }); + data.append(FP16x16 { mag: 129479, sign: false }); + data.append(FP16x16 { mag: 277479, sign: false }); + data.append(FP16x16 { mag: 131054, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo new file mode 100644 index 000000000..6376e4230 --- /dev/null +++ b/src/tests/nodes/asinh_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 115137, sign: false }); + data.append(FP16x16 { mag: 93894, sign: false }); + data.append(FP16x16 { mag: 140899, sign: false }); + data.append(FP16x16 { mag: 94602, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23.cairo b/src/tests/nodes/asinh_fp8x23.cairo new file mode 100644 index 000000000..f4670f968 --- /dev/null +++ b/src/tests/nodes/asinh_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_asinh_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.asinh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo new file mode 100644 index 000000000..f59934d7b --- /dev/null +++ b/src/tests/nodes/asinh_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27455781, sign: false }); + data.append(FP8x23 { mag: 18897191, sign: false }); + data.append(FP8x23 { mag: 21438360, sign: false }); + data.append(FP8x23 { mag: 14100507, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo new file mode 100644 index 000000000..19b823afe --- /dev/null +++ b/src/tests/nodes/asinh_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 15950180, sign: false }); + data.append(FP8x23 { mag: 13012932, sign: false }); + data.append(FP8x23 { mag: 13989712, sign: false }); + data.append(FP8x23 { mag: 10830545, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 51866881a..089cb2a91 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -42,8 +42,6 @@ fn quantize_linear() { let y: Tensor = x.quantize_linear(@y_scale, @y_zero_point); - (*y.data.at(0).mag).print(); - assert((*y.data[0]).into() == 1, '*result[0] == 1'); assert((*y.data[1]).into() == 2, '*result[1] == 2'); assert((*y.data[2]).into() == 2, '*result[2] == 2'); From 0702eadb2f1f9309399c88eaed09356c1804345f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:41:32 +0300 Subject: [PATCH 124/179] test atan --- .../implement-new-operators-in-orion.md | 24 ++--- nodegen/node/atan.py | 91 ------------------- nodegen/node/concat.py | 20 ++-- nodegen/node/cos.py | 24 ++--- nodegen/node/cosh.py | 24 ++--- nodegen/node/exp.py | 24 ++--- nodegen/node/leaky_relu.py | 16 ++-- nodegen/node/log.py | 24 ++--- nodegen/node/logsoftmax.py | 56 ++++++------ nodegen/node/matmul.py | 8 +- nodegen/node/reduce_sum.py | 4 +- nodegen/node/sigmoid.py | 28 +++--- nodegen/node/sin.py | 24 ++--- nodegen/node/sinh.py | 24 ++--- nodegen/node/softmax.py | 28 +++--- nodegen/node/softplus.py | 28 +++--- nodegen/node/softsign.py | 28 +++--- nodegen/node/sqrt.py | 24 ++--- nodegen/node/tanh.py | 24 ++--- nodegen/node/transpose.py | 4 +- src/tests/nodes.cairo | 2 + src/tests/nodes/atan_fp16x16.cairo | 20 ++++ src/tests/nodes/atan_fp16x16/input_0.cairo | 18 ++++ src/tests/nodes/atan_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/atan_fp8x23.cairo | 20 ++++ src/tests/nodes/atan_fp8x23/input_0.cairo | 18 ++++ src/tests/nodes/atan_fp8x23/output_0.cairo | 18 ++++ 27 files changed, 332 insertions(+), 309 deletions(-) create mode 100644 src/tests/nodes/atan_fp16x16.cairo create mode 100644 src/tests/nodes/atan_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/atan_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/atan_fp8x23.cairo create mode 100644 src/tests/nodes/atan_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/atan_fp8x23/output_0.cairo diff --git a/docs/academy/tutorials/implement-new-operators-in-orion.md b/docs/academy/tutorials/implement-new-operators-in-orion.md index fee2ee978..1f6e53ab5 100644 --- a/docs/academy/tutorials/implement-new-operators-in-orion.md +++ b/docs/academy/tutorials/implement-new-operators-in-orion.md @@ -344,10 +344,10 @@ class Softmax(RunAll): y = softmax(x, 0) # Convert the input and output to Tensor class, similar to Orion's Tensor struct: - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) # Convert the floats values in `y` to fixed points with `to_fp` method: y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) # Define the name of the generated folder. name = "softmax_i32_fp8x23" @@ -367,9 +367,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i32_fp16x16" make_node([x], [y], name) @@ -385,9 +385,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 1) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_i8_fp8x23" make_node([x], [y], name) @@ -398,9 +398,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 0) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i8_fp16x16" make_node([x], [y], name) @@ -416,9 +416,9 @@ class Softmax(RunAll): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_u32_fp8x23" make_node([x], [y], name) @@ -429,9 +429,9 @@ class Softmax(RunAll): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 0) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/atan.py b/nodegen/node/atan.py index 1233f7e6c..09fa82cdb 100644 --- a/nodegen/node/atan.py +++ b/nodegen/node/atan.py @@ -4,97 +4,6 @@ class Atan(RunAll): - - @staticmethod - def atan_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - - @staticmethod - def atan_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.arctan(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - - @staticmethod - def atan_u32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.uint32) - y = np.arctan(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.uint32) - y = np.arctan(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - @staticmethod def atan_fp8x23(): x = np.random.uniform(-10, 127, (2, 2)).astype(np.float64) diff --git a/nodegen/node/concat.py b/nodegen/node/concat.py index c79dffb79..beb88f0cc 100644 --- a/nodegen/node/concat.py +++ b/nodegen/node/concat.py @@ -416,7 +416,7 @@ def concat_2D(): x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_2d" make_node([x1, x2], [y], name) @@ -453,7 +453,7 @@ def axis_1(): x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_axis_1" make_node([x1, x2], [y], name) @@ -471,7 +471,7 @@ def axis_2(): x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_axis_2" make_node([x1, x2], [y], name) @@ -494,7 +494,7 @@ def three_tensors_axis_1(): x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_three_tensors_axis_1" make_node([x1, x2, x3], [y], name) @@ -517,7 +517,7 @@ def three_tensors_axis_2(): x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_three_tensors_axis_2" make_node([x1, x2, x3], [y], name) @@ -547,7 +547,7 @@ def concat_1D(): x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_1d" make_node([x1, x2], [y], name) @@ -566,7 +566,7 @@ def concat_2D(): x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_2d" make_node([x1, x2], [y], name) @@ -585,7 +585,7 @@ def default(): x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_default" make_node([x1, x2], [y], name) @@ -621,7 +621,7 @@ def axis_2(): x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_axis_2" make_node([x1, x2], [y], name) @@ -644,7 +644,7 @@ def three_tensors_axis_1(): x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_three_tensors_axis_1" make_node([x1, x2, x3], [y], name) diff --git a/nodegen/node/cos.py b/nodegen/node/cos.py index e4c84ec68..a3074943f 100644 --- a/nodegen/node/cos.py +++ b/nodegen/node/cos.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.cos(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cos_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.cos(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cos_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) y = np.cos(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cos_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.cos(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cos_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.cos(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cos_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.cos(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cos_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/cosh.py b/nodegen/node/cosh.py index 71fd68109..f739b6ab0 100644 --- a/nodegen/node/cosh.py +++ b/nodegen/node/cosh.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.cosh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cosh_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.cosh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cosh_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = np.cosh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cosh_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.cosh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cosh_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.cosh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cosh_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.cosh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cosh_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/exp.py b/nodegen/node/exp.py index 0576f9e93..b5a345626 100644 --- a/nodegen/node/exp.py +++ b/nodegen/node/exp.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.exp(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "exp_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.exp(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "exp_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = np.exp(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "exp_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.exp(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "exp_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.exp(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "exp_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.exp(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "exp_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/leaky_relu.py b/nodegen/node/leaky_relu.py index 8d08303c4..d7420b2f0 100644 --- a/nodegen/node/leaky_relu.py +++ b/nodegen/node/leaky_relu.py @@ -13,9 +13,9 @@ def fp8x23(): layer = tf.keras.layers.LeakyReLU(alpha=0.1) y = layer(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "leaky_relu_i32_fp8x23" make_node([x], [y], name) @@ -27,9 +27,9 @@ def fp16x16(): layer = tf.keras.layers.LeakyReLU(alpha=0.1) y = layer(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "leaky_relu_i32_fp16x16" make_node([x], [y], name) @@ -46,9 +46,9 @@ def fp8x23(): layer = tf.keras.layers.LeakyReLU(alpha=0.1) y = layer(x).numpy() - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "leaky_relu_i8_fp8x23" make_node([x], [y], name) @@ -60,9 +60,9 @@ def fp16x16(): layer = tf.keras.layers.LeakyReLU(alpha=0.1) y = layer(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "leaky_relu_i8_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/log.py b/nodegen/node/log.py index 88488740d..d2cc12d70 100644 --- a/nodegen/node/log.py +++ b/nodegen/node/log.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(1, 127, (2, 2)).astype(np.int32) y = np.log(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "log_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(1, 127, (2, 2)).astype(np.int32) y = np.log(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "log_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(1, 5, (2, 2)).astype(np.int8) y = np.log(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "log_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(1, 127, (2, 2)).astype(np.int32) y = np.log(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "log_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.log(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "log_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.log(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "log_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/logsoftmax.py b/nodegen/node/logsoftmax.py index 9469dcce6..4a5e56d68 100644 --- a/nodegen/node/logsoftmax.py +++ b/nodegen/node/logsoftmax.py @@ -16,9 +16,9 @@ def fp8x23_axis_0(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_i32_fp8x23_axis_0" make_node([x], [y], name) @@ -29,9 +29,9 @@ def fp8x23_axis_1(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_i32_fp8x23_axis_1" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp16x16_axis_0(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_i32_fp16x16_axis_0" make_node([x], [y], name) @@ -55,9 +55,9 @@ def fp16x16_axis_1(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_i32_fp16x16_axis_1" make_node([x], [y], name) @@ -74,9 +74,9 @@ def fp8x23_axis_0(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_i8_fp8x23_axis_0" make_node([x], [y], name) @@ -87,9 +87,9 @@ def fp8x23_axis_1(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_i8_fp8x23_axis_1" make_node([x], [y], name) @@ -100,9 +100,9 @@ def fp16x16_axis_0(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_i8_fp16x16_axis_0" make_node([x], [y], name) @@ -113,9 +113,9 @@ def fp16x16_axis_1(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_i8_fp16x16_axis_1" make_node([x], [y], name) @@ -132,9 +132,9 @@ def fp8x23_axis_0(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_u32_fp8x23_axis_0" make_node([x], [y], name) @@ -145,9 +145,9 @@ def fp8x23_axis_1(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_u32_fp8x23_axis_1" make_node([x], [y], name) @@ -158,9 +158,9 @@ def fp16x16_axis_0(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 0) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_u32_fp16x16_axis_0" make_node([x], [y], name) @@ -171,9 +171,9 @@ def fp16x16_axis_1(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = logsoftmax(x, 1) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_u32_fp16x16_axis_1" make_node([x], [y], name) @@ -193,7 +193,7 @@ def axis_0(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_fp8x23_axis_0" make_node([x], [y], name) @@ -207,7 +207,7 @@ def axis_1(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_fp8x23_axis_1" make_node([x], [y], name) @@ -225,7 +225,7 @@ def axis_0(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_fp16x16_axis_0" make_node([x], [y], name) @@ -239,7 +239,7 @@ def axis_1(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_fp16x16_axis_1" make_node([x], [y], name) diff --git a/nodegen/node/matmul.py b/nodegen/node/matmul.py index ae367f696..142daece2 100644 --- a/nodegen/node/matmul.py +++ b/nodegen/node/matmul.py @@ -206,7 +206,7 @@ def matmul_1D(): b = Tensor(Dtype.FP8x23, b.shape, to_fp( b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_1d" make_node([a, b], [y], name) @@ -223,7 +223,7 @@ def matmul_2x2(): b = Tensor(Dtype.FP8x23, b.shape, to_fp( b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_2x2" make_node([a, b], [y], name) @@ -240,7 +240,7 @@ def matmul_2x1(): b = Tensor(Dtype.FP8x23, b.shape, to_fp( b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_2x1" make_node([a, b], [y], name) @@ -257,7 +257,7 @@ def matmul_1x2(): b = Tensor(Dtype.FP8x23, b.shape, to_fp( b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_1x2" make_node([a, b], [y], name) diff --git a/nodegen/node/reduce_sum.py b/nodegen/node/reduce_sum.py index 7305d4e20..93efe8f95 100644 --- a/nodegen/node/reduce_sum.py +++ b/nodegen/node/reduce_sum.py @@ -184,7 +184,7 @@ def reduce_sum_1D(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_1D" make_node([x], [y], name) @@ -250,7 +250,7 @@ def reduce_sum_1D(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_1D" make_node([x], [y], name) diff --git a/nodegen/node/sigmoid.py b/nodegen/node/sigmoid.py index fe35ee2c1..d145d0050 100644 --- a/nodegen/node/sigmoid.py +++ b/nodegen/node/sigmoid.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sigmoid_i32_fp8x23" make_node([x], [y], name) @@ -25,9 +25,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sigmoid_i32_fp16x16" make_node([x], [y], name) @@ -43,9 +43,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sigmoid_i8_fp8x23" make_node([x], [y], name) @@ -56,9 +56,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sigmoid_i8_fp16x16" make_node([x], [y], name) @@ -74,9 +74,9 @@ def fp8x23(): x = np.random.randint(0, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sigmoid_u32_fp8x23" make_node([x], [y], name) @@ -87,9 +87,9 @@ def fp16x16(): x = np.random.randint(0, 3, (2, 2)).astype(np.float32) y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sigmoid_u32_fp16x16" make_node([x], [y], name) @@ -108,7 +108,7 @@ def fp8x23(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sigmoid_fp8x23" make_node([x], [y], name) @@ -122,7 +122,7 @@ def fp16x16(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sigmoid_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sin.py b/nodegen/node/sin.py index 39abbb433..63693b7bc 100644 --- a/nodegen/node/sin.py +++ b/nodegen/node/sin.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.sin(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sin_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.sin(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sin_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) y = np.sin(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sin_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) y = np.sin(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sin_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.sin(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sin_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) y = np.sin(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sin_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sinh.py b/nodegen/node/sinh.py index c5296b871..0a410eff7 100644 --- a/nodegen/node/sinh.py +++ b/nodegen/node/sinh.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.sinh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sinh_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.sinh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sinh_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = np.sinh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sinh_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.sinh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sinh_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.sinh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sinh_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.sinh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sinh_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/softmax.py b/nodegen/node/softmax.py index 27e114600..049b2c695 100644 --- a/nodegen/node/softmax.py +++ b/nodegen/node/softmax.py @@ -18,9 +18,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softmax(x, 0) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_i32_fp8x23" make_node([x], [y], name) @@ -31,9 +31,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i32_fp16x16" make_node([x], [y], name) @@ -49,9 +49,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 1) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_i8_fp8x23" make_node([x], [y], name) @@ -62,9 +62,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 0) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i8_fp16x16" make_node([x], [y], name) @@ -80,9 +80,9 @@ def fp8x23(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_u32_fp8x23" make_node([x], [y], name) @@ -93,9 +93,9 @@ def fp16x16(): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 0) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_u32_fp16x16" make_node([x], [y], name) @@ -114,7 +114,7 @@ def fp8x23(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_fp8x23" make_node([x], [y], name) @@ -128,7 +128,7 @@ def fp16x16(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/softplus.py b/nodegen/node/softplus.py index 4d50f3ce4..d0a7a7d4f 100644 --- a/nodegen/node/softplus.py +++ b/nodegen/node/softplus.py @@ -15,9 +15,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softplus(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softplus_i32_fp8x23" make_node([x], [y], name) @@ -28,9 +28,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softplus(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softplus_i32_fp16x16" make_node([x], [y], name) @@ -46,9 +46,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softplus(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softplus_i8_fp8x23" make_node([x], [y], name) @@ -59,9 +59,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softplus(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softplus_i8_fp16x16" make_node([x], [y], name) @@ -77,9 +77,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) y = softplus(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softplus_u32_fp8x23" make_node([x], [y], name) @@ -90,9 +90,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) y = softplus(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softplus_u32_fp16x16" make_node([x], [y], name) @@ -111,7 +111,7 @@ def fp8x23(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softplus_fp8x23" make_node([x], [y], name) @@ -125,7 +125,7 @@ def fp16x16(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softplus_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/softsign.py b/nodegen/node/softsign.py index fd14d5b46..44f00b0b8 100644 --- a/nodegen/node/softsign.py +++ b/nodegen/node/softsign.py @@ -15,9 +15,9 @@ def fp8x23(): x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) y = softsign(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softsign_i32_fp8x23" make_node([x], [y], name) @@ -28,9 +28,9 @@ def fp16x16(): x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) y = softsign(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softsign_i32_fp16x16" make_node([x], [y], name) @@ -46,9 +46,9 @@ def fp8x23(): x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) y = softsign(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softsign_i8_fp8x23" make_node([x], [y], name) @@ -59,9 +59,9 @@ def fp16x16(): x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) y = softsign(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softsign_i8_fp16x16" make_node([x], [y], name) @@ -77,9 +77,9 @@ def fp8x23(): x = np.random.randint(0, 9, (2, 2)).astype(np.int32) y = softsign(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softsign_u32_fp8x23" make_node([x], [y], name) @@ -90,9 +90,9 @@ def fp16x16(): x = np.random.randint(0, 9, (2, 2)).astype(np.int32) y = softsign(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softsign_u32_fp16x16" make_node([x], [y], name) @@ -111,7 +111,7 @@ def fp8x23(): x = Tensor(Dtype.FP8x23, x.shape, to_fp( x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softsign_fp8x23" make_node([x], [y], name) @@ -125,7 +125,7 @@ def fp16x16(): x = Tensor(Dtype.FP16x16, x.shape, to_fp( x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softsign_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sqrt.py b/nodegen/node/sqrt.py index 021ea31b9..3bc74964a 100644 --- a/nodegen/node/sqrt.py +++ b/nodegen/node/sqrt.py @@ -11,9 +11,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) y = np.sqrt(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sqrt_i32_fp8x23" make_node([x], [y], name) @@ -23,9 +23,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) y = np.sqrt(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sqrt_i32_fp16x16" make_node([x], [y], name) @@ -41,9 +41,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.int8) y = np.sqrt(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sqrt_i8_fp8x23" make_node([x], [y], name) @@ -53,9 +53,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) y = np.sqrt(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sqrt_i8_fp16x16" make_node([x], [y], name) @@ -71,9 +71,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.sqrt(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sqrt_u32_fp8x23" make_node([x], [y], name) @@ -83,9 +83,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.sqrt(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sqrt_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/tanh.py b/nodegen/node/tanh.py index 1a10500bc..ab13cbfbd 100644 --- a/nodegen/node/tanh.py +++ b/nodegen/node/tanh.py @@ -12,9 +12,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.tanh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "tanh_i32_fp8x23" make_node([x], [y], name) @@ -24,9 +24,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.tanh(x) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "tanh_i32_fp16x16" make_node([x], [y], name) @@ -42,9 +42,9 @@ def fp8x23(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = np.tanh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "tanh_i8_fp8x23" make_node([x], [y], name) @@ -54,9 +54,9 @@ def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = np.tanh(x) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "tanh_i8_fp16x16" make_node([x], [y], name) @@ -72,9 +72,9 @@ def fp8x23(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.tanh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "tanh_u32_fp8x23" make_node([x], [y], name) @@ -84,9 +84,9 @@ def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) y = np.tanh(x) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "tanh_u32_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/transpose.py b/nodegen/node/transpose.py index 39f5f0518..9452980c7 100644 --- a/nodegen/node/transpose.py +++ b/nodegen/node/transpose.py @@ -99,7 +99,7 @@ def transpose_2D(): ).astype(np.int64), FixedImpl.FP8x23) y = np.transpose(x, [1, 0]) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) name = "transpose_fp8x23_2d" @@ -112,7 +112,7 @@ def transpose_3D(): ).astype(np.int64), FixedImpl.FP8x23) y = np.transpose(x, [1, 2, 0]) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) name = "transpose_fp8x23_3d" diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 6e9e23338..f906e18cd 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -110,3 +110,5 @@ mod asin_fp16x16; mod asin_fp8x23; mod asinh_fp16x16; mod asinh_fp8x23; +mod atan_fp16x16; +mod atan_fp8x23; diff --git a/src/tests/nodes/atan_fp16x16.cairo b/src/tests/nodes/atan_fp16x16.cairo new file mode 100644 index 000000000..e112ce4f5 --- /dev/null +++ b/src/tests/nodes/atan_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_atan_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.atan(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo new file mode 100644 index 000000000..6101ec85b --- /dev/null +++ b/src/tests/nodes/atan_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 6783373, sign: false }); + data.append(FP16x16 { mag: 8040908, sign: false }); + data.append(FP16x16 { mag: 4875319, sign: false }); + data.append(FP16x16 { mag: 7007700, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo new file mode 100644 index 000000000..72126e5ce --- /dev/null +++ b/src/tests/nodes/atan_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 102310, sign: false }); + data.append(FP16x16 { mag: 102409, sign: false }); + data.append(FP16x16 { mag: 102062, sign: false }); + data.append(FP16x16 { mag: 102330, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23.cairo b/src/tests/nodes/atan_fp8x23.cairo new file mode 100644 index 000000000..71c6d2168 --- /dev/null +++ b/src/tests/nodes/atan_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_atan_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.atan(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo new file mode 100644 index 000000000..b83196538 --- /dev/null +++ b/src/tests/nodes/atan_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 18618993, sign: false }); + data.append(FP8x23 { mag: 5949940, sign: false }); + data.append(FP8x23 { mag: 999751667, sign: false }); + data.append(FP8x23 { mag: 150920617, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo new file mode 100644 index 000000000..aba8b0eb5 --- /dev/null +++ b/src/tests/nodes/atan_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 9625869, sign: false }); + data.append(FP8x23 { mag: 5175204, sign: false }); + data.append(FP8x23 { mag: 13106410, sign: false }); + data.append(FP8x23 { mag: 12711010, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 65df8ec5089a020148672f1f00b4860278c8cb6e Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:42:31 +0300 Subject: [PATCH 125/179] add ceil test --- src/tests/nodes.cairo | 2 ++ src/tests/nodes/ceil_fp16x16.cairo | 20 ++++++++++++++++++++ src/tests/nodes/ceil_fp16x16/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/ceil_fp16x16/output_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/ceil_fp8x23.cairo | 20 ++++++++++++++++++++ src/tests/nodes/ceil_fp8x23/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/ceil_fp8x23/output_0.cairo | 18 ++++++++++++++++++ 7 files changed, 114 insertions(+) create mode 100644 src/tests/nodes/ceil_fp16x16.cairo create mode 100644 src/tests/nodes/ceil_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/ceil_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/ceil_fp8x23.cairo create mode 100644 src/tests/nodes/ceil_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/ceil_fp8x23/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f906e18cd..ce5c1f459 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -112,3 +112,5 @@ mod asinh_fp16x16; mod asinh_fp8x23; mod atan_fp16x16; mod atan_fp8x23; +mod ceil_fp16x16; +mod ceil_fp8x23; diff --git a/src/tests/nodes/ceil_fp16x16.cairo b/src/tests/nodes/ceil_fp16x16.cairo new file mode 100644 index 000000000..8f1c60b48 --- /dev/null +++ b/src/tests/nodes/ceil_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_ceil_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.ceil(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo new file mode 100644 index 000000000..b1665abb1 --- /dev/null +++ b/src/tests/nodes/ceil_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 57980, sign: false }); + data.append(FP16x16 { mag: 13481, sign: false }); + data.append(FP16x16 { mag: 37024, sign: false }); + data.append(FP16x16 { mag: 38899, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo new file mode 100644 index 000000000..c30a1e465 --- /dev/null +++ b/src/tests/nodes/ceil_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23.cairo b/src/tests/nodes/ceil_fp8x23.cairo new file mode 100644 index 000000000..15b9eb6d3 --- /dev/null +++ b/src/tests/nodes/ceil_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_ceil_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.ceil(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo new file mode 100644 index 000000000..c708e015d --- /dev/null +++ b/src/tests/nodes/ceil_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 395238, sign: true }); + data.append(FP8x23 { mag: 8327668, sign: false }); + data.append(FP8x23 { mag: 3848433, sign: true }); + data.append(FP8x23 { mag: 3761123, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo new file mode 100644 index 000000000..1b4e2b036 --- /dev/null +++ b/src/tests/nodes/ceil_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 61927c50c68b54f3d2f2065ae4f9961a86cda36b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 11:56:59 +0300 Subject: [PATCH 126/179] test concat --- nodegen/node/concat.py | 104 +++++++++--------- nodegen/node/cumsum.py | 48 ++++---- nodegen/node/linear.py | 12 +- nodegen/node/matmul.py | 16 +-- nodegen/node/reduce_sum.py | 24 ++-- src/tests/nodes.cairo | 35 ++++++ src/tests/nodes/concat_fp16x16_1d.cairo | 22 ++++ .../nodes/concat_fp16x16_1d/input_0.cairo | 16 +++ .../nodes/concat_fp16x16_1d/input_1.cairo | 16 +++ .../nodes/concat_fp16x16_1d/output_0.cairo | 19 ++++ src/tests/nodes/concat_fp16x16_2d.cairo | 22 ++++ .../nodes/concat_fp16x16_2d/input_0.cairo | 18 +++ .../nodes/concat_fp16x16_2d/input_1.cairo | 18 +++ .../nodes/concat_fp16x16_2d/output_0.cairo | 22 ++++ .../nodes/concat_fp16x16_3d_axis_1.cairo | 22 ++++ .../concat_fp16x16_3d_axis_1/input_0.cairo | 42 +++++++ .../concat_fp16x16_3d_axis_1/input_1.cairo | 42 +++++++ .../concat_fp16x16_3d_axis_1/output_0.cairo | 69 ++++++++++++ .../nodes/concat_fp16x16_3d_axis_2.cairo | 22 ++++ .../concat_fp16x16_3d_axis_2/input_0.cairo | 42 +++++++ .../concat_fp16x16_3d_axis_2/input_1.cairo | 42 +++++++ .../concat_fp16x16_3d_axis_2/output_0.cairo | 69 ++++++++++++ .../nodes/concat_fp16x16_3d_default.cairo | 22 ++++ .../concat_fp16x16_3d_default/input_0.cairo | 42 +++++++ .../concat_fp16x16_3d_default/input_1.cairo | 42 +++++++ .../concat_fp16x16_3d_default/output_0.cairo | 69 ++++++++++++ ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ src/tests/nodes/concat_fp8x23_1d.cairo | 22 ++++ .../nodes/concat_fp8x23_1d/input_0.cairo | 16 +++ .../nodes/concat_fp8x23_1d/input_1.cairo | 16 +++ .../nodes/concat_fp8x23_1d/output_0.cairo | 19 ++++ src/tests/nodes/concat_fp8x23_2d.cairo | 22 ++++ .../nodes/concat_fp8x23_2d/input_0.cairo | 18 +++ .../nodes/concat_fp8x23_2d/input_1.cairo | 18 +++ .../nodes/concat_fp8x23_2d/output_0.cairo | 22 ++++ src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 22 ++++ .../concat_fp8x23_3d_axis_1/input_0.cairo | 42 +++++++ .../concat_fp8x23_3d_axis_1/input_1.cairo | 42 +++++++ .../concat_fp8x23_3d_axis_1/output_0.cairo | 69 ++++++++++++ src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 22 ++++ .../concat_fp8x23_3d_axis_2/input_0.cairo | 42 +++++++ .../concat_fp8x23_3d_axis_2/input_1.cairo | 42 +++++++ .../concat_fp8x23_3d_axis_2/output_0.cairo | 69 ++++++++++++ .../nodes/concat_fp8x23_3d_default.cairo | 22 ++++ .../concat_fp8x23_3d_default/input_0.cairo | 42 +++++++ .../concat_fp8x23_3d_default/input_1.cairo | 42 +++++++ .../concat_fp8x23_3d_default/output_0.cairo | 69 ++++++++++++ ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ src/tests/nodes/concat_i32_1d.cairo | 22 ++++ src/tests/nodes/concat_i32_1d/input_0.cairo | 15 +++ src/tests/nodes/concat_i32_1d/input_1.cairo | 15 +++ src/tests/nodes/concat_i32_1d/output_0.cairo | 18 +++ src/tests/nodes/concat_i32_2d.cairo | 22 ++++ src/tests/nodes/concat_i32_2d/input_0.cairo | 17 +++ src/tests/nodes/concat_i32_2d/input_1.cairo | 17 +++ src/tests/nodes/concat_i32_2d/output_0.cairo | 21 ++++ src/tests/nodes/concat_i32_3d_axis_1.cairo | 22 ++++ .../nodes/concat_i32_3d_axis_1/input_0.cairo | 41 +++++++ .../nodes/concat_i32_3d_axis_1/input_1.cairo | 41 +++++++ .../nodes/concat_i32_3d_axis_1/output_0.cairo | 68 ++++++++++++ src/tests/nodes/concat_i32_3d_axis_2.cairo | 22 ++++ .../nodes/concat_i32_3d_axis_2/input_0.cairo | 41 +++++++ .../nodes/concat_i32_3d_axis_2/input_1.cairo | 41 +++++++ .../nodes/concat_i32_3d_axis_2/output_0.cairo | 68 ++++++++++++ src/tests/nodes/concat_i32_3d_default.cairo | 22 ++++ .../nodes/concat_i32_3d_default/input_0.cairo | 41 +++++++ .../nodes/concat_i32_3d_default/input_1.cairo | 41 +++++++ .../concat_i32_3d_default/output_0.cairo | 68 ++++++++++++ .../concat_i32_3d_three_tensors_axis_1.cairo | 24 ++++ .../input_0.cairo | 41 +++++++ .../input_1.cairo | 41 +++++++ .../input_2.cairo | 41 +++++++ .../output_0.cairo | 95 ++++++++++++++++ .../concat_i32_3d_three_tensors_axis_2.cairo | 24 ++++ .../input_0.cairo | 41 +++++++ .../input_1.cairo | 41 +++++++ .../input_2.cairo | 41 +++++++ .../output_0.cairo | 95 ++++++++++++++++ src/tests/nodes/concat_i8_1d.cairo | 22 ++++ src/tests/nodes/concat_i8_1d/input_0.cairo | 16 +++ src/tests/nodes/concat_i8_1d/input_1.cairo | 16 +++ src/tests/nodes/concat_i8_1d/output_0.cairo | 19 ++++ src/tests/nodes/concat_i8_2d.cairo | 22 ++++ src/tests/nodes/concat_i8_2d/input_0.cairo | 18 +++ src/tests/nodes/concat_i8_2d/input_1.cairo | 18 +++ src/tests/nodes/concat_i8_2d/output_0.cairo | 22 ++++ src/tests/nodes/concat_i8_3d_axis_1.cairo | 22 ++++ .../nodes/concat_i8_3d_axis_1/input_0.cairo | 42 +++++++ .../nodes/concat_i8_3d_axis_1/input_1.cairo | 42 +++++++ .../nodes/concat_i8_3d_axis_1/output_0.cairo | 69 ++++++++++++ src/tests/nodes/concat_i8_3d_axis_2.cairo | 22 ++++ .../nodes/concat_i8_3d_axis_2/input_0.cairo | 42 +++++++ .../nodes/concat_i8_3d_axis_2/input_1.cairo | 42 +++++++ .../nodes/concat_i8_3d_axis_2/output_0.cairo | 69 ++++++++++++ src/tests/nodes/concat_i8_3d_default.cairo | 22 ++++ .../nodes/concat_i8_3d_default/input_0.cairo | 42 +++++++ .../nodes/concat_i8_3d_default/input_1.cairo | 42 +++++++ .../nodes/concat_i8_3d_default/output_0.cairo | 69 ++++++++++++ .../concat_i8_3d_three_tensors_axis_1.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ .../concat_i8_3d_three_tensors_axis_2.cairo | 24 ++++ .../input_0.cairo | 42 +++++++ .../input_1.cairo | 42 +++++++ .../input_2.cairo | 42 +++++++ .../output_0.cairo | 96 ++++++++++++++++ src/tests/nodes/concat_u32_1d.cairo | 22 ++++ src/tests/nodes/concat_u32_1d/input_0.cairo | 14 +++ src/tests/nodes/concat_u32_1d/input_1.cairo | 14 +++ src/tests/nodes/concat_u32_1d/output_0.cairo | 17 +++ src/tests/nodes/concat_u32_2d.cairo | 22 ++++ src/tests/nodes/concat_u32_2d/input_0.cairo | 16 +++ src/tests/nodes/concat_u32_2d/input_1.cairo | 16 +++ src/tests/nodes/concat_u32_2d/output_0.cairo | 20 ++++ src/tests/nodes/concat_u32_3d_axis_1.cairo | 22 ++++ .../nodes/concat_u32_3d_axis_1/input_0.cairo | 40 +++++++ .../nodes/concat_u32_3d_axis_1/input_1.cairo | 40 +++++++ .../nodes/concat_u32_3d_axis_1/output_0.cairo | 67 +++++++++++ src/tests/nodes/concat_u32_3d_axis_2.cairo | 22 ++++ .../nodes/concat_u32_3d_axis_2/input_0.cairo | 40 +++++++ .../nodes/concat_u32_3d_axis_2/input_1.cairo | 40 +++++++ .../nodes/concat_u32_3d_axis_2/output_0.cairo | 67 +++++++++++ src/tests/nodes/concat_u32_3d_default.cairo | 22 ++++ .../nodes/concat_u32_3d_default/input_0.cairo | 40 +++++++ .../nodes/concat_u32_3d_default/input_1.cairo | 40 +++++++ .../concat_u32_3d_default/output_0.cairo | 67 +++++++++++ .../concat_u32_3d_three_tensors_axis_1.cairo | 24 ++++ .../input_0.cairo | 40 +++++++ .../input_1.cairo | 40 +++++++ .../input_2.cairo | 40 +++++++ .../output_0.cairo | 94 ++++++++++++++++ .../concat_u32_3d_three_tensors_axis_2.cairo | 24 ++++ .../input_0.cairo | 40 +++++++ .../input_1.cairo | 40 +++++++ .../input_2.cairo | 40 +++++++ .../output_0.cairo | 94 ++++++++++++++++ 156 files changed, 5918 insertions(+), 102 deletions(-) create mode 100644 src/tests/nodes/concat_fp16x16_1d.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_1d.cairo create mode 100644 src/tests/nodes/concat_i32_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_2d.cairo create mode 100644 src/tests/nodes/concat_i32_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_1d.cairo create mode 100644 src/tests/nodes/concat_u32_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_2d.cairo create mode 100644 src/tests/nodes/concat_u32_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo diff --git a/nodegen/node/concat.py b/nodegen/node/concat.py index beb88f0cc..794fedd8d 100644 --- a/nodegen/node/concat.py +++ b/nodegen/node/concat.py @@ -18,7 +18,7 @@ def concat_1D(): name = "concat_u32_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) @@ -34,7 +34,7 @@ def concat_2D(): name = "concat_u32_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -50,7 +50,7 @@ def default(): name = "concat_u32_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -145,7 +145,7 @@ def concat_1D(): name = "concat_i32_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -161,7 +161,7 @@ def concat_2D(): name = "concat_i32_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -177,7 +177,7 @@ def default(): name = "concat_i32_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -272,7 +272,7 @@ def concat_1D(): name = "concat_i8_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -288,7 +288,7 @@ def concat_2D(): name = "concat_i8_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -304,7 +304,7 @@ def default(): name = "concat_i8_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -393,16 +393,16 @@ def concat_1D(): y = np.concatenate((x1, x2)) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -412,16 +412,16 @@ def concat_2D(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -431,16 +431,16 @@ def default(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape,to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -449,9 +449,9 @@ def axis_1(): y = np.concatenate((x1, x2), axis=1) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -467,9 +467,9 @@ def axis_2(): y = np.concatenate((x1, x2), axis=2) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -487,11 +487,11 @@ def three_tensors_axis_1(): y = np.concatenate((x1, x2, x3), axis=1) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) x3 = Tensor(Dtype.FP8x23, x3.shape,to_fp( - x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -510,11 +510,11 @@ def three_tensors_axis_2(): y = np.concatenate((x1, x2, x3), axis=2) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) x3 = Tensor(Dtype.FP8x23, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -543,16 +543,16 @@ def concat_1D(): y = np.concatenate((x1, x2)) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -562,16 +562,16 @@ def concat_2D(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -581,16 +581,16 @@ def default(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -599,11 +599,11 @@ def axis_1(): y = np.concatenate((x1, x2), axis=1) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape,to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape ,to_fp( + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_axis_1" make_node([x1, x2], [y], name) @@ -617,9 +617,9 @@ def axis_2(): y = np.concatenate((x1, x2), axis=2) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) @@ -637,11 +637,11 @@ def three_tensors_axis_1(): y = np.concatenate((x1, x2, x3), axis=1) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) + x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( + x3.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) @@ -660,14 +660,14 @@ def three_tensors_axis_2(): y = np.concatenate((x1, x2, x3), axis=2) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x3.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape,to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_three_tensors_axis_2" make_node([x1, x2, x3], [y], name) diff --git a/nodegen/node/cumsum.py b/nodegen/node/cumsum.py index 9ca74e07b..267368bfb 100644 --- a/nodegen/node/cumsum.py +++ b/nodegen/node/cumsum.py @@ -282,9 +282,9 @@ def default(): y = np.array([1, 3, 6, 10, 15]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_default" make_node([x], [y], name) @@ -296,9 +296,9 @@ def exclusive(): y = np.array([0, 1, 3, 6, 10]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_exclusive" make_node([x], [y], name) @@ -310,9 +310,9 @@ def reverse(): y = np.array([15, 14, 12, 9, 5]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_reverse" make_node([x], [y], name) @@ -324,9 +324,9 @@ def reverse_exclusive(): y = np.array([14, 12, 9, 5, 0]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_reverse_exclusive" make_node([x], [y], name) @@ -347,9 +347,9 @@ def axis_0(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_2d_axis_0" make_node([x], [y], name) @@ -363,9 +363,9 @@ def axis_1(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_2d_axis_1" make_node([x], [y], name) @@ -384,9 +384,9 @@ def default(): y = np.array([1, 3, 6, 10, 15]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_default" make_node([x], [y], name) @@ -398,9 +398,9 @@ def exclusive(): y = np.array([0, 1, 3, 6, 10]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_exclusive" make_node([x], [y], name) @@ -412,9 +412,9 @@ def reverse(): y = np.array([15, 14, 12, 9, 5]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_reverse" make_node([x], [y], name) @@ -426,9 +426,9 @@ def reverse_exclusive(): y = np.array([14, 12, 9, 5, 0]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_reverse_exclusive" make_node([x], [y], name) @@ -449,9 +449,9 @@ def axis_0(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_2d_axis_0" make_node([x], [y], name) @@ -465,9 +465,9 @@ def axis_1(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_2d_axis_1" make_node([x], [y], name) diff --git a/nodegen/node/linear.py b/nodegen/node/linear.py index 9822d9084..b3a486398 100644 --- a/nodegen/node/linear.py +++ b/nodegen/node/linear.py @@ -74,11 +74,11 @@ def linear_fp8x23(): y = linear(i, w, b) i = Tensor(Dtype.FP8x23, i.shape, to_fp( - i.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + i.flatten(), FixedImpl.FP8x23)) w = Tensor(Dtype.FP8x23, w.shape, to_fp( - w.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + w.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -95,11 +95,11 @@ def linear_fp16x16(): y = linear(i, w, b) i = Tensor(Dtype.FP16x16, i.shape, to_fp( - i.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + i.flatten(), FixedImpl.FP16x16)) w = Tensor(Dtype.FP16x16, w.shape, to_fp( - w.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + w.flatten(), FixedImpl.FP16x16)) b = Tensor(Dtype.FP16x16, b.shape, to_fp( - b.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + b.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( y.flatten(), FixedImpl.FP16x16)) diff --git a/nodegen/node/matmul.py b/nodegen/node/matmul.py index 142daece2..6965fcc41 100644 --- a/nodegen/node/matmul.py +++ b/nodegen/node/matmul.py @@ -202,9 +202,9 @@ def matmul_1D(): y = np.matmul(a, b).reshape((1)) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -219,9 +219,9 @@ def matmul_2x2(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -236,9 +236,9 @@ def matmul_2x1(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) @@ -253,9 +253,9 @@ def matmul_1x2(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( y.flatten(), FixedImpl.FP8x23)) diff --git a/nodegen/node/reduce_sum.py b/nodegen/node/reduce_sum.py index 93efe8f95..859ce77c0 100644 --- a/nodegen/node/reduce_sum.py +++ b/nodegen/node/reduce_sum.py @@ -197,9 +197,9 @@ def default(): y = np.array([2, 4]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_default" make_node([x], [y], name) @@ -211,9 +211,9 @@ def keepdims(): y = np.array([2, 4]).astype(np.int64).reshape(1, 2) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_keepdims" make_node([x], [y], name) @@ -225,9 +225,9 @@ def axis_1(): y = np.array([1, 5]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_axis_1" make_node([x], [y], name) @@ -263,9 +263,9 @@ def default(): y = np.array([2, 4]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_default" make_node([x], [y], name) @@ -277,9 +277,9 @@ def keepdims(): y = np.array([2, 4]).astype(np.int64).reshape(1, 2) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_keepdims" make_node([x], [y], name) @@ -291,9 +291,9 @@ def axis_1(): y = np.array([1, 5]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_axis_1" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index ce5c1f459..983935213 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -114,3 +114,38 @@ mod atan_fp16x16; mod atan_fp8x23; mod ceil_fp16x16; mod ceil_fp8x23; +mod concat_fp16x16_1d; +mod concat_fp16x16_2d; +mod concat_fp16x16_3d_default; +mod concat_fp16x16_3d_axis_1; +mod concat_fp16x16_3d_axis_2; +mod concat_fp16x16_3d_three_tensors_axis_1; +mod concat_fp16x16_3d_three_tensors_axis_2; +mod concat_fp8x23_1d; +mod concat_fp8x23_2d; +mod concat_fp8x23_3d_default; +mod concat_fp8x23_3d_axis_1; +mod concat_fp8x23_3d_axis_2; +mod concat_fp8x23_3d_three_tensors_axis_1; +mod concat_fp8x23_3d_three_tensors_axis_2; +mod concat_i32_1d; +mod concat_i32_2d; +mod concat_i32_3d_default; +mod concat_i32_3d_axis_1; +mod concat_i32_3d_axis_2; +mod concat_i32_3d_three_tensors_axis_1; +mod concat_i32_3d_three_tensors_axis_2; +mod concat_i8_1d; +mod concat_i8_2d; +mod concat_i8_3d_default; +mod concat_i8_3d_axis_1; +mod concat_i8_3d_axis_2; +mod concat_i8_3d_three_tensors_axis_1; +mod concat_i8_3d_three_tensors_axis_2; +mod concat_u32_1d; +mod concat_u32_2d; +mod concat_u32_3d_default; +mod concat_u32_3d_axis_1; +mod concat_u32_3d_axis_2; +mod concat_u32_3d_three_tensors_axis_1; +mod concat_u32_3d_three_tensors_axis_2; diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo new file mode 100644 index 000000000..7f5c0604c --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo new file mode 100644 index 000000000..3bb7db502 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo new file mode 100644 index 000000000..babceb629 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo new file mode 100644 index 000000000..a7d1a2cb4 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo new file mode 100644 index 000000000..5667ab403 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo new file mode 100644 index 000000000..8009dcc45 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo new file mode 100644 index 000000000..488c15f80 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo new file mode 100644 index 000000000..2f8bd96c2 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo new file mode 100644 index 000000000..2f6976d58 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1 ].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..e0824f678 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..c233f3bb8 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..ee0f5f514 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo new file mode 100644 index 000000000..4f6e55520 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..e0824f678 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..c233f3bb8 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..ea28151bc --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo new file mode 100644 index 000000000..f7ab8a10d --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo new file mode 100644 index 000000000..e0824f678 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo new file mode 100644 index 000000000..c233f3bb8 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo new file mode 100644 index 000000000..e754615e0 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..29b38d736 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..e0824f678 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..c233f3bb8 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..cbde97f54 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..08a81cd42 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..ee8a5efac --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp16x16_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..e0824f678 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..c233f3bb8 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..cbde97f54 --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..198aca06b --- /dev/null +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo new file mode 100644 index 000000000..f4558f2dc --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo new file mode 100644 index 000000000..617c82eee --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo new file mode 100644 index 000000000..41cc35eff --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo new file mode 100644 index 000000000..93ad38d28 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo new file mode 100644 index 000000000..1161ae825 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo new file mode 100644 index 000000000..738ae80d4 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo new file mode 100644 index 000000000..1fbbf0089 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo new file mode 100644 index 000000000..c4ed893d9 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo new file mode 100644 index 000000000..608eab0ac --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..372300cc0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..686b022f0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..2d44abdfe --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo new file mode 100644 index 000000000..1e372ed29 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..372300cc0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..686b022f0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..bfa59db9b --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo new file mode 100644 index 000000000..58d71551b --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo new file mode 100644 index 000000000..372300cc0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo new file mode 100644 index 000000000..686b022f0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo new file mode 100644 index 000000000..27027c97c --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..2ff90ab30 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2 ].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..372300cc0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..686b022f0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..c37d60e56 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..e7c521235 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..5c1722456 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_fp8x23_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2 ].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..372300cc0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..686b022f0 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..c37d60e56 --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..f79ebe78e --- /dev/null +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d.cairo b/src/tests/nodes/concat_i32_1d.cairo new file mode 100644 index 000000000..153e9d6c1 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo new file mode 100644 index 000000000..e9ce9f192 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo new file mode 100644 index 000000000..3694655d5 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo new file mode 100644 index 000000000..8513ed945 --- /dev/null +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d.cairo b/src/tests/nodes/concat_i32_2d.cairo new file mode 100644 index 000000000..4946993fc --- /dev/null +++ b/src/tests/nodes/concat_i32_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo new file mode 100644 index 000000000..fb4bacc7b --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo new file mode 100644 index 000000000..e2ff14a65 --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo new file mode 100644 index 000000000..8940f4f2e --- /dev/null +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1.cairo new file mode 100644 index 000000000..cec13240f --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..aa97ad7e4 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..edf434c98 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..8e0dae429 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -0,0 +1,68 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2.cairo b/src/tests/nodes/concat_i32_3d_axis_2.cairo new file mode 100644 index 000000000..6ff92f720 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..aa97ad7e4 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..edf434c98 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..f424384cf --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -0,0 +1,68 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default.cairo b/src/tests/nodes/concat_i32_3d_default.cairo new file mode 100644 index 000000000..936890cd3 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo new file mode 100644 index 000000000..aa97ad7e4 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo new file mode 100644 index 000000000..edf434c98 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo new file mode 100644 index 000000000..4ccedc484 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -0,0 +1,68 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..f83b54529 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..aa97ad7e4 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..edf434c98 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..26b58e89a --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..bd6dca687 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,95 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..56bad9b55 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i32_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..aa97ad7e4 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..edf434c98 --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..26b58e89a --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..47a42821b --- /dev/null +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,95 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 21, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d.cairo b/src/tests/nodes/concat_i8_1d.cairo new file mode 100644 index 000000000..82587bdbd --- /dev/null +++ b/src/tests/nodes/concat_i8_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_0.cairo b/src/tests/nodes/concat_i8_1d/input_0.cairo new file mode 100644 index 000000000..345f34d8c --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_1.cairo b/src/tests/nodes/concat_i8_1d/input_1.cairo new file mode 100644 index 000000000..e52565231 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/output_0.cairo b/src/tests/nodes/concat_i8_1d/output_0.cairo new file mode 100644 index 000000000..d595c6ff9 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d.cairo b/src/tests/nodes/concat_i8_2d.cairo new file mode 100644 index 000000000..662e0c669 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_0.cairo b/src/tests/nodes/concat_i8_2d/input_0.cairo new file mode 100644 index 000000000..06f8f1737 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_1.cairo b/src/tests/nodes/concat_i8_2d/input_1.cairo new file mode 100644 index 000000000..38a8a66a8 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/output_0.cairo b/src/tests/nodes/concat_i8_2d/output_0.cairo new file mode 100644 index 000000000..77011ad63 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1.cairo new file mode 100644 index 000000000..d8587be03 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..0c57d7014 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2.cairo b/src/tests/nodes/concat_i8_3d_axis_2.cairo new file mode 100644 index 000000000..f974a8273 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..49d2702e1 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default.cairo b/src/tests/nodes/concat_i8_3d_default.cairo new file mode 100644 index 000000000..9c1159d15 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_0.cairo b/src/tests/nodes/concat_i8_3d_default/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_1.cairo b/src/tests/nodes/concat_i8_3d_default/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/output_0.cairo b/src/tests/nodes/concat_i8_3d_default/output_0.cairo new file mode 100644 index 000000000..58df2dbe5 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..6fc3f9b99 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..7ae4b9db0 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..fff9fef15 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..549959afa --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..7ae4b9db0 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..49d8bb277 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo new file mode 100644 index 000000000..700e7bd2f --- /dev/null +++ b/src/tests/nodes/concat_u32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo new file mode 100644 index 000000000..26ecd350b --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo new file mode 100644 index 000000000..ee5e4ed99 --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo new file mode 100644 index 000000000..3b6302d9f --- /dev/null +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo new file mode 100644 index 000000000..7ae4a8eed --- /dev/null +++ b/src/tests/nodes/concat_u32_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo new file mode 100644 index 000000000..6c324ceb6 --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo new file mode 100644 index 000000000..df41e2c70 --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo new file mode 100644 index 000000000..d2b9b09cb --- /dev/null +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo new file mode 100644 index 000000000..32698c264 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..353984f4f --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..ce950d8a0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..143fd9c91 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -0,0 +1,67 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo new file mode 100644 index 000000000..6788eaa38 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..353984f4f --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..ce950d8a0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..b9bb512d9 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -0,0 +1,67 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(27); + data.append(28); + data.append(29); + data.append(3); + data.append(4); + data.append(5); + data.append(30); + data.append(31); + data.append(32); + data.append(6); + data.append(7); + data.append(8); + data.append(33); + data.append(34); + data.append(35); + data.append(9); + data.append(10); + data.append(11); + data.append(36); + data.append(37); + data.append(38); + data.append(12); + data.append(13); + data.append(14); + data.append(39); + data.append(40); + data.append(41); + data.append(15); + data.append(16); + data.append(17); + data.append(42); + data.append(43); + data.append(44); + data.append(18); + data.append(19); + data.append(20); + data.append(45); + data.append(46); + data.append(47); + data.append(21); + data.append(22); + data.append(23); + data.append(48); + data.append(49); + data.append(50); + data.append(24); + data.append(25); + data.append(26); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo new file mode 100644 index 000000000..5ffbd651b --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo new file mode 100644 index 000000000..353984f4f --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo new file mode 100644 index 000000000..ce950d8a0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo new file mode 100644 index 000000000..d4ad140b0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -0,0 +1,67 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..b15cde11b --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..353984f4f --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..ce950d8a0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..686accc0a --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..944680ca8 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,94 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..233842e37 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_u32_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..353984f4f --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + data.append(7); + data.append(8); + data.append(9); + data.append(10); + data.append(11); + data.append(12); + data.append(13); + data.append(14); + data.append(15); + data.append(16); + data.append(17); + data.append(18); + data.append(19); + data.append(20); + data.append(21); + data.append(22); + data.append(23); + data.append(24); + data.append(25); + data.append(26); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..ce950d8a0 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(27); + data.append(28); + data.append(29); + data.append(30); + data.append(31); + data.append(32); + data.append(33); + data.append(34); + data.append(35); + data.append(36); + data.append(37); + data.append(38); + data.append(39); + data.append(40); + data.append(41); + data.append(42); + data.append(43); + data.append(44); + data.append(45); + data.append(46); + data.append(47); + data.append(48); + data.append(49); + data.append(50); + data.append(51); + data.append(52); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..686accc0a --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(54); + data.append(55); + data.append(56); + data.append(57); + data.append(58); + data.append(59); + data.append(60); + data.append(61); + data.append(62); + data.append(63); + data.append(64); + data.append(65); + data.append(66); + data.append(67); + data.append(68); + data.append(69); + data.append(70); + data.append(71); + data.append(72); + data.append(73); + data.append(74); + data.append(75); + data.append(76); + data.append(77); + data.append(78); + data.append(79); + data.append(80); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..c2b13d310 --- /dev/null +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,94 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(27); + data.append(28); + data.append(29); + data.append(54); + data.append(55); + data.append(56); + data.append(3); + data.append(4); + data.append(5); + data.append(30); + data.append(31); + data.append(32); + data.append(57); + data.append(58); + data.append(59); + data.append(6); + data.append(7); + data.append(8); + data.append(33); + data.append(34); + data.append(35); + data.append(60); + data.append(61); + data.append(62); + data.append(9); + data.append(10); + data.append(11); + data.append(36); + data.append(37); + data.append(38); + data.append(63); + data.append(64); + data.append(65); + data.append(12); + data.append(13); + data.append(14); + data.append(39); + data.append(40); + data.append(41); + data.append(66); + data.append(67); + data.append(68); + data.append(15); + data.append(16); + data.append(17); + data.append(42); + data.append(43); + data.append(44); + data.append(69); + data.append(70); + data.append(71); + data.append(18); + data.append(19); + data.append(20); + data.append(45); + data.append(46); + data.append(47); + data.append(72); + data.append(73); + data.append(74); + data.append(21); + data.append(22); + data.append(23); + data.append(48); + data.append(49); + data.append(50); + data.append(75); + data.append(76); + data.append(77); + data.append(24); + data.append(25); + data.append(26); + data.append(51); + data.append(52); + data.append(53); + data.append(78); + data.append(79); + data.append(80); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 9efcd3fc0b3fed4c3f2c909db7551a71de3f12ee Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:00:15 +0300 Subject: [PATCH 127/179] test cos --- nodegen/node/cos.py | 90 ---------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/cos_fp16x16.cairo | 20 +++++ src/tests/nodes/cos_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/cos_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/cos_fp8x23.cairo | 20 +++++ src/tests/nodes/cos_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/cos_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/cos_fp16x16.cairo create mode 100644 src/tests/nodes/cos_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/cos_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/cos_fp8x23.cairo create mode 100644 src/tests/nodes/cos_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/cos_fp8x23/output_0.cairo diff --git a/nodegen/node/cos.py b/nodegen/node/cos.py index a3074943f..e01df60fe 100644 --- a/nodegen/node/cos.py +++ b/nodegen/node/cos.py @@ -5,96 +5,6 @@ class Cos(RunAll): - @staticmethod - def cos_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cos_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cos_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cos_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.cos(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cos_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cos_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cos_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.cos(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cos_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.cos(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cos_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - @staticmethod def cos_fp8x23(): x = np.random.uniform(-10, 127, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 983935213..13df22337 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -149,3 +149,5 @@ mod concat_u32_3d_axis_1; mod concat_u32_3d_axis_2; mod concat_u32_3d_three_tensors_axis_1; mod concat_u32_3d_three_tensors_axis_2; +mod cos_fp16x16; +mod cos_fp8x23; diff --git a/src/tests/nodes/cos_fp16x16.cairo b/src/tests/nodes/cos_fp16x16.cairo new file mode 100644 index 000000000..dbfb6b27f --- /dev/null +++ b/src/tests/nodes/cos_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cos_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cos(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo new file mode 100644 index 000000000..5ae705b41 --- /dev/null +++ b/src/tests/nodes/cos_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1737975, sign: false }); + data.append(FP16x16 { mag: 6312706, sign: false }); + data.append(FP16x16 { mag: 5651744, sign: false }); + data.append(FP16x16 { mag: 6320564, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo new file mode 100644 index 000000000..7d3e451d1 --- /dev/null +++ b/src/tests/nodes/cos_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 11999, sign: false }); + data.append(FP16x16 { mag: 31746, sign: true }); + data.append(FP16x16 { mag: 10118, sign: true }); + data.append(FP16x16 { mag: 38375, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23.cairo b/src/tests/nodes/cos_fp8x23.cairo new file mode 100644 index 000000000..93bd1b161 --- /dev/null +++ b/src/tests/nodes/cos_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cos_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cos(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo new file mode 100644 index 000000000..d13e263ef --- /dev/null +++ b/src/tests/nodes/cos_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 658990, sign: true }); + data.append(FP8x23 { mag: 330978878, sign: false }); + data.append(FP8x23 { mag: 820031043, sign: false }); + data.append(FP8x23 { mag: 154991942, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo new file mode 100644 index 000000000..810a3468c --- /dev/null +++ b/src/tests/nodes/cos_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8362736, sign: false }); + data.append(FP8x23 { mag: 1550053, sign: true }); + data.append(FP8x23 { mag: 7833162, sign: true }); + data.append(FP8x23 { mag: 7811558, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From e661914e9db85b0d3172237c2c548be1e4456f88 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:01:08 +0300 Subject: [PATCH 128/179] test cosh --- nodegen/node/cosh.py | 90 --------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/cosh_fp16x16.cairo | 20 +++++ src/tests/nodes/cosh_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/cosh_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/cosh_fp8x23.cairo | 20 +++++ src/tests/nodes/cosh_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/cosh_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/cosh_fp16x16.cairo create mode 100644 src/tests/nodes/cosh_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/cosh_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/cosh_fp8x23.cairo create mode 100644 src/tests/nodes/cosh_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/cosh_fp8x23/output_0.cairo diff --git a/nodegen/node/cosh.py b/nodegen/node/cosh.py index f739b6ab0..df3203837 100644 --- a/nodegen/node/cosh.py +++ b/nodegen/node/cosh.py @@ -5,96 +5,6 @@ class Cosh(RunAll): - @staticmethod - def cosh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cosh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cosh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cosh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.cosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cosh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cosh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cosh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.cosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "cosh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.cosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "cosh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - @staticmethod def cosh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 13df22337..d53b7c24f 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -151,3 +151,5 @@ mod concat_u32_3d_three_tensors_axis_1; mod concat_u32_3d_three_tensors_axis_2; mod cos_fp16x16; mod cos_fp8x23; +mod cosh_fp16x16; +mod cosh_fp8x23; diff --git a/src/tests/nodes/cosh_fp16x16.cairo b/src/tests/nodes/cosh_fp16x16.cairo new file mode 100644 index 000000000..772a93f25 --- /dev/null +++ b/src/tests/nodes/cosh_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cosh_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cosh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo new file mode 100644 index 000000000..1b196b149 --- /dev/null +++ b/src/tests/nodes/cosh_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 180002, sign: false }); + data.append(FP16x16 { mag: 115071, sign: true }); + data.append(FP16x16 { mag: 111643, sign: true }); + data.append(FP16x16 { mag: 184638, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo new file mode 100644 index 000000000..8b4f0f741 --- /dev/null +++ b/src/tests/nodes/cosh_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 512946, sign: false }); + data.append(FP16x16 { mag: 195335, sign: false }); + data.append(FP16x16 { mag: 185972, sign: false }); + data.append(FP16x16 { mag: 550252, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23.cairo b/src/tests/nodes/cosh_fp8x23.cairo new file mode 100644 index 000000000..f12f6c751 --- /dev/null +++ b/src/tests/nodes/cosh_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cosh_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cosh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo new file mode 100644 index 000000000..66dea31f1 --- /dev/null +++ b/src/tests/nodes/cosh_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 23096690, sign: true }); + data.append(FP8x23 { mag: 10692965, sign: false }); + data.append(FP8x23 { mag: 17437172, sign: true }); + data.append(FP8x23 { mag: 24645388, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo new file mode 100644 index 000000000..6069e6a4a --- /dev/null +++ b/src/tests/nodes/cosh_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 66096700, sign: false }); + data.append(FP8x23 { mag: 16178040, sign: false }); + data.append(FP8x23 { mag: 34053341, sign: false }); + data.append(FP8x23 { mag: 79399253, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 3fb2e8f4e0dedbb6c2a36103c72091b38e2e3b44 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:02:30 +0300 Subject: [PATCH 129/179] test cumsum --- src/tests/nodes.cairo | 30 +++++++++++++++++++ .../nodes/cumsum_fp16x16_1d_default.cairo | 20 +++++++++++++ .../cumsum_fp16x16_1d_default/input_0.cairo | 18 +++++++++++ .../cumsum_fp16x16_1d_default/output_0.cairo | 18 +++++++++++ .../nodes/cumsum_fp16x16_1d_exclusive.cairo | 20 +++++++++++++ .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 18 +++++++++++ .../output_0.cairo | 18 +++++++++++ .../nodes/cumsum_fp16x16_1d_reverse.cairo | 20 +++++++++++++ .../cumsum_fp16x16_1d_reverse/input_0.cairo | 18 +++++++++++ .../cumsum_fp16x16_1d_reverse/output_0.cairo | 18 +++++++++++ .../cumsum_fp16x16_1d_reverse_exclusive.cairo | 20 +++++++++++++ .../input_0.cairo | 18 +++++++++++ .../output_0.cairo | 18 +++++++++++ .../nodes/cumsum_fp16x16_2d_axis_0.cairo | 20 +++++++++++++ .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 20 +++++++++++++ .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 20 +++++++++++++ .../nodes/cumsum_fp16x16_2d_axis_1.cairo | 20 +++++++++++++ .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 20 +++++++++++++ .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 20 +++++++++++++ .../nodes/cumsum_fp8x23_1d_default.cairo | 20 +++++++++++++ .../cumsum_fp8x23_1d_default/input_0.cairo | 18 +++++++++++ .../cumsum_fp8x23_1d_default/output_0.cairo | 18 +++++++++++ .../nodes/cumsum_fp8x23_1d_exclusive.cairo | 20 +++++++++++++ .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 18 +++++++++++ .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 18 +++++++++++ .../nodes/cumsum_fp8x23_1d_reverse.cairo | 20 +++++++++++++ .../cumsum_fp8x23_1d_reverse/input_0.cairo | 18 +++++++++++ .../cumsum_fp8x23_1d_reverse/output_0.cairo | 18 +++++++++++ .../cumsum_fp8x23_1d_reverse_exclusive.cairo | 20 +++++++++++++ .../input_0.cairo | 18 +++++++++++ .../output_0.cairo | 18 +++++++++++ src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo | 20 +++++++++++++ .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 20 +++++++++++++ .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 20 +++++++++++++ src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo | 20 +++++++++++++ .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 20 +++++++++++++ .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 20 +++++++++++++ src/tests/nodes/cumsum_i32_1d_default.cairo | 20 +++++++++++++ .../nodes/cumsum_i32_1d_default/input_0.cairo | 17 +++++++++++ .../cumsum_i32_1d_default/output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i32_1d_exclusive.cairo | 20 +++++++++++++ .../cumsum_i32_1d_exclusive/input_0.cairo | 17 +++++++++++ .../cumsum_i32_1d_exclusive/output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i32_1d_reverse.cairo | 20 +++++++++++++ .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 17 +++++++++++ .../cumsum_i32_1d_reverse/output_0.cairo | 17 +++++++++++ .../cumsum_i32_1d_reverse_exclusive.cairo | 20 +++++++++++++ .../input_0.cairo | 17 +++++++++++ .../output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i32_2d_axis_0.cairo | 20 +++++++++++++ .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 19 ++++++++++++ .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 19 ++++++++++++ src/tests/nodes/cumsum_i32_2d_axis_1.cairo | 20 +++++++++++++ .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 19 ++++++++++++ .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 19 ++++++++++++ src/tests/nodes/cumsum_i8_1d_default.cairo | 20 +++++++++++++ .../nodes/cumsum_i8_1d_default/input_0.cairo | 17 +++++++++++ .../nodes/cumsum_i8_1d_default/output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i8_1d_exclusive.cairo | 20 +++++++++++++ .../cumsum_i8_1d_exclusive/input_0.cairo | 17 +++++++++++ .../cumsum_i8_1d_exclusive/output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i8_1d_reverse.cairo | 20 +++++++++++++ .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 17 +++++++++++ .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 17 +++++++++++ .../cumsum_i8_1d_reverse_exclusive.cairo | 20 +++++++++++++ .../input_0.cairo | 17 +++++++++++ .../output_0.cairo | 17 +++++++++++ src/tests/nodes/cumsum_i8_2d_axis_0.cairo | 20 +++++++++++++ .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 19 ++++++++++++ .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 19 ++++++++++++ src/tests/nodes/cumsum_i8_2d_axis_1.cairo | 20 +++++++++++++ .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 19 ++++++++++++ .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 19 ++++++++++++ src/tests/nodes/cumsum_u32_1d_default.cairo | 20 +++++++++++++ .../nodes/cumsum_u32_1d_default/input_0.cairo | 16 ++++++++++ .../cumsum_u32_1d_default/output_0.cairo | 16 ++++++++++ src/tests/nodes/cumsum_u32_1d_exclusive.cairo | 20 +++++++++++++ .../cumsum_u32_1d_exclusive/input_0.cairo | 16 ++++++++++ .../cumsum_u32_1d_exclusive/output_0.cairo | 16 ++++++++++ src/tests/nodes/cumsum_u32_1d_reverse.cairo | 20 +++++++++++++ .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 16 ++++++++++ .../cumsum_u32_1d_reverse/output_0.cairo | 16 ++++++++++ .../cumsum_u32_1d_reverse_exclusive.cairo | 20 +++++++++++++ .../input_0.cairo | 16 ++++++++++ .../output_0.cairo | 16 ++++++++++ src/tests/nodes/cumsum_u32_2d_axis_0.cairo | 20 +++++++++++++ .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 18 +++++++++++ .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 18 +++++++++++ src/tests/nodes/cumsum_u32_2d_axis_1.cairo | 20 +++++++++++++ .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 18 +++++++++++ .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 18 +++++++++++ 91 files changed, 1702 insertions(+) create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_default.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_default/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_default/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_default.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_default/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_default/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_default.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_default/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_default/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index d53b7c24f..be25edfa6 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -153,3 +153,33 @@ mod cos_fp16x16; mod cos_fp8x23; mod cosh_fp16x16; mod cosh_fp8x23; +mod cumsum_fp16x16_1d_default; +mod cumsum_fp16x16_1d_exclusive; +mod cumsum_fp16x16_1d_reverse; +mod cumsum_fp16x16_1d_reverse_exclusive; +mod cumsum_fp16x16_2d_axis_0; +mod cumsum_fp16x16_2d_axis_1; +mod cumsum_fp8x23_1d_default; +mod cumsum_fp8x23_1d_exclusive; +mod cumsum_fp8x23_1d_reverse; +mod cumsum_fp8x23_1d_reverse_exclusive; +mod cumsum_fp8x23_2d_axis_0; +mod cumsum_fp8x23_2d_axis_1; +mod cumsum_i32_1d_default; +mod cumsum_i32_1d_exclusive; +mod cumsum_i32_1d_reverse; +mod cumsum_i32_1d_reverse_exclusive; +mod cumsum_i32_2d_axis_0; +mod cumsum_i32_2d_axis_1; +mod cumsum_i8_1d_default; +mod cumsum_i8_1d_exclusive; +mod cumsum_i8_1d_reverse; +mod cumsum_i8_1d_reverse_exclusive; +mod cumsum_i8_2d_axis_0; +mod cumsum_i8_2d_axis_1; +mod cumsum_u32_1d_default; +mod cumsum_u32_1d_exclusive; +mod cumsum_u32_1d_reverse; +mod cumsum_u32_1d_reverse_exclusive; +mod cumsum_u32_2d_axis_0; +mod cumsum_u32_2d_axis_1; diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo new file mode 100644 index 000000000..8bee503e5 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_1d_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo new file mode 100644 index 000000000..175583ac6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo new file mode 100644 index 000000000..9e94ff3a3 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo new file mode 100644 index 000000000..f1b19e9d6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_1d_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo new file mode 100644 index 000000000..175583ac6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo new file mode 100644 index 000000000..a6a0cc910 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo new file mode 100644 index 000000000..ec84dbad4 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_1d_reverse() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo new file mode 100644 index 000000000..175583ac6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo new file mode 100644 index 000000000..0dd64716f --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo new file mode 100644 index 000000000..a488da6fd --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_1d_reverse_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo new file mode 100644 index 000000000..175583ac6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo new file mode 100644 index 000000000..f654a1f59 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo new file mode 100644 index 000000000..5492b5631 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_2d_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo new file mode 100644 index 000000000..062fb7dd6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo new file mode 100644 index 000000000..3f72a9934 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo new file mode 100644 index 000000000..1637170e9 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp16x16_2d_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(1, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo new file mode 100644 index 000000000..062fb7dd6 --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo new file mode 100644 index 000000000..a4aaa86cc --- /dev/null +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 983040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo new file mode 100644 index 000000000..64dc9537b --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_1d_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo new file mode 100644 index 000000000..7c097058a --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo new file mode 100644 index 000000000..0567359ee --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo new file mode 100644 index 000000000..ae75e2f77 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_1d_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo new file mode 100644 index 000000000..7c097058a --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo new file mode 100644 index 000000000..0272f6c36 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo new file mode 100644 index 000000000..80a866b5b --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_1d_reverse() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo new file mode 100644 index 000000000..7c097058a --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo new file mode 100644 index 000000000..fe3108e56 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo new file mode 100644 index 000000000..8ad9e5de1 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_1d_reverse_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo new file mode 100644 index 000000000..7c097058a --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo new file mode 100644 index 000000000..41aa2f72f --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo new file mode 100644 index 000000000..11dae065c --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_2d_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo new file mode 100644 index 000000000..1f68e2bc8 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo new file mode 100644 index 000000000..15d59ba23 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo new file mode 100644 index 000000000..61bc3d1c4 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_fp8x23_2d_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(1, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo new file mode 100644 index 000000000..1f68e2bc8 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo new file mode 100644 index 000000000..04c5f8028 --- /dev/null +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default.cairo b/src/tests/nodes/cumsum_i32_1d_default.cairo new file mode 100644 index 000000000..a6cea41e5 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_1d_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo new file mode 100644 index 000000000..0ac4a9f61 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo new file mode 100644 index 000000000..60da35a37 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 15, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo new file mode 100644 index 000000000..58b497bb4 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_1d_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo new file mode 100644 index 000000000..0ac4a9f61 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo new file mode 100644 index 000000000..1299ea06c --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 10, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse.cairo b/src/tests/nodes/cumsum_i32_1d_reverse.cairo new file mode 100644 index 000000000..88a21cb5f --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_1d_reverse() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo new file mode 100644 index 000000000..0ac4a9f61 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo new file mode 100644 index 000000000..2fcc00a39 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo new file mode 100644 index 000000000..d3c9d8cf1 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_1d_reverse_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo new file mode 100644 index 000000000..0ac4a9f61 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo new file mode 100644 index 000000000..60333d5cb --- /dev/null +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo new file mode 100644 index 000000000..9564c8627 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_2d_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo new file mode 100644 index 000000000..ae45ce844 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo new file mode 100644 index 000000000..a6ac4eec4 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 9, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo new file mode 100644 index 000000000..6336d5204 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i32_2d_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(1, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo new file mode 100644 index 000000000..ae45ce844 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 6, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo new file mode 100644 index 000000000..fe9c23754 --- /dev/null +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 15, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default.cairo b/src/tests/nodes/cumsum_i8_1d_default.cairo new file mode 100644 index 000000000..9b4d9a835 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_1d_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo new file mode 100644 index 000000000..96c706cdb --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo new file mode 100644 index 000000000..5edbc3a6e --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 15, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo new file mode 100644 index 000000000..52c366960 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_1d_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo new file mode 100644 index 000000000..96c706cdb --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo new file mode 100644 index 000000000..80272b3c0 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 10, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse.cairo b/src/tests/nodes/cumsum_i8_1d_reverse.cairo new file mode 100644 index 000000000..83595125d --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_1d_reverse() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo new file mode 100644 index 000000000..96c706cdb --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo new file mode 100644 index 000000000..480def7de --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo new file mode 100644 index 000000000..2a344e9b8 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_1d_reverse_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo new file mode 100644 index 000000000..96c706cdb --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo new file mode 100644 index 000000000..c3980cbf3 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo new file mode 100644 index 000000000..9f06d8788 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_2d_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo new file mode 100644 index 000000000..e1bb10267 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo new file mode 100644 index 000000000..a18fc8584 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 9, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo new file mode 100644 index 000000000..7d2669176 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_i8_2d_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(1, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo new file mode 100644 index 000000000..e1bb10267 --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 6, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo new file mode 100644 index 000000000..99eab414d --- /dev/null +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 15, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default.cairo b/src/tests/nodes/cumsum_u32_1d_default.cairo new file mode 100644 index 000000000..5e9d98156 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_1d_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo new file mode 100644 index 000000000..622c5d695 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo new file mode 100644 index 000000000..c2d0bdbf6 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(3); + data.append(6); + data.append(10); + data.append(15); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo new file mode 100644 index 000000000..2223740e6 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_1d_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo new file mode 100644 index 000000000..622c5d695 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo new file mode 100644 index 000000000..f5fec21fc --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(3); + data.append(6); + data.append(10); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse.cairo b/src/tests/nodes/cumsum_u32_1d_reverse.cairo new file mode 100644 index 000000000..cab7a64f6 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_1d_reverse() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo new file mode 100644 index 000000000..622c5d695 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo new file mode 100644 index 000000000..5650f5bdc --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(15); + data.append(14); + data.append(12); + data.append(9); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo new file mode 100644 index 000000000..0ac724f0b --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_1d_reverse_exclusive() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo new file mode 100644 index 000000000..622c5d695 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo new file mode 100644 index 000000000..e6f2a8444 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(5); + + let mut data = ArrayTrait::new(); + data.append(14); + data.append(12); + data.append(9); + data.append(5); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo new file mode 100644 index 000000000..c21143147 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_2d_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(0, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo new file mode 100644 index 000000000..6e6b0b0c3 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo new file mode 100644 index 000000000..21198b1fe --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(5); + data.append(7); + data.append(9); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo new file mode 100644 index 000000000..145a334e4 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_cumsum_u32_2d_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.cumsum(1, Option::None(()), Option::None(())); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo new file mode 100644 index 000000000..6e6b0b0c3 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(4); + data.append(5); + data.append(6); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo new file mode 100644 index 000000000..322f993c8 --- /dev/null +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(3); + data.append(6); + data.append(4); + data.append(9); + data.append(15); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 2a1a3a128d5620b5be02b7ebadbf4768508f3a90 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:07:34 +0300 Subject: [PATCH 130/179] test div --- nodegen/node/abs.py | 8 +- nodegen/node/acos.py | 4 +- nodegen/node/acosh.py | 4 +- nodegen/node/argmax.py | 90 +++++++++---------- nodegen/node/argmin.py | 90 +++++++++---------- nodegen/node/asin.py | 4 +- nodegen/node/asinh.py | 4 +- nodegen/node/atan.py | 4 +- nodegen/node/ceil.py | 4 +- nodegen/node/cos.py | 4 +- nodegen/node/cosh.py | 4 +- nodegen/node/cumsum.py | 60 ++++++------- nodegen/node/exp.py | 16 ++-- nodegen/node/log.py | 16 ++-- nodegen/node/reduce_sum.py | 40 ++++----- nodegen/node/sin.py | 16 ++-- nodegen/node/sinh.py | 16 ++-- nodegen/node/sqrt.py | 16 ++-- nodegen/node/tanh.py | 16 ++-- src/tests/nodes.cairo | 10 +++ src/tests/nodes/div_fp16x16.cairo | 22 +++++ src/tests/nodes/div_fp16x16/input_0.cairo | 42 +++++++++ src/tests/nodes/div_fp16x16/input_1.cairo | 42 +++++++++ src/tests/nodes/div_fp16x16/output_0.cairo | 42 +++++++++ src/tests/nodes/div_fp16x16_broadcast.cairo | 22 +++++ .../nodes/div_fp16x16_broadcast/input_0.cairo | 42 +++++++++ .../nodes/div_fp16x16_broadcast/input_1.cairo | 18 ++++ .../div_fp16x16_broadcast/output_0.cairo | 42 +++++++++ src/tests/nodes/div_fp8x23.cairo | 22 +++++ src/tests/nodes/div_fp8x23/input_0.cairo | 42 +++++++++ src/tests/nodes/div_fp8x23/input_1.cairo | 42 +++++++++ src/tests/nodes/div_fp8x23/output_0.cairo | 42 +++++++++ src/tests/nodes/div_fp8x23_broadcast.cairo | 22 +++++ .../nodes/div_fp8x23_broadcast/input_0.cairo | 42 +++++++++ .../nodes/div_fp8x23_broadcast/input_1.cairo | 18 ++++ .../nodes/div_fp8x23_broadcast/output_0.cairo | 42 +++++++++ src/tests/nodes/div_i32.cairo | 22 +++++ src/tests/nodes/div_i32/input_0.cairo | 41 +++++++++ src/tests/nodes/div_i32/input_1.cairo | 41 +++++++++ src/tests/nodes/div_i32/output_0.cairo | 41 +++++++++ src/tests/nodes/div_i32_broadcast.cairo | 22 +++++ .../nodes/div_i32_broadcast/input_0.cairo | 41 +++++++++ .../nodes/div_i32_broadcast/input_1.cairo | 17 ++++ .../nodes/div_i32_broadcast/output_0.cairo | 41 +++++++++ src/tests/nodes/div_i8.cairo | 22 +++++ src/tests/nodes/div_i8/input_0.cairo | 41 +++++++++ src/tests/nodes/div_i8/input_1.cairo | 41 +++++++++ src/tests/nodes/div_i8/output_0.cairo | 41 +++++++++ src/tests/nodes/div_i8_broadcast.cairo | 22 +++++ .../nodes/div_i8_broadcast/input_0.cairo | 41 +++++++++ .../nodes/div_i8_broadcast/input_1.cairo | 17 ++++ .../nodes/div_i8_broadcast/output_0.cairo | 41 +++++++++ src/tests/nodes/div_u32.cairo | 22 +++++ src/tests/nodes/div_u32/input_0.cairo | 40 +++++++++ src/tests/nodes/div_u32/input_1.cairo | 40 +++++++++ src/tests/nodes/div_u32/output_0.cairo | 40 +++++++++ src/tests/nodes/div_u32_broadcast.cairo | 22 +++++ .../nodes/div_u32_broadcast/input_0.cairo | 40 +++++++++ .../nodes/div_u32_broadcast/input_1.cairo | 16 ++++ .../nodes/div_u32_broadcast/output_0.cairo | 40 +++++++++ 60 files changed, 1554 insertions(+), 208 deletions(-) create mode 100644 src/tests/nodes/div_fp16x16.cairo create mode 100644 src/tests/nodes/div_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/div_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/div_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/div_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/div_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/div_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/div_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/div_fp8x23.cairo create mode 100644 src/tests/nodes/div_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/div_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/div_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/div_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/div_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/div_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/div_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/div_i32.cairo create mode 100644 src/tests/nodes/div_i32/input_0.cairo create mode 100644 src/tests/nodes/div_i32/input_1.cairo create mode 100644 src/tests/nodes/div_i32/output_0.cairo create mode 100644 src/tests/nodes/div_i32_broadcast.cairo create mode 100644 src/tests/nodes/div_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/div_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/div_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/div_i8.cairo create mode 100644 src/tests/nodes/div_i8/input_0.cairo create mode 100644 src/tests/nodes/div_i8/input_1.cairo create mode 100644 src/tests/nodes/div_i8/output_0.cairo create mode 100644 src/tests/nodes/div_i8_broadcast.cairo create mode 100644 src/tests/nodes/div_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/div_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/div_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/div_u32.cairo create mode 100644 src/tests/nodes/div_u32/input_0.cairo create mode 100644 src/tests/nodes/div_u32/input_1.cairo create mode 100644 src/tests/nodes/div_u32/output_0.cairo create mode 100644 src/tests/nodes/div_u32_broadcast.cairo create mode 100644 src/tests/nodes/div_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/div_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/div_u32_broadcast/output_0.cairo diff --git a/nodegen/node/abs.py b/nodegen/node/abs.py index a07ee30b4..13467e4ea 100644 --- a/nodegen/node/abs.py +++ b/nodegen/node/abs.py @@ -14,7 +14,7 @@ def abs_i32(): name = "abs_i32" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_i8(): @@ -26,7 +26,7 @@ def abs_i8(): name = "abs_i8" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_fp8x23(): @@ -39,7 +39,7 @@ def abs_fp8x23(): name = "abs_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_fp16x16(): @@ -52,4 +52,4 @@ def abs_fp16x16(): name = "abs_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) diff --git a/nodegen/node/acos.py b/nodegen/node/acos.py index 61ed4e781..6b7015e6e 100644 --- a/nodegen/node/acos.py +++ b/nodegen/node/acos.py @@ -14,7 +14,7 @@ def acos_fp8x23(): name = "acos_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.acos()", name) + make_test([x], y, "input_0.acos()", name) @staticmethod def acos_fp16x16(): @@ -26,7 +26,7 @@ def acos_fp16x16(): name = "acos_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.acos()", name) + make_test([x], y, "input_0.acos()", name) diff --git a/nodegen/node/acosh.py b/nodegen/node/acosh.py index ebf898688..62f870206 100644 --- a/nodegen/node/acosh.py +++ b/nodegen/node/acosh.py @@ -16,7 +16,7 @@ def acosh_fp8x23(): name = "acosh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) + make_test([x], y, "input_0.acosh()", name) @staticmethod def acosh_fp16x16(): @@ -30,4 +30,4 @@ def acosh_fp16x16(): name = "acosh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) + make_test([x], y, "input_0.acosh()", name) diff --git a/nodegen/node/argmax.py b/nodegen/node/argmax.py index 74c410966..bf5dfa432 100644 --- a/nodegen/node/argmax.py +++ b/nodegen/node/argmax.py @@ -36,7 +36,7 @@ def default_params(): name = "argmax_u32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -49,7 +49,7 @@ def keepdims_false(): name = "argmax_u32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -62,7 +62,7 @@ def last_index(): name = "argmax_u32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -80,7 +80,7 @@ def default_params(): name = "argmax_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -93,7 +93,7 @@ def keepdims_false(): name = "argmax_u32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -106,7 +106,7 @@ def last_index(): name = "argmax_u32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -124,7 +124,7 @@ def default_params(): name = "argmax_u32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -137,7 +137,7 @@ def keepdims_false(): name = "argmax_u32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -150,7 +150,7 @@ def last_index(): name = "argmax_u32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -170,7 +170,7 @@ def default_params(): name = "argmax_i32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int32) @@ -183,7 +183,7 @@ def keepdims_false(): name = "argmax_i32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int32) @@ -196,7 +196,7 @@ def last_index(): name = "argmax_i32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -214,7 +214,7 @@ def default_params(): name = "argmax_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -227,7 +227,7 @@ def keepdims_false(): name = "argmax_i32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -240,7 +240,7 @@ def last_index(): name = "argmax_i32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -258,7 +258,7 @@ def default_params(): name = "argmax_i32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -271,7 +271,7 @@ def keepdims_false(): name = "argmax_i32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -284,7 +284,7 @@ def last_index(): name = "argmax_i32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -304,7 +304,7 @@ def default_params(): name = "argmax_i8_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int8) @@ -317,7 +317,7 @@ def keepdims_false(): name = "argmax_i8_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int8) @@ -330,7 +330,7 @@ def last_index(): name = "argmax_i8_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -348,7 +348,7 @@ def default_params(): name = "argmax_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -361,7 +361,7 @@ def keepdims_false(): name = "argmax_i8_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -374,7 +374,7 @@ def last_index(): name = "argmax_i8_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -392,7 +392,7 @@ def default_params(): name = "argmax_i8_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -405,7 +405,7 @@ def keepdims_false(): name = "argmax_i8_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -418,7 +418,7 @@ def last_index(): name = "argmax_i8_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -439,7 +439,7 @@ def default_params(): name = "argmax_fp16x16_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -453,7 +453,7 @@ def keepdims_false(): name = "argmax_fp16x16_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -467,7 +467,7 @@ def last_index(): name = "argmax_fp16x16_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -486,7 +486,7 @@ def default_params(): name = "argmax_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -500,7 +500,7 @@ def keepdims_false(): name = "argmax_fp16x16_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -514,7 +514,7 @@ def last_index(): name = "argmax_fp16x16_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -533,7 +533,7 @@ def default_params(): name = "argmax_fp16x16_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -547,7 +547,7 @@ def keepdims_false(): name = "argmax_fp16x16_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -561,7 +561,7 @@ def last_index(): name = "argmax_fp16x16_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -583,7 +583,7 @@ def default_params(): name = "argmax_fp8x23_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -598,7 +598,7 @@ def keepdims_false(): name = "argmax_fp8x23_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -613,7 +613,7 @@ def last_index(): name = "argmax_fp8x23_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -632,7 +632,7 @@ def default_params(): name = "argmax_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -647,7 +647,7 @@ def keepdims_false(): name = "argmax_fp8x23_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -662,7 +662,7 @@ def last_index(): name = "argmax_fp8x23_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -682,7 +682,7 @@ def default_params(): name = "argmax_fp8x23_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -697,7 +697,7 @@ def keepdims_false(): name = "argmax_fp8x23_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -712,7 +712,7 @@ def last_index(): name = "argmax_fp8x23_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() diff --git a/nodegen/node/argmin.py b/nodegen/node/argmin.py index d76b6491c..fd3249a55 100644 --- a/nodegen/node/argmin.py +++ b/nodegen/node/argmin.py @@ -36,7 +36,7 @@ def default_params(): name = "argmin_u32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -49,7 +49,7 @@ def keepdims_false(): name = "argmin_u32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -62,7 +62,7 @@ def last_index(): name = "argmin_u32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -80,7 +80,7 @@ def default_params(): name = "argmin_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -93,7 +93,7 @@ def keepdims_false(): name = "argmin_u32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -106,7 +106,7 @@ def last_index(): name = "argmin_u32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -124,7 +124,7 @@ def default_params(): name = "argmin_u32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -137,7 +137,7 @@ def keepdims_false(): name = "argmin_u32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -150,7 +150,7 @@ def last_index(): name = "argmin_u32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -170,7 +170,7 @@ def default_params(): name = "argmin_i32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int32) @@ -183,7 +183,7 @@ def keepdims_false(): name = "argmin_i32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int32) @@ -196,7 +196,7 @@ def last_index(): name = "argmin_i32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -214,7 +214,7 @@ def default_params(): name = "argmin_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -227,7 +227,7 @@ def keepdims_false(): name = "argmin_i32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -240,7 +240,7 @@ def last_index(): name = "argmin_i32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -258,7 +258,7 @@ def default_params(): name = "argmin_i32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -271,7 +271,7 @@ def keepdims_false(): name = "argmin_i32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -284,7 +284,7 @@ def last_index(): name = "argmin_i32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -304,7 +304,7 @@ def default_params(): name = "argmin_i8_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int8) @@ -317,7 +317,7 @@ def keepdims_false(): name = "argmin_i8_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int8) @@ -330,7 +330,7 @@ def last_index(): name = "argmin_i8_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -348,7 +348,7 @@ def default_params(): name = "argmin_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -361,7 +361,7 @@ def keepdims_false(): name = "argmin_i8_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -374,7 +374,7 @@ def last_index(): name = "argmin_i8_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -392,7 +392,7 @@ def default_params(): name = "argmin_i8_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -405,7 +405,7 @@ def keepdims_false(): name = "argmin_i8_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -418,7 +418,7 @@ def last_index(): name = "argmin_i8_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -439,7 +439,7 @@ def default_params(): name = "argmin_fp16x16_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -453,7 +453,7 @@ def keepdims_false(): name = "argmin_fp16x16_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -467,7 +467,7 @@ def last_index(): name = "argmin_fp16x16_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -486,7 +486,7 @@ def default_params(): name = "argmin_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -500,7 +500,7 @@ def keepdims_false(): name = "argmin_fp16x16_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -514,7 +514,7 @@ def last_index(): name = "argmin_fp16x16_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -533,7 +533,7 @@ def default_params(): name = "argmin_fp16x16_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -547,7 +547,7 @@ def keepdims_false(): name = "argmin_fp16x16_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -561,7 +561,7 @@ def last_index(): name = "argmin_fp16x16_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -583,7 +583,7 @@ def default_params(): name = "argmin_fp8x23_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -598,7 +598,7 @@ def keepdims_false(): name = "argmin_fp8x23_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -613,7 +613,7 @@ def last_index(): name = "argmin_fp8x23_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -632,7 +632,7 @@ def default_params(): name = "argmin_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -647,7 +647,7 @@ def keepdims_false(): name = "argmin_fp8x23_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -662,7 +662,7 @@ def last_index(): name = "argmin_fp8x23_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -682,7 +682,7 @@ def default_params(): name = "argmin_fp8x23_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -697,7 +697,7 @@ def keepdims_false(): name = "argmin_fp8x23_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -712,7 +712,7 @@ def last_index(): name = "argmin_fp8x23_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() diff --git a/nodegen/node/asin.py b/nodegen/node/asin.py index 2c4036e3f..7268666ed 100644 --- a/nodegen/node/asin.py +++ b/nodegen/node/asin.py @@ -14,7 +14,7 @@ def asin_fp8x23(): name = "asin_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.asin()", name) + make_test([x], y, "input_0.asin()", name) @staticmethod def asin_fp16x16(): @@ -26,7 +26,7 @@ def asin_fp16x16(): name = "asin_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.asin()", name) + make_test([x], y, "input_0.asin()", name) diff --git a/nodegen/node/asinh.py b/nodegen/node/asinh.py index 85d49ac7b..995e93d4a 100644 --- a/nodegen/node/asinh.py +++ b/nodegen/node/asinh.py @@ -17,7 +17,7 @@ def asinh_fp8x23(): name = "asinh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) + make_test([x], y, "input_0.asinh()", name) @staticmethod def asinh_fp16x16(): @@ -31,4 +31,4 @@ def asinh_fp16x16(): name = "asinh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) + make_test([x], y, "input_0.asinh()", name) diff --git a/nodegen/node/atan.py b/nodegen/node/atan.py index 09fa82cdb..8731a6838 100644 --- a/nodegen/node/atan.py +++ b/nodegen/node/atan.py @@ -16,7 +16,7 @@ def atan_fp8x23(): name = "atan_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.atan()", name) + make_test([x], y, "input_0.atan()", name) @staticmethod def atan_fp16x16(): @@ -30,4 +30,4 @@ def atan_fp16x16(): name = "atan_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.atan()", name) + make_test([x], y, "input_0.atan()", name) diff --git a/nodegen/node/ceil.py b/nodegen/node/ceil.py index cef759d91..361cf74d4 100644 --- a/nodegen/node/ceil.py +++ b/nodegen/node/ceil.py @@ -14,7 +14,7 @@ def ceil_fp8x23(): name = "ceil_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.ceil()", name) + make_test([x], y, "input_0.ceil()", name) @staticmethod def ceil_fp16x16(): @@ -26,7 +26,7 @@ def ceil_fp16x16(): name = "ceil_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.ceil()", name) + make_test([x], y, "input_0.ceil()", name) diff --git a/nodegen/node/cos.py b/nodegen/node/cos.py index e01df60fe..c6f965432 100644 --- a/nodegen/node/cos.py +++ b/nodegen/node/cos.py @@ -17,7 +17,7 @@ def cos_fp8x23(): name = "cos_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.cos()", name) + make_test([x], y, "input_0.cos()", name) @staticmethod def cos_fp16x16(): @@ -31,4 +31,4 @@ def cos_fp16x16(): name = "cos_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.cos()", name) + make_test([x], y, "input_0.cos()", name) diff --git a/nodegen/node/cosh.py b/nodegen/node/cosh.py index df3203837..fac5f3ef5 100644 --- a/nodegen/node/cosh.py +++ b/nodegen/node/cosh.py @@ -17,7 +17,7 @@ def cosh_fp8x23(): name = "cosh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) + make_test([x], y, "input_0.cosh()", name) @staticmethod def cosh_fp16x16(): @@ -31,4 +31,4 @@ def cosh_fp16x16(): name = "cosh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) + make_test([x], y, "input_0.cosh()", name) diff --git a/nodegen/node/cumsum.py b/nodegen/node/cumsum.py index 267368bfb..9ed5c6747 100644 --- a/nodegen/node/cumsum.py +++ b/nodegen/node/cumsum.py @@ -17,7 +17,7 @@ def default(): name = "cumsum_u32_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -29,7 +29,7 @@ def exclusive(): name = "cumsum_u32_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -41,7 +41,7 @@ def reverse(): name = "cumsum_u32_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -53,7 +53,7 @@ def reverse_exclusive(): name = "cumsum_u32_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -74,7 +74,7 @@ def axis_0(): name = "cumsum_u32_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -88,7 +88,7 @@ def axis_1(): name = "cumsum_u32_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -107,7 +107,7 @@ def default(): name = "cumsum_i32_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -119,7 +119,7 @@ def exclusive(): name = "cumsum_i32_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -131,7 +131,7 @@ def reverse(): name = "cumsum_i32_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -143,7 +143,7 @@ def reverse_exclusive(): name = "cumsum_i32_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -164,7 +164,7 @@ def axis_0(): name = "cumsum_i32_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -178,7 +178,7 @@ def axis_1(): name = "cumsum_i32_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -197,7 +197,7 @@ def default(): name = "cumsum_i8_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -209,7 +209,7 @@ def exclusive(): name = "cumsum_i8_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -221,7 +221,7 @@ def reverse(): name = "cumsum_i8_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -233,7 +233,7 @@ def reverse_exclusive(): name = "cumsum_i8_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -254,7 +254,7 @@ def axis_0(): name = "cumsum_i8_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -268,7 +268,7 @@ def axis_1(): name = "cumsum_i8_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -289,7 +289,7 @@ def default(): name = "cumsum_fp8x23_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -303,7 +303,7 @@ def exclusive(): name = "cumsum_fp8x23_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -317,7 +317,7 @@ def reverse(): name = "cumsum_fp8x23_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -331,7 +331,7 @@ def reverse_exclusive(): name = "cumsum_fp8x23_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -354,7 +354,7 @@ def axis_0(): name = "cumsum_fp8x23_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -370,7 +370,7 @@ def axis_1(): name = "cumsum_fp8x23_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -391,7 +391,7 @@ def default(): name = "cumsum_fp16x16_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -405,7 +405,7 @@ def exclusive(): name = "cumsum_fp16x16_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -419,7 +419,7 @@ def reverse(): name = "cumsum_fp16x16_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) @@ -433,7 +433,7 @@ def reverse_exclusive(): name = "cumsum_fp16x16_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -456,7 +456,7 @@ def axis_0(): name = "cumsum_fp16x16_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -472,7 +472,7 @@ def axis_1(): name = "cumsum_fp16x16_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() diff --git a/nodegen/node/exp.py b/nodegen/node/exp.py index b5a345626..7e50152b5 100644 --- a/nodegen/node/exp.py +++ b/nodegen/node/exp.py @@ -18,7 +18,7 @@ def fp8x23(): name = "exp_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -30,7 +30,7 @@ def fp16x16(): name = "exp_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) fp8x23() fp16x16() @@ -48,7 +48,7 @@ def fp8x23(): name = "exp_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -60,7 +60,7 @@ def fp16x16(): name = "exp_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) fp8x23() fp16x16() @@ -78,7 +78,7 @@ def fp8x23(): name = "exp_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) @@ -90,7 +90,7 @@ def fp16x16(): name = "exp_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) fp8x23() fp16x16() @@ -107,7 +107,7 @@ def exp_fp8x23(): name = "exp_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) @staticmethod def exp_fp16x16(): @@ -121,4 +121,4 @@ def exp_fp16x16(): name = "exp_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) diff --git a/nodegen/node/log.py b/nodegen/node/log.py index d2cc12d70..e1aa32b46 100644 --- a/nodegen/node/log.py +++ b/nodegen/node/log.py @@ -18,7 +18,7 @@ def fp8x23(): name = "log_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) def fp16x16(): x = np.random.randint(1, 127, (2, 2)).astype(np.int32) @@ -30,7 +30,7 @@ def fp16x16(): name = "log_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) fp8x23() fp16x16() @@ -48,7 +48,7 @@ def fp8x23(): name = "log_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) def fp16x16(): x = np.random.randint(1, 127, (2, 2)).astype(np.int32) @@ -60,7 +60,7 @@ def fp16x16(): name = "log_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) fp8x23() fp16x16() @@ -78,7 +78,7 @@ def fp8x23(): name = "log_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) def fp16x16(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) @@ -90,7 +90,7 @@ def fp16x16(): name = "log_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) fp8x23() fp16x16() @@ -107,7 +107,7 @@ def log_fp8x23(): name = "log_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) @staticmethod def log_fp16x16(): @@ -121,4 +121,4 @@ def log_fp16x16(): name = "log_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) diff --git a/nodegen/node/reduce_sum.py b/nodegen/node/reduce_sum.py index 859ce77c0..3a4449032 100644 --- a/nodegen/node/reduce_sum.py +++ b/nodegen/node/reduce_sum.py @@ -16,7 +16,7 @@ def reduce_sum_1D(): name = "reduce_sum_u32_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -29,7 +29,7 @@ def default(): name = "reduce_sum_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.uint32).reshape(2, 2) @@ -41,7 +41,7 @@ def keepdims(): name = "reduce_sum_u32_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.uint32).reshape(2, 2) @@ -53,7 +53,7 @@ def axis_1(): name = "reduce_sum_u32_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -73,7 +73,7 @@ def reduce_sum_1D(): name = "reduce_sum_i32_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -86,7 +86,7 @@ def default(): name = "reduce_sum_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int32).reshape(2, 2) @@ -98,7 +98,7 @@ def keepdims(): name = "reduce_sum_i32_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int32).reshape(2, 2) @@ -110,7 +110,7 @@ def axis_1(): name = "reduce_sum_i32_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -130,7 +130,7 @@ def reduce_sum_1D(): name = "reduce_sum_i8_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -143,7 +143,7 @@ def default(): name = "reduce_sum_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int8).reshape(2, 2) @@ -155,7 +155,7 @@ def keepdims(): name = "reduce_sum_i8_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int8).reshape(2, 2) @@ -167,7 +167,7 @@ def axis_1(): name = "reduce_sum_i8_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -189,7 +189,7 @@ def reduce_sum_1D(): name = "reduce_sum_fp8x23_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -204,7 +204,7 @@ def default(): name = "reduce_sum_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) @@ -218,7 +218,7 @@ def keepdims(): name = "reduce_sum_fp8x23_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) @@ -232,7 +232,7 @@ def axis_1(): name = "reduce_sum_fp8x23_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -255,7 +255,7 @@ def reduce_sum_1D(): name = "reduce_sum_fp16x16_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -270,7 +270,7 @@ def default(): name = "reduce_sum_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) @@ -284,7 +284,7 @@ def keepdims(): name = "reduce_sum_fp16x16_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) @@ -298,7 +298,7 @@ def axis_1(): name = "reduce_sum_fp16x16_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() diff --git a/nodegen/node/sin.py b/nodegen/node/sin.py index 63693b7bc..d8436d114 100644 --- a/nodegen/node/sin.py +++ b/nodegen/node/sin.py @@ -18,7 +18,7 @@ def fp8x23(): name = "sin_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) @@ -30,7 +30,7 @@ def fp16x16(): name = "sin_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) fp8x23() fp16x16() @@ -48,7 +48,7 @@ def fp8x23(): name = "sin_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) def fp16x16(): x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) @@ -60,7 +60,7 @@ def fp16x16(): name = "sin_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) fp8x23() fp16x16() @@ -78,7 +78,7 @@ def fp8x23(): name = "sin_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) def fp16x16(): x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) @@ -90,7 +90,7 @@ def fp16x16(): name = "sin_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) fp8x23() fp16x16() @@ -107,7 +107,7 @@ def sin_fp8x23(): name = "sin_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) @staticmethod def sin_fp16x16(): @@ -121,4 +121,4 @@ def sin_fp16x16(): name = "sin_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) diff --git a/nodegen/node/sinh.py b/nodegen/node/sinh.py index 0a410eff7..a1d8000b9 100644 --- a/nodegen/node/sinh.py +++ b/nodegen/node/sinh.py @@ -18,7 +18,7 @@ def fp8x23(): name = "sinh_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -30,7 +30,7 @@ def fp16x16(): name = "sinh_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) fp8x23() fp16x16() @@ -48,7 +48,7 @@ def fp8x23(): name = "sinh_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -60,7 +60,7 @@ def fp16x16(): name = "sinh_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) fp8x23() fp16x16() @@ -78,7 +78,7 @@ def fp8x23(): name = "sinh_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) @@ -90,7 +90,7 @@ def fp16x16(): name = "sinh_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) fp8x23() fp16x16() @@ -107,7 +107,7 @@ def sinh_fp8x23(): name = "sinh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) @staticmethod def sinh_fp16x16(): @@ -121,4 +121,4 @@ def sinh_fp16x16(): name = "sinh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) diff --git a/nodegen/node/sqrt.py b/nodegen/node/sqrt.py index 3bc74964a..ecaa03873 100644 --- a/nodegen/node/sqrt.py +++ b/nodegen/node/sqrt.py @@ -17,7 +17,7 @@ def fp8x23(): name = "sqrt_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) @@ -29,7 +29,7 @@ def fp16x16(): name = "sqrt_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) fp8x23() fp16x16() @@ -47,7 +47,7 @@ def fp8x23(): name = "sqrt_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.int32) @@ -59,7 +59,7 @@ def fp16x16(): name = "sqrt_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) fp8x23() fp16x16() @@ -77,7 +77,7 @@ def fp8x23(): name = "sqrt_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) @@ -89,7 +89,7 @@ def fp16x16(): name = "sqrt_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) fp8x23() fp16x16() @@ -106,7 +106,7 @@ def sqrt_fp8x23(): name = "sqrt_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) @staticmethod def sqrt_fp16x16(): @@ -120,4 +120,4 @@ def sqrt_fp16x16(): name = "sqrt_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) diff --git a/nodegen/node/tanh.py b/nodegen/node/tanh.py index ab13cbfbd..53bbba04c 100644 --- a/nodegen/node/tanh.py +++ b/nodegen/node/tanh.py @@ -18,7 +18,7 @@ def fp8x23(): name = "tanh_i32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -30,7 +30,7 @@ def fp16x16(): name = "tanh_i32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) fp8x23() fp16x16() @@ -48,7 +48,7 @@ def fp8x23(): name = "tanh_i8_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) def fp16x16(): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) @@ -60,7 +60,7 @@ def fp16x16(): name = "tanh_i8_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) fp8x23() fp16x16() @@ -78,7 +78,7 @@ def fp8x23(): name = "tanh_u32_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) def fp16x16(): x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) @@ -90,7 +90,7 @@ def fp16x16(): name = "tanh_u32_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) fp8x23() fp16x16() @@ -107,7 +107,7 @@ def tanh_fp8x23(): name = "tanh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) @staticmethod def tanh_fp16x16(): @@ -121,4 +121,4 @@ def tanh_fp16x16(): name = "tanh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index be25edfa6..c55c41792 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -183,3 +183,13 @@ mod cumsum_u32_1d_reverse; mod cumsum_u32_1d_reverse_exclusive; mod cumsum_u32_2d_axis_0; mod cumsum_u32_2d_axis_1; +mod div_fp16x16; +mod div_fp16x16_broadcast; +mod div_fp8x23; +mod div_fp8x23_broadcast; +mod div_i32; +mod div_i32_broadcast; +mod div_i8; +mod div_i8_broadcast; +mod div_u32; +mod div_u32_broadcast; diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo new file mode 100644 index 000000000..1c65ce822 --- /dev/null +++ b/src/tests/nodes/div_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorDiv}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo new file mode 100644 index 000000000..ebec1dd71 --- /dev/null +++ b/src/tests/nodes/div_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo new file mode 100644 index 000000000..5664c9473 --- /dev/null +++ b/src/tests/nodes/div_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo new file mode 100644 index 000000000..a9d2fed91 --- /dev/null +++ b/src/tests/nodes/div_fp16x16/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo new file mode 100644 index 000000000..ab365df13 --- /dev/null +++ b/src/tests/nodes/div_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorDiv}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..0e7830f68 --- /dev/null +++ b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..b40221126 --- /dev/null +++ b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..bc5d6d0fa --- /dev/null +++ b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo new file mode 100644 index 000000000..9b3cd41b2 --- /dev/null +++ b/src/tests/nodes/div_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorDiv}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo new file mode 100644 index 000000000..5207a2e67 --- /dev/null +++ b/src/tests/nodes/div_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo new file mode 100644 index 000000000..fba559547 --- /dev/null +++ b/src/tests/nodes/div_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo new file mode 100644 index 000000000..6e05358a7 --- /dev/null +++ b/src/tests/nodes/div_fp8x23/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo new file mode 100644 index 000000000..98247d410 --- /dev/null +++ b/src/tests/nodes/div_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorDiv}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..3f8fd0134 --- /dev/null +++ b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..cf2ddd464 --- /dev/null +++ b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..fd04e1ce4 --- /dev/null +++ b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32.cairo b/src/tests/nodes/div_i32.cairo new file mode 100644 index 000000000..55ea834d1 --- /dev/null +++ b/src/tests/nodes/div_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorDiv}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo new file mode 100644 index 000000000..e40e76185 --- /dev/null +++ b/src/tests/nodes/div_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo new file mode 100644 index 000000000..cfc7cc5ca --- /dev/null +++ b/src/tests/nodes/div_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo new file mode 100644 index 000000000..358bed425 --- /dev/null +++ b/src/tests/nodes/div_i32/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast.cairo b/src/tests/nodes/div_i32_broadcast.cairo new file mode 100644 index 000000000..0d00bb6d0 --- /dev/null +++ b/src/tests/nodes/div_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorDiv}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..6e8ea6c4b --- /dev/null +++ b/src/tests/nodes/div_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..efeeb68df --- /dev/null +++ b/src/tests/nodes/div_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..4a93a54a2 --- /dev/null +++ b/src/tests/nodes/div_i32_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8.cairo b/src/tests/nodes/div_i8.cairo new file mode 100644 index 000000000..86ce3b8cc --- /dev/null +++ b/src/tests/nodes/div_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorDiv}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo new file mode 100644 index 000000000..9b38ea284 --- /dev/null +++ b/src/tests/nodes/div_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo new file mode 100644 index 000000000..f708358c8 --- /dev/null +++ b/src/tests/nodes/div_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo new file mode 100644 index 000000000..f3984d981 --- /dev/null +++ b/src/tests/nodes/div_i8/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast.cairo b/src/tests/nodes/div_i8_broadcast.cairo new file mode 100644 index 000000000..360b783ee --- /dev/null +++ b/src/tests/nodes/div_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorDiv}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..3ca175b18 --- /dev/null +++ b/src/tests/nodes/div_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..ffe7f6894 --- /dev/null +++ b/src/tests/nodes/div_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..e40d4d24c --- /dev/null +++ b/src/tests/nodes/div_i8_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32.cairo b/src/tests/nodes/div_u32.cairo new file mode 100644 index 000000000..1d0ff31b6 --- /dev/null +++ b/src/tests/nodes/div_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorDiv}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo new file mode 100644 index 000000000..c2c6b44f3 --- /dev/null +++ b/src/tests/nodes/div_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(5); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(4); + data.append(3); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + data.append(4); + data.append(4); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo new file mode 100644 index 000000000..0283570db --- /dev/null +++ b/src/tests/nodes/div_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(2); + data.append(1); + data.append(2); + data.append(1); + data.append(1); + data.append(2); + data.append(2); + data.append(2); + data.append(2); + data.append(2); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(1); + data.append(2); + data.append(1); + data.append(2); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(2); + data.append(2); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo new file mode 100644 index 000000000..d43ae3e2b --- /dev/null +++ b/src/tests/nodes/div_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(2); + data.append(3); + data.append(1); + data.append(5); + data.append(3); + data.append(2); + data.append(2); + data.append(2); + data.append(2); + data.append(1); + data.append(3); + data.append(5); + data.append(3); + data.append(2); + data.append(3); + data.append(2); + data.append(4); + data.append(1); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + data.append(2); + data.append(2); + data.append(2); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast.cairo b/src/tests/nodes/div_u32_broadcast.cairo new file mode 100644 index 000000000..e1988ad32 --- /dev/null +++ b/src/tests/nodes/div_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorDiv}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_div_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 / input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..e9c930eb7 --- /dev/null +++ b/src/tests/nodes/div_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + data.append(5); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..114a06d12 --- /dev/null +++ b/src/tests/nodes/div_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..7db27318f --- /dev/null +++ b/src/tests/nodes/div_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + data.append(5); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 5e89e4ed77c79743fad0910f981ea3588c546276 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:08:22 +0300 Subject: [PATCH 131/179] test equal --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/equal_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/equal_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/equal_fp16x16/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/equal_fp16x16/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_fp16x16_broadcast.cairo | 22 ++++++++++ .../equal_fp16x16_broadcast/input_0.cairo | 18 ++++++++ .../equal_fp16x16_broadcast/input_1.cairo | 16 +++++++ .../equal_fp16x16_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/equal_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/equal_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/equal_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/equal_fp8x23/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_fp8x23_broadcast.cairo | 22 ++++++++++ .../equal_fp8x23_broadcast/input_0.cairo | 18 ++++++++ .../equal_fp8x23_broadcast/input_1.cairo | 16 +++++++ .../equal_fp8x23_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/equal_i32.cairo | 22 ++++++++++ src/tests/nodes/equal_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/equal_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/equal_i32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_i32_broadcast.cairo | 22 ++++++++++ .../nodes/equal_i32_broadcast/input_0.cairo | 17 ++++++++ .../nodes/equal_i32_broadcast/input_1.cairo | 15 +++++++ .../nodes/equal_i32_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/equal_i8.cairo | 22 ++++++++++ src/tests/nodes/equal_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/equal_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/equal_i8/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_i8_broadcast.cairo | 22 ++++++++++ .../nodes/equal_i8_broadcast/input_0.cairo | 17 ++++++++ .../nodes/equal_i8_broadcast/input_1.cairo | 15 +++++++ .../nodes/equal_i8_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/equal_u32.cairo | 22 ++++++++++ src/tests/nodes/equal_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/equal_u32_broadcast.cairo | 22 ++++++++++ .../nodes/equal_u32_broadcast/input_0.cairo | 16 +++++++ .../nodes/equal_u32_broadcast/input_1.cairo | 14 +++++++ .../nodes/equal_u32_broadcast/output_0.cairo | 16 +++++++ 41 files changed, 1084 insertions(+) create mode 100644 src/tests/nodes/equal_fp16x16.cairo create mode 100644 src/tests/nodes/equal_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/equal_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/equal_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/equal_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/equal_fp8x23.cairo create mode 100644 src/tests/nodes/equal_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/equal_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/equal_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/equal_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/equal_i32.cairo create mode 100644 src/tests/nodes/equal_i32/input_0.cairo create mode 100644 src/tests/nodes/equal_i32/input_1.cairo create mode 100644 src/tests/nodes/equal_i32/output_0.cairo create mode 100644 src/tests/nodes/equal_i32_broadcast.cairo create mode 100644 src/tests/nodes/equal_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/equal_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/equal_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/equal_i8.cairo create mode 100644 src/tests/nodes/equal_i8/input_0.cairo create mode 100644 src/tests/nodes/equal_i8/input_1.cairo create mode 100644 src/tests/nodes/equal_i8/output_0.cairo create mode 100644 src/tests/nodes/equal_i8_broadcast.cairo create mode 100644 src/tests/nodes/equal_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/equal_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/equal_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/equal_u32.cairo create mode 100644 src/tests/nodes/equal_u32/input_0.cairo create mode 100644 src/tests/nodes/equal_u32/input_1.cairo create mode 100644 src/tests/nodes/equal_u32/output_0.cairo create mode 100644 src/tests/nodes/equal_u32_broadcast.cairo create mode 100644 src/tests/nodes/equal_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/equal_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/equal_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index c55c41792..a673b8b3a 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -193,3 +193,13 @@ mod div_i8; mod div_i8_broadcast; mod div_u32; mod div_u32_broadcast; +mod equal_fp16x16; +mod equal_fp16x16_broadcast; +mod equal_fp8x23; +mod equal_fp8x23_broadcast; +mod equal_i32; +mod equal_i32_broadcast; +mod equal_i8; +mod equal_i8_broadcast; +mod equal_u32; +mod equal_u32_broadcast; diff --git a/src/tests/nodes/equal_fp16x16.cairo b/src/tests/nodes/equal_fp16x16.cairo new file mode 100644 index 000000000..e5f8ba27f --- /dev/null +++ b/src/tests/nodes/equal_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo new file mode 100644 index 000000000..bb2d30b13 --- /dev/null +++ b/src/tests/nodes/equal_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo new file mode 100644 index 000000000..022b7aeff --- /dev/null +++ b/src/tests/nodes/equal_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo new file mode 100644 index 000000000..4ac107912 --- /dev/null +++ b/src/tests/nodes/equal_fp16x16/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast.cairo b/src/tests/nodes/equal_fp16x16_broadcast.cairo new file mode 100644 index 000000000..a2939736f --- /dev/null +++ b/src/tests/nodes/equal_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..f8c2e9849 --- /dev/null +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..0e549709b --- /dev/null +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..386b678ef --- /dev/null +++ b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23.cairo b/src/tests/nodes/equal_fp8x23.cairo new file mode 100644 index 000000000..bf987d766 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo new file mode 100644 index 000000000..bad79cb47 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo new file mode 100644 index 000000000..5ab3d78e3 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo new file mode 100644 index 000000000..993dfb719 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast.cairo b/src/tests/nodes/equal_fp8x23_broadcast.cairo new file mode 100644 index 000000000..aef83cbfb --- /dev/null +++ b/src/tests/nodes/equal_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..d93db0659 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..64713b1ba --- /dev/null +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..0cc7de207 --- /dev/null +++ b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32.cairo b/src/tests/nodes/equal_i32.cairo new file mode 100644 index 000000000..8f42d32cd --- /dev/null +++ b/src/tests/nodes/equal_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo new file mode 100644 index 000000000..9abf4e9b7 --- /dev/null +++ b/src/tests/nodes/equal_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo new file mode 100644 index 000000000..a7ab8ba6d --- /dev/null +++ b/src/tests/nodes/equal_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo new file mode 100644 index 000000000..26c1da5a9 --- /dev/null +++ b/src/tests/nodes/equal_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast.cairo b/src/tests/nodes/equal_i32_broadcast.cairo new file mode 100644 index 000000000..3c0d2da8a --- /dev/null +++ b/src/tests/nodes/equal_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..93feb7d50 --- /dev/null +++ b/src/tests/nodes/equal_i32_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..2e88b9154 --- /dev/null +++ b/src/tests/nodes/equal_i32_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..2101f7fc8 --- /dev/null +++ b/src/tests/nodes/equal_i32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8.cairo b/src/tests/nodes/equal_i8.cairo new file mode 100644 index 000000000..78eadad98 --- /dev/null +++ b/src/tests/nodes/equal_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo new file mode 100644 index 000000000..865d1dbf2 --- /dev/null +++ b/src/tests/nodes/equal_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo new file mode 100644 index 000000000..bb19add34 --- /dev/null +++ b/src/tests/nodes/equal_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo new file mode 100644 index 000000000..72bdf3492 --- /dev/null +++ b/src/tests/nodes/equal_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast.cairo b/src/tests/nodes/equal_i8_broadcast.cairo new file mode 100644 index 000000000..751d192e4 --- /dev/null +++ b/src/tests/nodes/equal_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..8ac6798f4 --- /dev/null +++ b/src/tests/nodes/equal_i8_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..b16e2e8ed --- /dev/null +++ b/src/tests/nodes/equal_i8_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..d9b9dedff --- /dev/null +++ b/src/tests/nodes/equal_i8_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32.cairo b/src/tests/nodes/equal_u32.cairo new file mode 100644 index 000000000..6a3e0cf29 --- /dev/null +++ b/src/tests/nodes/equal_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo new file mode 100644 index 000000000..ae27571e9 --- /dev/null +++ b/src/tests/nodes/equal_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(5); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(1); + data.append(5); + data.append(1); + data.append(3); + data.append(3); + data.append(4); + data.append(1); + data.append(3); + data.append(5); + data.append(4); + data.append(0); + data.append(1); + data.append(2); + data.append(4); + data.append(3); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo new file mode 100644 index 000000000..f4b8dcf2b --- /dev/null +++ b/src/tests/nodes/equal_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(3); + data.append(0); + data.append(1); + data.append(5); + data.append(3); + data.append(2); + data.append(1); + data.append(0); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(2); + data.append(1); + data.append(5); + data.append(1); + data.append(2); + data.append(0); + data.append(4); + data.append(1); + data.append(1); + data.append(0); + data.append(5); + data.append(1); + data.append(5); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo new file mode 100644 index 000000000..48ee1ad7d --- /dev/null +++ b/src/tests/nodes/equal_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast.cairo b/src/tests/nodes/equal_u32_broadcast.cairo new file mode 100644 index 000000000..4ceb32a0e --- /dev/null +++ b/src/tests/nodes/equal_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_equal_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..fdbf9ca33 --- /dev/null +++ b/src/tests/nodes/equal_u32_broadcast/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(4); + data.append(4); + data.append(5); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..b3f2c616b --- /dev/null +++ b/src/tests/nodes/equal_u32_broadcast/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..df2800d42 --- /dev/null +++ b/src/tests/nodes/equal_u32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From c78a54599e07fe651fe67fc9f61550c85c82d348 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:09:14 +0300 Subject: [PATCH 132/179] test exp --- nodegen/node/exp.py | 90 ---------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/exp_fp16x16.cairo | 20 +++++ src/tests/nodes/exp_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/exp_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/exp_fp8x23.cairo | 20 +++++ src/tests/nodes/exp_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/exp_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/exp_fp16x16.cairo create mode 100644 src/tests/nodes/exp_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/exp_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/exp_fp8x23.cairo create mode 100644 src/tests/nodes/exp_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/exp_fp8x23/output_0.cairo diff --git a/nodegen/node/exp.py b/nodegen/node/exp.py index 7e50152b5..3194c1081 100644 --- a/nodegen/node/exp.py +++ b/nodegen/node/exp.py @@ -5,96 +5,6 @@ class Exp(RunAll): - @staticmethod - def exp_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "exp_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "exp_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - fp8x23() - fp16x16() - - @staticmethod - def exp_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.exp(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "exp_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "exp_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - fp8x23() - fp16x16() - - @staticmethod - def exp_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.exp(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "exp_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.exp(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "exp_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.exp()", name) - - fp8x23() - fp16x16() - @staticmethod def exp_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index a673b8b3a..939d323ae 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -203,3 +203,5 @@ mod equal_i8; mod equal_i8_broadcast; mod equal_u32; mod equal_u32_broadcast; +mod exp_fp16x16; +mod exp_fp8x23; diff --git a/src/tests/nodes/exp_fp16x16.cairo b/src/tests/nodes/exp_fp16x16.cairo new file mode 100644 index 000000000..0d18bff68 --- /dev/null +++ b/src/tests/nodes/exp_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_exp_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.exp(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo new file mode 100644 index 000000000..e58d3c935 --- /dev/null +++ b/src/tests/nodes/exp_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 194862, sign: false }); + data.append(FP16x16 { mag: 38141, sign: true }); + data.append(FP16x16 { mag: 110238, sign: false }); + data.append(FP16x16 { mag: 63859, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo new file mode 100644 index 000000000..ac9ad4ec0 --- /dev/null +++ b/src/tests/nodes/exp_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1281733, sign: false }); + data.append(FP16x16 { mag: 36620, sign: false }); + data.append(FP16x16 { mag: 352377, sign: false }); + data.append(FP16x16 { mag: 24734, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23.cairo b/src/tests/nodes/exp_fp8x23.cairo new file mode 100644 index 000000000..e7b4e9cef --- /dev/null +++ b/src/tests/nodes/exp_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_exp_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.exp(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo new file mode 100644 index 000000000..62073f39a --- /dev/null +++ b/src/tests/nodes/exp_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 11235841, sign: true }); + data.append(FP8x23 { mag: 5119248, sign: false }); + data.append(FP8x23 { mag: 735081, sign: true }); + data.append(FP8x23 { mag: 19148930, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo new file mode 100644 index 000000000..a902d063b --- /dev/null +++ b/src/tests/nodes/exp_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 2197802, sign: false }); + data.append(FP8x23 { mag: 15442702, sign: false }); + data.append(FP8x23 { mag: 7684813, sign: false }); + data.append(FP8x23 { mag: 855682, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 81202eb725887386281356c20464a5d570e9309c Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:25:19 +0300 Subject: [PATCH 133/179] test less_equal tensor --- src/tests/nodes.cairo | 10 +++++++++ src/tests/nodes/less_equal_fp16x16.cairo | 22 +++++++++++++++++++ .../nodes/less_equal_fp16x16/input_0.cairo | 18 +++++++++++++++ .../nodes/less_equal_fp16x16/input_1.cairo | 18 +++++++++++++++ .../nodes/less_equal_fp16x16/output_0.cairo | 16 ++++++++++++++ .../nodes/less_equal_fp16x16_broadcast.cairo | 22 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++ .../input_1.cairo | 16 ++++++++++++++ .../output_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_fp8x23.cairo | 22 +++++++++++++++++++ .../nodes/less_equal_fp8x23/input_0.cairo | 18 +++++++++++++++ .../nodes/less_equal_fp8x23/input_1.cairo | 18 +++++++++++++++ .../nodes/less_equal_fp8x23/output_0.cairo | 16 ++++++++++++++ .../nodes/less_equal_fp8x23_broadcast.cairo | 22 +++++++++++++++++++ .../less_equal_fp8x23_broadcast/input_0.cairo | 18 +++++++++++++++ .../less_equal_fp8x23_broadcast/input_1.cairo | 16 ++++++++++++++ .../output_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_i32.cairo | 22 +++++++++++++++++++ src/tests/nodes/less_equal_i32/input_0.cairo | 17 ++++++++++++++ src/tests/nodes/less_equal_i32/input_1.cairo | 17 ++++++++++++++ src/tests/nodes/less_equal_i32/output_0.cairo | 16 ++++++++++++++ .../nodes/less_equal_i32_broadcast.cairo | 22 +++++++++++++++++++ .../less_equal_i32_broadcast/input_0.cairo | 17 ++++++++++++++ .../less_equal_i32_broadcast/input_1.cairo | 15 +++++++++++++ .../less_equal_i32_broadcast/output_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_i8.cairo | 22 +++++++++++++++++++ src/tests/nodes/less_equal_i8/input_0.cairo | 17 ++++++++++++++ src/tests/nodes/less_equal_i8/input_1.cairo | 17 ++++++++++++++ src/tests/nodes/less_equal_i8/output_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_i8_broadcast.cairo | 22 +++++++++++++++++++ .../less_equal_i8_broadcast/input_0.cairo | 17 ++++++++++++++ .../less_equal_i8_broadcast/input_1.cairo | 15 +++++++++++++ .../less_equal_i8_broadcast/output_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_u32.cairo | 22 +++++++++++++++++++ src/tests/nodes/less_equal_u32/input_0.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_u32/input_1.cairo | 16 ++++++++++++++ src/tests/nodes/less_equal_u32/output_0.cairo | 16 ++++++++++++++ .../nodes/less_equal_u32_broadcast.cairo | 22 +++++++++++++++++++ .../less_equal_u32_broadcast/input_0.cairo | 16 ++++++++++++++ .../less_equal_u32_broadcast/input_1.cairo | 14 ++++++++++++ .../less_equal_u32_broadcast/output_0.cairo | 16 ++++++++++++++ 41 files changed, 724 insertions(+) create mode 100644 src/tests/nodes/less_equal_fp16x16.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_equal_i32.cairo create mode 100644 src/tests/nodes/less_equal_i32/input_0.cairo create mode 100644 src/tests/nodes/less_equal_i32/input_1.cairo create mode 100644 src/tests/nodes/less_equal_i32/output_0.cairo create mode 100644 src/tests/nodes/less_equal_i32_broadcast.cairo create mode 100644 src/tests/nodes/less_equal_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_equal_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_equal_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_equal_i8.cairo create mode 100644 src/tests/nodes/less_equal_i8/input_0.cairo create mode 100644 src/tests/nodes/less_equal_i8/input_1.cairo create mode 100644 src/tests/nodes/less_equal_i8/output_0.cairo create mode 100644 src/tests/nodes/less_equal_i8_broadcast.cairo create mode 100644 src/tests/nodes/less_equal_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_equal_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_equal_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_equal_u32.cairo create mode 100644 src/tests/nodes/less_equal_u32/input_0.cairo create mode 100644 src/tests/nodes/less_equal_u32/input_1.cairo create mode 100644 src/tests/nodes/less_equal_u32/output_0.cairo create mode 100644 src/tests/nodes/less_equal_u32_broadcast.cairo create mode 100644 src/tests/nodes/less_equal_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_equal_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_equal_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 939d323ae..45a3e02c9 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -205,3 +205,13 @@ mod equal_u32; mod equal_u32_broadcast; mod exp_fp16x16; mod exp_fp8x23; +mod less_equal_fp16x16; +mod less_equal_fp16x16_broadcast; +mod less_equal_fp8x23; +mod less_equal_fp8x23_broadcast; +mod less_equal_i32; +mod less_equal_i32_broadcast; +mod less_equal_i8; +mod less_equal_i8_broadcast; +mod less_equal_u32; +mod less_equal_u32_broadcast; diff --git a/src/tests/nodes/less_equal_fp16x16.cairo b/src/tests/nodes/less_equal_fp16x16.cairo new file mode 100644 index 000000000..e5aa67a91 --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo new file mode 100644 index 000000000..e45b1c3a0 --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo new file mode 100644 index 000000000..4a0f45254 --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo new file mode 100644 index 000000000..fdae52d6a --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo new file mode 100644 index 000000000..28e877b85 --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..cad6713ff --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..378bd0a89 --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..fdae52d6a --- /dev/null +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23.cairo b/src/tests/nodes/less_equal_fp8x23.cairo new file mode 100644 index 000000000..6e4cfe75d --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo new file mode 100644 index 000000000..1e987a572 --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo new file mode 100644 index 000000000..50338a1e0 --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo new file mode 100644 index 000000000..328774a25 --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo new file mode 100644 index 000000000..f4425ce6f --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..55785eaea --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..fdcd11d36 --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..b7f7a3c83 --- /dev/null +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32.cairo b/src/tests/nodes/less_equal_i32.cairo new file mode 100644 index 000000000..07417edc7 --- /dev/null +++ b/src/tests/nodes/less_equal_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo new file mode 100644 index 000000000..76d7a597a --- /dev/null +++ b/src/tests/nodes/less_equal_i32/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo new file mode 100644 index 000000000..b713f9cdf --- /dev/null +++ b/src/tests/nodes/less_equal_i32/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo new file mode 100644 index 000000000..d9b9dedff --- /dev/null +++ b/src/tests/nodes/less_equal_i32/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast.cairo b/src/tests/nodes/less_equal_i32_broadcast.cairo new file mode 100644 index 000000000..30528a72d --- /dev/null +++ b/src/tests/nodes/less_equal_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..044d66961 --- /dev/null +++ b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..ef4d6e029 --- /dev/null +++ b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..2a00c3c50 --- /dev/null +++ b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8.cairo b/src/tests/nodes/less_equal_i8.cairo new file mode 100644 index 000000000..432c158b9 --- /dev/null +++ b/src/tests/nodes/less_equal_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo new file mode 100644 index 000000000..9f38b3caa --- /dev/null +++ b/src/tests/nodes/less_equal_i8/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo new file mode 100644 index 000000000..28d5cb3d4 --- /dev/null +++ b/src/tests/nodes/less_equal_i8/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo new file mode 100644 index 000000000..2094003c4 --- /dev/null +++ b/src/tests/nodes/less_equal_i8/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast.cairo b/src/tests/nodes/less_equal_i8_broadcast.cairo new file mode 100644 index 000000000..f83a1ebbc --- /dev/null +++ b/src/tests/nodes/less_equal_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..af8ae9475 --- /dev/null +++ b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..f2ee05092 --- /dev/null +++ b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..386b678ef --- /dev/null +++ b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32.cairo b/src/tests/nodes/less_equal_u32.cairo new file mode 100644 index 000000000..b9de4d683 --- /dev/null +++ b/src/tests/nodes/less_equal_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo new file mode 100644 index 000000000..a1dd52918 --- /dev/null +++ b/src/tests/nodes/less_equal_u32/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo new file mode 100644 index 000000000..ff87f088a --- /dev/null +++ b/src/tests/nodes/less_equal_u32/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(2); + data.append(5); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo new file mode 100644 index 000000000..fdae52d6a --- /dev/null +++ b/src/tests/nodes/less_equal_u32/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast.cairo b/src/tests/nodes/less_equal_u32_broadcast.cairo new file mode 100644 index 000000000..6db6cba0f --- /dev/null +++ b/src/tests/nodes/less_equal_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_equal_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..d4284899e --- /dev/null +++ b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..cd189c89d --- /dev/null +++ b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..b7f7a3c83 --- /dev/null +++ b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 4bfc9a4915f63c56cdc925cc5d9aa7f358393d14 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:33:17 +0300 Subject: [PATCH 134/179] test greater tensor --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/greater_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/greater_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/greater_fp16x16/input_1.cairo | 42 +++++++++++++++++++ .../nodes/greater_fp16x16/output_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_fp16x16_broadcast.cairo | 22 ++++++++++ .../greater_fp16x16_broadcast/input_0.cairo | 18 ++++++++ .../greater_fp16x16_broadcast/input_1.cairo | 16 +++++++ .../greater_fp16x16_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/greater_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/greater_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/greater_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/greater_fp8x23/output_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_fp8x23_broadcast.cairo | 22 ++++++++++ .../greater_fp8x23_broadcast/input_0.cairo | 18 ++++++++ .../greater_fp8x23_broadcast/input_1.cairo | 16 +++++++ .../greater_fp8x23_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/greater_i32.cairo | 22 ++++++++++ src/tests/nodes/greater_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/greater_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/greater_i32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_i32_broadcast.cairo | 22 ++++++++++ .../nodes/greater_i32_broadcast/input_0.cairo | 17 ++++++++ .../nodes/greater_i32_broadcast/input_1.cairo | 15 +++++++ .../greater_i32_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/greater_i8.cairo | 22 ++++++++++ src/tests/nodes/greater_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/greater_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/greater_i8/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_i8_broadcast.cairo | 22 ++++++++++ .../nodes/greater_i8_broadcast/input_0.cairo | 17 ++++++++ .../nodes/greater_i8_broadcast/input_1.cairo | 15 +++++++ .../nodes/greater_i8_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/greater_u32.cairo | 22 ++++++++++ src/tests/nodes/greater_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_u32_broadcast.cairo | 22 ++++++++++ .../nodes/greater_u32_broadcast/input_0.cairo | 16 +++++++ .../nodes/greater_u32_broadcast/input_1.cairo | 14 +++++++ .../greater_u32_broadcast/output_0.cairo | 16 +++++++ 41 files changed, 1084 insertions(+) create mode 100644 src/tests/nodes/greater_fp16x16.cairo create mode 100644 src/tests/nodes/greater_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/greater_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/greater_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/greater_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_fp8x23.cairo create mode 100644 src/tests/nodes/greater_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/greater_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/greater_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/greater_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_i32.cairo create mode 100644 src/tests/nodes/greater_i32/input_0.cairo create mode 100644 src/tests/nodes/greater_i32/input_1.cairo create mode 100644 src/tests/nodes/greater_i32/output_0.cairo create mode 100644 src/tests/nodes/greater_i32_broadcast.cairo create mode 100644 src/tests/nodes/greater_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_i8.cairo create mode 100644 src/tests/nodes/greater_i8/input_0.cairo create mode 100644 src/tests/nodes/greater_i8/input_1.cairo create mode 100644 src/tests/nodes/greater_i8/output_0.cairo create mode 100644 src/tests/nodes/greater_i8_broadcast.cairo create mode 100644 src/tests/nodes/greater_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_u32.cairo create mode 100644 src/tests/nodes/greater_u32/input_0.cairo create mode 100644 src/tests/nodes/greater_u32/input_1.cairo create mode 100644 src/tests/nodes/greater_u32/output_0.cairo create mode 100644 src/tests/nodes/greater_u32_broadcast.cairo create mode 100644 src/tests/nodes/greater_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 45a3e02c9..8820be17f 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -215,3 +215,13 @@ mod less_equal_i8; mod less_equal_i8_broadcast; mod less_equal_u32; mod less_equal_u32_broadcast; +mod greater_fp16x16; +mod greater_fp16x16_broadcast; +mod greater_fp8x23; +mod greater_fp8x23_broadcast; +mod greater_i32; +mod greater_i32_broadcast; +mod greater_i8; +mod greater_i8_broadcast; +mod greater_u32; +mod greater_u32_broadcast; diff --git a/src/tests/nodes/greater_fp16x16.cairo b/src/tests/nodes/greater_fp16x16.cairo new file mode 100644 index 000000000..0cc99e81c --- /dev/null +++ b/src/tests/nodes/greater_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo new file mode 100644 index 000000000..413c5e23c --- /dev/null +++ b/src/tests/nodes/greater_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo new file mode 100644 index 000000000..09ed30ca1 --- /dev/null +++ b/src/tests/nodes/greater_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo new file mode 100644 index 000000000..ab7cf0d44 --- /dev/null +++ b/src/tests/nodes/greater_fp16x16/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast.cairo b/src/tests/nodes/greater_fp16x16_broadcast.cairo new file mode 100644 index 000000000..260e69a26 --- /dev/null +++ b/src/tests/nodes/greater_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..29e9cf24e --- /dev/null +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..03404f090 --- /dev/null +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23.cairo b/src/tests/nodes/greater_fp8x23.cairo new file mode 100644 index 000000000..e187524d0 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo new file mode 100644 index 000000000..9c6d968c1 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo new file mode 100644 index 000000000..973023ed5 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo new file mode 100644 index 000000000..275f357bf --- /dev/null +++ b/src/tests/nodes/greater_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast.cairo b/src/tests/nodes/greater_fp8x23_broadcast.cairo new file mode 100644 index 000000000..4c99a88ea --- /dev/null +++ b/src/tests/nodes/greater_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..ac784d111 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..fb94adec2 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..0cc7de207 --- /dev/null +++ b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32.cairo b/src/tests/nodes/greater_i32.cairo new file mode 100644 index 000000000..c754aae9f --- /dev/null +++ b/src/tests/nodes/greater_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo new file mode 100644 index 000000000..e13a83564 --- /dev/null +++ b/src/tests/nodes/greater_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo new file mode 100644 index 000000000..679b09655 --- /dev/null +++ b/src/tests/nodes/greater_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo new file mode 100644 index 000000000..fc2a80e83 --- /dev/null +++ b/src/tests/nodes/greater_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast.cairo b/src/tests/nodes/greater_i32_broadcast.cairo new file mode 100644 index 000000000..b27b7a1d9 --- /dev/null +++ b/src/tests/nodes/greater_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..a89883f85 --- /dev/null +++ b/src/tests/nodes/greater_i32_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..6cabdde08 --- /dev/null +++ b/src/tests/nodes/greater_i32_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..328774a25 --- /dev/null +++ b/src/tests/nodes/greater_i32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8.cairo b/src/tests/nodes/greater_i8.cairo new file mode 100644 index 000000000..cc6f1d298 --- /dev/null +++ b/src/tests/nodes/greater_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo new file mode 100644 index 000000000..5bf63e116 --- /dev/null +++ b/src/tests/nodes/greater_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo new file mode 100644 index 000000000..cc263f1d9 --- /dev/null +++ b/src/tests/nodes/greater_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo new file mode 100644 index 000000000..8df4f4ebf --- /dev/null +++ b/src/tests/nodes/greater_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast.cairo b/src/tests/nodes/greater_i8_broadcast.cairo new file mode 100644 index 000000000..1fa576230 --- /dev/null +++ b/src/tests/nodes/greater_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..d04b52ef1 --- /dev/null +++ b/src/tests/nodes/greater_i8_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..7b08376db --- /dev/null +++ b/src/tests/nodes/greater_i8_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..328774a25 --- /dev/null +++ b/src/tests/nodes/greater_i8_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32.cairo b/src/tests/nodes/greater_u32.cairo new file mode 100644 index 000000000..f0357234f --- /dev/null +++ b/src/tests/nodes/greater_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo new file mode 100644 index 000000000..fd617f80f --- /dev/null +++ b/src/tests/nodes/greater_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(5); + data.append(2); + data.append(0); + data.append(5); + data.append(4); + data.append(2); + data.append(3); + data.append(2); + data.append(3); + data.append(1); + data.append(0); + data.append(2); + data.append(5); + data.append(0); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(0); + data.append(3); + data.append(5); + data.append(3); + data.append(1); + data.append(3); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo new file mode 100644 index 000000000..daf06d0ec --- /dev/null +++ b/src/tests/nodes/greater_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(0); + data.append(5); + data.append(4); + data.append(4); + data.append(0); + data.append(0); + data.append(3); + data.append(5); + data.append(0); + data.append(3); + data.append(2); + data.append(3); + data.append(0); + data.append(2); + data.append(5); + data.append(5); + data.append(5); + data.append(0); + data.append(4); + data.append(2); + data.append(5); + data.append(5); + data.append(1); + data.append(0); + data.append(2); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo new file mode 100644 index 000000000..6ec7401a6 --- /dev/null +++ b/src/tests/nodes/greater_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast.cairo b/src/tests/nodes/greater_u32_broadcast.cairo new file mode 100644 index 000000000..14765b7aa --- /dev/null +++ b/src/tests/nodes/greater_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..e1e81a8b4 --- /dev/null +++ b/src/tests/nodes/greater_u32_broadcast/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(5); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..6dbc8d99b --- /dev/null +++ b/src/tests/nodes/greater_u32_broadcast/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..d9b9dedff --- /dev/null +++ b/src/tests/nodes/greater_u32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From bc9cfb7efd7e1c143d38ebb5f8e560d65c29f9c5 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:34:32 +0300 Subject: [PATCH 135/179] test leaky relu --- nodegen/node/leaky_relu.py | 66 ------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/leaky_relu_fp16x16.cairo | 20 ++++++ .../nodes/leaky_relu_fp16x16/input_0.cairo | 18 +++++ .../nodes/leaky_relu_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/leaky_relu_fp8x23.cairo | 20 ++++++ .../nodes/leaky_relu_fp8x23/input_0.cairo | 18 +++++ .../nodes/leaky_relu_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 66 deletions(-) create mode 100644 src/tests/nodes/leaky_relu_fp16x16.cairo create mode 100644 src/tests/nodes/leaky_relu_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/leaky_relu_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/leaky_relu_fp8x23.cairo create mode 100644 src/tests/nodes/leaky_relu_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/leaky_relu_fp8x23/output_0.cairo diff --git a/nodegen/node/leaky_relu.py b/nodegen/node/leaky_relu.py index d7420b2f0..a20704f3c 100644 --- a/nodegen/node/leaky_relu.py +++ b/nodegen/node/leaky_relu.py @@ -6,72 +6,6 @@ class Leaky_relu(RunAll): - @staticmethod - def leaky_relu_i32(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "leaky_relu_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false))", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "leaky_relu_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false))", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def leaky_relu_i8(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "leaky_relu_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false))", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "leaky_relu_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false))", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def leaky_relu_fp8x23(): diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 8820be17f..f7fa87e99 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -225,3 +225,5 @@ mod greater_i8; mod greater_i8_broadcast; mod greater_u32; mod greater_u32_broadcast; +mod leaky_relu_fp16x16; +mod leaky_relu_fp8x23; diff --git a/src/tests/nodes/leaky_relu_fp16x16.cairo b/src/tests/nodes/leaky_relu_fp16x16.cairo new file mode 100644 index 000000000..166df1924 --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_leaky_relu_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo new file mode 100644 index 000000000..59ff9a98d --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 401540, sign: false }); + data.append(FP16x16 { mag: 47813, sign: true }); + data.append(FP16x16 { mag: 206992, sign: false }); + data.append(FP16x16 { mag: 323041, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo new file mode 100644 index 000000000..4ee4947bc --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 401540, sign: false }); + data.append(FP16x16 { mag: 4781, sign: true }); + data.append(FP16x16 { mag: 206992, sign: false }); + data.append(FP16x16 { mag: 32304, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23.cairo b/src/tests/nodes/leaky_relu_fp8x23.cairo new file mode 100644 index 000000000..05110795c --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_leaky_relu_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo new file mode 100644 index 000000000..93effa14d --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 12477177, sign: false }); + data.append(FP8x23 { mag: 29017046, sign: false }); + data.append(FP8x23 { mag: 26929960, sign: true }); + data.append(FP8x23 { mag: 689284, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo new file mode 100644 index 000000000..da0ea5456 --- /dev/null +++ b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 12477178, sign: false }); + data.append(FP8x23 { mag: 29017046, sign: false }); + data.append(FP8x23 { mag: 2692996, sign: true }); + data.append(FP8x23 { mag: 689284, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 10867242c61358b8d8d20ac8e197276f64ec6ec1 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:36:19 +0300 Subject: [PATCH 136/179] test linear layer --- src/tests/nodes.cairo | 5 ++++ src/tests/nodes/linear_fp16x16.cairo | 24 +++++++++++++++++++ src/tests/nodes/linear_fp16x16/input_0.cairo | 16 +++++++++++++ src/tests/nodes/linear_fp16x16/input_1.cairo | 20 ++++++++++++++++ src/tests/nodes/linear_fp16x16/input_2.cairo | 15 ++++++++++++ src/tests/nodes/linear_fp16x16/output_0.cairo | 15 ++++++++++++ src/tests/nodes/linear_fp8x23.cairo | 24 +++++++++++++++++++ src/tests/nodes/linear_fp8x23/input_0.cairo | 16 +++++++++++++ src/tests/nodes/linear_fp8x23/input_1.cairo | 20 ++++++++++++++++ src/tests/nodes/linear_fp8x23/input_2.cairo | 15 ++++++++++++ src/tests/nodes/linear_fp8x23/output_0.cairo | 15 ++++++++++++ src/tests/nodes/linear_i32.cairo | 24 +++++++++++++++++++ src/tests/nodes/linear_i32/input_0.cairo | 15 ++++++++++++ src/tests/nodes/linear_i32/input_1.cairo | 19 +++++++++++++++ src/tests/nodes/linear_i32/input_2.cairo | 14 +++++++++++ src/tests/nodes/linear_i32/output_0.cairo | 14 +++++++++++ src/tests/nodes/linear_i8.cairo | 24 +++++++++++++++++++ src/tests/nodes/linear_i8/input_0.cairo | 15 ++++++++++++ src/tests/nodes/linear_i8/input_1.cairo | 19 +++++++++++++++ src/tests/nodes/linear_i8/input_2.cairo | 14 +++++++++++ src/tests/nodes/linear_i8/output_0.cairo | 14 +++++++++++ src/tests/nodes/linear_u32.cairo | 24 +++++++++++++++++++ src/tests/nodes/linear_u32/input_0.cairo | 14 +++++++++++ src/tests/nodes/linear_u32/input_1.cairo | 18 ++++++++++++++ src/tests/nodes/linear_u32/input_2.cairo | 13 ++++++++++ src/tests/nodes/linear_u32/output_0.cairo | 13 ++++++++++ 26 files changed, 439 insertions(+) create mode 100644 src/tests/nodes/linear_fp16x16.cairo create mode 100644 src/tests/nodes/linear_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/linear_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/linear_fp16x16/input_2.cairo create mode 100644 src/tests/nodes/linear_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/linear_fp8x23.cairo create mode 100644 src/tests/nodes/linear_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/linear_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/linear_fp8x23/input_2.cairo create mode 100644 src/tests/nodes/linear_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/linear_i32.cairo create mode 100644 src/tests/nodes/linear_i32/input_0.cairo create mode 100644 src/tests/nodes/linear_i32/input_1.cairo create mode 100644 src/tests/nodes/linear_i32/input_2.cairo create mode 100644 src/tests/nodes/linear_i32/output_0.cairo create mode 100644 src/tests/nodes/linear_i8.cairo create mode 100644 src/tests/nodes/linear_i8/input_0.cairo create mode 100644 src/tests/nodes/linear_i8/input_1.cairo create mode 100644 src/tests/nodes/linear_i8/input_2.cairo create mode 100644 src/tests/nodes/linear_i8/output_0.cairo create mode 100644 src/tests/nodes/linear_u32.cairo create mode 100644 src/tests/nodes/linear_u32/input_0.cairo create mode 100644 src/tests/nodes/linear_u32/input_1.cairo create mode 100644 src/tests/nodes/linear_u32/input_2.cairo create mode 100644 src/tests/nodes/linear_u32/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f7fa87e99..25d8e7bb5 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -227,3 +227,8 @@ mod greater_u32; mod greater_u32_broadcast; mod leaky_relu_fp16x16; mod leaky_relu_fp8x23; +mod linear_fp16x16; +mod linear_fp8x23; +mod linear_i32; +mod linear_i8; +mod linear_u32; diff --git a/src/tests/nodes/linear_fp16x16.cairo b/src/tests/nodes/linear_fp16x16.cairo new file mode 100644 index 000000000..6814a5879 --- /dev/null +++ b/src/tests/nodes/linear_fp16x16.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_linear_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = NNTrait::linear(input_0, input_1, input_2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo new file mode 100644 index 000000000..deb804047 --- /dev/null +++ b/src/tests/nodes/linear_fp16x16/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 57550, sign: false }); + data.append(FP16x16 { mag: 313427, sign: true }); + data.append(FP16x16 { mag: 31559, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo new file mode 100644 index 000000000..139b1e374 --- /dev/null +++ b/src/tests/nodes/linear_fp16x16/input_1.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 316249, sign: true }); + data.append(FP16x16 { mag: 223592, sign: true }); + data.append(FP16x16 { mag: 238282, sign: true }); + data.append(FP16x16 { mag: 452809, sign: false }); + data.append(FP16x16 { mag: 234567, sign: false }); + data.append(FP16x16 { mag: 135020, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo new file mode 100644 index 000000000..5b0cd4ce2 --- /dev/null +++ b/src/tests/nodes/linear_fp16x16/input_2.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 362925, sign: false }); + data.append(FP16x16 { mag: 184207, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo new file mode 100644 index 000000000..3563bee17 --- /dev/null +++ b/src/tests/nodes/linear_fp16x16/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 1039798, sign: false }); + data.append(FP16x16 { mag: 843374, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23.cairo b/src/tests/nodes/linear_fp8x23.cairo new file mode 100644 index 000000000..10914205a --- /dev/null +++ b/src/tests/nodes/linear_fp8x23.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_linear_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = NNTrait::linear(input_0, input_1, input_2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo new file mode 100644 index 000000000..76f1d5631 --- /dev/null +++ b/src/tests/nodes/linear_fp8x23/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 11919257, sign: false }); + data.append(FP8x23 { mag: 4840922, sign: false }); + data.append(FP8x23 { mag: 47921258, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo new file mode 100644 index 000000000..e7c115b6e --- /dev/null +++ b/src/tests/nodes/linear_fp8x23/input_1.cairo @@ -0,0 +1,20 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 52315818, sign: false }); + data.append(FP8x23 { mag: 2320148, sign: false }); + data.append(FP8x23 { mag: 22884193, sign: true }); + data.append(FP8x23 { mag: 21749272, sign: false }); + data.append(FP8x23 { mag: 29980322, sign: true }); + data.append(FP8x23 { mag: 34817611, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo new file mode 100644 index 000000000..df5d5093a --- /dev/null +++ b/src/tests/nodes/linear_fp8x23/input_2.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8723741, sign: false }); + data.append(FP8x23 { mag: 54398803, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo new file mode 100644 index 000000000..6075c78e7 --- /dev/null +++ b/src/tests/nodes/linear_fp8x23/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 46332113, sign: true }); + data.append(FP8x23 { mag: 130900238, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32.cairo b/src/tests/nodes/linear_i32.cairo new file mode 100644 index 000000000..47644ee5a --- /dev/null +++ b/src/tests/nodes/linear_i32.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I32NN; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_linear_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = NNTrait::linear(input_0, input_1, input_2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo new file mode 100644 index 000000000..ceac57bb9 --- /dev/null +++ b/src/tests/nodes/linear_i32/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo new file mode 100644 index 000000000..cd9b1a41a --- /dev/null +++ b/src/tests/nodes/linear_i32/input_1.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo new file mode 100644 index 000000000..b51f38563 --- /dev/null +++ b/src/tests/nodes/linear_i32/input_2.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 4, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo new file mode 100644 index 000000000..d22ac08d8 --- /dev/null +++ b/src/tests/nodes/linear_i32/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 36, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8.cairo b/src/tests/nodes/linear_i8.cairo new file mode 100644 index 000000000..906f4ede1 --- /dev/null +++ b/src/tests/nodes/linear_i8.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I8NN; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_linear_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = NNTrait::linear(input_0, input_1, input_2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo new file mode 100644 index 000000000..71ad2ee24 --- /dev/null +++ b/src/tests/nodes/linear_i8/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo new file mode 100644 index 000000000..1af283f23 --- /dev/null +++ b/src/tests/nodes/linear_i8/input_1.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo new file mode 100644 index 000000000..a64f62901 --- /dev/null +++ b/src/tests/nodes/linear_i8/input_2.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo new file mode 100644 index 000000000..a274958e0 --- /dev/null +++ b/src/tests/nodes/linear_i8/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32.cairo b/src/tests/nodes/linear_u32.cairo new file mode 100644 index 000000000..d0f695299 --- /dev/null +++ b/src/tests/nodes/linear_u32.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::U32NN; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_linear_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = NNTrait::linear(input_0, input_1, input_2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo new file mode 100644 index 000000000..1155cc0bc --- /dev/null +++ b/src/tests/nodes/linear_u32/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo new file mode 100644 index 000000000..4ed09b8c4 --- /dev/null +++ b/src/tests/nodes/linear_u32/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(4); + data.append(4); + data.append(4); + data.append(2); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo new file mode 100644 index 000000000..cb612d623 --- /dev/null +++ b/src/tests/nodes/linear_u32/input_2.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo new file mode 100644 index 000000000..7c2e0d428 --- /dev/null +++ b/src/tests/nodes/linear_u32/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(41); + data.append(11); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 101e749f4e688c69de1a3bd7732efe4ccc3f7e0d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:37:42 +0300 Subject: [PATCH 137/179] test log --- nodegen/node/log.py | 90 ---------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/log_fp16x16.cairo | 20 +++++ src/tests/nodes/log_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/log_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/log_fp8x23.cairo | 20 +++++ src/tests/nodes/log_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/log_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/log_fp16x16.cairo create mode 100644 src/tests/nodes/log_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/log_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/log_fp8x23.cairo create mode 100644 src/tests/nodes/log_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/log_fp8x23/output_0.cairo diff --git a/nodegen/node/log.py b/nodegen/node/log.py index e1aa32b46..0465dc95f 100644 --- a/nodegen/node/log.py +++ b/nodegen/node/log.py @@ -5,96 +5,6 @@ class Log(RunAll): - @staticmethod - def log_i32(): - - def fp8x23(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "log_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "log_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - fp8x23() - fp16x16() - - @staticmethod - def log_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.log(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "log_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "log_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - fp8x23() - fp16x16() - - @staticmethod - def log_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.log(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "log_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.log(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "log_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.log()", name) - - fp8x23() - fp16x16() - @staticmethod def log_fp8x23(): x = np.random.uniform(1, 127, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 25d8e7bb5..c61ceef72 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -232,3 +232,5 @@ mod linear_fp8x23; mod linear_i32; mod linear_i8; mod linear_u32; +mod log_fp16x16; +mod log_fp8x23; diff --git a/src/tests/nodes/log_fp16x16.cairo b/src/tests/nodes/log_fp16x16.cairo new file mode 100644 index 000000000..798670a05 --- /dev/null +++ b/src/tests/nodes/log_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_log_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.log(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo new file mode 100644 index 000000000..559a20755 --- /dev/null +++ b/src/tests/nodes/log_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 2469811, sign: false }); + data.append(FP16x16 { mag: 841664, sign: false }); + data.append(FP16x16 { mag: 6861780, sign: false }); + data.append(FP16x16 { mag: 3475757, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo new file mode 100644 index 000000000..3674d50ee --- /dev/null +++ b/src/tests/nodes/log_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 237849, sign: false }); + data.append(FP16x16 { mag: 167299, sign: false }); + data.append(FP16x16 { mag: 304815, sign: false }); + data.append(FP16x16 { mag: 260241, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23.cairo b/src/tests/nodes/log_fp8x23.cairo new file mode 100644 index 000000000..65a79077e --- /dev/null +++ b/src/tests/nodes/log_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_log_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.log(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo new file mode 100644 index 000000000..2be00adcd --- /dev/null +++ b/src/tests/nodes/log_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 193551844, sign: false }); + data.append(FP8x23 { mag: 202689108, sign: false }); + data.append(FP8x23 { mag: 535508695, sign: false }); + data.append(FP8x23 { mag: 235726980, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo new file mode 100644 index 000000000..0c8318b27 --- /dev/null +++ b/src/tests/nodes/log_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 26329079, sign: false }); + data.append(FP8x23 { mag: 26716028, sign: false }); + data.append(FP8x23 { mag: 34865928, sign: false }); + data.append(FP8x23 { mag: 27982715, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From f894c15926b98fe80de95b394cf3d1e54051151d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:38:32 +0300 Subject: [PATCH 138/179] test logsoftmax --- nodegen/node/logsoftmax.py | 183 +----------------- src/tests/nodes.cairo | 4 + .../nodes/logsoftmax_fp16x16_axis_0.cairo | 20 ++ .../logsoftmax_fp16x16_axis_0/input_0.cairo | 18 ++ .../logsoftmax_fp16x16_axis_0/output_0.cairo | 18 ++ .../nodes/logsoftmax_fp16x16_axis_1.cairo | 20 ++ .../logsoftmax_fp16x16_axis_1/input_0.cairo | 18 ++ .../logsoftmax_fp16x16_axis_1/output_0.cairo | 18 ++ .../nodes/logsoftmax_fp8x23_axis_0.cairo | 20 ++ .../logsoftmax_fp8x23_axis_0/input_0.cairo | 18 ++ .../logsoftmax_fp8x23_axis_0/output_0.cairo | 18 ++ .../nodes/logsoftmax_fp8x23_axis_1.cairo | 20 ++ .../logsoftmax_fp8x23_axis_1/input_0.cairo | 18 ++ .../logsoftmax_fp8x23_axis_1/output_0.cairo | 18 ++ 14 files changed, 232 insertions(+), 179 deletions(-) create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo create mode 100644 src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo diff --git a/nodegen/node/logsoftmax.py b/nodegen/node/logsoftmax.py index 4a5e56d68..af87e76ee 100644 --- a/nodegen/node/logsoftmax.py +++ b/nodegen/node/logsoftmax.py @@ -11,180 +11,7 @@ def logsoftmax(x: np.ndarray, axis: int = -1) -> np.ndarray: class Logsoftmax(RunAll): - def logsoftmax_i32(): - def fp8x23_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_i32_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_i32_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_i32_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_i32_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - - def logsoftmax_i8(): - def fp8x23_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_i8_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_i8_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_i8_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_i8_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - - def logsoftmax_u32(): - def fp8x23_axis_0(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_u32_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "logsoftmax_u32_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_u32_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "logsoftmax_u32_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - def logsoftmax_fp8x23(): def axis_0(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) @@ -198,7 +25,7 @@ def axis_0(): name = "logsoftmax_fp8x23_axis_0" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) + name, Trait.NN) def axis_1(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) @@ -212,7 +39,7 @@ def axis_1(): name = "logsoftmax_fp8x23_axis_1" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) + name, Trait.NN) axis_0() axis_1() @@ -230,7 +57,7 @@ def axis_0(): name = "logsoftmax_fp16x16_axis_0" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) + name, Trait.NN) def axis_1(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) @@ -244,9 +71,7 @@ def axis_1(): name = "logsoftmax_fp16x16_axis_1" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) + name, Trait.NN) axis_0() axis_1() - - diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index c61ceef72..f66edaea7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -234,3 +234,7 @@ mod linear_i8; mod linear_u32; mod log_fp16x16; mod log_fp8x23; +mod logsoftmax_fp16x16_axis_0; +mod logsoftmax_fp16x16_axis_1; +mod logsoftmax_fp8x23_axis_0; +mod logsoftmax_fp8x23_axis_1; diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo new file mode 100644 index 000000000..e0bb07e4d --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_logsoftmax_fp16x16_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::logsoftmax(@input_0, 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo new file mode 100644 index 000000000..74c447c63 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 174259, sign: false }); + data.append(FP16x16 { mag: 162527, sign: false }); + data.append(FP16x16 { mag: 121375, sign: false }); + data.append(FP16x16 { mag: 140007, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo new file mode 100644 index 000000000..ee95f26c8 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 24179, sign: true }); + data.append(FP16x16 { mag: 644, sign: true }); + data.append(FP16x16 { mag: 77063, sign: true }); + data.append(FP16x16 { mag: 303179, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo new file mode 100644 index 000000000..2c5076d76 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_logsoftmax_fp16x16_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::logsoftmax(@input_0, 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo new file mode 100644 index 000000000..4b561ef8c --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131507, sign: true }); + data.append(FP16x16 { mag: 114767, sign: true }); + data.append(FP16x16 { mag: 44400, sign: true }); + data.append(FP16x16 { mag: 107661, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo new file mode 100644 index 000000000..b5890e4de --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 54329, sign: true }); + data.append(FP16x16 { mag: 37588, sign: true }); + data.append(FP16x16 { mag: 158203, sign: true }); + data.append(FP16x16 { mag: 6141, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo new file mode 100644 index 000000000..d17151ee0 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_logsoftmax_fp8x23_axis_0() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::logsoftmax(@input_0, 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo new file mode 100644 index 000000000..09a55d417 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 13176366, sign: false }); + data.append(FP8x23 { mag: 22787205, sign: true }); + data.append(FP8x23 { mag: 3037628, sign: false }); + data.append(FP8x23 { mag: 15135492, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo new file mode 100644 index 000000000..a2f21ecad --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 2191868, sign: true }); + data.append(FP8x23 { mag: 10484172, sign: true }); + data.append(FP8x23 { mag: 12330606, sign: true }); + data.append(FP8x23 { mag: 2832460, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo new file mode 100644 index 000000000..170e93bbd --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_logsoftmax_fp8x23_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::logsoftmax(@input_0, 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo new file mode 100644 index 000000000..025a7cd96 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 14864085, sign: false }); + data.append(FP8x23 { mag: 748527, sign: false }); + data.append(FP8x23 { mag: 13216170, sign: false }); + data.append(FP8x23 { mag: 10738967, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo new file mode 100644 index 000000000..c6e156022 --- /dev/null +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 1430064, sign: true }); + data.append(FP8x23 { mag: 15545622, sign: true }); + data.append(FP8x23 { mag: 469121, sign: true }); + data.append(FP8x23 { mag: 24424260, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From f08f7f5b1197d891dcabfc09bc814db7026e88ba Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:39:11 +0300 Subject: [PATCH 139/179] test matmul --- src/tests/nodes.cairo | 20 +++++++++++++++++ src/tests/nodes/matmul_fp16x16_1d.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp16x16_1d/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_1d/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_1d/output_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_fp16x16_1x2.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp16x16_1x2/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_1x2/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_1x2/output_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_fp16x16_2x1.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp16x16_2x1/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_2x1/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp16x16_2x1/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/matmul_fp16x16_2x2.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp16x16_2x2/input_0.cairo | 18 +++++++++++++++ .../nodes/matmul_fp16x16_2x2/input_1.cairo | 18 +++++++++++++++ .../nodes/matmul_fp16x16_2x2/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/matmul_fp8x23_1d.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp8x23_1d/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_1d/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_1d/output_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_fp8x23_1x2.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp8x23_1x2/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_1x2/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_1x2/output_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_fp8x23_2x1.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp8x23_2x1/input_0.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_2x1/input_1.cairo | 16 ++++++++++++++ .../nodes/matmul_fp8x23_2x1/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/matmul_fp8x23_2x2.cairo | 22 +++++++++++++++++++ .../nodes/matmul_fp8x23_2x2/input_0.cairo | 18 +++++++++++++++ .../nodes/matmul_fp8x23_2x2/input_1.cairo | 18 +++++++++++++++ .../nodes/matmul_fp8x23_2x2/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/matmul_i32_1d.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i32_1d/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_1d/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_1d/output_0.cairo | 13 +++++++++++ src/tests/nodes/matmul_i32_1x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i32_1x2/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_1x2/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_1x2/output_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_i32_2x1.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i32_2x1/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_2x1/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i32_2x1/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i32_2x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i32_2x2/input_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i32_2x2/input_1.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i32_2x2/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i8_1d.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i8_1d/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_1d/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_1d/output_0.cairo | 13 +++++++++++ src/tests/nodes/matmul_i8_1x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i8_1x2/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_1x2/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_1x2/output_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_i8_2x1.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i8_2x1/input_0.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_2x1/input_1.cairo | 15 +++++++++++++ src/tests/nodes/matmul_i8_2x1/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i8_2x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_i8_2x2/input_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i8_2x2/input_1.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_i8_2x2/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/matmul_u32_1d.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_u32_1d/input_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_1d/input_1.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_1d/output_0.cairo | 12 ++++++++++ src/tests/nodes/matmul_u32_1x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_u32_1x2/input_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_1x2/input_1.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_1x2/output_0.cairo | 13 +++++++++++ src/tests/nodes/matmul_u32_2x1.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_u32_2x1/input_0.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_2x1/input_1.cairo | 14 ++++++++++++ src/tests/nodes/matmul_u32_2x1/output_0.cairo | 16 ++++++++++++++ src/tests/nodes/matmul_u32_2x2.cairo | 22 +++++++++++++++++++ src/tests/nodes/matmul_u32_2x2/input_0.cairo | 16 ++++++++++++++ src/tests/nodes/matmul_u32_2x2/input_1.cairo | 16 ++++++++++++++ src/tests/nodes/matmul_u32_2x2/output_0.cairo | 16 ++++++++++++++ 81 files changed, 1397 insertions(+) create mode 100644 src/tests/nodes/matmul_fp16x16_1d.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1d/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1d/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1d/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1x2.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x1.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x2.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1d.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1d/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1d/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1d/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1x2.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x1.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x2.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_i32_1d.cairo create mode 100644 src/tests/nodes/matmul_i32_1d/input_0.cairo create mode 100644 src/tests/nodes/matmul_i32_1d/input_1.cairo create mode 100644 src/tests/nodes/matmul_i32_1d/output_0.cairo create mode 100644 src/tests/nodes/matmul_i32_1x2.cairo create mode 100644 src/tests/nodes/matmul_i32_1x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_i32_1x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_i32_1x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_i32_2x1.cairo create mode 100644 src/tests/nodes/matmul_i32_2x1/input_0.cairo create mode 100644 src/tests/nodes/matmul_i32_2x1/input_1.cairo create mode 100644 src/tests/nodes/matmul_i32_2x1/output_0.cairo create mode 100644 src/tests/nodes/matmul_i32_2x2.cairo create mode 100644 src/tests/nodes/matmul_i32_2x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_i32_2x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_i32_2x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_i8_1d.cairo create mode 100644 src/tests/nodes/matmul_i8_1d/input_0.cairo create mode 100644 src/tests/nodes/matmul_i8_1d/input_1.cairo create mode 100644 src/tests/nodes/matmul_i8_1d/output_0.cairo create mode 100644 src/tests/nodes/matmul_i8_1x2.cairo create mode 100644 src/tests/nodes/matmul_i8_1x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_i8_1x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_i8_1x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_i8_2x1.cairo create mode 100644 src/tests/nodes/matmul_i8_2x1/input_0.cairo create mode 100644 src/tests/nodes/matmul_i8_2x1/input_1.cairo create mode 100644 src/tests/nodes/matmul_i8_2x1/output_0.cairo create mode 100644 src/tests/nodes/matmul_i8_2x2.cairo create mode 100644 src/tests/nodes/matmul_i8_2x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_i8_2x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_i8_2x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_u32_1d.cairo create mode 100644 src/tests/nodes/matmul_u32_1d/input_0.cairo create mode 100644 src/tests/nodes/matmul_u32_1d/input_1.cairo create mode 100644 src/tests/nodes/matmul_u32_1d/output_0.cairo create mode 100644 src/tests/nodes/matmul_u32_1x2.cairo create mode 100644 src/tests/nodes/matmul_u32_1x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_u32_1x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_u32_1x2/output_0.cairo create mode 100644 src/tests/nodes/matmul_u32_2x1.cairo create mode 100644 src/tests/nodes/matmul_u32_2x1/input_0.cairo create mode 100644 src/tests/nodes/matmul_u32_2x1/input_1.cairo create mode 100644 src/tests/nodes/matmul_u32_2x1/output_0.cairo create mode 100644 src/tests/nodes/matmul_u32_2x2.cairo create mode 100644 src/tests/nodes/matmul_u32_2x2/input_0.cairo create mode 100644 src/tests/nodes/matmul_u32_2x2/input_1.cairo create mode 100644 src/tests/nodes/matmul_u32_2x2/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f66edaea7..990412659 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -238,3 +238,23 @@ mod logsoftmax_fp16x16_axis_0; mod logsoftmax_fp16x16_axis_1; mod logsoftmax_fp8x23_axis_0; mod logsoftmax_fp8x23_axis_1; +mod matmul_fp16x16_1d; +mod matmul_fp16x16_2x2; +mod matmul_fp16x16_2x1; +mod matmul_fp16x16_1x2; +mod matmul_fp8x23_1d; +mod matmul_fp8x23_2x2; +mod matmul_fp8x23_2x1; +mod matmul_fp8x23_1x2; +mod matmul_i32_1d; +mod matmul_i32_2x2; +mod matmul_i32_2x1; +mod matmul_i32_1x2; +mod matmul_i8_1d; +mod matmul_i8_2x2; +mod matmul_i8_2x1; +mod matmul_i8_1x2; +mod matmul_u32_1d; +mod matmul_u32_2x2; +mod matmul_u32_2x1; +mod matmul_u32_1x2; diff --git a/src/tests/nodes/matmul_fp16x16_1d.cairo b/src/tests/nodes/matmul_fp16x16_1d.cairo new file mode 100644 index 000000000..8556790f4 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp16x16_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo new file mode 100644 index 000000000..a0c78663c --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo new file mode 100644 index 000000000..1419b7daa --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo new file mode 100644 index 000000000..3ce41e725 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2.cairo b/src/tests/nodes/matmul_fp16x16_1x2.cairo new file mode 100644 index 000000000..339b9b8ae --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp16x16_1x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo new file mode 100644 index 000000000..b98069ece --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo new file mode 100644 index 000000000..4c0f897cb --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo new file mode 100644 index 000000000..83656aa97 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1.cairo b/src/tests/nodes/matmul_fp16x16_2x1.cairo new file mode 100644 index 000000000..c1c383260 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp16x16_2x1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo new file mode 100644 index 000000000..7d22f7d54 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo new file mode 100644 index 000000000..d75464bd3 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo new file mode 100644 index 000000000..426f51bc1 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2.cairo b/src/tests/nodes/matmul_fp16x16_2x2.cairo new file mode 100644 index 000000000..2d4985e5a --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp16x16_2x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo new file mode 100644 index 000000000..c6205f8dd --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo new file mode 100644 index 000000000..02910be0e --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo new file mode 100644 index 000000000..c72087538 --- /dev/null +++ b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d.cairo b/src/tests/nodes/matmul_fp8x23_1d.cairo new file mode 100644 index 000000000..ba112de69 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp8x23_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo new file mode 100644 index 000000000..3f614c0af --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo new file mode 100644 index 000000000..15375e10e --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo new file mode 100644 index 000000000..e5f232990 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 100663296, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2.cairo b/src/tests/nodes/matmul_fp8x23_1x2.cairo new file mode 100644 index 000000000..c2ff4a6b1 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp8x23_1x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo new file mode 100644 index 000000000..d971c4d64 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo new file mode 100644 index 000000000..650ca9d78 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo new file mode 100644 index 000000000..b9c97f2fe --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 75497472, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1.cairo b/src/tests/nodes/matmul_fp8x23_2x1.cairo new file mode 100644 index 000000000..1d675ede9 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp8x23_2x1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo new file mode 100644 index 000000000..d7410502c --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo new file mode 100644 index 000000000..cc394e291 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo new file mode 100644 index 000000000..ced97c1f4 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2.cairo b/src/tests/nodes/matmul_fp8x23_2x2.cairo new file mode 100644 index 000000000..d990a05e5 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_fp8x23_2x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo new file mode 100644 index 000000000..fa1873060 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo new file mode 100644 index 000000000..d9c90cdad --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo new file mode 100644 index 000000000..b7896ce63 --- /dev/null +++ b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d.cairo b/src/tests/nodes/matmul_i32_1d.cairo new file mode 100644 index 000000000..954e022b4 --- /dev/null +++ b/src/tests/nodes/matmul_i32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo new file mode 100644 index 000000000..550f589d1 --- /dev/null +++ b/src/tests/nodes/matmul_i32_1d/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 37, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo new file mode 100644 index 000000000..29dbdaed4 --- /dev/null +++ b/src/tests/nodes/matmul_i32_1d/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 59, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo new file mode 100644 index 000000000..def32662a --- /dev/null +++ b/src/tests/nodes/matmul_i32_1d/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 681, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2.cairo b/src/tests/nodes/matmul_i32_1x2.cairo new file mode 100644 index 000000000..4be4880f0 --- /dev/null +++ b/src/tests/nodes/matmul_i32_1x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i32_1x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo new file mode 100644 index 000000000..a734c416d --- /dev/null +++ b/src/tests/nodes/matmul_i32_1x2/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 36, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo new file mode 100644 index 000000000..65bc44676 --- /dev/null +++ b/src/tests/nodes/matmul_i32_1x2/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 84, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo new file mode 100644 index 000000000..37731af6b --- /dev/null +++ b/src/tests/nodes/matmul_i32_1x2/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1524, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1.cairo b/src/tests/nodes/matmul_i32_2x1.cairo new file mode 100644 index 000000000..acc587c1c --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i32_2x1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo new file mode 100644 index 000000000..3b07896d4 --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x1/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 37, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo new file mode 100644 index 000000000..bc5c5431e --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x1/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 106, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo new file mode 100644 index 000000000..f932c0e37 --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x1/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 5876, sign: true }); + data.append(i32 { mag: 5512, sign: false }); + data.append(i32 { mag: 4181, sign: true }); + data.append(i32 { mag: 3922, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2.cairo b/src/tests/nodes/matmul_i32_2x2.cairo new file mode 100644 index 000000000..19aa4c19b --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i32_2x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo new file mode 100644 index 000000000..3159fa0d6 --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x2/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo new file mode 100644 index 000000000..133eb9025 --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x2/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 22, sign: true }); + data.append(i32 { mag: 71, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo new file mode 100644 index 000000000..03ebfea85 --- /dev/null +++ b/src/tests/nodes/matmul_i32_2x2/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 5136, sign: true }); + data.append(i32 { mag: 15456, sign: false }); + data.append(i32 { mag: 3518, sign: true }); + data.append(i32 { mag: 10483, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d.cairo b/src/tests/nodes/matmul_i8_1d.cairo new file mode 100644 index 000000000..1ff75eba2 --- /dev/null +++ b/src/tests/nodes/matmul_i8_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i8_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo new file mode 100644 index 000000000..9a84e6554 --- /dev/null +++ b/src/tests/nodes/matmul_i8_1d/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo new file mode 100644 index 000000000..4a8d022fd --- /dev/null +++ b/src/tests/nodes/matmul_i8_1d/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo new file mode 100644 index 000000000..4f87aadd1 --- /dev/null +++ b/src/tests/nodes/matmul_i8_1d/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 14, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2.cairo b/src/tests/nodes/matmul_i8_1x2.cairo new file mode 100644 index 000000000..644709321 --- /dev/null +++ b/src/tests/nodes/matmul_i8_1x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i8_1x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo new file mode 100644 index 000000000..c31d9d71c --- /dev/null +++ b/src/tests/nodes/matmul_i8_1x2/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo new file mode 100644 index 000000000..5a58f617e --- /dev/null +++ b/src/tests/nodes/matmul_i8_1x2/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo new file mode 100644 index 000000000..93c06ad93 --- /dev/null +++ b/src/tests/nodes/matmul_i8_1x2/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1.cairo b/src/tests/nodes/matmul_i8_2x1.cairo new file mode 100644 index 000000000..9bc6aa743 --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i8_2x1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo new file mode 100644 index 000000000..909aa526b --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x1/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo new file mode 100644 index 000000000..669f471e6 --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x1/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo new file mode 100644 index 000000000..efb300e6a --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x1/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 9, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2.cairo b/src/tests/nodes/matmul_i8_2x2.cairo new file mode 100644 index 000000000..5b2a18259 --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_i8_2x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo new file mode 100644 index 000000000..84f324f02 --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x2/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo new file mode 100644 index 000000000..6282b84be --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x2/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo new file mode 100644 index 000000000..761ce0efe --- /dev/null +++ b/src/tests/nodes/matmul_i8_2x2/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d.cairo b/src/tests/nodes/matmul_u32_1d.cairo new file mode 100644 index 000000000..4da598379 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_u32_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo new file mode 100644 index 000000000..603829563 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1d/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(160); + data.append(50); + data.append(195); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo new file mode 100644 index 000000000..001202e79 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1d/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(15); + data.append(90); + data.append(53); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo new file mode 100644 index 000000000..c835ea3ec --- /dev/null +++ b/src/tests/nodes/matmul_u32_1d/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(17235); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2.cairo b/src/tests/nodes/matmul_u32_1x2.cairo new file mode 100644 index 000000000..7dd094095 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_u32_1x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo new file mode 100644 index 000000000..ddc6791d4 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1x2/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(38); + data.append(186); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo new file mode 100644 index 000000000..ddff242e0 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1x2/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(192); + data.append(48); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo new file mode 100644 index 000000000..fae32e724 --- /dev/null +++ b/src/tests/nodes/matmul_u32_1x2/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(16224); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1.cairo b/src/tests/nodes/matmul_u32_2x1.cairo new file mode 100644 index 000000000..b2d62cf9e --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_u32_2x1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo new file mode 100644 index 000000000..27ee8eff4 --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x1/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(36); + data.append(127); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo new file mode 100644 index 000000000..596735161 --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x1/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(184); + data.append(114); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo new file mode 100644 index 000000000..d560be99c --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x1/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(6624); + data.append(4104); + data.append(23368); + data.append(14478); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2.cairo b/src/tests/nodes/matmul_u32_2x2.cairo new file mode 100644 index 000000000..7844925c9 --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_matmul_u32_2x2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.matmul(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo new file mode 100644 index 000000000..c111fcee5 --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x2/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(66); + data.append(225); + data.append(132); + data.append(40); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo new file mode 100644 index 000000000..e5f03537d --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x2/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(153); + data.append(79); + data.append(80); + data.append(131); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo new file mode 100644 index 000000000..22387ec0e --- /dev/null +++ b/src/tests/nodes/matmul_u32_2x2/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(28098); + data.append(34689); + data.append(23396); + data.append(15668); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 6b6cc1989e15355fc4e89c64ab4720bfb07afcb8 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:46:18 +0300 Subject: [PATCH 140/179] test tensor mul --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/mul_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/mul_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp16x16/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp16x16/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp16x16_broadcast.cairo | 22 ++++++++++ .../nodes/mul_fp16x16_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../nodes/mul_fp16x16_broadcast/input_1.cairo | 18 ++++++++ .../mul_fp16x16_broadcast/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/mul_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp8x23/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/mul_fp8x23_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../nodes/mul_fp8x23_broadcast/input_1.cairo | 18 ++++++++ .../nodes/mul_fp8x23_broadcast/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/mul_i32.cairo | 22 ++++++++++ src/tests/nodes/mul_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i32/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i32_broadcast.cairo | 22 ++++++++++ .../nodes/mul_i32_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/mul_i32_broadcast/input_1.cairo | 17 ++++++++ .../nodes/mul_i32_broadcast/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i8.cairo | 22 ++++++++++ src/tests/nodes/mul_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i8/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_i8_broadcast.cairo | 22 ++++++++++ .../nodes/mul_i8_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/mul_i8_broadcast/input_1.cairo | 17 ++++++++ .../nodes/mul_i8_broadcast/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/mul_u32.cairo | 22 ++++++++++ src/tests/nodes/mul_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/mul_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/mul_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/mul_u32_broadcast.cairo | 22 ++++++++++ .../nodes/mul_u32_broadcast/input_0.cairo | 40 ++++++++++++++++++ .../nodes/mul_u32_broadcast/input_1.cairo | 16 +++++++ .../nodes/mul_u32_broadcast/output_0.cairo | 40 ++++++++++++++++++ 41 files changed, 1346 insertions(+) create mode 100644 src/tests/nodes/mul_fp16x16.cairo create mode 100644 src/tests/nodes/mul_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/mul_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/mul_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/mul_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/mul_fp8x23.cairo create mode 100644 src/tests/nodes/mul_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/mul_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/mul_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/mul_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/mul_i32.cairo create mode 100644 src/tests/nodes/mul_i32/input_0.cairo create mode 100644 src/tests/nodes/mul_i32/input_1.cairo create mode 100644 src/tests/nodes/mul_i32/output_0.cairo create mode 100644 src/tests/nodes/mul_i32_broadcast.cairo create mode 100644 src/tests/nodes/mul_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/mul_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/mul_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/mul_i8.cairo create mode 100644 src/tests/nodes/mul_i8/input_0.cairo create mode 100644 src/tests/nodes/mul_i8/input_1.cairo create mode 100644 src/tests/nodes/mul_i8/output_0.cairo create mode 100644 src/tests/nodes/mul_i8_broadcast.cairo create mode 100644 src/tests/nodes/mul_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/mul_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/mul_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/mul_u32.cairo create mode 100644 src/tests/nodes/mul_u32/input_0.cairo create mode 100644 src/tests/nodes/mul_u32/input_1.cairo create mode 100644 src/tests/nodes/mul_u32/output_0.cairo create mode 100644 src/tests/nodes/mul_u32_broadcast.cairo create mode 100644 src/tests/nodes/mul_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/mul_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/mul_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 990412659..84fc40d55 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -258,3 +258,13 @@ mod matmul_u32_1d; mod matmul_u32_2x2; mod matmul_u32_2x1; mod matmul_u32_1x2; +mod mul_fp16x16; +mod mul_fp16x16_broadcast; +mod mul_fp8x23; +mod mul_fp8x23_broadcast; +mod mul_i32; +mod mul_i32_broadcast; +mod mul_i8; +mod mul_i8_broadcast; +mod mul_u32; +mod mul_u32_broadcast; diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo new file mode 100644 index 000000000..e26469d88 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorMul}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo new file mode 100644 index 000000000..29b710982 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo new file mode 100644 index 000000000..3acdc42ef --- /dev/null +++ b/src/tests/nodes/mul_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo new file mode 100644 index 000000000..2ec6ffe99 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo new file mode 100644 index 000000000..d9f38748a --- /dev/null +++ b/src/tests/nodes/mul_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorMul}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..93dbbd041 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..5b763c577 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..b9342b356 --- /dev/null +++ b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo new file mode 100644 index 000000000..6ecda8831 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo new file mode 100644 index 000000000..d16f9ae2e --- /dev/null +++ b/src/tests/nodes/mul_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo new file mode 100644 index 000000000..71a2d5dc8 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo new file mode 100644 index 000000000..ef187d640 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo new file mode 100644 index 000000000..3563976f8 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..dfeaae98c --- /dev/null +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..4036513c3 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..4fa551de1 --- /dev/null +++ b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32.cairo b/src/tests/nodes/mul_i32.cairo new file mode 100644 index 000000000..828c656bf --- /dev/null +++ b/src/tests/nodes/mul_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorMul}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo new file mode 100644 index 000000000..d82e4567f --- /dev/null +++ b/src/tests/nodes/mul_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo new file mode 100644 index 000000000..97b3e3793 --- /dev/null +++ b/src/tests/nodes/mul_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo new file mode 100644 index 000000000..a04e7dcce --- /dev/null +++ b/src/tests/nodes/mul_i32/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast.cairo b/src/tests/nodes/mul_i32_broadcast.cairo new file mode 100644 index 000000000..35117cdaa --- /dev/null +++ b/src/tests/nodes/mul_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorMul}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..1cce6509d --- /dev/null +++ b/src/tests/nodes/mul_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..e7738c230 --- /dev/null +++ b/src/tests/nodes/mul_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..7138bb7db --- /dev/null +++ b/src/tests/nodes/mul_i32_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8.cairo b/src/tests/nodes/mul_i8.cairo new file mode 100644 index 000000000..fcb1a7ffc --- /dev/null +++ b/src/tests/nodes/mul_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorMul}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo new file mode 100644 index 000000000..a1f2950b1 --- /dev/null +++ b/src/tests/nodes/mul_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo new file mode 100644 index 000000000..a4e345464 --- /dev/null +++ b/src/tests/nodes/mul_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo new file mode 100644 index 000000000..1149304bd --- /dev/null +++ b/src/tests/nodes/mul_i8/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 6, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast.cairo b/src/tests/nodes/mul_i8_broadcast.cairo new file mode 100644 index 000000000..e5ef399f7 --- /dev/null +++ b/src/tests/nodes/mul_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorMul}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..17e506970 --- /dev/null +++ b/src/tests/nodes/mul_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..b74cceb18 --- /dev/null +++ b/src/tests/nodes/mul_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..e37f31db4 --- /dev/null +++ b/src/tests/nodes/mul_i8_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32.cairo b/src/tests/nodes/mul_u32.cairo new file mode 100644 index 000000000..49e04c6f8 --- /dev/null +++ b/src/tests/nodes/mul_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorMul}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo new file mode 100644 index 000000000..096393361 --- /dev/null +++ b/src/tests/nodes/mul_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(4); + data.append(3); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(4); + data.append(4); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(4); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo new file mode 100644 index 000000000..96ec7e32c --- /dev/null +++ b/src/tests/nodes/mul_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(1); + data.append(2); + data.append(0); + data.append(2); + data.append(0); + data.append(0); + data.append(0); + data.append(2); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(2); + data.append(2); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo new file mode 100644 index 000000000..f7dda0e5c --- /dev/null +++ b/src/tests/nodes/mul_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(0); + data.append(0); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(8); + data.append(4); + data.append(8); + data.append(0); + data.append(10); + data.append(0); + data.append(0); + data.append(0); + data.append(8); + data.append(3); + data.append(0); + data.append(0); + data.append(4); + data.append(6); + data.append(6); + data.append(0); + data.append(0); + data.append(3); + data.append(0); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast.cairo b/src/tests/nodes/mul_u32_broadcast.cairo new file mode 100644 index 000000000..6dc5876ef --- /dev/null +++ b/src/tests/nodes/mul_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorMul}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_mul_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 * input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..9adb47531 --- /dev/null +++ b/src/tests/nodes/mul_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(4); + data.append(3); + data.append(5); + data.append(5); + data.append(3); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(3); + data.append(5); + data.append(3); + data.append(4); + data.append(4); + data.append(5); + data.append(4); + data.append(5); + data.append(3); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..79e305aa6 --- /dev/null +++ b/src/tests/nodes/mul_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..18abad1e2 --- /dev/null +++ b/src/tests/nodes/mul_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(4); + data.append(3); + data.append(0); + data.append(0); + data.append(0); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(5); + data.append(4); + data.append(0); + data.append(0); + data.append(0); + data.append(3); + data.append(5); + data.append(3); + data.append(4); + data.append(4); + data.append(5); + data.append(0); + data.append(0); + data.append(0); + data.append(3); + data.append(4); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 4f84da24333e09ae0d58c2d38bc11e67749f7466 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:47:27 +0300 Subject: [PATCH 141/179] test tensor or --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/or_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/or_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/or_fp16x16/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/or_fp16x16/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_fp16x16_broadcast.cairo | 22 ++++++++++ .../nodes/or_fp16x16_broadcast/input_0.cairo | 18 ++++++++ .../nodes/or_fp16x16_broadcast/input_1.cairo | 16 +++++++ .../nodes/or_fp16x16_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/or_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/or_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/or_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/or_fp8x23/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/or_fp8x23_broadcast/input_0.cairo | 18 ++++++++ .../nodes/or_fp8x23_broadcast/input_1.cairo | 16 +++++++ .../nodes/or_fp8x23_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/or_i32.cairo | 22 ++++++++++ src/tests/nodes/or_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/or_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/or_i32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_i32_broadcast.cairo | 22 ++++++++++ .../nodes/or_i32_broadcast/input_0.cairo | 17 ++++++++ .../nodes/or_i32_broadcast/input_1.cairo | 15 +++++++ .../nodes/or_i32_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/or_i8.cairo | 22 ++++++++++ src/tests/nodes/or_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/or_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/or_i8/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_i8_broadcast.cairo | 22 ++++++++++ src/tests/nodes/or_i8_broadcast/input_0.cairo | 17 ++++++++ src/tests/nodes/or_i8_broadcast/input_1.cairo | 15 +++++++ .../nodes/or_i8_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/or_u32.cairo | 22 ++++++++++ src/tests/nodes/or_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/or_u32_broadcast.cairo | 22 ++++++++++ .../nodes/or_u32_broadcast/input_0.cairo | 16 +++++++ .../nodes/or_u32_broadcast/input_1.cairo | 14 +++++++ .../nodes/or_u32_broadcast/output_0.cairo | 16 +++++++ 41 files changed, 1084 insertions(+) create mode 100644 src/tests/nodes/or_fp16x16.cairo create mode 100644 src/tests/nodes/or_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/or_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/or_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/or_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/or_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/or_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/or_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/or_fp8x23.cairo create mode 100644 src/tests/nodes/or_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/or_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/or_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/or_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/or_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/or_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/or_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/or_i32.cairo create mode 100644 src/tests/nodes/or_i32/input_0.cairo create mode 100644 src/tests/nodes/or_i32/input_1.cairo create mode 100644 src/tests/nodes/or_i32/output_0.cairo create mode 100644 src/tests/nodes/or_i32_broadcast.cairo create mode 100644 src/tests/nodes/or_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/or_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/or_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/or_i8.cairo create mode 100644 src/tests/nodes/or_i8/input_0.cairo create mode 100644 src/tests/nodes/or_i8/input_1.cairo create mode 100644 src/tests/nodes/or_i8/output_0.cairo create mode 100644 src/tests/nodes/or_i8_broadcast.cairo create mode 100644 src/tests/nodes/or_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/or_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/or_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/or_u32.cairo create mode 100644 src/tests/nodes/or_u32/input_0.cairo create mode 100644 src/tests/nodes/or_u32/input_1.cairo create mode 100644 src/tests/nodes/or_u32/output_0.cairo create mode 100644 src/tests/nodes/or_u32_broadcast.cairo create mode 100644 src/tests/nodes/or_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/or_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/or_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 84fc40d55..7b67b23b7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -268,3 +268,13 @@ mod mul_i8; mod mul_i8_broadcast; mod mul_u32; mod mul_u32_broadcast; +mod or_fp16x16; +mod or_fp16x16_broadcast; +mod or_fp8x23; +mod or_fp8x23_broadcast; +mod or_i32; +mod or_i32_broadcast; +mod or_i8; +mod or_i8_broadcast; +mod or_u32; +mod or_u32_broadcast; diff --git a/src/tests/nodes/or_fp16x16.cairo b/src/tests/nodes/or_fp16x16.cairo new file mode 100644 index 000000000..1ef45573f --- /dev/null +++ b/src/tests/nodes/or_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo new file mode 100644 index 000000000..82efc46fe --- /dev/null +++ b/src/tests/nodes/or_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo new file mode 100644 index 000000000..5306fa505 --- /dev/null +++ b/src/tests/nodes/or_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo new file mode 100644 index 000000000..9488b9f2c --- /dev/null +++ b/src/tests/nodes/or_fp16x16/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast.cairo b/src/tests/nodes/or_fp16x16_broadcast.cairo new file mode 100644 index 000000000..5b4a8fa08 --- /dev/null +++ b/src/tests/nodes/or_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..d01c26c92 --- /dev/null +++ b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..de7a027d1 --- /dev/null +++ b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23.cairo b/src/tests/nodes/or_fp8x23.cairo new file mode 100644 index 000000000..72c52ab7c --- /dev/null +++ b/src/tests/nodes/or_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo new file mode 100644 index 000000000..62574451b --- /dev/null +++ b/src/tests/nodes/or_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo new file mode 100644 index 000000000..d19cd31ed --- /dev/null +++ b/src/tests/nodes/or_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo new file mode 100644 index 000000000..b7502f775 --- /dev/null +++ b/src/tests/nodes/or_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast.cairo b/src/tests/nodes/or_fp8x23_broadcast.cairo new file mode 100644 index 000000000..daac2dc16 --- /dev/null +++ b/src/tests/nodes/or_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..1e59e0e2a --- /dev/null +++ b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..de3f273e4 --- /dev/null +++ b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32.cairo b/src/tests/nodes/or_i32.cairo new file mode 100644 index 000000000..41df5095b --- /dev/null +++ b/src/tests/nodes/or_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo new file mode 100644 index 000000000..e96fc7237 --- /dev/null +++ b/src/tests/nodes/or_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo new file mode 100644 index 000000000..5e59ae979 --- /dev/null +++ b/src/tests/nodes/or_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo new file mode 100644 index 000000000..9d23207fe --- /dev/null +++ b/src/tests/nodes/or_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast.cairo b/src/tests/nodes/or_i32_broadcast.cairo new file mode 100644 index 000000000..ca81beb48 --- /dev/null +++ b/src/tests/nodes/or_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..d5e991eb5 --- /dev/null +++ b/src/tests/nodes/or_i32_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..6cabdde08 --- /dev/null +++ b/src/tests/nodes/or_i32_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/or_i32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8.cairo b/src/tests/nodes/or_i8.cairo new file mode 100644 index 000000000..3356d32bd --- /dev/null +++ b/src/tests/nodes/or_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo new file mode 100644 index 000000000..54b63018a --- /dev/null +++ b/src/tests/nodes/or_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo new file mode 100644 index 000000000..cc9e3dcbd --- /dev/null +++ b/src/tests/nodes/or_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo new file mode 100644 index 000000000..34fdfc282 --- /dev/null +++ b/src/tests/nodes/or_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast.cairo b/src/tests/nodes/or_i8_broadcast.cairo new file mode 100644 index 000000000..601195f02 --- /dev/null +++ b/src/tests/nodes/or_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..cfe284cbc --- /dev/null +++ b/src/tests/nodes/or_i8_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..5ee26bf38 --- /dev/null +++ b/src/tests/nodes/or_i8_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/or_i8_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32.cairo b/src/tests/nodes/or_u32.cairo new file mode 100644 index 000000000..b0a917866 --- /dev/null +++ b/src/tests/nodes/or_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo new file mode 100644 index 000000000..3b8265911 --- /dev/null +++ b/src/tests/nodes/or_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(2); + data.append(3); + data.append(0); + data.append(4); + data.append(1); + data.append(4); + data.append(2); + data.append(3); + data.append(2); + data.append(1); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(0); + data.append(4); + data.append(1); + data.append(1); + data.append(4); + data.append(1); + data.append(1); + data.append(4); + data.append(4); + data.append(2); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo new file mode 100644 index 000000000..186273e14 --- /dev/null +++ b/src/tests/nodes/or_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(3); + data.append(5); + data.append(1); + data.append(0); + data.append(5); + data.append(2); + data.append(2); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + data.append(0); + data.append(1); + data.append(3); + data.append(1); + data.append(3); + data.append(2); + data.append(0); + data.append(4); + data.append(2); + data.append(0); + data.append(1); + data.append(1); + data.append(2); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo new file mode 100644 index 000000000..7be1706b0 --- /dev/null +++ b/src/tests/nodes/or_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast.cairo b/src/tests/nodes/or_u32_broadcast.cairo new file mode 100644 index 000000000..3071c3b0a --- /dev/null +++ b/src/tests/nodes/or_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_or_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.or(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..603917619 --- /dev/null +++ b/src/tests/nodes/or_u32_broadcast/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(4); + data.append(4); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..08160469e --- /dev/null +++ b/src/tests/nodes/or_u32_broadcast/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/or_u32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 34176691d89e34a1cb0e91c706b6896f91319596 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:48:18 +0300 Subject: [PATCH 142/179] test reduce_sum --- src/tests/nodes.cairo | 20 +++++++++++++++++++ src/tests/nodes/reduce_sum_fp16x16_1D.cairo | 20 +++++++++++++++++++ .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 16 +++++++++++++++ .../reduce_sum_fp16x16_1D/output_0.cairo | 14 +++++++++++++ .../nodes/reduce_sum_fp16x16_2D_axis_1.cairo | 20 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_fp16x16_2D_default.cairo | 20 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 15 ++++++++++++++ .../reduce_sum_fp16x16_2D_keepdims.cairo | 20 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 16 +++++++++++++++ src/tests/nodes/reduce_sum_fp8x23_1D.cairo | 20 +++++++++++++++++++ .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 16 +++++++++++++++ .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 14 +++++++++++++ .../nodes/reduce_sum_fp8x23_2D_axis_1.cairo | 20 +++++++++++++++++++ .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_fp8x23_2D_default.cairo | 20 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_fp8x23_2D_keepdims.cairo | 20 +++++++++++++++++++ .../input_0.cairo | 18 +++++++++++++++++ .../output_0.cairo | 16 +++++++++++++++ src/tests/nodes/reduce_sum_i32_1D.cairo | 20 +++++++++++++++++++ .../nodes/reduce_sum_i32_1D/input_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_i32_1D/output_0.cairo | 13 ++++++++++++ .../nodes/reduce_sum_i32_2D_axis_1.cairo | 20 +++++++++++++++++++ .../reduce_sum_i32_2D_axis_1/input_0.cairo | 17 ++++++++++++++++ .../reduce_sum_i32_2D_axis_1/output_0.cairo | 14 +++++++++++++ .../nodes/reduce_sum_i32_2D_default.cairo | 20 +++++++++++++++++++ .../reduce_sum_i32_2D_default/input_0.cairo | 17 ++++++++++++++++ .../reduce_sum_i32_2D_default/output_0.cairo | 14 +++++++++++++ .../nodes/reduce_sum_i32_2D_keepdims.cairo | 20 +++++++++++++++++++ .../reduce_sum_i32_2D_keepdims/input_0.cairo | 17 ++++++++++++++++ .../reduce_sum_i32_2D_keepdims/output_0.cairo | 15 ++++++++++++++ src/tests/nodes/reduce_sum_i8_1D.cairo | 20 +++++++++++++++++++ .../nodes/reduce_sum_i8_1D/input_0.cairo | 16 +++++++++++++++ .../nodes/reduce_sum_i8_1D/output_0.cairo | 14 +++++++++++++ src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 20 +++++++++++++++++++ .../reduce_sum_i8_2D_axis_1/input_0.cairo | 18 +++++++++++++++++ .../reduce_sum_i8_2D_axis_1/output_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_i8_2D_default.cairo | 20 +++++++++++++++++++ .../reduce_sum_i8_2D_default/input_0.cairo | 18 +++++++++++++++++ .../reduce_sum_i8_2D_default/output_0.cairo | 15 ++++++++++++++ .../nodes/reduce_sum_i8_2D_keepdims.cairo | 20 +++++++++++++++++++ .../reduce_sum_i8_2D_keepdims/input_0.cairo | 18 +++++++++++++++++ .../reduce_sum_i8_2D_keepdims/output_0.cairo | 16 +++++++++++++++ src/tests/nodes/reduce_sum_u32_1D.cairo | 20 +++++++++++++++++++ .../nodes/reduce_sum_u32_1D/input_0.cairo | 14 +++++++++++++ .../nodes/reduce_sum_u32_1D/output_0.cairo | 12 +++++++++++ .../nodes/reduce_sum_u32_2D_axis_1.cairo | 20 +++++++++++++++++++ .../reduce_sum_u32_2D_axis_1/input_0.cairo | 16 +++++++++++++++ .../reduce_sum_u32_2D_axis_1/output_0.cairo | 13 ++++++++++++ .../nodes/reduce_sum_u32_2D_default.cairo | 20 +++++++++++++++++++ .../reduce_sum_u32_2D_default/input_0.cairo | 16 +++++++++++++++ .../reduce_sum_u32_2D_default/output_0.cairo | 13 ++++++++++++ .../nodes/reduce_sum_u32_2D_keepdims.cairo | 20 +++++++++++++++++++ .../reduce_sum_u32_2D_keepdims/input_0.cairo | 16 +++++++++++++++ .../reduce_sum_u32_2D_keepdims/output_0.cairo | 14 +++++++++++++ 61 files changed, 1046 insertions(+) create mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_1D.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_1D/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_1D/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_default.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_1D.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_1D/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_1D/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_default.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_1D.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_1D/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_1D/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_default.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo create mode 100644 src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 7b67b23b7..9be0e1e16 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -278,3 +278,23 @@ mod or_i8; mod or_i8_broadcast; mod or_u32; mod or_u32_broadcast; +mod reduce_sum_fp16x16_1D; +mod reduce_sum_fp16x16_2D_default; +mod reduce_sum_fp16x16_2D_keepdims; +mod reduce_sum_fp16x16_2D_axis_1; +mod reduce_sum_fp8x23_1D; +mod reduce_sum_fp8x23_2D_default; +mod reduce_sum_fp8x23_2D_keepdims; +mod reduce_sum_fp8x23_2D_axis_1; +mod reduce_sum_i32_1D; +mod reduce_sum_i32_2D_default; +mod reduce_sum_i32_2D_keepdims; +mod reduce_sum_i32_2D_axis_1; +mod reduce_sum_i8_1D; +mod reduce_sum_i8_2D_default; +mod reduce_sum_i8_2D_keepdims; +mod reduce_sum_i8_2D_axis_1; +mod reduce_sum_u32_1D; +mod reduce_sum_u32_2D_default; +mod reduce_sum_u32_2D_keepdims; +mod reduce_sum_u32_2D_axis_1; diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo new file mode 100644 index 000000000..8b9cf049b --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp16x16_1D() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo new file mode 100644 index 000000000..3bb7db502 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo new file mode 100644 index 000000000..aca4697cb --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo new file mode 100644 index 000000000..b490a20cd --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp16x16_2D_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(1, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo new file mode 100644 index 000000000..8009dcc45 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo new file mode 100644 index 000000000..5c1594543 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo new file mode 100644 index 000000000..9a56b683d --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp16x16_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo new file mode 100644 index 000000000..8009dcc45 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo new file mode 100644 index 000000000..e7881ed14 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo new file mode 100644 index 000000000..aea890952 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp16x16_2D_keepdims() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, true); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo new file mode 100644 index 000000000..8009dcc45 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo new file mode 100644 index 000000000..9dc98276a --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo new file mode 100644 index 000000000..9a712a803 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp8x23_1D() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo new file mode 100644 index 000000000..617c82eee --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo new file mode 100644 index 000000000..532039c9d --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo new file mode 100644 index 000000000..4074254a8 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp8x23_2D_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(1, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo new file mode 100644 index 000000000..738ae80d4 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo new file mode 100644 index 000000000..c2d2a02d5 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo new file mode 100644 index 000000000..553a37ec7 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp8x23_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo new file mode 100644 index 000000000..738ae80d4 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo new file mode 100644 index 000000000..d8909e9e6 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo new file mode 100644 index 000000000..e1d6688eb --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_fp8x23_2D_keepdims() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, true); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo new file mode 100644 index 000000000..738ae80d4 --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo new file mode 100644 index 000000000..aed0ca34e --- /dev/null +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D.cairo b/src/tests/nodes/reduce_sum_i32_1D.cairo new file mode 100644 index 000000000..90aa448df --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_1D.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i32_1D() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo new file mode 100644 index 000000000..e9ce9f192 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo new file mode 100644 index 000000000..b2096bc0f --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo new file mode 100644 index 000000000..b7d3cbc9d --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i32_2D_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(1, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo new file mode 100644 index 000000000..fb4bacc7b --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo new file mode 100644 index 000000000..2513d7cce --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default.cairo b/src/tests/nodes/reduce_sum_i32_2D_default.cairo new file mode 100644 index 000000000..f8d325b2d --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo new file mode 100644 index 000000000..fb4bacc7b --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo new file mode 100644 index 000000000..28240397c --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 4, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo new file mode 100644 index 000000000..a87a7f0ab --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i32_2D_keepdims() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, true); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo new file mode 100644 index 000000000..fb4bacc7b --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo new file mode 100644 index 000000000..bf29f7645 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 4, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo new file mode 100644 index 000000000..78c0f5fc6 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_1D.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i8_1D() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo new file mode 100644 index 000000000..345f34d8c --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo new file mode 100644 index 000000000..b7d792408 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo new file mode 100644 index 000000000..090fcffdd --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i8_2D_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(1, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo new file mode 100644 index 000000000..06f8f1737 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo new file mode 100644 index 000000000..dce7aed06 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo new file mode 100644 index 000000000..6fbdb3c2b --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i8_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo new file mode 100644 index 000000000..06f8f1737 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo new file mode 100644 index 000000000..116d100c4 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo new file mode 100644 index 000000000..2f1af81bf --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_i8_2D_keepdims() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, true); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo new file mode 100644 index 000000000..06f8f1737 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo new file mode 100644 index 000000000..a40e69624 --- /dev/null +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D.cairo b/src/tests/nodes/reduce_sum_u32_1D.cairo new file mode 100644 index 000000000..0db242af5 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_1D.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_u32_1D() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo new file mode 100644 index 000000000..26ecd350b --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo new file mode 100644 index 000000000..cf29a4530 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo @@ -0,0 +1,12 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo new file mode 100644 index 000000000..99848df59 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_u32_2D_axis_1() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(1, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo new file mode 100644 index 000000000..6c324ceb6 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo new file mode 100644 index 000000000..b15f624cd --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default.cairo b/src/tests/nodes/reduce_sum_u32_2D_default.cairo new file mode 100644 index 000000000..f949deea3 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_default.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_u32_2D_default() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, false); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo new file mode 100644 index 000000000..6c324ceb6 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo new file mode 100644 index 000000000..f10eb07f1 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo @@ -0,0 +1,13 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo new file mode 100644 index 000000000..cfd7da1bb --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_reduce_sum_u32_2D_keepdims() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.reduce_sum(0, true); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo new file mode 100644 index 000000000..6c324ceb6 --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(2); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo new file mode 100644 index 000000000..7d63eb45a --- /dev/null +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From ca69c60fcec93c79f1d9eaf94174c0aed6fb6cd3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:49:05 +0300 Subject: [PATCH 143/179] test relu --- src/tests/nodes.cairo | 4 ++++ src/tests/nodes/relu_fp16x16.cairo | 20 ++++++++++++++++++++ src/tests/nodes/relu_fp16x16/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/relu_fp16x16/output_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/relu_fp8x23.cairo | 20 ++++++++++++++++++++ src/tests/nodes/relu_fp8x23/input_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/relu_fp8x23/output_0.cairo | 18 ++++++++++++++++++ src/tests/nodes/relu_i32.cairo | 20 ++++++++++++++++++++ src/tests/nodes/relu_i32/input_0.cairo | 17 +++++++++++++++++ src/tests/nodes/relu_i32/output_0.cairo | 17 +++++++++++++++++ src/tests/nodes/relu_i8.cairo | 20 ++++++++++++++++++++ src/tests/nodes/relu_i8/input_0.cairo | 17 +++++++++++++++++ src/tests/nodes/relu_i8/output_0.cairo | 17 +++++++++++++++++ 13 files changed, 224 insertions(+) create mode 100644 src/tests/nodes/relu_fp16x16.cairo create mode 100644 src/tests/nodes/relu_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/relu_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/relu_fp8x23.cairo create mode 100644 src/tests/nodes/relu_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/relu_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/relu_i32.cairo create mode 100644 src/tests/nodes/relu_i32/input_0.cairo create mode 100644 src/tests/nodes/relu_i32/output_0.cairo create mode 100644 src/tests/nodes/relu_i8.cairo create mode 100644 src/tests/nodes/relu_i8/input_0.cairo create mode 100644 src/tests/nodes/relu_i8/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 9be0e1e16..31248d84f 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -298,3 +298,7 @@ mod reduce_sum_u32_1D; mod reduce_sum_u32_2D_default; mod reduce_sum_u32_2D_keepdims; mod reduce_sum_u32_2D_axis_1; +mod relu_fp16x16; +mod relu_fp8x23; +mod relu_i32; +mod relu_i8; diff --git a/src/tests/nodes/relu_fp16x16.cairo b/src/tests/nodes/relu_fp16x16.cairo new file mode 100644 index 000000000..d8e439cae --- /dev/null +++ b/src/tests/nodes/relu_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_relu_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::relu(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo new file mode 100644 index 000000000..e196cc8c1 --- /dev/null +++ b/src/tests/nodes/relu_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 6065, sign: false }); + data.append(FP16x16 { mag: 134983, sign: true }); + data.append(FP16x16 { mag: 30217, sign: false }); + data.append(FP16x16 { mag: 88950, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo new file mode 100644 index 000000000..be4ea0189 --- /dev/null +++ b/src/tests/nodes/relu_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 6065, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 30217, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23.cairo b/src/tests/nodes/relu_fp8x23.cairo new file mode 100644 index 000000000..9ceec0072 --- /dev/null +++ b/src/tests/nodes/relu_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_relu_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::relu(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo new file mode 100644 index 000000000..4d1122f47 --- /dev/null +++ b/src/tests/nodes/relu_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 35370496, sign: false }); + data.append(FP8x23 { mag: 51831526, sign: false }); + data.append(FP8x23 { mag: 26129513, sign: true }); + data.append(FP8x23 { mag: 10508621, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo new file mode 100644 index 000000000..cc0423858 --- /dev/null +++ b/src/tests/nodes/relu_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 35370496, sign: false }); + data.append(FP8x23 { mag: 51831528, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32.cairo b/src/tests/nodes/relu_i32.cairo new file mode 100644 index 000000000..0608a6fdd --- /dev/null +++ b/src/tests/nodes/relu_i32.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I32NN; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_relu_i32() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::relu(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo new file mode 100644 index 000000000..a9af2d9a5 --- /dev/null +++ b/src/tests/nodes/relu_i32/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo new file mode 100644 index 000000000..903239942 --- /dev/null +++ b/src/tests/nodes/relu_i32/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8.cairo b/src/tests/nodes/relu_i8.cairo new file mode 100644 index 000000000..85674ecd0 --- /dev/null +++ b/src/tests/nodes/relu_i8.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I8NN; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_relu_i8() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::relu(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo new file mode 100644 index 000000000..13d6f8f5d --- /dev/null +++ b/src/tests/nodes/relu_i8/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 8, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo new file mode 100644 index 000000000..432b19071 --- /dev/null +++ b/src/tests/nodes/relu_i8/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 8, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 83c8428ce3730ab21fe8a8cffc192497f5fb3c9d Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:50:56 +0300 Subject: [PATCH 144/179] test sigmoid --- nodegen/node/sigmoid.py | 138 +++--------------- src/tests/nodes.cairo | 2 + src/tests/nodes/sigmoid_fp16x16.cairo | 20 +++ src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 18 +++ .../nodes/sigmoid_fp16x16/output_0.cairo | 18 +++ src/tests/nodes/sigmoid_fp8x23.cairo | 20 +++ src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 18 +++ src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 18 +++ 8 files changed, 136 insertions(+), 116 deletions(-) create mode 100644 src/tests/nodes/sigmoid_fp16x16.cairo create mode 100644 src/tests/nodes/sigmoid_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/sigmoid_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/sigmoid_fp8x23.cairo create mode 100644 src/tests/nodes/sigmoid_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/sigmoid_fp8x23/output_0.cairo diff --git a/nodegen/node/sigmoid.py b/nodegen/node/sigmoid.py index d145d0050..0f5052eae 100644 --- a/nodegen/node/sigmoid.py +++ b/nodegen/node/sigmoid.py @@ -7,127 +7,33 @@ class Sigmoid(RunAll): @staticmethod - def sigmoid_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() + def fp8x23(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) + y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) + x = Tensor(Dtype.FP8x23, x.shape, to_fp( + x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23)) - name = "sigmoid_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sigmoid_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def sigmoid_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sigmoid_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sigmoid_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() + name = "sigmoid_fp8x23" + make_node([x], [y], name) + make_test([x], y, "NNTrait::sigmoid(@input_0)", + name, Trait.NN) @staticmethod - def sigmoid_u32(): - def fp8x23(): - x = np.random.randint(0, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sigmoid_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sigmoid_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def sigmoid_fp(): - def fp8x23(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23)) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sigmoid_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) + def fp16x16(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) + y = tf.keras.activations.sigmoid(x).numpy() - def fp16x16(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() + x = Tensor(Dtype.FP16x16, x.shape, to_fp( + x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16)) - x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16)) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) + name = "sigmoid_fp16x16" + make_node([x], [y], name) + make_test([x], y, "NNTrait::sigmoid(@input_0)", + name, Trait.NN) - name = "sigmoid_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - fp8x23() - fp16x16() diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 31248d84f..080fd04c8 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -302,3 +302,5 @@ mod relu_fp16x16; mod relu_fp8x23; mod relu_i32; mod relu_i8; +mod sigmoid_fp16x16; +mod sigmoid_fp8x23; diff --git a/src/tests/nodes/sigmoid_fp16x16.cairo b/src/tests/nodes/sigmoid_fp16x16.cairo new file mode 100644 index 000000000..d58d99c92 --- /dev/null +++ b/src/tests/nodes/sigmoid_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sigmoid_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::sigmoid(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo new file mode 100644 index 000000000..56c4e748f --- /dev/null +++ b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 42997, sign: true }); + data.append(FP16x16 { mag: 108408, sign: true }); + data.append(FP16x16 { mag: 87345, sign: false }); + data.append(FP16x16 { mag: 169098, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo new file mode 100644 index 000000000..f085cd671 --- /dev/null +++ b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 22388, sign: false }); + data.append(FP16x16 { mag: 10521, sign: false }); + data.append(FP16x16 { mag: 51858, sign: false }); + data.append(FP16x16 { mag: 60920, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23.cairo b/src/tests/nodes/sigmoid_fp8x23.cairo new file mode 100644 index 000000000..77797b92a --- /dev/null +++ b/src/tests/nodes/sigmoid_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sigmoid_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::sigmoid(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo new file mode 100644 index 000000000..7ae3ed063 --- /dev/null +++ b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 20907772, sign: true }); + data.append(FP8x23 { mag: 24683986, sign: true }); + data.append(FP8x23 { mag: 21494604, sign: true }); + data.append(FP8x23 { mag: 1609367, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo new file mode 100644 index 000000000..370da14ef --- /dev/null +++ b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 640827, sign: false }); + data.append(FP8x23 { mag: 420179, sign: false }); + data.append(FP8x23 { mag: 600630, sign: false }); + data.append(FP8x23 { mag: 4595416, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 942ea4cad674f4346da888b1486e312c155da89c Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:51:57 +0300 Subject: [PATCH 145/179] test sin --- nodegen/node/sin.py | 92 +--------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/sin_fp16x16.cairo | 20 +++++ src/tests/nodes/sin_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/sin_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/sin_fp8x23.cairo | 20 +++++ src/tests/nodes/sin_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/sin_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 115 insertions(+), 91 deletions(-) create mode 100644 src/tests/nodes/sin_fp16x16.cairo create mode 100644 src/tests/nodes/sin_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/sin_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/sin_fp8x23.cairo create mode 100644 src/tests/nodes/sin_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/sin_fp8x23/output_0.cairo diff --git a/nodegen/node/sin.py b/nodegen/node/sin.py index d8436d114..e62eb38d8 100644 --- a/nodegen/node/sin.py +++ b/nodegen/node/sin.py @@ -4,97 +4,7 @@ class Sin(RunAll): - - @staticmethod - def sin_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sin_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sin_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sin_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.sin(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sin_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sin_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sin_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.sin(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sin_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.sin(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sin_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sin()", name) - - fp8x23() - fp16x16() - + @staticmethod def sin_fp8x23(): x = np.random.uniform(-3, 7, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 080fd04c8..5b57d04b8 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -304,3 +304,5 @@ mod relu_i32; mod relu_i8; mod sigmoid_fp16x16; mod sigmoid_fp8x23; +mod sin_fp16x16; +mod sin_fp8x23; diff --git a/src/tests/nodes/sin_fp16x16.cairo b/src/tests/nodes/sin_fp16x16.cairo new file mode 100644 index 000000000..ab1c5df2f --- /dev/null +++ b/src/tests/nodes/sin_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sin_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sin(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo new file mode 100644 index 000000000..8067cff1d --- /dev/null +++ b/src/tests/nodes/sin_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 167356, sign: false }); + data.append(FP16x16 { mag: 369339, sign: false }); + data.append(FP16x16 { mag: 308834, sign: false }); + data.append(FP16x16 { mag: 3145, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo new file mode 100644 index 000000000..6513f7d26 --- /dev/null +++ b/src/tests/nodes/sin_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 36348, sign: false }); + data.append(FP16x16 { mag: 39531, sign: true }); + data.append(FP16x16 { mag: 65535, sign: true }); + data.append(FP16x16 { mag: 3144, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23.cairo b/src/tests/nodes/sin_fp8x23.cairo new file mode 100644 index 000000000..d9aab62d4 --- /dev/null +++ b/src/tests/nodes/sin_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sin_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sin(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo new file mode 100644 index 000000000..4ea3887b6 --- /dev/null +++ b/src/tests/nodes/sin_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 6647816, sign: true }); + data.append(FP8x23 { mag: 58073960, sign: false }); + data.append(FP8x23 { mag: 41721546, sign: false }); + data.append(FP8x23 { mag: 410451, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo new file mode 100644 index 000000000..f0d006c61 --- /dev/null +++ b/src/tests/nodes/sin_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 5973508, sign: true }); + data.append(FP8x23 { mag: 5008092, sign: false }); + data.append(FP8x23 { mag: 8104057, sign: true }); + data.append(FP8x23 { mag: 410287, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From d491d43bba327299d78479d1e6a44ad5dfeac3b5 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:52:35 +0300 Subject: [PATCH 146/179] test sinh --- nodegen/node/sinh.py | 90 --------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/sinh_fp16x16.cairo | 20 +++++ src/tests/nodes/sinh_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/sinh_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/sinh_fp8x23.cairo | 20 +++++ src/tests/nodes/sinh_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/sinh_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/sinh_fp16x16.cairo create mode 100644 src/tests/nodes/sinh_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/sinh_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/sinh_fp8x23.cairo create mode 100644 src/tests/nodes/sinh_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/sinh_fp8x23/output_0.cairo diff --git a/nodegen/node/sinh.py b/nodegen/node/sinh.py index a1d8000b9..27710d3ed 100644 --- a/nodegen/node/sinh.py +++ b/nodegen/node/sinh.py @@ -5,96 +5,6 @@ class Sinh(RunAll): - @staticmethod - def sinh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sinh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sinh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sinh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.sinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sinh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sinh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sinh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sinh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sinh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sinh()", name) - - fp8x23() - fp16x16() - @staticmethod def sinh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 5b57d04b8..95c2f1ba7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -306,3 +306,5 @@ mod sigmoid_fp16x16; mod sigmoid_fp8x23; mod sin_fp16x16; mod sin_fp8x23; +mod sinh_fp16x16; +mod sinh_fp8x23; diff --git a/src/tests/nodes/sinh_fp16x16.cairo b/src/tests/nodes/sinh_fp16x16.cairo new file mode 100644 index 000000000..704362bfc --- /dev/null +++ b/src/tests/nodes/sinh_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sinh_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sinh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo new file mode 100644 index 000000000..e6749f4f7 --- /dev/null +++ b/src/tests/nodes/sinh_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 181084, sign: false }); + data.append(FP16x16 { mag: 85235, sign: true }); + data.append(FP16x16 { mag: 59303, sign: true }); + data.append(FP16x16 { mag: 130937, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo new file mode 100644 index 000000000..2f7e763c3 --- /dev/null +++ b/src/tests/nodes/sinh_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 517281, sign: false }); + data.append(FP16x16 { mag: 111381, sign: true }); + data.append(FP16x16 { mag: 67734, sign: true }); + data.append(FP16x16 { mag: 237186, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23.cairo b/src/tests/nodes/sinh_fp8x23.cairo new file mode 100644 index 000000000..beef97a64 --- /dev/null +++ b/src/tests/nodes/sinh_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sinh_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sinh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo new file mode 100644 index 000000000..4945e8dba --- /dev/null +++ b/src/tests/nodes/sinh_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 20711629, sign: true }); + data.append(FP8x23 { mag: 18228194, sign: false }); + data.append(FP8x23 { mag: 15655651, sign: true }); + data.append(FP8x23 { mag: 13406669, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo new file mode 100644 index 000000000..15f43bfac --- /dev/null +++ b/src/tests/nodes/sinh_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 49183175, sign: true }); + data.append(FP8x23 { mag: 36366700, sign: false }); + data.append(FP8x23 { mag: 26464518, sign: true }); + data.append(FP8x23 { mag: 19888811, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From cdc1db3628de43de08fe0b522a200db7f28fb193 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:53:38 +0300 Subject: [PATCH 147/179] test softmax --- nodegen/node/softmax.py | 138 +++--------------- src/tests/nodes.cairo | 2 + src/tests/nodes/softmax_fp16x16.cairo | 20 +++ src/tests/nodes/softmax_fp16x16/input_0.cairo | 18 +++ .../nodes/softmax_fp16x16/output_0.cairo | 18 +++ src/tests/nodes/softmax_fp8x23.cairo | 20 +++ src/tests/nodes/softmax_fp8x23/input_0.cairo | 18 +++ src/tests/nodes/softmax_fp8x23/output_0.cairo | 18 +++ 8 files changed, 136 insertions(+), 116 deletions(-) create mode 100644 src/tests/nodes/softmax_fp16x16.cairo create mode 100644 src/tests/nodes/softmax_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/softmax_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/softmax_fp8x23.cairo create mode 100644 src/tests/nodes/softmax_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/softmax_fp8x23/output_0.cairo diff --git a/nodegen/node/softmax.py b/nodegen/node/softmax.py index 049b2c695..2c42b9844 100644 --- a/nodegen/node/softmax.py +++ b/nodegen/node/softmax.py @@ -12,128 +12,34 @@ def softmax(x: np.ndarray, axis: int = -1) -> np.ndarray: class Softmax(RunAll): - @staticmethod - def softmax_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softmax_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softmax_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softmax_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softmax_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softmax_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - fp8x23() - fp16x16() @staticmethod - def softmax_u32(): - def fp8x23(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = softmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softmax_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) + def fp8x23(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) + y = softmax(x, 0) - def fp16x16(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = softmax(x, 0) + x = Tensor(Dtype.FP8x23, x.shape, to_fp( + x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23)) - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softmax_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - fp8x23() - fp16x16() + name = "softmax_fp8x23" + make_node([x], [y], name) + make_test([x], y, "NNTrait::softmax(@input_0, 0)", + name, Trait.NN) @staticmethod - def softmax_fp(): - def fp8x23(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) - y = softmax(x, 0) - - x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23)) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softmax_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) - y = softmax(x, 1) + def fp16x16(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) + y = softmax(x, 1) - x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16)) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) + x = Tensor(Dtype.FP16x16, x.shape, to_fp( + x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16)) - name = "softmax_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) + name = "softmax_fp16x16" + make_node([x], [y], name) + make_test([x], y, "NNTrait::softmax(@input_0, 1)", + name, Trait.NN) - fp8x23() - fp16x16() diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 95c2f1ba7..66976a3f1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -308,3 +308,5 @@ mod sin_fp16x16; mod sin_fp8x23; mod sinh_fp16x16; mod sinh_fp8x23; +mod softmax_fp16x16; +mod softmax_fp8x23; diff --git a/src/tests/nodes/softmax_fp16x16.cairo b/src/tests/nodes/softmax_fp16x16.cairo new file mode 100644 index 000000000..ea3f7f578 --- /dev/null +++ b/src/tests/nodes/softmax_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softmax_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softmax(@input_0, 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo new file mode 100644 index 000000000..749b61dda --- /dev/null +++ b/src/tests/nodes/softmax_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 3889, sign: false }); + data.append(FP16x16 { mag: 89405, sign: false }); + data.append(FP16x16 { mag: 78312, sign: false }); + data.append(FP16x16 { mag: 139730, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo new file mode 100644 index 000000000..b7f7bf7c5 --- /dev/null +++ b/src/tests/nodes/softmax_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 13981, sign: false }); + data.append(FP16x16 { mag: 51554, sign: false }); + data.append(FP16x16 { mag: 18446, sign: false }); + data.append(FP16x16 { mag: 47089, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23.cairo b/src/tests/nodes/softmax_fp8x23.cairo new file mode 100644 index 000000000..a658b8594 --- /dev/null +++ b/src/tests/nodes/softmax_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softmax_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softmax(@input_0, 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo new file mode 100644 index 000000000..741a9d820 --- /dev/null +++ b/src/tests/nodes/softmax_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 9804113, sign: true }); + data.append(FP8x23 { mag: 8638782, sign: true }); + data.append(FP8x23 { mag: 20159749, sign: true }); + data.append(FP8x23 { mag: 2673667, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo new file mode 100644 index 000000000..ee2fbefed --- /dev/null +++ b/src/tests/nodes/softmax_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 6497841, sign: false }); + data.append(FP8x23 { mag: 2762842, sign: false }); + data.append(FP8x23 { mag: 1890766, sign: false }); + data.append(FP8x23 { mag: 5625765, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 6661eb40f12366438883ef0949c9788d0d43306b Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:54:34 +0300 Subject: [PATCH 148/179] test softplus --- nodegen/node/softplus.py | 93 ------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/softplus_fp16x16.cairo | 20 ++++ .../nodes/softplus_fp16x16/input_0.cairo | 18 ++++ .../nodes/softplus_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/softplus_fp8x23.cairo | 20 ++++ src/tests/nodes/softplus_fp8x23/input_0.cairo | 18 ++++ .../nodes/softplus_fp8x23/output_0.cairo | 18 ++++ 8 files changed, 114 insertions(+), 93 deletions(-) create mode 100644 src/tests/nodes/softplus_fp16x16.cairo create mode 100644 src/tests/nodes/softplus_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/softplus_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/softplus_fp8x23.cairo create mode 100644 src/tests/nodes/softplus_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/softplus_fp8x23/output_0.cairo diff --git a/nodegen/node/softplus.py b/nodegen/node/softplus.py index d0a7a7d4f..9c8b72106 100644 --- a/nodegen/node/softplus.py +++ b/nodegen/node/softplus.py @@ -9,99 +9,6 @@ def softplus(x: np.ndarray) -> np.ndarray: class Softplus(RunAll): - @staticmethod - def softplus_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softplus_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softplus_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softplus_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softplus(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softplus_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softplus(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softplus_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softplus_u32(): - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softplus_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softplus_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def softplus_fp(): def fp8x23(): diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 66976a3f1..59b329065 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -310,3 +310,5 @@ mod sinh_fp16x16; mod sinh_fp8x23; mod softmax_fp16x16; mod softmax_fp8x23; +mod softplus_fp8x23; +mod softplus_fp16x16; diff --git a/src/tests/nodes/softplus_fp16x16.cairo b/src/tests/nodes/softplus_fp16x16.cairo new file mode 100644 index 000000000..916e1ed21 --- /dev/null +++ b/src/tests/nodes/softplus_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softplus_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softplus(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo new file mode 100644 index 000000000..d07486662 --- /dev/null +++ b/src/tests/nodes/softplus_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 109682, sign: true }); + data.append(FP16x16 { mag: 76425, sign: false }); + data.append(FP16x16 { mag: 182796, sign: false }); + data.append(FP16x16 { mag: 7375, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo new file mode 100644 index 000000000..ad5a4e5a4 --- /dev/null +++ b/src/tests/nodes/softplus_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 11266, sign: false }); + data.append(FP16x16 { mag: 94200, sign: false }); + data.append(FP16x16 { mag: 186705, sign: false }); + data.append(FP16x16 { mag: 49217, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23.cairo b/src/tests/nodes/softplus_fp8x23.cairo new file mode 100644 index 000000000..e75490bd1 --- /dev/null +++ b/src/tests/nodes/softplus_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softplus_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softplus(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo new file mode 100644 index 000000000..ebd78352d --- /dev/null +++ b/src/tests/nodes/softplus_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 3471357, sign: true }); + data.append(FP8x23 { mag: 13111113, sign: true }); + data.append(FP8x23 { mag: 21113375, sign: true }); + data.append(FP8x23 { mag: 7707092, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo new file mode 100644 index 000000000..30337af60 --- /dev/null +++ b/src/tests/nodes/softplus_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 4257158, sign: false }); + data.append(FP8x23 { mag: 1595666, sign: false }); + data.append(FP8x23 { mag: 651097, sign: false }); + data.append(FP8x23 { mag: 10523719, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From c6745dceb8fdbcc5e801aee4f9569d159f84b4bb Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:55:29 +0300 Subject: [PATCH 149/179] test softsign --- nodegen/node/softsign.py | 93 ------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/softsign_fp16x16.cairo | 20 ++++ .../nodes/softsign_fp16x16/input_0.cairo | 18 ++++ .../nodes/softsign_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/softsign_fp8x23.cairo | 20 ++++ src/tests/nodes/softsign_fp8x23/input_0.cairo | 18 ++++ .../nodes/softsign_fp8x23/output_0.cairo | 18 ++++ 8 files changed, 114 insertions(+), 93 deletions(-) create mode 100644 src/tests/nodes/softsign_fp16x16.cairo create mode 100644 src/tests/nodes/softsign_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/softsign_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/softsign_fp8x23.cairo create mode 100644 src/tests/nodes/softsign_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/softsign_fp8x23/output_0.cairo diff --git a/nodegen/node/softsign.py b/nodegen/node/softsign.py index 44f00b0b8..381d3e2d7 100644 --- a/nodegen/node/softsign.py +++ b/nodegen/node/softsign.py @@ -9,99 +9,6 @@ def softsign(x: np.ndarray) -> np.ndarray: class Softsign(RunAll): - @staticmethod - def softsign_i32(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softsign_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softsign_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softsign_i8(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) - y = softsign(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softsign_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) - y = softsign(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softsign_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softsign_u32(): - def fp8x23(): - x = np.random.randint(0, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "softsign_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "softsign_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def softsign_fp(): def fp8x23(): diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 59b329065..515fe26c6 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -312,3 +312,5 @@ mod softmax_fp16x16; mod softmax_fp8x23; mod softplus_fp8x23; mod softplus_fp16x16; +mod softsign_fp8x23; +mod softsign_fp16x16; diff --git a/src/tests/nodes/softsign_fp16x16.cairo b/src/tests/nodes/softsign_fp16x16.cairo new file mode 100644 index 000000000..622ed5d59 --- /dev/null +++ b/src/tests/nodes/softsign_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softsign_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softsign(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo new file mode 100644 index 000000000..cb67eccad --- /dev/null +++ b/src/tests/nodes/softsign_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 139604, sign: true }); + data.append(FP16x16 { mag: 91968, sign: true }); + data.append(FP16x16 { mag: 455699, sign: false }); + data.append(FP16x16 { mag: 243346, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo new file mode 100644 index 000000000..c42e60807 --- /dev/null +++ b/src/tests/nodes/softsign_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 44599, sign: true }); + data.append(FP16x16 { mag: 38267, sign: true }); + data.append(FP16x16 { mag: 57296, sign: false }); + data.append(FP16x16 { mag: 51631, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23.cairo b/src/tests/nodes/softsign_fp8x23.cairo new file mode 100644 index 000000000..54288f4a3 --- /dev/null +++ b/src/tests/nodes/softsign_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_softsign_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = NNTrait::softsign(@input_0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo new file mode 100644 index 000000000..92b80d489 --- /dev/null +++ b/src/tests/nodes/softsign_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 47253221, sign: false }); + data.append(FP8x23 { mag: 50936689, sign: false }); + data.append(FP8x23 { mag: 5714756, sign: true }); + data.append(FP8x23 { mag: 15620718, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo new file mode 100644 index 000000000..45c3cbbf3 --- /dev/null +++ b/src/tests/nodes/softsign_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 7123934, sign: false }); + data.append(FP8x23 { mag: 7202457, sign: false }); + data.append(FP8x23 { mag: 3399107, sign: true }); + data.append(FP8x23 { mag: 5457715, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From bcc3951f5cdf5c86a94570f4166b4fd1e5b900c6 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:56:18 +0300 Subject: [PATCH 150/179] test sqrt --- nodegen/node/sqrt.py | 91 +-------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/sqrt_fp16x16.cairo | 20 +++++ src/tests/nodes/sqrt_fp16x16/input_0.cairo | 18 ++++ src/tests/nodes/sqrt_fp16x16/output_0.cairo | 18 ++++ src/tests/nodes/sqrt_fp8x23.cairo | 20 +++++ src/tests/nodes/sqrt_fp8x23/input_0.cairo | 18 ++++ src/tests/nodes/sqrt_fp8x23/output_0.cairo | 18 ++++ 8 files changed, 115 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/sqrt_fp16x16.cairo create mode 100644 src/tests/nodes/sqrt_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/sqrt_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/sqrt_fp8x23.cairo create mode 100644 src/tests/nodes/sqrt_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/sqrt_fp8x23/output_0.cairo diff --git a/nodegen/node/sqrt.py b/nodegen/node/sqrt.py index ecaa03873..62222c43b 100644 --- a/nodegen/node/sqrt.py +++ b/nodegen/node/sqrt.py @@ -2,97 +2,8 @@ from nodegen.node import RunAll from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl -class Sqrt(RunAll): - - @staticmethod - def sqrt_i32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sqrt_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sqrt_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sqrt_i8(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int8) - y = np.sqrt(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - name = "sqrt_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sqrt_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sqrt_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sqrt(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "sqrt_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sqrt(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "sqrt_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.sqrt()", name) - - fp8x23() - fp16x16() +class Sqrt(RunAll): @staticmethod def sqrt_fp8x23(): diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 515fe26c6..f0f00c858 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -314,3 +314,5 @@ mod softplus_fp8x23; mod softplus_fp16x16; mod softsign_fp8x23; mod softsign_fp16x16; +mod sqrt_fp16x16; +mod sqrt_fp8x23; diff --git a/src/tests/nodes/sqrt_fp16x16.cairo b/src/tests/nodes/sqrt_fp16x16.cairo new file mode 100644 index 000000000..39424710b --- /dev/null +++ b/src/tests/nodes/sqrt_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sqrt_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sqrt(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo new file mode 100644 index 000000000..bc65b62d2 --- /dev/null +++ b/src/tests/nodes/sqrt_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 317628, sign: false }); + data.append(FP16x16 { mag: 241773, sign: false }); + data.append(FP16x16 { mag: 229884, sign: false }); + data.append(FP16x16 { mag: 311367, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo new file mode 100644 index 000000000..468899f72 --- /dev/null +++ b/src/tests/nodes/sqrt_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 144277, sign: false }); + data.append(FP16x16 { mag: 125876, sign: false }); + data.append(FP16x16 { mag: 122742, sign: false }); + data.append(FP16x16 { mag: 142848, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23.cairo b/src/tests/nodes/sqrt_fp8x23.cairo new file mode 100644 index 000000000..28aac23e9 --- /dev/null +++ b/src/tests/nodes/sqrt_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sqrt_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.sqrt(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo new file mode 100644 index 000000000..b46fc3377 --- /dev/null +++ b/src/tests/nodes/sqrt_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 15040676, sign: false }); + data.append(FP8x23 { mag: 25362172, sign: false }); + data.append(FP8x23 { mag: 25487151, sign: false }); + data.append(FP8x23 { mag: 747202, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo new file mode 100644 index 000000000..553dc52b3 --- /dev/null +++ b/src/tests/nodes/sqrt_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 11232557, sign: false }); + data.append(FP8x23 { mag: 14586066, sign: false }); + data.append(FP8x23 { mag: 14621960, sign: false }); + data.append(FP8x23 { mag: 2503594, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 2a1650204c95a65ebc5a0bf6aab1405a280e0b0e Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 12:59:55 +0300 Subject: [PATCH 151/179] test tensor sub --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/sub_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/sub_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp16x16/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp16x16/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp16x16_broadcast.cairo | 22 ++++++++++ .../nodes/sub_fp16x16_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../nodes/sub_fp16x16_broadcast/input_1.cairo | 18 ++++++++ .../sub_fp16x16_broadcast/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/sub_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp8x23/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/sub_fp8x23_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../nodes/sub_fp8x23_broadcast/input_1.cairo | 18 ++++++++ .../nodes/sub_fp8x23_broadcast/output_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/sub_i32.cairo | 22 ++++++++++ src/tests/nodes/sub_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i32/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i32_broadcast.cairo | 22 ++++++++++ .../nodes/sub_i32_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/sub_i32_broadcast/input_1.cairo | 17 ++++++++ .../nodes/sub_i32_broadcast/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i8.cairo | 22 ++++++++++ src/tests/nodes/sub_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i8/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_i8_broadcast.cairo | 22 ++++++++++ .../nodes/sub_i8_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/sub_i8_broadcast/input_1.cairo | 17 ++++++++ .../nodes/sub_i8_broadcast/output_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/sub_u32.cairo | 22 ++++++++++ src/tests/nodes/sub_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/sub_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/sub_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/sub_u32_broadcast.cairo | 22 ++++++++++ .../nodes/sub_u32_broadcast/input_0.cairo | 40 ++++++++++++++++++ .../nodes/sub_u32_broadcast/input_1.cairo | 16 +++++++ .../nodes/sub_u32_broadcast/output_0.cairo | 40 ++++++++++++++++++ 41 files changed, 1346 insertions(+) create mode 100644 src/tests/nodes/sub_fp16x16.cairo create mode 100644 src/tests/nodes/sub_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/sub_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/sub_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/sub_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/sub_fp8x23.cairo create mode 100644 src/tests/nodes/sub_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/sub_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/sub_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/sub_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/sub_i32.cairo create mode 100644 src/tests/nodes/sub_i32/input_0.cairo create mode 100644 src/tests/nodes/sub_i32/input_1.cairo create mode 100644 src/tests/nodes/sub_i32/output_0.cairo create mode 100644 src/tests/nodes/sub_i32_broadcast.cairo create mode 100644 src/tests/nodes/sub_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/sub_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/sub_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/sub_i8.cairo create mode 100644 src/tests/nodes/sub_i8/input_0.cairo create mode 100644 src/tests/nodes/sub_i8/input_1.cairo create mode 100644 src/tests/nodes/sub_i8/output_0.cairo create mode 100644 src/tests/nodes/sub_i8_broadcast.cairo create mode 100644 src/tests/nodes/sub_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/sub_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/sub_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/sub_u32.cairo create mode 100644 src/tests/nodes/sub_u32/input_0.cairo create mode 100644 src/tests/nodes/sub_u32/input_1.cairo create mode 100644 src/tests/nodes/sub_u32/output_0.cairo create mode 100644 src/tests/nodes/sub_u32_broadcast.cairo create mode 100644 src/tests/nodes/sub_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/sub_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/sub_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index f0f00c858..fa698f5c3 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -316,3 +316,13 @@ mod softsign_fp8x23; mod softsign_fp16x16; mod sqrt_fp16x16; mod sqrt_fp8x23; +mod sub_fp16x16; +mod sub_fp16x16_broadcast; +mod sub_fp8x23; +mod sub_fp8x23_broadcast; +mod sub_i32; +mod sub_i32_broadcast; +mod sub_i8; +mod sub_i8_broadcast; +mod sub_u32; +mod sub_u32_broadcast; diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo new file mode 100644 index 000000000..ee3ccc2f2 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo new file mode 100644 index 000000000..f3afb08b1 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo new file mode 100644 index 000000000..8676d06a6 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo new file mode 100644 index 000000000..32b2d20a0 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo new file mode 100644 index 000000000..031b58802 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..4b7babc68 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..5afeabf4d --- /dev/null +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..08ef27d96 --- /dev/null +++ b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo new file mode 100644 index 000000000..3d2e1e402 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo new file mode 100644 index 000000000..f4ba5bb90 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo new file mode 100644 index 000000000..c252cdbfa --- /dev/null +++ b/src/tests/nodes/sub_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo new file mode 100644 index 000000000..f826bfd59 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo new file mode 100644 index 000000000..0b43eb433 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..4394feacb --- /dev/null +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..01519e485 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..51f872d37 --- /dev/null +++ b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32.cairo b/src/tests/nodes/sub_i32.cairo new file mode 100644 index 000000000..a52c80cd6 --- /dev/null +++ b/src/tests/nodes/sub_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorSub}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo new file mode 100644 index 000000000..285b5135a --- /dev/null +++ b/src/tests/nodes/sub_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo new file mode 100644 index 000000000..b634c93dc --- /dev/null +++ b/src/tests/nodes/sub_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo new file mode 100644 index 000000000..1b3de7ea6 --- /dev/null +++ b/src/tests/nodes/sub_i32/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast.cairo b/src/tests/nodes/sub_i32_broadcast.cairo new file mode 100644 index 000000000..2c33e07d4 --- /dev/null +++ b/src/tests/nodes/sub_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorSub}; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..08a229d45 --- /dev/null +++ b/src/tests/nodes/sub_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..2567db422 --- /dev/null +++ b/src/tests/nodes/sub_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..deac3558b --- /dev/null +++ b/src/tests/nodes/sub_i32_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8.cairo b/src/tests/nodes/sub_i8.cairo new file mode 100644 index 000000000..67ce0f788 --- /dev/null +++ b/src/tests/nodes/sub_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorSub}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo new file mode 100644 index 000000000..e3d610aeb --- /dev/null +++ b/src/tests/nodes/sub_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo new file mode 100644 index 000000000..796a86580 --- /dev/null +++ b/src/tests/nodes/sub_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo new file mode 100644 index 000000000..62debaeae --- /dev/null +++ b/src/tests/nodes/sub_i8/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast.cairo b/src/tests/nodes/sub_i8_broadcast.cairo new file mode 100644 index 000000000..38b995ce1 --- /dev/null +++ b/src/tests/nodes/sub_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorSub}; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..b6941121d --- /dev/null +++ b/src/tests/nodes/sub_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..f7f01b833 --- /dev/null +++ b/src/tests/nodes/sub_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..99ba0b678 --- /dev/null +++ b/src/tests/nodes/sub_i8_broadcast/output_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32.cairo b/src/tests/nodes/sub_u32.cairo new file mode 100644 index 000000000..d26c7449c --- /dev/null +++ b/src/tests/nodes/sub_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorSub}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo new file mode 100644 index 000000000..457bc9d0c --- /dev/null +++ b/src/tests/nodes/sub_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(4); + data.append(3); + data.append(4); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + data.append(3); + data.append(4); + data.append(3); + data.append(5); + data.append(3); + data.append(5); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(4); + data.append(4); + data.append(5); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo new file mode 100644 index 000000000..e963c919d --- /dev/null +++ b/src/tests/nodes/sub_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(1); + data.append(2); + data.append(2); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(2); + data.append(2); + data.append(1); + data.append(0); + data.append(1); + data.append(2); + data.append(0); + data.append(0); + data.append(2); + data.append(1); + data.append(1); + data.append(0); + data.append(2); + data.append(0); + data.append(0); + data.append(2); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo new file mode 100644 index 000000000..2c57cd25d --- /dev/null +++ b/src/tests/nodes/sub_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(2); + data.append(1); + data.append(1); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(4); + data.append(1); + data.append(1); + data.append(3); + data.append(3); + data.append(2); + data.append(2); + data.append(3); + data.append(5); + data.append(1); + data.append(4); + data.append(4); + data.append(4); + data.append(1); + data.append(3); + data.append(4); + data.append(2); + data.append(5); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast.cairo b/src/tests/nodes/sub_u32_broadcast.cairo new file mode 100644 index 000000000..74bebbf12 --- /dev/null +++ b/src/tests/nodes/sub_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorSub}; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_sub_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0 - input_1; + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..e90e880fc --- /dev/null +++ b/src/tests/nodes/sub_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(5); + data.append(3); + data.append(5); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..b1fdd26bd --- /dev/null +++ b/src/tests/nodes/sub_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..192af5be9 --- /dev/null +++ b/src/tests/nodes/sub_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(5); + data.append(4); + data.append(3); + data.append(2); + data.append(4); + data.append(3); + data.append(5); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(2); + data.append(4); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + data.append(2); + data.append(4); + data.append(3); + data.append(3); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 5bcab512c978d6db3f555c236f0e84ce804f31df Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 13:00:59 +0300 Subject: [PATCH 152/179] test tanh --- nodegen/node/tanh.py | 90 --------------------- src/tests/nodes.cairo | 2 + src/tests/nodes/tanh_fp16x16.cairo | 20 +++++ src/tests/nodes/tanh_fp16x16/input_0.cairo | 18 +++++ src/tests/nodes/tanh_fp16x16/output_0.cairo | 18 +++++ src/tests/nodes/tanh_fp8x23.cairo | 20 +++++ src/tests/nodes/tanh_fp8x23/input_0.cairo | 18 +++++ src/tests/nodes/tanh_fp8x23/output_0.cairo | 18 +++++ 8 files changed, 114 insertions(+), 90 deletions(-) create mode 100644 src/tests/nodes/tanh_fp16x16.cairo create mode 100644 src/tests/nodes/tanh_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/tanh_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/tanh_fp8x23.cairo create mode 100644 src/tests/nodes/tanh_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/tanh_fp8x23/output_0.cairo diff --git a/nodegen/node/tanh.py b/nodegen/node/tanh.py index 53bbba04c..f09dc1342 100644 --- a/nodegen/node/tanh.py +++ b/nodegen/node/tanh.py @@ -5,96 +5,6 @@ class Tanh(RunAll): - @staticmethod - def tanh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "tanh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "tanh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def tanh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.tanh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "tanh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "tanh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def tanh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.tanh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23)) - - name = "tanh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.tanh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten()) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16)) - - name = "tanh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "input_0.tanh()", name) - - fp8x23() - fp16x16() - @staticmethod def tanh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index fa698f5c3..fcac81ce7 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -326,3 +326,5 @@ mod sub_i8; mod sub_i8_broadcast; mod sub_u32; mod sub_u32_broadcast; +mod tanh_fp16x16; +mod tanh_fp8x23; diff --git a/src/tests/nodes/tanh_fp16x16.cairo b/src/tests/nodes/tanh_fp16x16.cairo new file mode 100644 index 000000000..28dc8bead --- /dev/null +++ b/src/tests/nodes/tanh_fp16x16.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_tanh_fp16x16() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.tanh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo new file mode 100644 index 000000000..deaf0ba70 --- /dev/null +++ b/src/tests/nodes/tanh_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 60947, sign: true }); + data.append(FP16x16 { mag: 18316, sign: true }); + data.append(FP16x16 { mag: 60057, sign: false }); + data.append(FP16x16 { mag: 56869, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo new file mode 100644 index 000000000..c1712bf05 --- /dev/null +++ b/src/tests/nodes/tanh_fp16x16/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 47879, sign: true }); + data.append(FP16x16 { mag: 17853, sign: true }); + data.append(FP16x16 { mag: 47460, sign: false }); + data.append(FP16x16 { mag: 45890, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23.cairo b/src/tests/nodes/tanh_fp8x23.cairo new file mode 100644 index 000000000..049171f04 --- /dev/null +++ b/src/tests/nodes/tanh_fp8x23.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_tanh_fp8x23() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.tanh(); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo new file mode 100644 index 000000000..d575e6042 --- /dev/null +++ b/src/tests/nodes/tanh_fp8x23/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 7865643, sign: false }); + data.append(FP8x23 { mag: 14710904, sign: true }); + data.append(FP8x23 { mag: 8475156, sign: true }); + data.append(FP8x23 { mag: 8392465, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo new file mode 100644 index 000000000..e638eddbe --- /dev/null +++ b/src/tests/nodes/tanh_fp8x23/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 6158448, sign: false }); + data.append(FP8x23 { mag: 7900328, sign: true }); + data.append(FP8x23 { mag: 6424778, sign: true }); + data.append(FP8x23 { mag: 6390334, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From e352a9a4efc98a12891ea8dfd0afb4237b14610a Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 13:03:44 +0300 Subject: [PATCH 153/179] test transpose --- nodegen/node/transpose.py | 4 ++-- src/tests/nodes.cairo | 10 ++++++++ src/tests/nodes/transpose_fp16x16_2d.cairo | 20 ++++++++++++++++ .../nodes/transpose_fp16x16_2d/input_0.cairo | 18 +++++++++++++++ .../nodes/transpose_fp16x16_2d/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/transpose_fp16x16_3d.cairo | 20 ++++++++++++++++ .../nodes/transpose_fp16x16_3d/input_0.cairo | 23 +++++++++++++++++++ .../nodes/transpose_fp16x16_3d/output_0.cairo | 23 +++++++++++++++++++ src/tests/nodes/transpose_fp8x23_2d.cairo | 20 ++++++++++++++++ .../nodes/transpose_fp8x23_2d/input_0.cairo | 18 +++++++++++++++ .../nodes/transpose_fp8x23_2d/output_0.cairo | 18 +++++++++++++++ src/tests/nodes/transpose_fp8x23_3d.cairo | 20 ++++++++++++++++ .../nodes/transpose_fp8x23_3d/input_0.cairo | 23 +++++++++++++++++++ .../nodes/transpose_fp8x23_3d/output_0.cairo | 23 +++++++++++++++++++ src/tests/nodes/transpose_i32_2d.cairo | 20 ++++++++++++++++ .../nodes/transpose_i32_2d/input_0.cairo | 17 ++++++++++++++ .../nodes/transpose_i32_2d/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/transpose_i32_3d.cairo | 20 ++++++++++++++++ .../nodes/transpose_i32_3d/input_0.cairo | 22 ++++++++++++++++++ .../nodes/transpose_i32_3d/output_0.cairo | 22 ++++++++++++++++++ src/tests/nodes/transpose_i8_2d.cairo | 20 ++++++++++++++++ src/tests/nodes/transpose_i8_2d/input_0.cairo | 17 ++++++++++++++ .../nodes/transpose_i8_2d/output_0.cairo | 17 ++++++++++++++ src/tests/nodes/transpose_i8_3d.cairo | 20 ++++++++++++++++ src/tests/nodes/transpose_i8_3d/input_0.cairo | 22 ++++++++++++++++++ .../nodes/transpose_i8_3d/output_0.cairo | 22 ++++++++++++++++++ src/tests/nodes/transpose_u32_2d.cairo | 20 ++++++++++++++++ .../nodes/transpose_u32_2d/input_0.cairo | 16 +++++++++++++ .../nodes/transpose_u32_2d/output_0.cairo | 16 +++++++++++++ src/tests/nodes/transpose_u32_3d.cairo | 20 ++++++++++++++++ .../nodes/transpose_u32_3d/input_0.cairo | 21 +++++++++++++++++ .../nodes/transpose_u32_3d/output_0.cairo | 21 +++++++++++++++++ 32 files changed, 606 insertions(+), 2 deletions(-) create mode 100644 src/tests/nodes/transpose_fp16x16_2d.cairo create mode 100644 src/tests/nodes/transpose_fp16x16_2d/input_0.cairo create mode 100644 src/tests/nodes/transpose_fp16x16_2d/output_0.cairo create mode 100644 src/tests/nodes/transpose_fp16x16_3d.cairo create mode 100644 src/tests/nodes/transpose_fp16x16_3d/input_0.cairo create mode 100644 src/tests/nodes/transpose_fp16x16_3d/output_0.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_2d.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_2d/input_0.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_2d/output_0.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_3d.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_3d/input_0.cairo create mode 100644 src/tests/nodes/transpose_fp8x23_3d/output_0.cairo create mode 100644 src/tests/nodes/transpose_i32_2d.cairo create mode 100644 src/tests/nodes/transpose_i32_2d/input_0.cairo create mode 100644 src/tests/nodes/transpose_i32_2d/output_0.cairo create mode 100644 src/tests/nodes/transpose_i32_3d.cairo create mode 100644 src/tests/nodes/transpose_i32_3d/input_0.cairo create mode 100644 src/tests/nodes/transpose_i32_3d/output_0.cairo create mode 100644 src/tests/nodes/transpose_i8_2d.cairo create mode 100644 src/tests/nodes/transpose_i8_2d/input_0.cairo create mode 100644 src/tests/nodes/transpose_i8_2d/output_0.cairo create mode 100644 src/tests/nodes/transpose_i8_3d.cairo create mode 100644 src/tests/nodes/transpose_i8_3d/input_0.cairo create mode 100644 src/tests/nodes/transpose_i8_3d/output_0.cairo create mode 100644 src/tests/nodes/transpose_u32_2d.cairo create mode 100644 src/tests/nodes/transpose_u32_2d/input_0.cairo create mode 100644 src/tests/nodes/transpose_u32_2d/output_0.cairo create mode 100644 src/tests/nodes/transpose_u32_3d.cairo create mode 100644 src/tests/nodes/transpose_u32_3d/input_0.cairo create mode 100644 src/tests/nodes/transpose_u32_3d/output_0.cairo diff --git a/nodegen/node/transpose.py b/nodegen/node/transpose.py index 9452980c7..f18e82faf 100644 --- a/nodegen/node/transpose.py +++ b/nodegen/node/transpose.py @@ -100,7 +100,7 @@ def transpose_2D(): y = np.transpose(x, [1, 0]) x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "transpose_fp8x23_2d" make_node([x], [y], name) @@ -113,7 +113,7 @@ def transpose_3D(): y = np.transpose(x, [1, 2, 0]) x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "transpose_fp8x23_3d" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index fcac81ce7..c655bea0a 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -328,3 +328,13 @@ mod sub_u32; mod sub_u32_broadcast; mod tanh_fp16x16; mod tanh_fp8x23; +mod transpose_fp16x16_2d; +mod transpose_fp16x16_3d; +mod transpose_fp8x23_2d; +mod transpose_fp8x23_3d; +mod transpose_i32_2d; +mod transpose_i32_3d; +mod transpose_i8_2d; +mod transpose_i8_3d; +mod transpose_u32_2d; +mod transpose_u32_3d; diff --git a/src/tests/nodes/transpose_fp16x16_2d.cairo b/src/tests/nodes/transpose_fp16x16_2d.cairo new file mode 100644 index 000000000..8518391c3 --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_fp16x16_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo new file mode 100644 index 000000000..44fdf69f3 --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo new file mode 100644 index 000000000..5dfd272d6 --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 458752, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d.cairo b/src/tests/nodes/transpose_fp16x16_3d.cairo new file mode 100644 index 000000000..45333106b --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_fp16x16_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 2, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo new file mode 100644 index 000000000..aaa8ef6de --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo new file mode 100644 index 000000000..291e5ff22 --- /dev/null +++ b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d.cairo b/src/tests/nodes/transpose_fp8x23_2d.cairo new file mode 100644 index 000000000..93de8b029 --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_fp8x23_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo new file mode 100644 index 000000000..0d03b1ea9 --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo new file mode 100644 index 000000000..01800798c --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d.cairo b/src/tests/nodes/transpose_fp8x23_3d.cairo new file mode 100644 index 000000000..7a9975363 --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_fp8x23_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 2, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo new file mode 100644 index 000000000..b9fc54101 --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 838860800, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo new file mode 100644 index 000000000..df49a1863 --- /dev/null +++ b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo @@ -0,0 +1,23 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 838860800, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d.cairo b/src/tests/nodes/transpose_i32_2d.cairo new file mode 100644 index 000000000..6c3a62908 --- /dev/null +++ b/src/tests/nodes/transpose_i32_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_i32_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo new file mode 100644 index 000000000..89cf660d2 --- /dev/null +++ b/src/tests/nodes/transpose_i32_2d/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 76, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo new file mode 100644 index 000000000..b944c98ba --- /dev/null +++ b/src/tests/nodes/transpose_i32_2d/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 76, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d.cairo b/src/tests/nodes/transpose_i32_3d.cairo new file mode 100644 index 000000000..91dd82bf9 --- /dev/null +++ b/src/tests/nodes/transpose_i32_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_i32_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 2, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo new file mode 100644 index 000000000..1db626fe7 --- /dev/null +++ b/src/tests/nodes/transpose_i32_3d/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 54, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo new file mode 100644 index 000000000..ac0efdce2 --- /dev/null +++ b/src/tests/nodes/transpose_i32_3d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 54, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d.cairo b/src/tests/nodes/transpose_i8_2d.cairo new file mode 100644 index 000000000..f0018ffc7 --- /dev/null +++ b/src/tests/nodes/transpose_i8_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_i8_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo new file mode 100644 index 000000000..43baf095b --- /dev/null +++ b/src/tests/nodes/transpose_i8_2d/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 17, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo new file mode 100644 index 000000000..0ce510017 --- /dev/null +++ b/src/tests/nodes/transpose_i8_2d/output_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 17, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d.cairo b/src/tests/nodes/transpose_i8_3d.cairo new file mode 100644 index 000000000..e2275f9e8 --- /dev/null +++ b/src/tests/nodes/transpose_i8_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_i8_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 2, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo new file mode 100644 index 000000000..6bc3c421f --- /dev/null +++ b/src/tests/nodes/transpose_i8_3d/input_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 84, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo new file mode 100644 index 000000000..0561ce16f --- /dev/null +++ b/src/tests/nodes/transpose_i8_3d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 84, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d.cairo b/src/tests/nodes/transpose_u32_2d.cairo new file mode 100644 index 000000000..cf85578ed --- /dev/null +++ b/src/tests/nodes/transpose_u32_2d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_u32_2d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo new file mode 100644 index 000000000..223599a73 --- /dev/null +++ b/src/tests/nodes/transpose_u32_2d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(128); + data.append(228); + data.append(50); + data.append(212); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo new file mode 100644 index 000000000..d7bdc47d7 --- /dev/null +++ b/src/tests/nodes/transpose_u32_2d/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(128); + data.append(50); + data.append(228); + data.append(212); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d.cairo b/src/tests/nodes/transpose_u32_3d.cairo new file mode 100644 index 000000000..e315043d7 --- /dev/null +++ b/src/tests/nodes/transpose_u32_3d.cairo @@ -0,0 +1,20 @@ +mod input_0; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_transpose_u32_3d() { + let input_0 = input_0::input_0(); + let z = output_0::output_0(); + + let y = input_0.transpose(array![1, 2, 0].span()); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo new file mode 100644 index 000000000..02fba471b --- /dev/null +++ b/src/tests/nodes/transpose_u32_3d/input_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(6); + data.append(44); + data.append(94); + data.append(97); + data.append(104); + data.append(24); + data.append(21); + data.append(83); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo new file mode 100644 index 000000000..12694d086 --- /dev/null +++ b/src/tests/nodes/transpose_u32_3d/output_0.cairo @@ -0,0 +1,21 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(6); + data.append(104); + data.append(44); + data.append(24); + data.append(94); + data.append(21); + data.append(97); + data.append(83); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 65feee20557bc7973ee21b63949d1078cd91f367 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 13:06:30 +0300 Subject: [PATCH 154/179] test tensor xor --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/xor_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/xor_fp16x16/input_0.cairo | 18 ++++++++ src/tests/nodes/xor_fp16x16/input_1.cairo | 16 +++++++ src/tests/nodes/xor_fp16x16/output_0.cairo | 16 +++++++ src/tests/nodes/xor_fp16x16_broadcast.cairo | 22 ++++++++++ .../nodes/xor_fp16x16_broadcast/input_0.cairo | 18 ++++++++ .../nodes/xor_fp16x16_broadcast/input_1.cairo | 16 +++++++ .../xor_fp16x16_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/xor_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/xor_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/xor_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/xor_fp8x23/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/xor_fp8x23_broadcast/input_0.cairo | 18 ++++++++ .../nodes/xor_fp8x23_broadcast/input_1.cairo | 16 +++++++ .../nodes/xor_fp8x23_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/xor_i32.cairo | 22 ++++++++++ src/tests/nodes/xor_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/xor_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/xor_i32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_i32_broadcast.cairo | 22 ++++++++++ .../nodes/xor_i32_broadcast/input_0.cairo | 17 ++++++++ .../nodes/xor_i32_broadcast/input_1.cairo | 15 +++++++ .../nodes/xor_i32_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/xor_i8.cairo | 22 ++++++++++ src/tests/nodes/xor_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/xor_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/xor_i8/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_i8_broadcast.cairo | 22 ++++++++++ .../nodes/xor_i8_broadcast/input_0.cairo | 17 ++++++++ .../nodes/xor_i8_broadcast/input_1.cairo | 15 +++++++ .../nodes/xor_i8_broadcast/output_0.cairo | 16 +++++++ src/tests/nodes/xor_u32.cairo | 22 ++++++++++ src/tests/nodes/xor_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/xor_u32_broadcast.cairo | 22 ++++++++++ .../nodes/xor_u32_broadcast/input_0.cairo | 16 +++++++ .../nodes/xor_u32_broadcast/input_1.cairo | 14 +++++++ .../nodes/xor_u32_broadcast/output_0.cairo | 16 +++++++ 41 files changed, 1010 insertions(+) create mode 100644 src/tests/nodes/xor_fp16x16.cairo create mode 100644 src/tests/nodes/xor_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/xor_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/xor_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/xor_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/xor_fp8x23.cairo create mode 100644 src/tests/nodes/xor_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/xor_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/xor_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/xor_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/xor_i32.cairo create mode 100644 src/tests/nodes/xor_i32/input_0.cairo create mode 100644 src/tests/nodes/xor_i32/input_1.cairo create mode 100644 src/tests/nodes/xor_i32/output_0.cairo create mode 100644 src/tests/nodes/xor_i32_broadcast.cairo create mode 100644 src/tests/nodes/xor_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/xor_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/xor_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/xor_i8.cairo create mode 100644 src/tests/nodes/xor_i8/input_0.cairo create mode 100644 src/tests/nodes/xor_i8/input_1.cairo create mode 100644 src/tests/nodes/xor_i8/output_0.cairo create mode 100644 src/tests/nodes/xor_i8_broadcast.cairo create mode 100644 src/tests/nodes/xor_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/xor_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/xor_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/xor_u32.cairo create mode 100644 src/tests/nodes/xor_u32/input_0.cairo create mode 100644 src/tests/nodes/xor_u32/input_1.cairo create mode 100644 src/tests/nodes/xor_u32/output_0.cairo create mode 100644 src/tests/nodes/xor_u32_broadcast.cairo create mode 100644 src/tests/nodes/xor_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/xor_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/xor_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index c655bea0a..cab4748c1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -338,3 +338,13 @@ mod transpose_i8_2d; mod transpose_i8_3d; mod transpose_u32_2d; mod transpose_u32_3d; +mod xor_fp16x16; +mod xor_fp16x16_broadcast; +mod xor_fp8x23; +mod xor_fp8x23_broadcast; +mod xor_i32; +mod xor_i32_broadcast; +mod xor_i8; +mod xor_i8_broadcast; +mod xor_u32; +mod xor_u32_broadcast; diff --git a/src/tests/nodes/xor_fp16x16.cairo b/src/tests/nodes/xor_fp16x16.cairo new file mode 100644 index 000000000..08b6c36ae --- /dev/null +++ b/src/tests/nodes/xor_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo new file mode 100644 index 000000000..fff479495 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo new file mode 100644 index 000000000..35b36e995 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo new file mode 100644 index 000000000..e7b1da4b1 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast.cairo b/src/tests/nodes/xor_fp16x16_broadcast.cairo new file mode 100644 index 000000000..b82315df3 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..7f8ad7c16 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..4e47e4f2c --- /dev/null +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..0cc7de207 --- /dev/null +++ b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23.cairo b/src/tests/nodes/xor_fp8x23.cairo new file mode 100644 index 000000000..4be36252e --- /dev/null +++ b/src/tests/nodes/xor_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo new file mode 100644 index 000000000..2b77e8b23 --- /dev/null +++ b/src/tests/nodes/xor_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo new file mode 100644 index 000000000..e68e28e05 --- /dev/null +++ b/src/tests/nodes/xor_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo new file mode 100644 index 000000000..70f2eb1c0 --- /dev/null +++ b/src/tests/nodes/xor_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast.cairo b/src/tests/nodes/xor_fp8x23_broadcast.cairo new file mode 100644 index 000000000..ab911da0f --- /dev/null +++ b/src/tests/nodes/xor_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..4f2014dfa --- /dev/null +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..4ce45e8c2 --- /dev/null +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..2101f7fc8 --- /dev/null +++ b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32.cairo b/src/tests/nodes/xor_i32.cairo new file mode 100644 index 000000000..137ecc9f7 --- /dev/null +++ b/src/tests/nodes/xor_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo new file mode 100644 index 000000000..c55b2e7fd --- /dev/null +++ b/src/tests/nodes/xor_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo new file mode 100644 index 000000000..29e595bcf --- /dev/null +++ b/src/tests/nodes/xor_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo new file mode 100644 index 000000000..496a737b9 --- /dev/null +++ b/src/tests/nodes/xor_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast.cairo b/src/tests/nodes/xor_i32_broadcast.cairo new file mode 100644 index 000000000..9b65f7f9a --- /dev/null +++ b/src/tests/nodes/xor_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..dd650e28e --- /dev/null +++ b/src/tests/nodes/xor_i32_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..d955a58f8 --- /dev/null +++ b/src/tests/nodes/xor_i32_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..2101f7fc8 --- /dev/null +++ b/src/tests/nodes/xor_i32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8.cairo b/src/tests/nodes/xor_i8.cairo new file mode 100644 index 000000000..818f8ec6e --- /dev/null +++ b/src/tests/nodes/xor_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo new file mode 100644 index 000000000..f0a5d8f05 --- /dev/null +++ b/src/tests/nodes/xor_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo new file mode 100644 index 000000000..736dbe136 --- /dev/null +++ b/src/tests/nodes/xor_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo new file mode 100644 index 000000000..3dfa40551 --- /dev/null +++ b/src/tests/nodes/xor_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast.cairo b/src/tests/nodes/xor_i8_broadcast.cairo new file mode 100644 index 000000000..88ecb155e --- /dev/null +++ b/src/tests/nodes/xor_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..e621a9516 --- /dev/null +++ b/src/tests/nodes/xor_i8_broadcast/input_0.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..ed4f1bac9 --- /dev/null +++ b/src/tests/nodes/xor_i8_broadcast/input_1.cairo @@ -0,0 +1,15 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..2094003c4 --- /dev/null +++ b/src/tests/nodes/xor_i8_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32.cairo b/src/tests/nodes/xor_u32.cairo new file mode 100644 index 000000000..bf08a5353 --- /dev/null +++ b/src/tests/nodes/xor_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo new file mode 100644 index 000000000..0ff938795 --- /dev/null +++ b/src/tests/nodes/xor_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(4); + data.append(4); + data.append(0); + data.append(1); + data.append(4); + data.append(1); + data.append(3); + data.append(0); + data.append(4); + data.append(3); + data.append(4); + data.append(2); + data.append(5); + data.append(1); + data.append(1); + data.append(5); + data.append(1); + data.append(1); + data.append(1); + data.append(2); + data.append(5); + data.append(5); + data.append(0); + data.append(0); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo new file mode 100644 index 000000000..bd273bcdf --- /dev/null +++ b/src/tests/nodes/xor_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(4); + data.append(0); + data.append(2); + data.append(4); + data.append(4); + data.append(2); + data.append(2); + data.append(3); + data.append(1); + data.append(1); + data.append(2); + data.append(5); + data.append(0); + data.append(3); + data.append(5); + data.append(2); + data.append(0); + data.append(0); + data.append(1); + data.append(4); + data.append(0); + data.append(1); + data.append(2); + data.append(2); + data.append(1); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo new file mode 100644 index 000000000..ba056af8f --- /dev/null +++ b/src/tests/nodes/xor_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast.cairo b/src/tests/nodes/xor_u32_broadcast.cairo new file mode 100644 index 000000000..350165580 --- /dev/null +++ b/src/tests/nodes/xor_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_xor_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.xor(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..ce1b965e8 --- /dev/null +++ b/src/tests/nodes/xor_u32_broadcast/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..7860a60be --- /dev/null +++ b/src/tests/nodes/xor_u32_broadcast/input_1.cairo @@ -0,0 +1,14 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(4); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..8304bcded --- /dev/null +++ b/src/tests/nodes/xor_u32_broadcast/output_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 6380c4d88c13400a1677ab7d5777ee669ea16da7 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 13:52:20 +0300 Subject: [PATCH 155/179] remove unnecessary generic impl --- .../implementations/tensor_fp16x16.cairo | 32 ++------------ .../tensor/implementations/tensor_i32.cairo | 42 +++---------------- .../tensor/implementations/tensor_i8.cairo | 42 +++---------------- .../tensor/implementations/tensor_u32.cairo | 42 +++---------------- 4 files changed, 22 insertions(+), 136 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 7e8375c52..af44eb78e 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -196,13 +196,7 @@ impl FP16x16Tensor of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl FP16x16TensorAdd< - FP16x16, - impl FP16x16Tensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop -> of Add> { +impl FP16x16TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -217,13 +211,7 @@ impl FP16x16TensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl FP16x16TensorSub< - FP16x16, - impl FP16x16Tensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop -> of Sub> { +impl FP16x16TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -238,13 +226,7 @@ impl FP16x16TensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl FP16x16TensorMul< - FP16x16, - impl FP16x16Tensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop -> of Mul> { +impl FP16x16TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -259,13 +241,7 @@ impl FP16x16TensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl FP16x16TensorDiv< - FP16x16, - impl FP16x16Tensor: TensorTrait, - impl TDiv: Div, - impl TCopy: Copy, - impl TDrop: Drop -> of Div> { +impl FP16x16TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments diff --git a/src/operators/tensor/implementations/tensor_i32.cairo b/src/operators/tensor/implementations/tensor_i32.cairo index 9932b891a..9e6cf7ca7 100644 --- a/src/operators/tensor/implementations/tensor_i32.cairo +++ b/src/operators/tensor/implementations/tensor_i32.cairo @@ -197,13 +197,7 @@ impl I32Tensor of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl I32TensorAdd< - i32, - impl I32Tensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop -> of Add> { +impl I32TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -218,13 +212,7 @@ impl I32TensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl I32TensorSub< - i32, - impl I32Tensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop -> of Sub> { +impl I32TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -239,13 +227,7 @@ impl I32TensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl I32TensorMul< - i32, - impl I32Tensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop -> of Mul> { +impl I32TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -260,13 +242,7 @@ impl I32TensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl I32TensorDiv< - i32, - impl I32Tensor: TensorTrait, - impl TDiv: Div, - impl TCopy: Copy, - impl TDrop: Drop -> of Div> { +impl I32TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -281,13 +257,7 @@ impl I32TensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl I32TensorPartialEq< - i32, - impl I32Tensor: TensorTrait, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop -> of PartialEq> { +impl I32TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -312,7 +282,7 @@ impl TensorI8IntoTensorI32 of Into, Tensor> { // Internals -fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( +fn tensor_eq( mut lhs: Tensor, mut rhs: Tensor, ) -> bool { let mut is_eq = true; diff --git a/src/operators/tensor/implementations/tensor_i8.cairo b/src/operators/tensor/implementations/tensor_i8.cairo index 322e09ce4..a4c5efe82 100644 --- a/src/operators/tensor/implementations/tensor_i8.cairo +++ b/src/operators/tensor/implementations/tensor_i8.cairo @@ -196,13 +196,7 @@ impl I8Tensor of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl I8TensorAdd< - i8, - impl I8Tensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop -> of Add> { +impl I8TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -217,13 +211,7 @@ impl I8TensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl I8TensorSub< - i8, - impl I8Tensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop -> of Sub> { +impl I8TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -238,13 +226,7 @@ impl I8TensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl I8TensorMul< - i8, - impl I8Tensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop -> of Mul> { +impl I8TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -259,13 +241,7 @@ impl I8TensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl I8TensorDiv< - i8, - impl I8Tensor: TensorTrait, - impl TDiv: Div, - impl TCopy: Copy, - impl TDrop: Drop -> of Div> { +impl I8TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -280,13 +256,7 @@ impl I8TensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl I8TensorPartialEq< - i8, - impl I8Tensor: TensorTrait, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop -> of PartialEq> { +impl I8TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -304,7 +274,7 @@ impl I8TryIntoI8 of TryInto { // Internals -fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( +fn tensor_eq( mut lhs: Tensor, mut rhs: Tensor, ) -> bool { let mut is_eq = true; diff --git a/src/operators/tensor/implementations/tensor_u32.cairo b/src/operators/tensor/implementations/tensor_u32.cairo index b71b02c9a..7ac0f0a7b 100644 --- a/src/operators/tensor/implementations/tensor_u32.cairo +++ b/src/operators/tensor/implementations/tensor_u32.cairo @@ -190,13 +190,7 @@ impl U32Tensor of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl U32TensorAdd< - u32, - impl U32Tensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop -> of Add> { +impl U32TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -211,13 +205,7 @@ impl U32TensorAdd< } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl U32TensorSub< - u32, - impl U32Tensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop -> of Sub> { +impl U32TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -232,13 +220,7 @@ impl U32TensorSub< } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl U32TensorMul< - u32, - impl U32Tensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop -> of Mul> { +impl U32TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -253,13 +235,7 @@ impl U32TensorMul< } /// Implements division for `Tensor` using the `Div` trait. -impl U32TensorDiv< - u32, - impl U32Tensor: TensorTrait, - impl TDiv: Div, - impl TCopy: Copy, - impl TDrop: Drop -> of Div> { +impl U32TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -274,13 +250,7 @@ impl U32TensorDiv< } /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl U32TensorPartialEq< - u32, - impl U32Tensor: TensorTrait, - impl TPartialEq: PartialEq, - impl TCopy: Copy, - impl TDrop: Drop -> of PartialEq> { +impl U32TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -299,7 +269,7 @@ impl U32TryIntoI8 of TryInto { // Internals -fn tensor_eq, impl TCopy: Copy, impl TDrop: Drop>( +fn tensor_eq( mut lhs: Tensor, mut rhs: Tensor, ) -> bool { let mut is_eq = true; From bf4928ef06128167f568981fde10467767fb4ce7 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 14:16:57 +0300 Subject: [PATCH 156/179] refactor broadcasting ops --- src/operators/tensor/math/equal.cairo | 44 ++++++++--------- src/operators/tensor/math/greater.cairo | 48 +++++++----------- src/operators/tensor/math/greater_equal.cairo | 48 +++++++----------- src/operators/tensor/math/less.cairo | 49 +++++++------------ src/operators/tensor/math/less_equal.cairo | 48 +++++++----------- src/operators/tensor/math/or.cairo | 48 +++++++----------- src/operators/tensor/math/xor.cairo | 49 ++++++++----------- 7 files changed, 135 insertions(+), 199 deletions(-) diff --git a/src/operators/tensor/math/equal.cairo b/src/operators/tensor/math/equal.cairo index bc98b866f..9de0c9fe4 100644 --- a/src/operators/tensor/math/equal.cairo +++ b/src/operators/tensor/math/equal.cairo @@ -2,8 +2,10 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::equal docstring fn equal< @@ -15,35 +17,29 @@ fn equal< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - if bigger_current_index == smaller_current_index { - data_result.append(1); + if *(*y.data)[indices_self] == *(*z.data)[indices_other] { + result.append(1); } else { - data_result.append(0); - }; + result.append(0); + } - smaller_index = (1 + smaller_index) % smaller_data.len(); + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/greater.cairo b/src/operators/tensor/math/greater.cairo index fb24e507d..7d4825b12 100644 --- a/src/operators/tensor/math/greater.cairo +++ b/src/operators/tensor/math/greater.cairo @@ -1,9 +1,11 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::greater docstring fn greater< @@ -15,41 +17,29 @@ fn greater< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] > *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/greater_equal.cairo b/src/operators/tensor/math/greater_equal.cairo index c353336d8..9edb87373 100644 --- a/src/operators/tensor/math/greater_equal.cairo +++ b/src/operators/tensor/math/greater_equal.cairo @@ -2,8 +2,10 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::greater_equal docstring fn greater_equal< @@ -15,41 +17,29 @@ fn greater_equal< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] >= *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/less.cairo b/src/operators/tensor/math/less.cairo index e1e7cbc99..e578ec426 100644 --- a/src/operators/tensor/math/less.cairo +++ b/src/operators/tensor/math/less.cairo @@ -1,10 +1,11 @@ -use core::debug::PrintTrait; use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::less docstring fn less< @@ -16,41 +17,29 @@ fn less< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] < *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/less_equal.cairo b/src/operators/tensor/math/less_equal.cairo index 2a97e9150..9b970a999 100644 --- a/src/operators/tensor/math/less_equal.cairo +++ b/src/operators/tensor/math/less_equal.cairo @@ -2,8 +2,10 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::less_equal docstring fn less_equal< @@ -15,41 +17,29 @@ fn less_equal< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] <= *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/or.cairo b/src/operators/tensor/math/or.cairo index 6cff9e8a9..95f3f9fab 100644 --- a/src/operators/tensor/math/or.cairo +++ b/src/operators/tensor/math/or.cairo @@ -3,8 +3,10 @@ use option::OptionTrait; use array::SpanTrait; use orion::numbers::NumberTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::or docstring fn or< @@ -17,41 +19,29 @@ fn or< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if NumberTrait::or(*(*y.data)[indices_self], *(*z.data)[indices_other]) { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; - - if NumberTrait::or(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); + result.append(0); } - smaller_index = (1 + smaller_index) % smaller_data.len(); + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/xor.cairo b/src/operators/tensor/math/xor.cairo index 4d7bb9a1d..690a768d7 100644 --- a/src/operators/tensor/math/xor.cairo +++ b/src/operators/tensor/math/xor.cairo @@ -3,8 +3,10 @@ use option::OptionTrait; use array::SpanTrait; use orion::numbers::NumberTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::xor docstring fn xor< @@ -17,40 +19,29 @@ fn xor< >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - if NumberTrait::xor(y_value, z_value) { - data_result.append(1); + if NumberTrait::xor(*(*y.data)[indices_self], *(*z.data)[indices_other]) { + result.append(1); } else { - data_result.append(0); + result.append(0); } - smaller_index = (1 + smaller_index) % smaller_data.len(); + + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } From 3e6d622f1e30c1f5d29ede8bb4b2579087fd82e3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 14:17:48 +0300 Subject: [PATCH 157/179] test less --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/less_fp16x16.cairo | 22 ++++++++++ src/tests/nodes/less_fp16x16/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/less_fp16x16/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/less_fp16x16/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_fp16x16_broadcast.cairo | 22 ++++++++++ .../less_fp16x16_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../less_fp16x16_broadcast/input_1.cairo | 18 ++++++++ .../less_fp16x16_broadcast/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_fp8x23.cairo | 22 ++++++++++ src/tests/nodes/less_fp8x23/input_0.cairo | 42 +++++++++++++++++++ src/tests/nodes/less_fp8x23/input_1.cairo | 42 +++++++++++++++++++ src/tests/nodes/less_fp8x23/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_fp8x23_broadcast.cairo | 22 ++++++++++ .../nodes/less_fp8x23_broadcast/input_0.cairo | 42 +++++++++++++++++++ .../nodes/less_fp8x23_broadcast/input_1.cairo | 18 ++++++++ .../less_fp8x23_broadcast/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_i32.cairo | 22 ++++++++++ src/tests/nodes/less_i32/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/less_i32/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/less_i32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_i32_broadcast.cairo | 22 ++++++++++ .../nodes/less_i32_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/less_i32_broadcast/input_1.cairo | 17 ++++++++ .../nodes/less_i32_broadcast/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_i8.cairo | 22 ++++++++++ src/tests/nodes/less_i8/input_0.cairo | 41 ++++++++++++++++++ src/tests/nodes/less_i8/input_1.cairo | 41 ++++++++++++++++++ src/tests/nodes/less_i8/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_i8_broadcast.cairo | 22 ++++++++++ .../nodes/less_i8_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../nodes/less_i8_broadcast/input_1.cairo | 17 ++++++++ .../nodes/less_i8_broadcast/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_u32.cairo | 22 ++++++++++ src/tests/nodes/less_u32/input_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_u32/input_1.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_u32/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/less_u32_broadcast.cairo | 22 ++++++++++ .../nodes/less_u32_broadcast/input_0.cairo | 40 ++++++++++++++++++ .../nodes/less_u32_broadcast/input_1.cairo | 16 +++++++ .../nodes/less_u32_broadcast/output_0.cairo | 40 ++++++++++++++++++ 41 files changed, 1334 insertions(+) create mode 100644 src/tests/nodes/less_fp16x16.cairo create mode 100644 src/tests/nodes/less_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/less_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/less_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/less_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/less_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_fp8x23.cairo create mode 100644 src/tests/nodes/less_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/less_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/less_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/less_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/less_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_i32.cairo create mode 100644 src/tests/nodes/less_i32/input_0.cairo create mode 100644 src/tests/nodes/less_i32/input_1.cairo create mode 100644 src/tests/nodes/less_i32/output_0.cairo create mode 100644 src/tests/nodes/less_i32_broadcast.cairo create mode 100644 src/tests/nodes/less_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_i8.cairo create mode 100644 src/tests/nodes/less_i8/input_0.cairo create mode 100644 src/tests/nodes/less_i8/input_1.cairo create mode 100644 src/tests/nodes/less_i8/output_0.cairo create mode 100644 src/tests/nodes/less_i8_broadcast.cairo create mode 100644 src/tests/nodes/less_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/less_u32.cairo create mode 100644 src/tests/nodes/less_u32/input_0.cairo create mode 100644 src/tests/nodes/less_u32/input_1.cairo create mode 100644 src/tests/nodes/less_u32/output_0.cairo create mode 100644 src/tests/nodes/less_u32_broadcast.cairo create mode 100644 src/tests/nodes/less_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/less_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/less_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index cab4748c1..69c38f4bb 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -348,3 +348,13 @@ mod xor_i8; mod xor_i8_broadcast; mod xor_u32; mod xor_u32_broadcast; +mod less_fp16x16; +mod less_fp16x16_broadcast; +mod less_fp8x23; +mod less_fp8x23_broadcast; +mod less_i32; +mod less_i32_broadcast; +mod less_i8; +mod less_i8_broadcast; +mod less_u32; +mod less_u32_broadcast; diff --git a/src/tests/nodes/less_fp16x16.cairo b/src/tests/nodes/less_fp16x16.cairo new file mode 100644 index 000000000..21781b9e0 --- /dev/null +++ b/src/tests/nodes/less_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo new file mode 100644 index 000000000..47ba0c652 --- /dev/null +++ b/src/tests/nodes/less_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo new file mode 100644 index 000000000..df51f1840 --- /dev/null +++ b/src/tests/nodes/less_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo new file mode 100644 index 000000000..57a138cc0 --- /dev/null +++ b/src/tests/nodes/less_fp16x16/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast.cairo b/src/tests/nodes/less_fp16x16_broadcast.cairo new file mode 100644 index 000000000..f12f65642 --- /dev/null +++ b/src/tests/nodes/less_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..e186777e0 --- /dev/null +++ b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..1f86b7108 --- /dev/null +++ b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..718bd3ae5 --- /dev/null +++ b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23.cairo b/src/tests/nodes/less_fp8x23.cairo new file mode 100644 index 000000000..acf56a881 --- /dev/null +++ b/src/tests/nodes/less_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo new file mode 100644 index 000000000..d25e75ea8 --- /dev/null +++ b/src/tests/nodes/less_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo new file mode 100644 index 000000000..268729957 --- /dev/null +++ b/src/tests/nodes/less_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo new file mode 100644 index 000000000..b8295128c --- /dev/null +++ b/src/tests/nodes/less_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast.cairo b/src/tests/nodes/less_fp8x23_broadcast.cairo new file mode 100644 index 000000000..52adce60c --- /dev/null +++ b/src/tests/nodes/less_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..dcf3b113f --- /dev/null +++ b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..d586a2c4b --- /dev/null +++ b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..0b1d736f2 --- /dev/null +++ b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32.cairo b/src/tests/nodes/less_i32.cairo new file mode 100644 index 000000000..57541a095 --- /dev/null +++ b/src/tests/nodes/less_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo new file mode 100644 index 000000000..dc2a71d6f --- /dev/null +++ b/src/tests/nodes/less_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo new file mode 100644 index 000000000..f8a774df8 --- /dev/null +++ b/src/tests/nodes/less_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo new file mode 100644 index 000000000..ea0f32c51 --- /dev/null +++ b/src/tests/nodes/less_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast.cairo b/src/tests/nodes/less_i32_broadcast.cairo new file mode 100644 index 000000000..09b42704a --- /dev/null +++ b/src/tests/nodes/less_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..b5d1adb86 --- /dev/null +++ b/src/tests/nodes/less_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..5a96f6820 --- /dev/null +++ b/src/tests/nodes/less_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..0b9fd5642 --- /dev/null +++ b/src/tests/nodes/less_i32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8.cairo b/src/tests/nodes/less_i8.cairo new file mode 100644 index 000000000..c05e8d799 --- /dev/null +++ b/src/tests/nodes/less_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo new file mode 100644 index 000000000..c2184a707 --- /dev/null +++ b/src/tests/nodes/less_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo new file mode 100644 index 000000000..571aad2d3 --- /dev/null +++ b/src/tests/nodes/less_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo new file mode 100644 index 000000000..deae6c067 --- /dev/null +++ b/src/tests/nodes/less_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast.cairo b/src/tests/nodes/less_i8_broadcast.cairo new file mode 100644 index 000000000..5d5671acb --- /dev/null +++ b/src/tests/nodes/less_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..bc6e75c58 --- /dev/null +++ b/src/tests/nodes/less_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..6c082b2d3 --- /dev/null +++ b/src/tests/nodes/less_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..48ad45772 --- /dev/null +++ b/src/tests/nodes/less_i8_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32.cairo b/src/tests/nodes/less_u32.cairo new file mode 100644 index 000000000..e3043c8cc --- /dev/null +++ b/src/tests/nodes/less_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo new file mode 100644 index 000000000..6289bb4f0 --- /dev/null +++ b/src/tests/nodes/less_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(1); + data.append(2); + data.append(3); + data.append(3); + data.append(5); + data.append(5); + data.append(5); + data.append(1); + data.append(5); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(2); + data.append(3); + data.append(0); + data.append(1); + data.append(2); + data.append(5); + data.append(5); + data.append(1); + data.append(5); + data.append(3); + data.append(2); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo new file mode 100644 index 000000000..1d3cc89f6 --- /dev/null +++ b/src/tests/nodes/less_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(4); + data.append(5); + data.append(5); + data.append(4); + data.append(0); + data.append(4); + data.append(3); + data.append(5); + data.append(0); + data.append(2); + data.append(5); + data.append(1); + data.append(3); + data.append(5); + data.append(0); + data.append(1); + data.append(4); + data.append(4); + data.append(0); + data.append(4); + data.append(5); + data.append(3); + data.append(0); + data.append(2); + data.append(4); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo new file mode 100644 index 000000000..df422974f --- /dev/null +++ b/src/tests/nodes/less_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast.cairo b/src/tests/nodes/less_u32_broadcast.cairo new file mode 100644 index 000000000..f6f451556 --- /dev/null +++ b/src/tests/nodes/less_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_less_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.less(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..d484854b7 --- /dev/null +++ b/src/tests/nodes/less_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(5); + data.append(5); + data.append(0); + data.append(4); + data.append(1); + data.append(3); + data.append(0); + data.append(4); + data.append(5); + data.append(2); + data.append(2); + data.append(0); + data.append(3); + data.append(0); + data.append(5); + data.append(4); + data.append(0); + data.append(5); + data.append(3); + data.append(1); + data.append(3); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(3); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..26f1f9845 --- /dev/null +++ b/src/tests/nodes/less_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(5); + data.append(3); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..e092a6421 --- /dev/null +++ b/src/tests/nodes/less_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 140c3105f1e098656bdf410e21cd6862179165e5 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 14:19:02 +0300 Subject: [PATCH 158/179] test greater_equal --- src/tests/nodes.cairo | 10 +++++ src/tests/nodes/greater_equal_fp16x16.cairo | 22 ++++++++++ .../nodes/greater_equal_fp16x16/input_0.cairo | 42 +++++++++++++++++++ .../nodes/greater_equal_fp16x16/input_1.cairo | 42 +++++++++++++++++++ .../greater_equal_fp16x16/output_0.cairo | 40 ++++++++++++++++++ .../greater_equal_fp16x16_broadcast.cairo | 22 ++++++++++ .../input_0.cairo | 42 +++++++++++++++++++ .../input_1.cairo | 18 ++++++++ .../output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_equal_fp8x23.cairo | 22 ++++++++++ .../nodes/greater_equal_fp8x23/input_0.cairo | 42 +++++++++++++++++++ .../nodes/greater_equal_fp8x23/input_1.cairo | 42 +++++++++++++++++++ .../nodes/greater_equal_fp8x23/output_0.cairo | 40 ++++++++++++++++++ .../greater_equal_fp8x23_broadcast.cairo | 22 ++++++++++ .../input_0.cairo | 42 +++++++++++++++++++ .../input_1.cairo | 18 ++++++++ .../output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_equal_i32.cairo | 22 ++++++++++ .../nodes/greater_equal_i32/input_0.cairo | 41 ++++++++++++++++++ .../nodes/greater_equal_i32/input_1.cairo | 41 ++++++++++++++++++ .../nodes/greater_equal_i32/output_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_equal_i32_broadcast.cairo | 22 ++++++++++ .../greater_equal_i32_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../greater_equal_i32_broadcast/input_1.cairo | 17 ++++++++ .../output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_equal_i8.cairo | 22 ++++++++++ .../nodes/greater_equal_i8/input_0.cairo | 41 ++++++++++++++++++ .../nodes/greater_equal_i8/input_1.cairo | 41 ++++++++++++++++++ .../nodes/greater_equal_i8/output_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_equal_i8_broadcast.cairo | 22 ++++++++++ .../greater_equal_i8_broadcast/input_0.cairo | 41 ++++++++++++++++++ .../greater_equal_i8_broadcast/input_1.cairo | 17 ++++++++ .../greater_equal_i8_broadcast/output_0.cairo | 40 ++++++++++++++++++ src/tests/nodes/greater_equal_u32.cairo | 22 ++++++++++ .../nodes/greater_equal_u32/input_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_equal_u32/input_1.cairo | 40 ++++++++++++++++++ .../nodes/greater_equal_u32/output_0.cairo | 40 ++++++++++++++++++ .../nodes/greater_equal_u32_broadcast.cairo | 22 ++++++++++ .../greater_equal_u32_broadcast/input_0.cairo | 40 ++++++++++++++++++ .../greater_equal_u32_broadcast/input_1.cairo | 16 +++++++ .../output_0.cairo | 40 ++++++++++++++++++ 41 files changed, 1334 insertions(+) create mode 100644 src/tests/nodes/greater_equal_fp16x16.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_i32.cairo create mode 100644 src/tests/nodes/greater_equal_i32/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_i32/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_i32/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_i32_broadcast.cairo create mode 100644 src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_i8.cairo create mode 100644 src/tests/nodes/greater_equal_i8/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_i8/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_i8/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_i8_broadcast.cairo create mode 100644 src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_u32.cairo create mode 100644 src/tests/nodes/greater_equal_u32/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_u32/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_u32/output_0.cairo create mode 100644 src/tests/nodes/greater_equal_u32_broadcast.cairo create mode 100644 src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo create mode 100644 src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo create mode 100644 src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 69c38f4bb..61da084a1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -358,3 +358,13 @@ mod less_i8; mod less_i8_broadcast; mod less_u32; mod less_u32_broadcast; +mod greater_equal_fp16x16; +mod greater_equal_fp16x16_broadcast; +mod greater_equal_fp8x23; +mod greater_equal_fp8x23_broadcast; +mod greater_equal_i32; +mod greater_equal_i32_broadcast; +mod greater_equal_i8; +mod greater_equal_i8_broadcast; +mod greater_equal_u32; +mod greater_equal_u32_broadcast; diff --git a/src/tests/nodes/greater_equal_fp16x16.cairo b/src/tests/nodes/greater_equal_fp16x16.cairo new file mode 100644 index 000000000..81145c607 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_fp16x16() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo new file mode 100644 index 000000000..3e4cf0178 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo new file mode 100644 index 000000000..7dca8c177 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo new file mode 100644 index 000000000..0563fc097 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo new file mode 100644 index 000000000..bf4b63b6f --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_fp16x16_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo new file mode 100644 index 000000000..e69833180 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo new file mode 100644 index 000000000..e662e53b4 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo new file mode 100644 index 000000000..3798b1601 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23.cairo b/src/tests/nodes/greater_equal_fp8x23.cairo new file mode 100644 index 000000000..13482e0ec --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_fp8x23() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo new file mode 100644 index 000000000..805430286 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo new file mode 100644 index 000000000..517179318 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo new file mode 100644 index 000000000..0345ba65f --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo new file mode 100644 index 000000000..dd979b6fc --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_fp8x23_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo new file mode 100644 index 000000000..bb87b4eed --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo new file mode 100644 index 000000000..65f5c6465 --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo new file mode 100644 index 000000000..5856dd1da --- /dev/null +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32.cairo b/src/tests/nodes/greater_equal_i32.cairo new file mode 100644 index 000000000..84368ba93 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_i32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo new file mode 100644 index 000000000..cec68dfb0 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo new file mode 100644 index 000000000..5fa17db22 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo new file mode 100644 index 000000000..ec54ffc3b --- /dev/null +++ b/src/tests/nodes/greater_equal_i32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast.cairo b/src/tests/nodes/greater_equal_i32_broadcast.cairo new file mode 100644 index 000000000..bd83f9308 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_i32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo new file mode 100644 index 000000000..ea1897d83 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo new file mode 100644 index 000000000..ba1463129 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo new file mode 100644 index 000000000..105f89e17 --- /dev/null +++ b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8.cairo b/src/tests/nodes/greater_equal_i8.cairo new file mode 100644 index 000000000..cc946f038 --- /dev/null +++ b/src/tests/nodes/greater_equal_i8.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_i8() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo new file mode 100644 index 000000000..969578186 --- /dev/null +++ b/src/tests/nodes/greater_equal_i8/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo new file mode 100644 index 000000000..4fc9266f5 --- /dev/null +++ b/src/tests/nodes/greater_equal_i8/input_1.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo new file mode 100644 index 000000000..6d6aadf7f --- /dev/null +++ b/src/tests/nodes/greater_equal_i8/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast.cairo b/src/tests/nodes/greater_equal_i8_broadcast.cairo new file mode 100644 index 000000000..0cf3a3bbd --- /dev/null +++ b/src/tests/nodes/greater_equal_i8_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_i8_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo new file mode 100644 index 000000000..aa0ee407a --- /dev/null +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo @@ -0,0 +1,41 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo new file mode 100644 index 000000000..b238febac --- /dev/null +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo @@ -0,0 +1,17 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo new file mode 100644 index 000000000..a1d7a1547 --- /dev/null +++ b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32.cairo b/src/tests/nodes/greater_equal_u32.cairo new file mode 100644 index 000000000..1d35a2070 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_u32() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo new file mode 100644 index 000000000..59ddf51b1 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(4); + data.append(1); + data.append(2); + data.append(5); + data.append(4); + data.append(2); + data.append(4); + data.append(5); + data.append(1); + data.append(0); + data.append(2); + data.append(4); + data.append(2); + data.append(0); + data.append(4); + data.append(1); + data.append(2); + data.append(5); + data.append(1); + data.append(2); + data.append(2); + data.append(4); + data.append(4); + data.append(2); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo new file mode 100644 index 000000000..cf5cdf751 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32/input_1.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(2); + data.append(5); + data.append(5); + data.append(3); + data.append(5); + data.append(1); + data.append(5); + data.append(2); + data.append(5); + data.append(5); + data.append(2); + data.append(3); + data.append(2); + data.append(5); + data.append(1); + data.append(4); + data.append(0); + data.append(1); + data.append(0); + data.append(3); + data.append(0); + data.append(1); + data.append(4); + data.append(4); + data.append(0); + data.append(3); + data.append(5); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo new file mode 100644 index 000000000..99310ca0d --- /dev/null +++ b/src/tests/nodes/greater_equal_u32/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(0); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast.cairo b/src/tests/nodes/greater_equal_u32_broadcast.cairo new file mode 100644 index 000000000..72219a061 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32_broadcast.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_greater_equal_u32_broadcast() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = input_0.greater_equal(@input_1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo new file mode 100644 index 000000000..7b6c92b34 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(3); + data.append(1); + data.append(4); + data.append(0); + data.append(4); + data.append(0); + data.append(4); + data.append(3); + data.append(4); + data.append(0); + data.append(1); + data.append(5); + data.append(5); + data.append(5); + data.append(0); + data.append(5); + data.append(0); + data.append(3); + data.append(5); + data.append(5); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(1); + data.append(5); + data.append(2); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo new file mode 100644 index 000000000..6b21f0921 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(1); + shape.append(3); + shape.append(1); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(3); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo new file mode 100644 index 000000000..6c038a7d6 --- /dev/null +++ b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo @@ -0,0 +1,40 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); + data.append(1); + data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file From 5a266dd724902cc85af5f41d4698a864b0645f47 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 14:57:16 +0300 Subject: [PATCH 159/179] update doc --- .../operators/neural-network/nn.leaky_relu.md | 28 +-- .../operators/neural-network/nn.linear.md | 4 +- .../operators/neural-network/nn.logsoftmax.md | 22 +- .../operators/neural-network/nn.relu.md | 4 +- .../operators/neural-network/nn.sigmoid.md | 22 +- .../operators/neural-network/nn.softmax.md | 22 +- .../operators/neural-network/nn.softplus.md | 22 +- .../operators/neural-network/nn.softsign.md | 22 +- docs/framework/operators/tensor/tensor.abs.md | 2 +- .../framework/operators/tensor/tensor.acos.md | 6 +- .../operators/tensor/tensor.acosh.md | 10 +- .../operators/tensor/tensor.argmax.md | 6 +- .../operators/tensor/tensor.argmin.md | 6 +- .../framework/operators/tensor/tensor.asin.md | 6 +- .../operators/tensor/tensor.asinh.md | 10 +- docs/framework/operators/tensor/tensor.at.md | 2 +- .../framework/operators/tensor/tensor.atan.md | 6 +- .../framework/operators/tensor/tensor.ceil.md | 6 +- .../operators/tensor/tensor.concat.md | 2 +- docs/framework/operators/tensor/tensor.cos.md | 6 +- .../framework/operators/tensor/tensor.cosh.md | 10 +- .../operators/tensor/tensor.cumsum.md | 6 +- .../tensor/tensor.dequantize_linear.md | 6 +- .../operators/tensor/tensor.equal.md | 4 +- docs/framework/operators/tensor/tensor.exp.md | 20 +- .../operators/tensor/tensor.flatten.md | 4 +- .../operators/tensor/tensor.greater.md | 4 +- .../operators/tensor/tensor.greater_equal.md | 4 +- .../framework/operators/tensor/tensor.less.md | 4 +- .../operators/tensor/tensor.less_equal.md | 4 +- docs/framework/operators/tensor/tensor.log.md | 20 +- .../operators/tensor/tensor.matmul.md | 6 +- docs/framework/operators/tensor/tensor.max.md | 2 +- docs/framework/operators/tensor/tensor.min.md | 2 +- docs/framework/operators/tensor/tensor.new.md | 3 +- .../operators/tensor/tensor.onehot.md | 22 +- docs/framework/operators/tensor/tensor.or.md | 4 +- .../tensor/tensor.quantize_linear.md | 6 +- .../operators/tensor/tensor.ravel_index.md | 2 +- .../operators/tensor/tensor.reduce_sum.md | 2 +- .../operators/tensor/tensor.reshape.md | 2 +- docs/framework/operators/tensor/tensor.sin.md | 6 +- .../framework/operators/tensor/tensor.sinh.md | 10 +- .../framework/operators/tensor/tensor.sqrt.md | 6 +- .../operators/tensor/tensor.stride.md | 2 +- .../framework/operators/tensor/tensor.tanh.md | 10 +- .../operators/tensor/tensor.transpose.md | 2 +- .../operators/tensor/tensor.unravel_index.md | 2 +- docs/framework/operators/tensor/tensor.xor.md | 4 +- src/operators/nn/core.cairo | 132 +++++++----- src/operators/tensor/core.cairo | 193 +++++++++++++----- 51 files changed, 472 insertions(+), 246 deletions(-) diff --git a/docs/framework/operators/neural-network/nn.leaky_relu.md b/docs/framework/operators/neural-network/nn.leaky_relu.md index 4b1e8f4fc..04d671ec3 100644 --- a/docs/framework/operators/neural-network/nn.leaky_relu.md +++ b/docs/framework/operators/neural-network/nn.leaky_relu.md @@ -1,7 +1,7 @@ # NNTrait::leaky_relu ```rust - fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor + fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor ``` Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -10,30 +10,34 @@ The Leaky ReLU function is defined as f(x) = alpha * x if x < 0, f(x) = x otherw ## Args * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. -* `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. +* `alpha`(`@T`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. ## Returns A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn leaky_relu_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 3].span(), data: array![ - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(1, true), - IntegerTrait::new(2, true), - IntegerTrait::new(0, false), - IntegerTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(1, true), + FixedTrait::new(2, true), + FixedTrait::new(0, false), + FixedTrait::new(0, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.linear.md b/docs/framework/operators/neural-network/nn.linear.md index 539daa863..0e37fd268 100644 --- a/docs/framework/operators/neural-network/nn.linear.md +++ b/docs/framework/operators/neural-network/nn.linear.md @@ -25,8 +25,8 @@ A `Tensor` representing the result of the linear transformation. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; +use orion::operators::nn::{NNTrait, I32NN}; use orion::numbers::{i32, IntegerTrait}; fn linear_example() -> Tensor { diff --git a/docs/framework/operators/neural-network/nn.logsoftmax.md b/docs/framework/operators/neural-network/nn.logsoftmax.md index d9555f994..1aba6b01b 100644 --- a/docs/framework/operators/neural-network/nn.logsoftmax.md +++ b/docs/framework/operators/neural-network/nn.logsoftmax.md @@ -1,7 +1,7 @@ # NNTrait::logsoftmax ```rust - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor ``` Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -19,23 +19,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn logsoftmax_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.relu.md b/docs/framework/operators/neural-network/nn.relu.md index 1e51ec1e2..c4f622066 100644 --- a/docs/framework/operators/neural-network/nn.relu.md +++ b/docs/framework/operators/neural-network/nn.relu.md @@ -23,8 +23,8 @@ A `Tensor` with the same shape as the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; +use orion::operators::nn::{NNTrait, I32NN}; use orion::numbers::{i32, IntegerTrait}; fn relu_example() -> Tensor { diff --git a/docs/framework/operators/neural-network/nn.sigmoid.md b/docs/framework/operators/neural-network/nn.sigmoid.md index 9e7f1f2b6..28503f04a 100644 --- a/docs/framework/operators/neural-network/nn.sigmoid.md +++ b/docs/framework/operators/neural-network/nn.sigmoid.md @@ -1,7 +1,7 @@ # NNTrait::sigmoid ```rust - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; ``` Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn sigmoid_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softmax.md b/docs/framework/operators/neural-network/nn.softmax.md index d93f2c1b0..13717bdb3 100644 --- a/docs/framework/operators/neural-network/nn.softmax.md +++ b/docs/framework/operators/neural-network/nn.softmax.md @@ -1,7 +1,7 @@ # NNTrait::softmax ```rust - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; ``` Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -19,23 +19,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softmax_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + NNTrait::new(0, false), + NNTrait::new(1, false), + NNTrait::new(2, false), + NNTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softplus.md b/docs/framework/operators/neural-network/nn.softplus.md index fc336afcf..32caeda7a 100644 --- a/docs/framework/operators/neural-network/nn.softplus.md +++ b/docs/framework/operators/neural-network/nn.softplus.md @@ -1,7 +1,7 @@ # NNTrait::softplus ```rust - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; ``` Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softplus_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softsign.md b/docs/framework/operators/neural-network/nn.softsign.md index 856438bb4..d80b89d7c 100644 --- a/docs/framework/operators/neural-network/nn.softsign.md +++ b/docs/framework/operators/neural-network/nn.softsign.md @@ -1,7 +1,7 @@ # NNTrait::softsign ```rust - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; ``` Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softsign_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/tensor/tensor.abs.md b/docs/framework/operators/tensor/tensor.abs.md index bba9ff097..923c7cedc 100644 --- a/docs/framework/operators/tensor/tensor.abs.md +++ b/docs/framework/operators/tensor/tensor.abs.md @@ -21,7 +21,7 @@ the absolute value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; use orion::numbers::{i32, IntegerTrait}; fn abs_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.acos.md b/docs/framework/operators/tensor/tensor.acos.md index 5dc9ad59c..724947e68 100644 --- a/docs/framework/operators/tensor/tensor.acos.md +++ b/docs/framework/operators/tensor/tensor.acos.md @@ -16,12 +16,16 @@ Computes the arccosine (inverse of cosine) of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arccosine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn acos_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.acosh.md b/docs/framework/operators/tensor/tensor.acosh.md index 4811bec00..7dbf6ba09 100644 --- a/docs/framework/operators/tensor/tensor.acosh.md +++ b/docs/framework/operators/tensor/tensor.acosh.md @@ -1,7 +1,7 @@ # tensor.acosh ```rust - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn acosh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.argmax.md b/docs/framework/operators/tensor/tensor.argmax.md index 8334d82a8..511b05c91 100644 --- a/docs/framework/operators/tensor/tensor.argmax.md +++ b/docs/framework/operators/tensor/tensor.argmax.md @@ -28,7 +28,7 @@ Case 1: argmax with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( @@ -45,7 +45,7 @@ Case 2: argmax with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( @@ -64,7 +64,7 @@ Case 3: argmax with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.argmin.md b/docs/framework/operators/tensor/tensor.argmin.md index 398308e47..cfe15e89b 100644 --- a/docs/framework/operators/tensor/tensor.argmin.md +++ b/docs/framework/operators/tensor/tensor.argmin.md @@ -28,7 +28,7 @@ Case 1: argmin with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( @@ -46,7 +46,7 @@ Case 2: argmin with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( @@ -65,7 +65,7 @@ Case 3: argmin with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.asin.md b/docs/framework/operators/tensor/tensor.asin.md index 0a3ed6c39..0c29f8735 100644 --- a/docs/framework/operators/tensor/tensor.asin.md +++ b/docs/framework/operators/tensor/tensor.asin.md @@ -16,12 +16,16 @@ Computes the arcsine (inverse of sine) of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arcsine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn asin_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.asinh.md b/docs/framework/operators/tensor/tensor.asinh.md index a447fc8e0..c0193b8b8 100644 --- a/docs/framework/operators/tensor/tensor.asinh.md +++ b/docs/framework/operators/tensor/tensor.asinh.md @@ -1,7 +1,7 @@ # tensor.asinh ```rust - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic sine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn asinh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.at.md b/docs/framework/operators/tensor/tensor.at.md index 1dc48cf57..0cc9833d5 100644 --- a/docs/framework/operators/tensor/tensor.at.md +++ b/docs/framework/operators/tensor/tensor.at.md @@ -24,7 +24,7 @@ The `T` value at the specified indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn at_example() -> u32 { diff --git a/docs/framework/operators/tensor/tensor.atan.md b/docs/framework/operators/tensor/tensor.atan.md index 942a40d1a..f0b7e12ab 100644 --- a/docs/framework/operators/tensor/tensor.atan.md +++ b/docs/framework/operators/tensor/tensor.atan.md @@ -16,12 +16,16 @@ Computes the arctangent (inverse of tangent) of all elements of the input tensor A new `Tensor` of the same shape as the input tensor with the arctangent (inverse of tangent) value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn atan_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.ceil.md b/docs/framework/operators/tensor/tensor.ceil.md index 3186b16fa..33a0bf932 100644 --- a/docs/framework/operators/tensor/tensor.ceil.md +++ b/docs/framework/operators/tensor/tensor.ceil.md @@ -16,12 +16,16 @@ Rounds up the value of each element in the input tensor. A new `Tensor` of the same shape as the input tensor with the rounded up value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn ceil_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.concat.md b/docs/framework/operators/tensor/tensor.concat.md index 3383a13fa..0e134a288 100644 --- a/docs/framework/operators/tensor/tensor.concat.md +++ b/docs/framework/operators/tensor/tensor.concat.md @@ -25,7 +25,7 @@ A new `Tensor` concatenated tensor of the input tensors. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn concat_example() -> Tensor { let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); diff --git a/docs/framework/operators/tensor/tensor.cos.md b/docs/framework/operators/tensor/tensor.cos.md index 9118d1ab9..f9384ec6d 100644 --- a/docs/framework/operators/tensor/tensor.cos.md +++ b/docs/framework/operators/tensor/tensor.cos.md @@ -16,12 +16,16 @@ Computes the cosine of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the cosine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn cos_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.cosh.md b/docs/framework/operators/tensor/tensor.cosh.md index 754c300da..3668e8ca0 100644 --- a/docs/framework/operators/tensor/tensor.cosh.md +++ b/docs/framework/operators/tensor/tensor.cosh.md @@ -1,7 +1,7 @@ # tensor.cosh ```rust - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic cosine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn cosh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.cumsum.md b/docs/framework/operators/tensor/tensor.cumsum.md index c48dc08cc..c93fa4d94 100644 --- a/docs/framework/operators/tensor/tensor.cumsum.md +++ b/docs/framework/operators/tensor/tensor.cumsum.md @@ -28,7 +28,7 @@ Case 1: cumsum with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( @@ -45,7 +45,7 @@ Case 2: cumsum with exclusive = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( @@ -62,7 +62,7 @@ Case 3: cumsum with exclusive = true and reverse = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.dequantize_linear.md b/docs/framework/operators/tensor/tensor.dequantize_linear.md index c1bdecf36..c3476f9c2 100644 --- a/docs/framework/operators/tensor/tensor.dequantize_linear.md +++ b/docs/framework/operators/tensor/tensor.dequantize_linear.md @@ -21,12 +21,16 @@ or a 1-D tensor for per-axis quantization. A new `Tensor` with the same shape as the input tensor, containing the dequantized values. +## Type Constraints + +u32 tensor, not supported. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; - use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; use orion::numbers::{i8, i32, IntegerTrait}; fn dequantize_linear_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.equal.md b/docs/framework/operators/tensor/tensor.equal.md index 740eee776..83bb52a5d 100644 --- a/docs/framework/operators/tensor/tensor.equal.md +++ b/docs/framework/operators/tensor/tensor.equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.exp.md b/docs/framework/operators/tensor/tensor.exp.md index 959dc7924..187d9becd 100644 --- a/docs/framework/operators/tensor/tensor.exp.md +++ b/docs/framework/operators/tensor/tensor.exp.md @@ -1,7 +1,7 @@ # tensor.exp ```rust - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; ``` Computes the exponential of all elements of the input tensor. @@ -15,19 +15,29 @@ $$ ## Returns -Returns a new tensor in `F` with the exponential of the elements of the input tensor. +Returns a new tensor in `T` with the exponential of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; -use orion::numbers::FP8x23; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; fn exp_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), + shape: array![2, 2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(3, false), + ] ); // We can call `exp` function as follows. diff --git a/docs/framework/operators/tensor/tensor.flatten.md b/docs/framework/operators/tensor/tensor.flatten.md index 506101077..0740346b4 100644 --- a/docs/framework/operators/tensor/tensor.flatten.md +++ b/docs/framework/operators/tensor/tensor.flatten.md @@ -43,7 +43,7 @@ Case 2: flatten with axis 1 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( @@ -60,7 +60,7 @@ Case 3: flatten with axis 2 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.greater.md b/docs/framework/operators/tensor/tensor.greater.md index 477cb229c..677bc1220 100644 --- a/docs/framework/operators/tensor/tensor.greater.md +++ b/docs/framework/operators/tensor/tensor.greater.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.greater_equal.md b/docs/framework/operators/tensor/tensor.greater_equal.md index 128368ec7..8a2d6637d 100644 --- a/docs/framework/operators/tensor/tensor.greater_equal.md +++ b/docs/framework/operators/tensor/tensor.greater_equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.less.md b/docs/framework/operators/tensor/tensor.less.md index 04ab98a66..0413fa7ea 100644 --- a/docs/framework/operators/tensor/tensor.less.md +++ b/docs/framework/operators/tensor/tensor.less.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.less_equal.md b/docs/framework/operators/tensor/tensor.less_equal.md index 6c22ebc61..23d3356fa 100644 --- a/docs/framework/operators/tensor/tensor.less_equal.md +++ b/docs/framework/operators/tensor/tensor.less_equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.log.md b/docs/framework/operators/tensor/tensor.log.md index 82ebe3304..d14245e47 100644 --- a/docs/framework/operators/tensor/tensor.log.md +++ b/docs/framework/operators/tensor/tensor.log.md @@ -1,7 +1,7 @@ # tensor.log ```rust - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; ``` Computes the natural log of all elements of the input tensor. @@ -15,19 +15,29 @@ $$ ## Returns -Returns a new tensor in `F` with the natural log of the elements of the input tensor. +Returns a new tensor in `T` with the natural log of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; -use orion::numbers::FP8x23; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; fn log_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), + shape: array![2, 2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(100, false), + ] ); // We can call `log` function as follows. diff --git a/docs/framework/operators/tensor/tensor.matmul.md b/docs/framework/operators/tensor/tensor.matmul.md index 08f371bca..21e828a76 100644 --- a/docs/framework/operators/tensor/tensor.matmul.md +++ b/docs/framework/operators/tensor/tensor.matmul.md @@ -31,7 +31,7 @@ Case 1: Dot product of two vectors (1D \* 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn dot_product_example() -> Tensor { let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); @@ -49,7 +49,7 @@ Case 2: Matrix multiplication (2D \* 2D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn matrix_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -71,7 +71,7 @@ Case 3: Matrix-Vector multiplication (2D x 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn matrix_vec_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.max.md b/docs/framework/operators/tensor/tensor.max.md index 74a63d6e6..e115cc559 100644 --- a/docs/framework/operators/tensor/tensor.max.md +++ b/docs/framework/operators/tensor/tensor.max.md @@ -19,7 +19,7 @@ Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn max_example() -> u32 { let tensor = TensorTrait::new( diff --git a/docs/framework/operators/tensor/tensor.min.md b/docs/framework/operators/tensor/tensor.min.md index 2569168dc..037c4067f 100644 --- a/docs/framework/operators/tensor/tensor.min.md +++ b/docs/framework/operators/tensor/tensor.min.md @@ -19,7 +19,7 @@ The minimum `T` value in the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn min_example() -> u32 { let tensor = TensorTrait::new( diff --git a/docs/framework/operators/tensor/tensor.new.md b/docs/framework/operators/tensor/tensor.new.md index 80e0f5179..3d29c9da3 100644 --- a/docs/framework/operators/tensor/tensor.new.md +++ b/docs/framework/operators/tensor/tensor.new.md @@ -29,8 +29,7 @@ use array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{ TensorTrait, // we import the trait Tensor, // we import the type - Tensor_u32_fp16x16 // we import the implementation. - //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). + U32Tensor // we import the implementation. }; // 1D TENSOR diff --git a/docs/framework/operators/tensor/tensor.onehot.md b/docs/framework/operators/tensor/tensor.onehot.md index 031935a0e..09e88f02d 100644 --- a/docs/framework/operators/tensor/tensor.onehot.md +++ b/docs/framework/operators/tensor/tensor.onehot.md @@ -21,15 +21,29 @@ Produces one-hot tensor based on input. A new `Tensor` one-hot encode of the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - -fn onehot_example() -> Tensor { - let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn onehot_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2,2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(3, false), + ] + .span(), + ); return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); } diff --git a/docs/framework/operators/tensor/tensor.or.md b/docs/framework/operators/tensor/tensor.or.md index 572a266d1..ec92f7bab 100644 --- a/docs/framework/operators/tensor/tensor.or.md +++ b/docs/framework/operators/tensor/tensor.or.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -50,7 +50,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.quantize_linear.md b/docs/framework/operators/tensor/tensor.quantize_linear.md index 80e17f34e..312cb94cb 100644 --- a/docs/framework/operators/tensor/tensor.quantize_linear.md +++ b/docs/framework/operators/tensor/tensor.quantize_linear.md @@ -22,12 +22,16 @@ For (x / y_scale), it's rounding to the nearest even. A new `Tensor` with the same shape as the input tensor, containing the quantized values. +## Type Constraints + +u32 tensor, not supported. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; use orion::numbers::{i8, i32, IntegerTrait}; fn quantize_linear_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.ravel_index.md b/docs/framework/operators/tensor/tensor.ravel_index.md index 916da0009..6d6ff9725 100644 --- a/docs/framework/operators/tensor/tensor.ravel_index.md +++ b/docs/framework/operators/tensor/tensor.ravel_index.md @@ -24,7 +24,7 @@ The index corresponding to the given indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn ravel_index_example() -> usize { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.reduce_sum.md b/docs/framework/operators/tensor/tensor.reduce_sum.md index 4e4b0b2a9..e596ba311 100644 --- a/docs/framework/operators/tensor/tensor.reduce_sum.md +++ b/docs/framework/operators/tensor/tensor.reduce_sum.md @@ -25,7 +25,7 @@ A new `Tensor` instance with the specified axis reduced by summing its elemen ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn reduce_sum_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.reshape.md b/docs/framework/operators/tensor/tensor.reshape.md index 48d8ccbd0..998c40c1a 100644 --- a/docs/framework/operators/tensor/tensor.reshape.md +++ b/docs/framework/operators/tensor/tensor.reshape.md @@ -24,7 +24,7 @@ A new `Tensor` with the specified target shape and the same data. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn reshape_tensor_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.sin.md b/docs/framework/operators/tensor/tensor.sin.md index 0776cf0be..3c7e0da17 100644 --- a/docs/framework/operators/tensor/tensor.sin.md +++ b/docs/framework/operators/tensor/tensor.sin.md @@ -16,12 +16,16 @@ Computes the sine of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the sine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn sin_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.sinh.md b/docs/framework/operators/tensor/tensor.sinh.md index 329e74aff..c89f40ecb 100644 --- a/docs/framework/operators/tensor/tensor.sinh.md +++ b/docs/framework/operators/tensor/tensor.sinh.md @@ -1,7 +1,7 @@ # tensor.sinh ```rust - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic sine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperbolic sine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn sinh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.sqrt.md b/docs/framework/operators/tensor/tensor.sqrt.md index 2494d52a2..918913f0b 100644 --- a/docs/framework/operators/tensor/tensor.sqrt.md +++ b/docs/framework/operators/tensor/tensor.sqrt.md @@ -16,12 +16,16 @@ Computes the square root of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arctangent (inverse of tangent) value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn sqrt_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.stride.md b/docs/framework/operators/tensor/tensor.stride.md index e17b35828..75313770a 100644 --- a/docs/framework/operators/tensor/tensor.stride.md +++ b/docs/framework/operators/tensor/tensor.stride.md @@ -18,7 +18,7 @@ A span of usize representing the stride for each dimension of the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn stride_example() -> Span { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.tanh.md b/docs/framework/operators/tensor/tensor.tanh.md index 9b818081e..9ffec7780 100644 --- a/docs/framework/operators/tensor/tensor.tanh.md +++ b/docs/framework/operators/tensor/tensor.tanh.md @@ -1,7 +1,7 @@ # tensor.tanh ```rust - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic tangent of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. +Returns a new tensor in `T` with the hyperbolic tangent of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn tanh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.transpose.md b/docs/framework/operators/tensor/tensor.transpose.md index 54f14bbaa..0dee6e2fb 100644 --- a/docs/framework/operators/tensor/tensor.transpose.md +++ b/docs/framework/operators/tensor/tensor.transpose.md @@ -24,7 +24,7 @@ A `Tensor` instance with the axes reordered according to the given permutatio ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn transpose_tensor_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.unravel_index.md b/docs/framework/operators/tensor/tensor.unravel_index.md index 5ac532fff..6221a5bd7 100644 --- a/docs/framework/operators/tensor/tensor.unravel_index.md +++ b/docs/framework/operators/tensor/tensor.unravel_index.md @@ -24,7 +24,7 @@ The unraveled indices corresponding to the given index. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn unravel_index_example() -> Span { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.xor.md b/docs/framework/operators/tensor/tensor.xor.md index 09f0bf011..53d89b24e 100644 --- a/docs/framework/operators/tensor/tensor.xor.md +++ b/docs/framework/operators/tensor/tensor.xor.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -50,7 +50,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index f08d6b56b..476616e30 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -36,8 +36,8 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; + /// use orion::operators::nn::{NNTrait, I32NN}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn relu_example() -> Tensor { @@ -79,23 +79,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softmax_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// NNTrait::new(0, false), + /// NNTrait::new(1, false), + /// NNTrait::new(2, false), + /// NNTrait::new(3, false), /// ] /// .span(), /// ); @@ -129,23 +133,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn logsoftmax_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -184,23 +192,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn sigmoid_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -233,23 +245,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softsign_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -282,23 +298,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softplus_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -338,8 +358,8 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; + /// use orion::operators::nn::{NNTrait, I32NN}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn linear_example() -> Tensor { @@ -395,25 +415,29 @@ trait NNTrait { /// ## Returns /// A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn leaky_relu_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 3].span(), /// data: array![ - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(1, true), - /// IntegerTrait::new(2, true), - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(1, true), + /// FixedTrait::new(2, true), + /// FixedTrait::new(0, false), + /// FixedTrait::new(0, false), /// ] /// .span(), /// ); diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 251d006ee..0b76cd2f5 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -101,8 +101,7 @@ trait TensorTrait { /// use orion::operators::tensor::{ /// TensorTrait, // we import the trait /// Tensor, // we import the type - /// Tensor_u32_fp16x16 // we import the implementation. - /// //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). + /// U32Tensor // we import the implementation. /// }; /// /// // 1D TENSOR @@ -156,7 +155,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// /// fn at_example() -> u32 { @@ -192,7 +191,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn min_example() -> u32 { /// let tensor = TensorTrait::new( @@ -228,7 +227,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn max_example() -> u32 { /// let tensor = TensorTrait::new( @@ -262,7 +261,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn stride_example() -> Span { /// let tensor = TensorTrait::::new( @@ -302,7 +301,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn ravel_index_example() -> usize { /// let tensor = TensorTrait::::new( @@ -344,7 +343,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn unravel_index_example() -> Span { /// let tensor = TensorTrait::::new( @@ -386,7 +385,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn reshape_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -426,7 +425,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn transpose_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -467,7 +466,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn reduce_sum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -511,7 +510,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -528,7 +527,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -547,7 +546,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -594,7 +593,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -612,7 +611,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -631,7 +630,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -681,7 +680,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn dot_product_example() -> Tensor { /// let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); @@ -699,7 +698,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn matrix_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -721,7 +720,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn matrix_vec_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -756,17 +755,27 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the exponential of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - /// use orion::numbers::FP8x23; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn exp_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), + /// shape: array![2, 2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(3, false), + /// ] /// ); /// /// // We can call `exp` function as follows. @@ -797,17 +806,27 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the natural log of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - /// use orion::numbers::FP8x23; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn log_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), + /// shape: array![2, 2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(100, false), + /// ] /// ); /// /// // We can call `log` function as follows. @@ -850,7 +869,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -872,7 +891,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -919,7 +938,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -941,7 +960,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -988,7 +1007,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1010,7 +1029,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1057,7 +1076,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1079,7 +1098,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1126,7 +1145,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1148,7 +1167,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1187,7 +1206,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn abs_example() -> Tensor { @@ -1223,6 +1242,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the rounded up value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -1266,6 +1289,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the sine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -1311,6 +1338,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the cosine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -1368,7 +1399,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1385,7 +1416,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1402,7 +1433,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1462,7 +1493,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1479,7 +1510,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1511,6 +1542,10 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the hyperbolic sine of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust @@ -1558,6 +1593,10 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the hyperbolic tangent of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust @@ -1605,6 +1644,10 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust @@ -1652,6 +1695,10 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the hyperblic sine of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust @@ -1699,6 +1746,10 @@ trait TensorTrait { /// /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust @@ -1745,6 +1796,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arctangent (inverse of tangent) value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -1790,6 +1845,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arcsine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -1844,7 +1903,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1865,7 +1924,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1913,7 +1972,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1934,7 +1993,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1969,6 +2028,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arccosine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -2015,15 +2078,29 @@ trait TensorTrait { /// /// A new `Tensor` one-hot encode of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn onehot_example() -> Tensor { - /// let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + /// fn onehot_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2,2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(3, false), + /// ] + /// .span(), + /// ); /// /// return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); /// } @@ -2053,6 +2130,10 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arctangent (inverse of tangent) value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust @@ -2107,7 +2188,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn concat_example() -> Tensor { /// let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); @@ -2158,12 +2239,16 @@ trait TensorTrait { /// /// A new `Tensor` with the same shape as the input tensor, containing the quantized values. /// + /// ## Type Constraints + /// + /// u32 tensor, not supported. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; /// use orion::numbers::{i8, i32, IntegerTrait}; /// /// fn quantize_linear_example() -> Tensor { @@ -2222,12 +2307,16 @@ trait TensorTrait { /// /// A new `Tensor` with the same shape as the input tensor, containing the dequantized values. /// + /// ## Type Constraints + /// + /// u32 tensor, not supported. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; /// use orion::numbers::{i8, i32, IntegerTrait}; /// /// fn dequantize_linear_example() -> Tensor { From c7e5420574213226bc8035f986e19e3bf68bcd04 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 15:32:18 +0300 Subject: [PATCH 160/179] Merge branch 'make-generic' into support-new-impl --- .../implement-new-operators-in-orion.md | 24 +- .../operators/neural-network/nn.leaky_relu.md | 28 +- .../operators/neural-network/nn.linear.md | 4 +- .../operators/neural-network/nn.logsoftmax.md | 22 +- .../operators/neural-network/nn.relu.md | 4 +- .../operators/neural-network/nn.sigmoid.md | 22 +- .../operators/neural-network/nn.softmax.md | 22 +- .../operators/neural-network/nn.softplus.md | 22 +- .../operators/neural-network/nn.softsign.md | 22 +- docs/framework/operators/tensor/tensor.abs.md | 2 +- .../framework/operators/tensor/tensor.acos.md | 6 +- .../operators/tensor/tensor.acosh.md | 10 +- .../operators/tensor/tensor.argmax.md | 6 +- .../operators/tensor/tensor.argmin.md | 6 +- .../framework/operators/tensor/tensor.asin.md | 6 +- .../operators/tensor/tensor.asinh.md | 10 +- docs/framework/operators/tensor/tensor.at.md | 2 +- .../framework/operators/tensor/tensor.atan.md | 6 +- .../framework/operators/tensor/tensor.ceil.md | 6 +- .../operators/tensor/tensor.concat.md | 2 +- docs/framework/operators/tensor/tensor.cos.md | 6 +- .../framework/operators/tensor/tensor.cosh.md | 10 +- .../operators/tensor/tensor.cumsum.md | 6 +- .../tensor/tensor.dequantize_linear.md | 6 +- .../operators/tensor/tensor.equal.md | 4 +- docs/framework/operators/tensor/tensor.exp.md | 20 +- .../operators/tensor/tensor.flatten.md | 4 +- .../operators/tensor/tensor.greater.md | 4 +- .../operators/tensor/tensor.greater_equal.md | 4 +- .../framework/operators/tensor/tensor.less.md | 4 +- .../operators/tensor/tensor.less_equal.md | 4 +- docs/framework/operators/tensor/tensor.log.md | 20 +- .../operators/tensor/tensor.matmul.md | 6 +- docs/framework/operators/tensor/tensor.max.md | 2 +- docs/framework/operators/tensor/tensor.min.md | 2 +- docs/framework/operators/tensor/tensor.new.md | 3 +- .../operators/tensor/tensor.onehot.md | 22 +- docs/framework/operators/tensor/tensor.or.md | 4 +- .../tensor/tensor.quantize_linear.md | 6 +- .../operators/tensor/tensor.ravel_index.md | 2 +- .../operators/tensor/tensor.reduce_sum.md | 2 +- .../operators/tensor/tensor.reshape.md | 2 +- docs/framework/operators/tensor/tensor.sin.md | 6 +- .../framework/operators/tensor/tensor.sinh.md | 10 +- .../framework/operators/tensor/tensor.sqrt.md | 6 +- .../operators/tensor/tensor.stride.md | 2 +- .../framework/operators/tensor/tensor.tanh.md | 10 +- .../operators/tensor/tensor.transpose.md | 2 +- .../operators/tensor/tensor.unravel_index.md | 2 +- docs/framework/operators/tensor/tensor.xor.md | 4 +- nodegen/helpers.py | 175 +--- nodegen/node/abs.py | 16 +- nodegen/node/acos.py | 12 +- nodegen/node/acosh.py | 103 +-- nodegen/node/add.py | 44 +- nodegen/node/argmax.py | 106 +-- nodegen/node/argmin.py | 106 +-- nodegen/node/asin.py | 12 +- nodegen/node/asinh.py | 102 +-- nodegen/node/atan.py | 103 +-- nodegen/node/ceil.py | 12 +- nodegen/node/concat.py | 126 +-- nodegen/node/cos.py | 102 +-- nodegen/node/cosh.py | 102 +-- nodegen/node/cumsum.py | 108 +-- nodegen/node/div.py | 24 +- nodegen/node/equal.py | 16 +- nodegen/node/exp.py | 102 +-- nodegen/node/greater.py | 16 +- nodegen/node/greater_equal.py | 16 +- nodegen/node/leaky_relu.py | 74 +- nodegen/node/less.py | 16 +- nodegen/node/less_equal.py | 16 +- nodegen/node/linear.py | 16 +- nodegen/node/log.py | 102 +-- nodegen/node/logsoftmax.py | 199 +---- nodegen/node/matmul.py | 24 +- nodegen/node/mul.py | 24 +- nodegen/node/or.py | 16 +- nodegen/node/reduce_sum.py | 72 +- nodegen/node/relu.py | 8 +- nodegen/node/sigmoid.py | 138 +-- nodegen/node/sin.py | 104 +-- nodegen/node/sinh.py | 102 +-- nodegen/node/softmax.py | 138 +-- nodegen/node/softplus.py | 101 +-- nodegen/node/softsign.py | 101 +-- nodegen/node/sqrt.py | 103 +-- nodegen/node/sub.py | 24 +- nodegen/node/tanh.py | 102 +-- nodegen/node/transpose.py | 8 +- nodegen/node/xor.py | 16 +- src/numbers.cairo | 811 +++++++++++++++++- src/operators/nn.cairo | 16 +- src/operators/nn/core.cairo | 160 ++-- src/operators/nn/functional/leaky_relu.cairo | 67 +- src/operators/nn/functional/linear.cairo | 3 +- src/operators/nn/functional/logsoftmax.cairo | 9 +- src/operators/nn/functional/relu.cairo | 3 +- src/operators/nn/functional/sigmoid.cairo | 60 +- src/operators/nn/functional/softmax.cairo | 13 +- src/operators/nn/functional/softplus.cairo | 57 +- src/operators/nn/functional/softsign.cairo | 56 +- src/operators/nn/implementations.cairo | 10 +- .../nn/implementations/nn_fp16x16.cairo | 12 +- .../nn/implementations/nn_fp8x23.cairo | 12 +- src/operators/nn/implementations/nn_i32.cairo | 41 + .../nn/implementations/nn_i32_fp16x16.cairo | 43 - .../nn/implementations/nn_i32_fp8x23.cairo | 43 - src/operators/nn/implementations/nn_i8.cairo | 41 + .../nn/implementations/nn_i8_fp16x16.cairo | 43 - .../nn/implementations/nn_i8_fp8x23.cairo | 43 - src/operators/nn/implementations/nn_u32.cairo | 40 + .../nn/implementations/nn_u32_fp16x16.cairo | 42 - .../nn/implementations/nn_u32_fp8x23.cairo | 42 - src/operators/tensor.cairo | 38 +- src/operators/tensor/core.cairo | 273 ++++-- src/operators/tensor/implementations.cairo | 10 +- .../implementations/tensor_fp16x16.cairo | 73 +- .../implementations/tensor_fp8x23.cairo | 104 ++- ...nsor_i32_fp8x23.cairo => tensor_i32.cairo} | 153 ++-- .../implementations/tensor_i32_fp16x16.cairo | 281 ------ ...tensor_i8_fp8x23.cairo => tensor_i8.cairo} | 168 ++-- .../implementations/tensor_i8_fp16x16.cairo | 311 ------- ...nsor_u32_fp8x23.cairo => tensor_u32.cairo} | 148 ++-- .../implementations/tensor_u32_fp16x16.cairo | 296 ------- src/operators/tensor/linalg/matmul.cairo | 6 +- src/operators/tensor/linalg/transpose.cairo | 2 +- src/operators/tensor/math/abs.cairo | 3 +- src/operators/tensor/math/acos.cairo | 16 +- src/operators/tensor/math/acosh.cairo | 52 +- src/operators/tensor/math/argmax.cairo | 16 +- src/operators/tensor/math/argmin.cairo | 11 +- src/operators/tensor/math/arithmetic.cairo | 56 +- src/operators/tensor/math/asin.cairo | 14 +- src/operators/tensor/math/asinh.cairo | 53 +- src/operators/tensor/math/atan.cairo | 51 +- src/operators/tensor/math/ceil.cairo | 16 +- src/operators/tensor/math/concat.cairo | 4 +- src/operators/tensor/math/cos.cairo | 52 +- src/operators/tensor/math/cosh.cairo | 52 +- src/operators/tensor/math/cumsum.cairo | 13 +- src/operators/tensor/math/equal.cairo | 47 +- src/operators/tensor/math/exp.cairo | 53 +- src/operators/tensor/math/flatten.cairo | 2 +- src/operators/tensor/math/greater.cairo | 51 +- src/operators/tensor/math/greater_equal.cairo | 51 +- src/operators/tensor/math/less.cairo | 52 +- src/operators/tensor/math/less_equal.cairo | 51 +- src/operators/tensor/math/log.cairo | 54 +- src/operators/tensor/math/onehot.cairo | 183 +--- src/operators/tensor/math/or.cairo | 51 +- src/operators/tensor/math/reduce_sum.cairo | 3 +- src/operators/tensor/math/sin.cairo | 53 +- src/operators/tensor/math/sinh.cairo | 53 +- src/operators/tensor/math/sqrt.cairo | 52 +- src/operators/tensor/math/tanh.cairo | 52 +- src/operators/tensor/math/xor.cairo | 52 +- .../quantization/dequantize_linear.cairo | 9 +- .../tensor/quantization/quantize_linear.cairo | 13 +- src/tests.cairo | 1 + .../helpers/tensor/fixed_point/fp16x16.cairo | 4 +- .../helpers/tensor/fixed_point/fp8x23.cairo | 4 +- src/tests/helpers/tensor/i32.cairo | 4 +- src/tests/helpers/tensor/i8.cairo | 41 +- src/tests/helpers/tensor/u32.cairo | 4 +- src/tests/nodes.cairo | 699 +++++++-------- src/tests/nodes/abs_fp16x16.cairo | 15 +- src/tests/nodes/abs_fp16x16/input_0.cairo | 20 +- src/tests/nodes/abs_fp16x16/output_0.cairo | 20 +- src/tests/nodes/abs_fp8x23.cairo | 16 +- src/tests/nodes/abs_fp8x23/input_0.cairo | 18 +- src/tests/nodes/abs_fp8x23/output_0.cairo | 18 +- src/tests/nodes/abs_i32.cairo | 15 +- src/tests/nodes/abs_i32/input_0.cairo | 21 +- src/tests/nodes/abs_i32/output_0.cairo | 19 +- src/tests/nodes/abs_i8.cairo | 15 +- src/tests/nodes/abs_i8/input_0.cairo | 19 +- src/tests/nodes/abs_i8/output_0.cairo | 17 +- src/tests/nodes/acos_fp16x16.cairo | 15 +- src/tests/nodes/acos_fp16x16/input_0.cairo | 21 +- src/tests/nodes/acos_fp16x16/output_0.cairo | 20 +- src/tests/nodes/acos_fp8x23.cairo | 12 +- src/tests/nodes/acos_fp8x23/input_0.cairo | 18 +- src/tests/nodes/acos_fp8x23/output_0.cairo | 18 +- src/tests/nodes/acosh_fp16x16.cairo | 9 +- src/tests/nodes/acosh_fp16x16/input_0.cairo | 20 +- src/tests/nodes/acosh_fp16x16/output_0.cairo | 20 +- src/tests/nodes/acosh_fp8x23.cairo | 9 +- src/tests/nodes/acosh_fp8x23/input_0.cairo | 18 +- src/tests/nodes/acosh_fp8x23/output_0.cairo | 18 +- src/tests/nodes/acosh_i32_fp16x16.cairo | 19 - .../nodes/acosh_i32_fp16x16/input_0.cairo | 20 - .../nodes/acosh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_i32_fp8x23.cairo | 20 - .../nodes/acosh_i32_fp8x23/input_0.cairo | 20 - .../nodes/acosh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_i8_fp16x16.cairo | 20 - .../nodes/acosh_i8_fp16x16/input_0.cairo | 20 - .../nodes/acosh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_i8_fp8x23.cairo | 21 - src/tests/nodes/acosh_i8_fp8x23/input_0.cairo | 20 - .../nodes/acosh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/acosh_u32_fp16x16.cairo | 20 - .../nodes/acosh_u32_fp16x16/input_0.cairo | 19 - .../nodes/acosh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/acosh_u32_fp8x23.cairo | 19 - .../nodes/acosh_u32_fp8x23/input_0.cairo | 19 - .../nodes/acosh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/add_fp16x16.cairo | 17 +- src/tests/nodes/add_fp16x16/input_0.cairo | 44 +- src/tests/nodes/add_fp16x16/input_1.cairo | 36 +- src/tests/nodes/add_fp16x16/output_0.cairo | 46 +- src/tests/nodes/add_fp16x16_broadcast.cairo | 14 +- .../nodes/add_fp16x16_broadcast/input_0.cairo | 44 +- .../nodes/add_fp16x16_broadcast/input_1.cairo | 14 +- .../add_fp16x16_broadcast/output_0.cairo | 44 +- src/tests/nodes/add_fp8x23.cairo | 14 +- src/tests/nodes/add_fp8x23/input_0.cairo | 36 +- src/tests/nodes/add_fp8x23/input_1.cairo | 36 +- src/tests/nodes/add_fp8x23/output_0.cairo | 42 +- src/tests/nodes/add_fp8x23_broadcast.cairo | 8 +- .../nodes/add_fp8x23_broadcast/input_0.cairo | 37 +- .../nodes/add_fp8x23_broadcast/input_1.cairo | 17 +- .../nodes/add_fp8x23_broadcast/output_0.cairo | 43 +- src/tests/nodes/add_i32.cairo | 10 +- src/tests/nodes/add_i32/input_0.cairo | 39 +- src/tests/nodes/add_i32/input_1.cairo | 41 +- src/tests/nodes/add_i32/output_0.cairo | 43 +- src/tests/nodes/add_i32_broadcast.cairo | 10 +- .../nodes/add_i32_broadcast/input_0.cairo | 39 +- .../nodes/add_i32_broadcast/input_1.cairo | 17 +- .../nodes/add_i32_broadcast/output_0.cairo | 51 +- src/tests/nodes/add_i8.cairo | 10 +- src/tests/nodes/add_i8/input_0.cairo | 37 +- src/tests/nodes/add_i8/input_1.cairo | 37 +- src/tests/nodes/add_i8/output_0.cairo | 45 +- src/tests/nodes/add_i8_broadcast.cairo | 17 +- .../nodes/add_i8_broadcast/input_0.cairo | 39 +- .../nodes/add_i8_broadcast/input_1.cairo | 15 +- .../nodes/add_i8_broadcast/output_0.cairo | 41 +- src/tests/nodes/add_u32.cairo | 16 +- src/tests/nodes/add_u32/input_0.cairo | 29 +- src/tests/nodes/add_u32/input_1.cairo | 27 +- src/tests/nodes/add_u32/output_0.cairo | 33 +- src/tests/nodes/add_u32_broadcast.cairo | 8 +- .../nodes/add_u32_broadcast/input_0.cairo | 31 +- .../nodes/add_u32_broadcast/input_1.cairo | 13 +- .../nodes/add_u32_broadcast/output_0.cairo | 41 +- .../nodes/argmax_fp16x16_1D_default.cairo | 14 +- .../argmax_fp16x16_1D_default/input_0.cairo | 18 +- .../argmax_fp16x16_1D_default/output_0.cairo | 11 +- .../argmax_fp16x16_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 18 +- .../output_0.cairo | 11 +- .../nodes/argmax_fp16x16_1D_last_index.cairo | 8 +- .../input_0.cairo | 18 +- .../output_0.cairo | 9 +- .../nodes/argmax_fp16x16_2D_default.cairo | 8 +- .../argmax_fp16x16_2D_default/input_0.cairo | 20 +- .../argmax_fp16x16_2D_default/output_0.cairo | 11 +- .../argmax_fp16x16_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 20 +- .../output_0.cairo | 9 +- .../nodes/argmax_fp16x16_2D_last_index.cairo | 8 +- .../input_0.cairo | 20 +- .../output_0.cairo | 11 +- .../nodes/argmax_fp16x16_3D_default.cairo | 8 +- .../argmax_fp16x16_3D_default/input_0.cairo | 28 +- .../argmax_fp16x16_3D_default/output_0.cairo | 13 +- .../argmax_fp16x16_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 26 +- .../output_0.cairo | 9 +- .../nodes/argmax_fp16x16_3D_last_index.cairo | 8 +- .../input_0.cairo | 28 +- .../output_0.cairo | 13 +- .../nodes/argmax_fp8x23_1D_default.cairo | 8 +- .../argmax_fp8x23_1D_default/input_0.cairo | 18 +- .../argmax_fp8x23_1D_default/output_0.cairo | 11 +- .../argmax_fp8x23_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 19 +- .../output_0.cairo | 11 +- .../nodes/argmax_fp8x23_1D_last_index.cairo | 8 +- .../argmax_fp8x23_1D_last_index/input_0.cairo | 19 +- .../output_0.cairo | 9 +- .../nodes/argmax_fp8x23_2D_default.cairo | 8 +- .../argmax_fp8x23_2D_default/input_0.cairo | 21 +- .../argmax_fp8x23_2D_default/output_0.cairo | 11 +- .../argmax_fp8x23_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 21 +- .../output_0.cairo | 11 +- .../nodes/argmax_fp8x23_2D_last_index.cairo | 8 +- .../argmax_fp8x23_2D_last_index/input_0.cairo | 21 +- .../output_0.cairo | 9 +- .../nodes/argmax_fp8x23_3D_default.cairo | 8 +- .../argmax_fp8x23_3D_default/input_0.cairo | 29 +- .../argmax_fp8x23_3D_default/output_0.cairo | 11 +- .../argmax_fp8x23_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 29 +- .../output_0.cairo | 11 +- .../nodes/argmax_fp8x23_3D_last_index.cairo | 8 +- .../argmax_fp8x23_3D_last_index/input_0.cairo | 29 +- .../output_0.cairo | 11 +- src/tests/nodes/argmax_i32_1D_default.cairo | 14 +- .../nodes/argmax_i32_1D_default/input_0.cairo | 17 +- .../argmax_i32_1D_default/output_0.cairo | 9 +- .../nodes/argmax_i32_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 17 +- .../output_0.cairo | 9 +- .../nodes/argmax_i32_1D_last_index.cairo | 8 +- .../argmax_i32_1D_last_index/input_0.cairo | 17 +- .../argmax_i32_1D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmax_i32_2D_default.cairo | 8 +- .../nodes/argmax_i32_2D_default/input_0.cairo | 19 +- .../argmax_i32_2D_default/output_0.cairo | 11 +- .../nodes/argmax_i32_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 19 +- .../output_0.cairo | 9 +- .../nodes/argmax_i32_2D_last_index.cairo | 8 +- .../argmax_i32_2D_last_index/input_0.cairo | 19 +- .../argmax_i32_2D_last_index/output_0.cairo | 9 +- src/tests/nodes/argmax_i32_3D_default.cairo | 8 +- .../nodes/argmax_i32_3D_default/input_0.cairo | 27 +- .../argmax_i32_3D_default/output_0.cairo | 11 +- .../nodes/argmax_i32_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 27 +- .../output_0.cairo | 11 +- .../nodes/argmax_i32_3D_last_index.cairo | 8 +- .../argmax_i32_3D_last_index/input_0.cairo | 27 +- .../argmax_i32_3D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmax_i8_1D_default.cairo | 8 +- .../nodes/argmax_i8_1D_default/input_0.cairo | 17 +- .../nodes/argmax_i8_1D_default/output_0.cairo | 9 +- .../nodes/argmax_i8_1D_keepdims_false.cairo | 8 +- .../argmax_i8_1D_keepdims_false/input_0.cairo | 17 +- .../output_0.cairo | 9 +- src/tests/nodes/argmax_i8_1D_last_index.cairo | 8 +- .../argmax_i8_1D_last_index/input_0.cairo | 17 +- .../argmax_i8_1D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmax_i8_2D_default.cairo | 8 +- .../nodes/argmax_i8_2D_default/input_0.cairo | 19 +- .../nodes/argmax_i8_2D_default/output_0.cairo | 9 +- .../nodes/argmax_i8_2D_keepdims_false.cairo | 8 +- .../argmax_i8_2D_keepdims_false/input_0.cairo | 19 +- .../output_0.cairo | 11 +- src/tests/nodes/argmax_i8_2D_last_index.cairo | 8 +- .../argmax_i8_2D_last_index/input_0.cairo | 19 +- .../argmax_i8_2D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmax_i8_3D_default.cairo | 8 +- .../nodes/argmax_i8_3D_default/input_0.cairo | 27 +- .../nodes/argmax_i8_3D_default/output_0.cairo | 11 +- .../nodes/argmax_i8_3D_keepdims_false.cairo | 8 +- .../argmax_i8_3D_keepdims_false/input_0.cairo | 27 +- .../output_0.cairo | 13 +- src/tests/nodes/argmax_i8_3D_last_index.cairo | 8 +- .../argmax_i8_3D_last_index/input_0.cairo | 27 +- .../argmax_i8_3D_last_index/output_0.cairo | 13 +- src/tests/nodes/argmax_u32_1D_default.cairo | 14 +- .../nodes/argmax_u32_1D_default/input_0.cairo | 15 +- .../argmax_u32_1D_default/output_0.cairo | 11 +- .../nodes/argmax_u32_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 15 +- .../output_0.cairo | 11 +- .../nodes/argmax_u32_1D_last_index.cairo | 8 +- .../argmax_u32_1D_last_index/input_0.cairo | 15 +- .../argmax_u32_1D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmax_u32_2D_default.cairo | 8 +- .../nodes/argmax_u32_2D_default/input_0.cairo | 17 +- .../argmax_u32_2D_default/output_0.cairo | 11 +- .../nodes/argmax_u32_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 17 +- .../output_0.cairo | 9 +- .../nodes/argmax_u32_2D_last_index.cairo | 8 +- .../argmax_u32_2D_last_index/input_0.cairo | 17 +- .../argmax_u32_2D_last_index/output_0.cairo | 9 +- src/tests/nodes/argmax_u32_3D_default.cairo | 8 +- .../nodes/argmax_u32_3D_default/input_0.cairo | 25 +- .../argmax_u32_3D_default/output_0.cairo | 11 +- .../nodes/argmax_u32_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 25 +- .../output_0.cairo | 11 +- .../nodes/argmax_u32_3D_last_index.cairo | 8 +- .../argmax_u32_3D_last_index/input_0.cairo | 25 +- .../argmax_u32_3D_last_index/output_0.cairo | 13 +- .../nodes/argmin_fp16x16_1D_default.cairo | 8 +- .../argmin_fp16x16_1D_default/input_0.cairo | 18 +- .../argmin_fp16x16_1D_default/output_0.cairo | 11 +- .../argmin_fp16x16_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 18 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp16x16_1D_last_index.cairo | 8 +- .../input_0.cairo | 18 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp16x16_2D_default.cairo | 8 +- .../argmin_fp16x16_2D_default/input_0.cairo | 18 +- .../argmin_fp16x16_2D_default/output_0.cairo | 13 +- .../argmin_fp16x16_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 20 +- .../output_0.cairo | 9 +- .../nodes/argmin_fp16x16_2D_last_index.cairo | 8 +- .../input_0.cairo | 20 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp16x16_3D_default.cairo | 8 +- .../argmin_fp16x16_3D_default/input_0.cairo | 28 +- .../argmin_fp16x16_3D_default/output_0.cairo | 13 +- .../argmin_fp16x16_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 28 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp16x16_3D_last_index.cairo | 8 +- .../input_0.cairo | 28 +- .../output_0.cairo | 15 +- .../nodes/argmin_fp8x23_1D_default.cairo | 8 +- .../argmin_fp8x23_1D_default/input_0.cairo | 19 +- .../argmin_fp8x23_1D_default/output_0.cairo | 11 +- .../argmin_fp8x23_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 19 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp8x23_1D_last_index.cairo | 8 +- .../argmin_fp8x23_1D_last_index/input_0.cairo | 19 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp8x23_2D_default.cairo | 8 +- .../argmin_fp8x23_2D_default/input_0.cairo | 21 +- .../argmin_fp8x23_2D_default/output_0.cairo | 11 +- .../argmin_fp8x23_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 21 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp8x23_2D_last_index.cairo | 8 +- .../argmin_fp8x23_2D_last_index/input_0.cairo | 21 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp8x23_3D_default.cairo | 8 +- .../argmin_fp8x23_3D_default/input_0.cairo | 29 +- .../argmin_fp8x23_3D_default/output_0.cairo | 13 +- .../argmin_fp8x23_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 29 +- .../output_0.cairo | 11 +- .../nodes/argmin_fp8x23_3D_last_index.cairo | 8 +- .../argmin_fp8x23_3D_last_index/input_0.cairo | 29 +- .../output_0.cairo | 11 +- src/tests/nodes/argmin_i32_1D_default.cairo | 8 +- .../nodes/argmin_i32_1D_default/input_0.cairo | 17 +- .../argmin_i32_1D_default/output_0.cairo | 11 +- .../nodes/argmin_i32_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 17 +- .../output_0.cairo | 9 +- .../nodes/argmin_i32_1D_last_index.cairo | 8 +- .../argmin_i32_1D_last_index/input_0.cairo | 17 +- .../argmin_i32_1D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmin_i32_2D_default.cairo | 8 +- .../nodes/argmin_i32_2D_default/input_0.cairo | 19 +- .../argmin_i32_2D_default/output_0.cairo | 11 +- .../nodes/argmin_i32_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 19 +- .../output_0.cairo | 13 +- .../nodes/argmin_i32_2D_last_index.cairo | 8 +- .../argmin_i32_2D_last_index/input_0.cairo | 19 +- .../argmin_i32_2D_last_index/output_0.cairo | 9 +- src/tests/nodes/argmin_i32_3D_default.cairo | 8 +- .../nodes/argmin_i32_3D_default/input_0.cairo | 27 +- .../argmin_i32_3D_default/output_0.cairo | 11 +- .../nodes/argmin_i32_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 25 +- .../output_0.cairo | 11 +- .../nodes/argmin_i32_3D_last_index.cairo | 8 +- .../argmin_i32_3D_last_index/input_0.cairo | 25 +- .../argmin_i32_3D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmin_i8_1D_default.cairo | 8 +- .../nodes/argmin_i8_1D_default/input_0.cairo | 17 +- .../nodes/argmin_i8_1D_default/output_0.cairo | 9 +- .../nodes/argmin_i8_1D_keepdims_false.cairo | 8 +- .../argmin_i8_1D_keepdims_false/input_0.cairo | 17 +- .../output_0.cairo | 9 +- src/tests/nodes/argmin_i8_1D_last_index.cairo | 8 +- .../argmin_i8_1D_last_index/input_0.cairo | 17 +- .../argmin_i8_1D_last_index/output_0.cairo | 9 +- src/tests/nodes/argmin_i8_2D_default.cairo | 8 +- .../nodes/argmin_i8_2D_default/input_0.cairo | 19 +- .../nodes/argmin_i8_2D_default/output_0.cairo | 11 +- .../nodes/argmin_i8_2D_keepdims_false.cairo | 8 +- .../argmin_i8_2D_keepdims_false/input_0.cairo | 19 +- .../output_0.cairo | 11 +- src/tests/nodes/argmin_i8_2D_last_index.cairo | 8 +- .../argmin_i8_2D_last_index/input_0.cairo | 19 +- .../argmin_i8_2D_last_index/output_0.cairo | 13 +- src/tests/nodes/argmin_i8_3D_default.cairo | 8 +- .../nodes/argmin_i8_3D_default/input_0.cairo | 27 +- .../nodes/argmin_i8_3D_default/output_0.cairo | 13 +- .../nodes/argmin_i8_3D_keepdims_false.cairo | 8 +- .../argmin_i8_3D_keepdims_false/input_0.cairo | 25 +- .../output_0.cairo | 11 +- src/tests/nodes/argmin_i8_3D_last_index.cairo | 8 +- .../argmin_i8_3D_last_index/input_0.cairo | 27 +- .../argmin_i8_3D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmin_u32_1D_default.cairo | 8 +- .../nodes/argmin_u32_1D_default/input_0.cairo | 15 +- .../argmin_u32_1D_default/output_0.cairo | 9 +- .../nodes/argmin_u32_1D_keepdims_false.cairo | 8 +- .../input_0.cairo | 15 +- .../output_0.cairo | 11 +- .../nodes/argmin_u32_1D_last_index.cairo | 8 +- .../argmin_u32_1D_last_index/input_0.cairo | 15 +- .../argmin_u32_1D_last_index/output_0.cairo | 9 +- src/tests/nodes/argmin_u32_2D_default.cairo | 8 +- .../nodes/argmin_u32_2D_default/input_0.cairo | 17 +- .../argmin_u32_2D_default/output_0.cairo | 11 +- .../nodes/argmin_u32_2D_keepdims_false.cairo | 8 +- .../input_0.cairo | 17 +- .../output_0.cairo | 9 +- .../nodes/argmin_u32_2D_last_index.cairo | 8 +- .../argmin_u32_2D_last_index/input_0.cairo | 17 +- .../argmin_u32_2D_last_index/output_0.cairo | 11 +- src/tests/nodes/argmin_u32_3D_default.cairo | 8 +- .../nodes/argmin_u32_3D_default/input_0.cairo | 25 +- .../argmin_u32_3D_default/output_0.cairo | 11 +- .../nodes/argmin_u32_3D_keepdims_false.cairo | 8 +- .../input_0.cairo | 25 +- .../output_0.cairo | 13 +- .../nodes/argmin_u32_3D_last_index.cairo | 8 +- .../argmin_u32_3D_last_index/input_0.cairo | 25 +- .../argmin_u32_3D_last_index/output_0.cairo | 13 +- src/tests/nodes/asin_fp16x16.cairo | 9 +- src/tests/nodes/asin_fp16x16/input_0.cairo | 20 +- src/tests/nodes/asin_fp16x16/output_0.cairo | 20 +- src/tests/nodes/asin_fp8x23.cairo | 9 +- src/tests/nodes/asin_fp8x23/input_0.cairo | 18 +- src/tests/nodes/asin_fp8x23/output_0.cairo | 18 +- src/tests/nodes/asinh_fp16x16.cairo | 9 +- src/tests/nodes/asinh_fp16x16/input_0.cairo | 20 +- src/tests/nodes/asinh_fp16x16/output_0.cairo | 20 +- src/tests/nodes/asinh_fp8x23.cairo | 9 +- src/tests/nodes/asinh_fp8x23/input_0.cairo | 18 +- src/tests/nodes/asinh_fp8x23/output_0.cairo | 18 +- src/tests/nodes/asinh_i32_fp16x16.cairo | 19 - .../nodes/asinh_i32_fp16x16/input_0.cairo | 20 - .../nodes/asinh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_i32_fp8x23.cairo | 20 - .../nodes/asinh_i32_fp8x23/input_0.cairo | 20 - .../nodes/asinh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_i8_fp16x16.cairo | 20 - .../nodes/asinh_i8_fp16x16/input_0.cairo | 20 - .../nodes/asinh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_i8_fp8x23.cairo | 21 - src/tests/nodes/asinh_i8_fp8x23/input_0.cairo | 20 - .../nodes/asinh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/asinh_u32_fp16x16.cairo | 20 - .../nodes/asinh_u32_fp16x16/input_0.cairo | 19 - .../nodes/asinh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/asinh_u32_fp8x23.cairo | 19 - .../nodes/asinh_u32_fp8x23/input_0.cairo | 19 - .../nodes/asinh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_fp16x16.cairo | 10 +- src/tests/nodes/atan_fp16x16/input_0.cairo | 20 +- src/tests/nodes/atan_fp16x16/output_0.cairo | 20 +- src/tests/nodes/atan_fp8x23.cairo | 9 +- src/tests/nodes/atan_fp8x23/input_0.cairo | 18 +- src/tests/nodes/atan_fp8x23/output_0.cairo | 18 +- src/tests/nodes/atan_i32_fp16x16.cairo | 20 - .../nodes/atan_i32_fp16x16/input_0.cairo | 20 - .../nodes/atan_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_i32_fp8x23.cairo | 20 - src/tests/nodes/atan_i32_fp8x23/input_0.cairo | 20 - .../nodes/atan_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_i8_fp16x16.cairo | 20 - src/tests/nodes/atan_i8_fp16x16/input_0.cairo | 20 - .../nodes/atan_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_i8_fp8x23.cairo | 20 - src/tests/nodes/atan_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/atan_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/atan_u32_fp16x16.cairo | 20 - .../nodes/atan_u32_fp16x16/input_0.cairo | 19 - .../nodes/atan_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/atan_u32_fp8x23.cairo | 20 - src/tests/nodes/atan_u32_fp8x23/input_0.cairo | 19 - .../nodes/atan_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/ceil_fp16x16.cairo | 9 +- src/tests/nodes/ceil_fp16x16/input_0.cairo | 20 +- src/tests/nodes/ceil_fp16x16/output_0.cairo | 14 +- src/tests/nodes/ceil_fp8x23.cairo | 9 +- src/tests/nodes/ceil_fp8x23/input_0.cairo | 18 +- src/tests/nodes/ceil_fp8x23/output_0.cairo | 12 +- src/tests/nodes/concat_fp16x16_1d.cairo | 9 +- .../nodes/concat_fp16x16_1d/input_0.cairo | 12 +- .../nodes/concat_fp16x16_1d/input_1.cairo | 12 +- .../nodes/concat_fp16x16_1d/output_0.cairo | 12 +- src/tests/nodes/concat_fp16x16_2d.cairo | 9 +- .../nodes/concat_fp16x16_2d/input_0.cairo | 12 +- .../nodes/concat_fp16x16_2d/input_1.cairo | 12 +- .../nodes/concat_fp16x16_2d/output_0.cairo | 12 +- .../nodes/concat_fp16x16_3d_axis_1.cairo | 11 +- .../concat_fp16x16_3d_axis_1/input_0.cairo | 12 +- .../concat_fp16x16_3d_axis_1/input_1.cairo | 12 +- .../concat_fp16x16_3d_axis_1/output_0.cairo | 12 +- .../nodes/concat_fp16x16_3d_axis_2.cairo | 19 +- .../concat_fp16x16_3d_axis_2/input_0.cairo | 12 +- .../concat_fp16x16_3d_axis_2/input_1.cairo | 12 +- .../concat_fp16x16_3d_axis_2/output_0.cairo | 12 +- .../nodes/concat_fp16x16_3d_default.cairo | 9 +- .../concat_fp16x16_3d_default/input_0.cairo | 12 +- .../concat_fp16x16_3d_default/input_1.cairo | 12 +- .../concat_fp16x16_3d_default/output_0.cairo | 12 +- ...ncat_fp16x16_3d_three_tensors_axis_1.cairo | 19 +- .../input_0.cairo | 12 +- .../input_1.cairo | 12 +- .../input_2.cairo | 12 +- .../output_0.cairo | 12 +- ...ncat_fp16x16_3d_three_tensors_axis_2.cairo | 19 +- .../input_0.cairo | 12 +- .../input_1.cairo | 12 +- .../input_2.cairo | 12 +- .../output_0.cairo | 12 +- src/tests/nodes/concat_fp8x23_1d.cairo | 8 +- .../nodes/concat_fp8x23_1d/input_0.cairo | 13 +- .../nodes/concat_fp8x23_1d/input_1.cairo | 13 +- .../nodes/concat_fp8x23_1d/output_0.cairo | 13 +- src/tests/nodes/concat_fp8x23_2d.cairo | 8 +- .../nodes/concat_fp8x23_2d/input_0.cairo | 13 +- .../nodes/concat_fp8x23_2d/input_1.cairo | 13 +- .../nodes/concat_fp8x23_2d/output_0.cairo | 13 +- src/tests/nodes/concat_fp8x23_3d_axis_1.cairo | 8 +- .../concat_fp8x23_3d_axis_1/input_0.cairo | 13 +- .../concat_fp8x23_3d_axis_1/input_1.cairo | 13 +- .../concat_fp8x23_3d_axis_1/output_0.cairo | 13 +- src/tests/nodes/concat_fp8x23_3d_axis_2.cairo | 8 +- .../concat_fp8x23_3d_axis_2/input_0.cairo | 13 +- .../concat_fp8x23_3d_axis_2/input_1.cairo | 13 +- .../concat_fp8x23_3d_axis_2/output_0.cairo | 13 +- .../nodes/concat_fp8x23_3d_default.cairo | 8 +- .../concat_fp8x23_3d_default/input_0.cairo | 13 +- .../concat_fp8x23_3d_default/input_1.cairo | 13 +- .../concat_fp8x23_3d_default/output_0.cairo | 13 +- ...oncat_fp8x23_3d_three_tensors_axis_1.cairo | 10 +- .../input_0.cairo | 13 +- .../input_1.cairo | 13 +- .../input_2.cairo | 13 +- .../output_0.cairo | 13 +- ...oncat_fp8x23_3d_three_tensors_axis_2.cairo | 10 +- .../input_0.cairo | 13 +- .../input_1.cairo | 13 +- .../input_2.cairo | 13 +- .../output_0.cairo | 13 +- src/tests/nodes/concat_i32_1d.cairo | 9 +- src/tests/nodes/concat_i32_1d/input_0.cairo | 11 +- src/tests/nodes/concat_i32_1d/input_1.cairo | 11 +- src/tests/nodes/concat_i32_1d/output_0.cairo | 11 +- src/tests/nodes/concat_i32_2d.cairo | 9 +- src/tests/nodes/concat_i32_2d/input_0.cairo | 11 +- src/tests/nodes/concat_i32_2d/input_1.cairo | 11 +- src/tests/nodes/concat_i32_2d/output_0.cairo | 11 +- src/tests/nodes/concat_i32_3d_axis_1.cairo | 9 +- .../nodes/concat_i32_3d_axis_1/input_0.cairo | 11 +- .../nodes/concat_i32_3d_axis_1/input_1.cairo | 11 +- .../nodes/concat_i32_3d_axis_1/output_0.cairo | 11 +- src/tests/nodes/concat_i32_3d_axis_2.cairo | 9 +- .../nodes/concat_i32_3d_axis_2/input_0.cairo | 11 +- .../nodes/concat_i32_3d_axis_2/input_1.cairo | 11 +- .../nodes/concat_i32_3d_axis_2/output_0.cairo | 11 +- src/tests/nodes/concat_i32_3d_default.cairo | 9 +- .../nodes/concat_i32_3d_default/input_0.cairo | 11 +- .../nodes/concat_i32_3d_default/input_1.cairo | 11 +- .../concat_i32_3d_default/output_0.cairo | 11 +- .../concat_i32_3d_three_tensors_axis_1.cairo | 9 +- .../input_0.cairo | 11 +- .../input_1.cairo | 11 +- .../input_2.cairo | 11 +- .../output_0.cairo | 11 +- .../concat_i32_3d_three_tensors_axis_2.cairo | 9 +- .../input_0.cairo | 11 +- .../input_1.cairo | 11 +- .../input_2.cairo | 11 +- .../output_0.cairo | 11 +- src/tests/nodes/concat_i8_1d.cairo | 22 + src/tests/nodes/concat_i8_1d/input_0.cairo | 16 + src/tests/nodes/concat_i8_1d/input_1.cairo | 16 + src/tests/nodes/concat_i8_1d/output_0.cairo | 19 + src/tests/nodes/concat_i8_2d.cairo | 22 + src/tests/nodes/concat_i8_2d/input_0.cairo | 18 + src/tests/nodes/concat_i8_2d/input_1.cairo | 18 + src/tests/nodes/concat_i8_2d/output_0.cairo | 22 + src/tests/nodes/concat_i8_3d_axis_1.cairo | 22 + .../nodes/concat_i8_3d_axis_1/input_0.cairo | 42 + .../nodes/concat_i8_3d_axis_1/input_1.cairo | 42 + .../nodes/concat_i8_3d_axis_1/output_0.cairo | 69 ++ src/tests/nodes/concat_i8_3d_axis_2.cairo | 22 + .../nodes/concat_i8_3d_axis_2/input_0.cairo | 42 + .../nodes/concat_i8_3d_axis_2/input_1.cairo | 42 + .../nodes/concat_i8_3d_axis_2/output_0.cairo | 69 ++ src/tests/nodes/concat_i8_3d_default.cairo | 22 + .../nodes/concat_i8_3d_default/input_0.cairo | 42 + .../nodes/concat_i8_3d_default/input_1.cairo | 42 + .../nodes/concat_i8_3d_default/output_0.cairo | 69 ++ .../concat_i8_3d_three_tensors_axis_1.cairo | 24 + .../input_0.cairo | 42 + .../input_1.cairo | 42 + .../input_2.cairo | 42 + .../output_0.cairo | 96 +++ .../concat_i8_3d_three_tensors_axis_2.cairo | 24 + .../input_0.cairo | 42 + .../input_1.cairo | 42 + .../input_2.cairo | 42 + .../output_0.cairo | 96 +++ src/tests/nodes/concat_u32_1d.cairo | 8 +- src/tests/nodes/concat_u32_1d/input_0.cairo | 9 +- src/tests/nodes/concat_u32_1d/input_1.cairo | 9 +- src/tests/nodes/concat_u32_1d/output_0.cairo | 9 +- src/tests/nodes/concat_u32_2d.cairo | 8 +- src/tests/nodes/concat_u32_2d/input_0.cairo | 9 +- src/tests/nodes/concat_u32_2d/input_1.cairo | 9 +- src/tests/nodes/concat_u32_2d/output_0.cairo | 9 +- src/tests/nodes/concat_u32_3d_axis_1.cairo | 8 +- .../nodes/concat_u32_3d_axis_1/input_0.cairo | 9 +- .../nodes/concat_u32_3d_axis_1/input_1.cairo | 9 +- .../nodes/concat_u32_3d_axis_1/output_0.cairo | 9 +- src/tests/nodes/concat_u32_3d_axis_2.cairo | 8 +- .../nodes/concat_u32_3d_axis_2/input_0.cairo | 9 +- .../nodes/concat_u32_3d_axis_2/input_1.cairo | 9 +- .../nodes/concat_u32_3d_axis_2/output_0.cairo | 9 +- src/tests/nodes/concat_u32_3d_default.cairo | 8 +- .../nodes/concat_u32_3d_default/input_0.cairo | 9 +- .../nodes/concat_u32_3d_default/input_1.cairo | 9 +- .../concat_u32_3d_default/output_0.cairo | 9 +- .../concat_u32_3d_three_tensors_axis_1.cairo | 8 +- .../input_0.cairo | 9 +- .../input_1.cairo | 9 +- .../input_2.cairo | 9 +- .../output_0.cairo | 9 +- .../concat_u32_3d_three_tensors_axis_2.cairo | 8 +- .../input_0.cairo | 9 +- .../input_1.cairo | 9 +- .../input_2.cairo | 9 +- .../output_0.cairo | 9 +- src/tests/nodes/cos_fp16x16.cairo | 9 +- src/tests/nodes/cos_fp16x16/input_0.cairo | 20 +- src/tests/nodes/cos_fp16x16/output_0.cairo | 20 +- src/tests/nodes/cos_fp8x23.cairo | 9 +- src/tests/nodes/cos_fp8x23/input_0.cairo | 18 +- src/tests/nodes/cos_fp8x23/output_0.cairo | 18 +- src/tests/nodes/cos_i32_fp16x16.cairo | 19 - src/tests/nodes/cos_i32_fp16x16/input_0.cairo | 20 - .../nodes/cos_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_i32_fp8x23.cairo | 20 - src/tests/nodes/cos_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/cos_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cos_i8_fp16x16.cairo | 20 - src/tests/nodes/cos_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/cos_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_i8_fp8x23.cairo | 21 - src/tests/nodes/cos_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/cos_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/cos_u32_fp16x16.cairo | 20 - src/tests/nodes/cos_u32_fp16x16/input_0.cairo | 19 - .../nodes/cos_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cos_u32_fp8x23.cairo | 19 - src/tests/nodes/cos_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/cos_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_fp16x16.cairo | 9 +- src/tests/nodes/cosh_fp16x16/input_0.cairo | 20 +- src/tests/nodes/cosh_fp16x16/output_0.cairo | 20 +- src/tests/nodes/cosh_fp8x23.cairo | 9 +- src/tests/nodes/cosh_fp8x23/input_0.cairo | 18 +- src/tests/nodes/cosh_fp8x23/output_0.cairo | 18 +- src/tests/nodes/cosh_i32_fp16x16.cairo | 19 - .../nodes/cosh_i32_fp16x16/input_0.cairo | 20 - .../nodes/cosh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_i32_fp8x23.cairo | 20 - src/tests/nodes/cosh_i32_fp8x23/input_0.cairo | 20 - .../nodes/cosh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_i8_fp16x16.cairo | 20 - src/tests/nodes/cosh_i8_fp16x16/input_0.cairo | 20 - .../nodes/cosh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_i8_fp8x23.cairo | 21 - src/tests/nodes/cosh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/cosh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/cosh_u32_fp16x16.cairo | 20 - .../nodes/cosh_u32_fp16x16/input_0.cairo | 19 - .../nodes/cosh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/cosh_u32_fp8x23.cairo | 19 - src/tests/nodes/cosh_u32_fp8x23/input_0.cairo | 19 - .../nodes/cosh_u32_fp8x23/output_0.cairo | 20 - .../nodes/cumsum_fp16x16_1d_default.cairo | 9 +- .../cumsum_fp16x16_1d_default/input_0.cairo | 12 +- .../cumsum_fp16x16_1d_default/output_0.cairo | 12 +- .../nodes/cumsum_fp16x16_1d_exclusive.cairo | 9 +- .../cumsum_fp16x16_1d_exclusive/input_0.cairo | 12 +- .../output_0.cairo | 12 +- .../nodes/cumsum_fp16x16_1d_reverse.cairo | 9 +- .../cumsum_fp16x16_1d_reverse/input_0.cairo | 12 +- .../cumsum_fp16x16_1d_reverse/output_0.cairo | 12 +- .../cumsum_fp16x16_1d_reverse_exclusive.cairo | 9 +- .../input_0.cairo | 12 +- .../output_0.cairo | 12 +- .../nodes/cumsum_fp16x16_2d_axis_0.cairo | 9 +- .../cumsum_fp16x16_2d_axis_0/input_0.cairo | 12 +- .../cumsum_fp16x16_2d_axis_0/output_0.cairo | 12 +- .../nodes/cumsum_fp16x16_2d_axis_1.cairo | 9 +- .../cumsum_fp16x16_2d_axis_1/input_0.cairo | 12 +- .../cumsum_fp16x16_2d_axis_1/output_0.cairo | 12 +- .../nodes/cumsum_fp8x23_1d_default.cairo | 8 +- .../cumsum_fp8x23_1d_default/input_0.cairo | 13 +- .../cumsum_fp8x23_1d_default/output_0.cairo | 13 +- .../nodes/cumsum_fp8x23_1d_exclusive.cairo | 8 +- .../cumsum_fp8x23_1d_exclusive/input_0.cairo | 13 +- .../cumsum_fp8x23_1d_exclusive/output_0.cairo | 13 +- .../nodes/cumsum_fp8x23_1d_reverse.cairo | 8 +- .../cumsum_fp8x23_1d_reverse/input_0.cairo | 13 +- .../cumsum_fp8x23_1d_reverse/output_0.cairo | 13 +- .../cumsum_fp8x23_1d_reverse_exclusive.cairo | 8 +- .../input_0.cairo | 13 +- .../output_0.cairo | 13 +- src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo | 8 +- .../cumsum_fp8x23_2d_axis_0/input_0.cairo | 13 +- .../cumsum_fp8x23_2d_axis_0/output_0.cairo | 13 +- src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo | 8 +- .../cumsum_fp8x23_2d_axis_1/input_0.cairo | 13 +- .../cumsum_fp8x23_2d_axis_1/output_0.cairo | 13 +- src/tests/nodes/cumsum_i32_1d_default.cairo | 9 +- .../nodes/cumsum_i32_1d_default/input_0.cairo | 11 +- .../cumsum_i32_1d_default/output_0.cairo | 11 +- src/tests/nodes/cumsum_i32_1d_exclusive.cairo | 9 +- .../cumsum_i32_1d_exclusive/input_0.cairo | 11 +- .../cumsum_i32_1d_exclusive/output_0.cairo | 11 +- src/tests/nodes/cumsum_i32_1d_reverse.cairo | 9 +- .../nodes/cumsum_i32_1d_reverse/input_0.cairo | 11 +- .../cumsum_i32_1d_reverse/output_0.cairo | 11 +- .../cumsum_i32_1d_reverse_exclusive.cairo | 9 +- .../input_0.cairo | 11 +- .../output_0.cairo | 11 +- src/tests/nodes/cumsum_i32_2d_axis_0.cairo | 9 +- .../nodes/cumsum_i32_2d_axis_0/input_0.cairo | 11 +- .../nodes/cumsum_i32_2d_axis_0/output_0.cairo | 11 +- src/tests/nodes/cumsum_i32_2d_axis_1.cairo | 9 +- .../nodes/cumsum_i32_2d_axis_1/input_0.cairo | 11 +- .../nodes/cumsum_i32_2d_axis_1/output_0.cairo | 11 +- src/tests/nodes/cumsum_i8_1d_default.cairo | 9 +- .../nodes/cumsum_i8_1d_default/input_0.cairo | 11 +- .../nodes/cumsum_i8_1d_default/output_0.cairo | 11 +- src/tests/nodes/cumsum_i8_1d_exclusive.cairo | 9 +- .../cumsum_i8_1d_exclusive/input_0.cairo | 11 +- .../cumsum_i8_1d_exclusive/output_0.cairo | 11 +- src/tests/nodes/cumsum_i8_1d_reverse.cairo | 9 +- .../nodes/cumsum_i8_1d_reverse/input_0.cairo | 11 +- .../nodes/cumsum_i8_1d_reverse/output_0.cairo | 11 +- .../cumsum_i8_1d_reverse_exclusive.cairo | 9 +- .../input_0.cairo | 11 +- .../output_0.cairo | 11 +- src/tests/nodes/cumsum_i8_2d_axis_0.cairo | 9 +- .../nodes/cumsum_i8_2d_axis_0/input_0.cairo | 11 +- .../nodes/cumsum_i8_2d_axis_0/output_0.cairo | 11 +- src/tests/nodes/cumsum_i8_2d_axis_1.cairo | 9 +- .../nodes/cumsum_i8_2d_axis_1/input_0.cairo | 11 +- .../nodes/cumsum_i8_2d_axis_1/output_0.cairo | 11 +- src/tests/nodes/cumsum_u32_1d_default.cairo | 8 +- .../nodes/cumsum_u32_1d_default/input_0.cairo | 9 +- .../cumsum_u32_1d_default/output_0.cairo | 9 +- src/tests/nodes/cumsum_u32_1d_exclusive.cairo | 8 +- .../cumsum_u32_1d_exclusive/input_0.cairo | 9 +- .../cumsum_u32_1d_exclusive/output_0.cairo | 9 +- src/tests/nodes/cumsum_u32_1d_reverse.cairo | 8 +- .../nodes/cumsum_u32_1d_reverse/input_0.cairo | 9 +- .../cumsum_u32_1d_reverse/output_0.cairo | 9 +- .../cumsum_u32_1d_reverse_exclusive.cairo | 8 +- .../input_0.cairo | 9 +- .../output_0.cairo | 9 +- src/tests/nodes/cumsum_u32_2d_axis_0.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_0/input_0.cairo | 9 +- .../nodes/cumsum_u32_2d_axis_0/output_0.cairo | 9 +- src/tests/nodes/cumsum_u32_2d_axis_1.cairo | 8 +- .../nodes/cumsum_u32_2d_axis_1/input_0.cairo | 9 +- .../nodes/cumsum_u32_2d_axis_1/output_0.cairo | 9 +- src/tests/nodes/div_fp16x16.cairo | 8 +- src/tests/nodes/div_fp16x16/input_0.cairo | 28 +- src/tests/nodes/div_fp16x16/input_1.cairo | 24 +- src/tests/nodes/div_fp16x16/output_0.cairo | 26 +- src/tests/nodes/div_fp16x16_broadcast.cairo | 8 +- .../nodes/div_fp16x16_broadcast/input_0.cairo | 28 +- .../nodes/div_fp16x16_broadcast/input_1.cairo | 16 +- .../div_fp16x16_broadcast/output_0.cairo | 34 +- src/tests/nodes/div_fp8x23.cairo | 8 +- src/tests/nodes/div_fp8x23/input_0.cairo | 24 +- src/tests/nodes/div_fp8x23/input_1.cairo | 20 +- src/tests/nodes/div_fp8x23/output_0.cairo | 30 +- src/tests/nodes/div_fp8x23_broadcast.cairo | 16 +- .../nodes/div_fp8x23_broadcast/input_0.cairo | 27 +- .../nodes/div_fp8x23_broadcast/input_1.cairo | 19 +- .../nodes/div_fp8x23_broadcast/output_0.cairo | 41 +- src/tests/nodes/div_i32.cairo | 10 +- src/tests/nodes/div_i32/input_0.cairo | 27 +- src/tests/nodes/div_i32/input_1.cairo | 23 +- src/tests/nodes/div_i32/output_0.cairo | 29 +- src/tests/nodes/div_i32_broadcast.cairo | 10 +- .../nodes/div_i32_broadcast/input_0.cairo | 23 +- .../nodes/div_i32_broadcast/input_1.cairo | 13 +- .../nodes/div_i32_broadcast/output_0.cairo | 31 +- src/tests/nodes/div_i8.cairo | 10 +- src/tests/nodes/div_i8/input_0.cairo | 23 +- src/tests/nodes/div_i8/input_1.cairo | 23 +- src/tests/nodes/div_i8/output_0.cairo | 25 +- src/tests/nodes/div_i8_broadcast.cairo | 10 +- .../nodes/div_i8_broadcast/input_0.cairo | 23 +- .../nodes/div_i8_broadcast/input_1.cairo | 11 +- .../nodes/div_i8_broadcast/output_0.cairo | 23 +- src/tests/nodes/div_u32.cairo | 11 +- src/tests/nodes/div_u32/input_0.cairo | 27 +- src/tests/nodes/div_u32/input_1.cairo | 25 +- src/tests/nodes/div_u32/output_0.cairo | 31 +- src/tests/nodes/div_u32_broadcast.cairo | 10 +- .../nodes/div_u32_broadcast/input_0.cairo | 29 +- .../nodes/div_u32_broadcast/input_1.cairo | 13 +- .../nodes/div_u32_broadcast/output_0.cairo | 47 +- src/tests/nodes/equal_fp16x16.cairo | 8 +- src/tests/nodes/equal_fp16x16/input_0.cairo | 42 +- src/tests/nodes/equal_fp16x16/input_1.cairo | 36 +- src/tests/nodes/equal_fp16x16/output_0.cairo | 17 +- src/tests/nodes/equal_fp16x16_broadcast.cairo | 8 +- .../equal_fp16x16_broadcast/input_0.cairo | 16 +- .../equal_fp16x16_broadcast/input_1.cairo | 14 +- .../equal_fp16x16_broadcast/output_0.cairo | 11 +- src/tests/nodes/equal_fp8x23.cairo | 8 +- src/tests/nodes/equal_fp8x23/input_0.cairo | 34 +- src/tests/nodes/equal_fp8x23/input_1.cairo | 36 +- src/tests/nodes/equal_fp8x23/output_0.cairo | 13 +- src/tests/nodes/equal_fp8x23_broadcast.cairo | 8 +- .../equal_fp8x23_broadcast/input_0.cairo | 17 +- .../equal_fp8x23_broadcast/input_1.cairo | 17 +- .../equal_fp8x23_broadcast/output_0.cairo | 11 +- src/tests/nodes/equal_i32.cairo | 8 +- src/tests/nodes/equal_i32/input_0.cairo | 35 +- src/tests/nodes/equal_i32/input_1.cairo | 35 +- src/tests/nodes/equal_i32/output_0.cairo | 15 +- src/tests/nodes/equal_i32_broadcast.cairo | 8 +- .../nodes/equal_i32_broadcast/input_0.cairo | 17 +- .../nodes/equal_i32_broadcast/input_1.cairo | 13 +- .../nodes/equal_i32_broadcast/output_0.cairo | 11 +- src/tests/nodes/equal_i8.cairo | 8 +- src/tests/nodes/equal_i8/input_0.cairo | 37 +- src/tests/nodes/equal_i8/input_1.cairo | 35 +- src/tests/nodes/equal_i8/output_0.cairo | 17 +- src/tests/nodes/equal_i8_broadcast.cairo | 8 +- .../nodes/equal_i8_broadcast/input_0.cairo | 15 +- .../nodes/equal_i8_broadcast/input_1.cairo | 13 +- .../nodes/equal_i8_broadcast/output_0.cairo | 9 +- src/tests/nodes/equal_u32.cairo | 8 +- src/tests/nodes/equal_u32/input_0.cairo | 37 +- src/tests/nodes/equal_u32/input_1.cairo | 37 +- src/tests/nodes/equal_u32/output_0.cairo | 15 +- src/tests/nodes/equal_u32_broadcast.cairo | 8 +- .../nodes/equal_u32_broadcast/input_0.cairo | 13 +- .../nodes/equal_u32_broadcast/input_1.cairo | 11 +- .../nodes/equal_u32_broadcast/output_0.cairo | 11 +- src/tests/nodes/exp_fp16x16.cairo | 9 +- src/tests/nodes/exp_fp16x16/input_0.cairo | 20 +- src/tests/nodes/exp_fp16x16/output_0.cairo | 20 +- src/tests/nodes/exp_fp8x23.cairo | 9 +- src/tests/nodes/exp_fp8x23/input_0.cairo | 18 +- src/tests/nodes/exp_fp8x23/output_0.cairo | 18 +- src/tests/nodes/exp_i32_fp16x16.cairo | 19 - src/tests/nodes/exp_i32_fp16x16/input_0.cairo | 20 - .../nodes/exp_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_i32_fp8x23.cairo | 20 - src/tests/nodes/exp_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/exp_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/exp_i8_fp16x16.cairo | 20 - src/tests/nodes/exp_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/exp_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_i8_fp8x23.cairo | 21 - src/tests/nodes/exp_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/exp_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/exp_u32_fp16x16.cairo | 20 - src/tests/nodes/exp_u32_fp16x16/input_0.cairo | 19 - .../nodes/exp_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/exp_u32_fp8x23.cairo | 19 - src/tests/nodes/exp_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/exp_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/greater_equal_fp16x16.cairo | 8 +- .../nodes/greater_equal_fp16x16/input_0.cairo | 40 +- .../nodes/greater_equal_fp16x16/input_1.cairo | 38 +- .../greater_equal_fp16x16/output_0.cairo | 21 +- .../greater_equal_fp16x16_broadcast.cairo | 8 +- .../input_0.cairo | 42 +- .../input_1.cairo | 16 +- .../output_0.cairo | 23 +- src/tests/nodes/greater_equal_fp8x23.cairo | 8 +- .../nodes/greater_equal_fp8x23/input_0.cairo | 38 +- .../nodes/greater_equal_fp8x23/input_1.cairo | 32 +- .../nodes/greater_equal_fp8x23/output_0.cairo | 17 +- .../greater_equal_fp8x23_broadcast.cairo | 8 +- .../input_0.cairo | 39 +- .../input_1.cairo | 17 +- .../output_0.cairo | 27 +- src/tests/nodes/greater_equal_i32.cairo | 8 +- .../nodes/greater_equal_i32/input_0.cairo | 37 +- .../nodes/greater_equal_i32/input_1.cairo | 37 +- .../nodes/greater_equal_i32/output_0.cairo | 21 +- .../nodes/greater_equal_i32_broadcast.cairo | 8 +- .../greater_equal_i32_broadcast/input_0.cairo | 39 +- .../greater_equal_i32_broadcast/input_1.cairo | 15 +- .../output_0.cairo | 23 +- src/tests/nodes/greater_equal_i8.cairo | 8 +- .../nodes/greater_equal_i8/input_0.cairo | 37 +- .../nodes/greater_equal_i8/input_1.cairo | 39 +- .../nodes/greater_equal_i8/output_0.cairo | 23 +- .../nodes/greater_equal_i8_broadcast.cairo | 8 +- .../greater_equal_i8_broadcast/input_0.cairo | 39 +- .../greater_equal_i8_broadcast/input_1.cairo | 15 +- .../greater_equal_i8_broadcast/output_0.cairo | 25 +- src/tests/nodes/greater_equal_u32.cairo | 8 +- .../nodes/greater_equal_u32/input_0.cairo | 37 +- .../nodes/greater_equal_u32/input_1.cairo | 33 +- .../nodes/greater_equal_u32/output_0.cairo | 21 +- .../nodes/greater_equal_u32_broadcast.cairo | 8 +- .../greater_equal_u32_broadcast/input_0.cairo | 39 +- .../greater_equal_u32_broadcast/input_1.cairo | 13 +- .../output_0.cairo | 17 +- src/tests/nodes/greater_fp16x16.cairo | 8 +- src/tests/nodes/greater_fp16x16/input_0.cairo | 42 +- src/tests/nodes/greater_fp16x16/input_1.cairo | 42 +- .../nodes/greater_fp16x16/output_0.cairo | 23 +- .../nodes/greater_fp16x16_broadcast.cairo | 8 +- .../greater_fp16x16_broadcast/input_0.cairo | 18 +- .../greater_fp16x16_broadcast/input_1.cairo | 14 +- .../greater_fp16x16_broadcast/output_0.cairo | 11 +- src/tests/nodes/greater_fp8x23.cairo | 8 +- src/tests/nodes/greater_fp8x23/input_0.cairo | 42 +- src/tests/nodes/greater_fp8x23/input_1.cairo | 44 +- src/tests/nodes/greater_fp8x23/output_0.cairo | 17 +- .../nodes/greater_fp8x23_broadcast.cairo | 8 +- .../greater_fp8x23_broadcast/input_0.cairo | 17 +- .../greater_fp8x23_broadcast/input_1.cairo | 15 +- .../greater_fp8x23_broadcast/output_0.cairo | 9 +- src/tests/nodes/greater_i32.cairo | 8 +- src/tests/nodes/greater_i32/input_0.cairo | 45 +- src/tests/nodes/greater_i32/input_1.cairo | 41 +- src/tests/nodes/greater_i32/output_0.cairo | 21 +- src/tests/nodes/greater_i32_broadcast.cairo | 8 +- .../nodes/greater_i32_broadcast/input_0.cairo | 15 +- .../nodes/greater_i32_broadcast/input_1.cairo | 15 +- .../greater_i32_broadcast/output_0.cairo | 13 +- src/tests/nodes/greater_i8.cairo | 8 +- src/tests/nodes/greater_i8/input_0.cairo | 35 +- src/tests/nodes/greater_i8/input_1.cairo | 37 +- src/tests/nodes/greater_i8/output_0.cairo | 19 +- src/tests/nodes/greater_i8_broadcast.cairo | 8 +- .../nodes/greater_i8_broadcast/input_0.cairo | 17 +- .../nodes/greater_i8_broadcast/input_1.cairo | 15 +- .../nodes/greater_i8_broadcast/output_0.cairo | 11 +- src/tests/nodes/greater_u32.cairo | 8 +- src/tests/nodes/greater_u32/input_0.cairo | 35 +- src/tests/nodes/greater_u32/input_1.cairo | 35 +- src/tests/nodes/greater_u32/output_0.cairo | 21 +- src/tests/nodes/greater_u32_broadcast.cairo | 8 +- .../nodes/greater_u32_broadcast/input_0.cairo | 13 +- .../nodes/greater_u32_broadcast/input_1.cairo | 13 +- .../greater_u32_broadcast/output_0.cairo | 13 +- src/tests/nodes/leaky_relu_fp16x16.cairo | 9 +- .../nodes/leaky_relu_fp16x16/input_0.cairo | 20 +- .../nodes/leaky_relu_fp16x16/output_0.cairo | 20 +- src/tests/nodes/leaky_relu_fp8x23.cairo | 9 +- .../nodes/leaky_relu_fp8x23/input_0.cairo | 18 +- .../nodes/leaky_relu_fp8x23/output_0.cairo | 18 +- src/tests/nodes/leaky_relu_i32_fp16x16.cairo | 20 - .../leaky_relu_i32_fp16x16/input_0.cairo | 20 - .../leaky_relu_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/leaky_relu_i32_fp8x23.cairo | 20 - .../nodes/leaky_relu_i32_fp8x23/input_0.cairo | 20 - .../leaky_relu_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/leaky_relu_i8_fp16x16.cairo | 20 - .../nodes/leaky_relu_i8_fp16x16/input_0.cairo | 20 - .../leaky_relu_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/leaky_relu_i8_fp8x23.cairo | 22 - .../nodes/leaky_relu_i8_fp8x23/input_0.cairo | 20 - .../nodes/leaky_relu_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/less_equal_fp16x16.cairo | 8 +- .../nodes/less_equal_fp16x16/input_0.cairo | 16 +- .../nodes/less_equal_fp16x16/input_1.cairo | 18 +- .../nodes/less_equal_fp16x16/output_0.cairo | 11 +- .../nodes/less_equal_fp16x16_broadcast.cairo | 8 +- .../input_0.cairo | 16 +- .../input_1.cairo | 14 +- .../output_0.cairo | 13 +- src/tests/nodes/less_equal_fp8x23.cairo | 8 +- .../nodes/less_equal_fp8x23/input_0.cairo | 16 +- .../nodes/less_equal_fp8x23/input_1.cairo | 14 +- .../nodes/less_equal_fp8x23/output_0.cairo | 11 +- .../nodes/less_equal_fp8x23_broadcast.cairo | 8 +- .../less_equal_fp8x23_broadcast/input_0.cairo | 17 +- .../less_equal_fp8x23_broadcast/input_1.cairo | 17 +- .../output_0.cairo | 13 +- src/tests/nodes/less_equal_i32.cairo | 8 +- src/tests/nodes/less_equal_i32/input_0.cairo | 17 +- src/tests/nodes/less_equal_i32/input_1.cairo | 19 +- src/tests/nodes/less_equal_i32/output_0.cairo | 11 +- .../nodes/less_equal_i32_broadcast.cairo | 8 +- .../less_equal_i32_broadcast/input_0.cairo | 15 +- .../less_equal_i32_broadcast/input_1.cairo | 15 +- .../less_equal_i32_broadcast/output_0.cairo | 11 +- src/tests/nodes/less_equal_i8.cairo | 8 +- src/tests/nodes/less_equal_i8/input_0.cairo | 19 +- src/tests/nodes/less_equal_i8/input_1.cairo | 17 +- src/tests/nodes/less_equal_i8/output_0.cairo | 13 +- src/tests/nodes/less_equal_i8_broadcast.cairo | 8 +- .../less_equal_i8_broadcast/input_0.cairo | 15 +- .../less_equal_i8_broadcast/input_1.cairo | 13 +- .../less_equal_i8_broadcast/output_0.cairo | 13 +- src/tests/nodes/less_equal_u32.cairo | 8 +- src/tests/nodes/less_equal_u32/input_0.cairo | 13 +- src/tests/nodes/less_equal_u32/input_1.cairo | 13 +- src/tests/nodes/less_equal_u32/output_0.cairo | 11 +- .../nodes/less_equal_u32_broadcast.cairo | 8 +- .../less_equal_u32_broadcast/input_0.cairo | 15 +- .../less_equal_u32_broadcast/input_1.cairo | 11 +- .../less_equal_u32_broadcast/output_0.cairo | 11 +- src/tests/nodes/less_fp16x16.cairo | 8 +- src/tests/nodes/less_fp16x16/input_0.cairo | 40 +- src/tests/nodes/less_fp16x16/input_1.cairo | 34 +- src/tests/nodes/less_fp16x16/output_0.cairo | 23 +- src/tests/nodes/less_fp16x16_broadcast.cairo | 8 +- .../less_fp16x16_broadcast/input_0.cairo | 42 +- .../less_fp16x16_broadcast/input_1.cairo | 16 +- .../less_fp16x16_broadcast/output_0.cairo | 27 +- src/tests/nodes/less_fp8x23.cairo | 8 +- src/tests/nodes/less_fp8x23/input_0.cairo | 34 +- src/tests/nodes/less_fp8x23/input_1.cairo | 36 +- src/tests/nodes/less_fp8x23/output_0.cairo | 19 +- src/tests/nodes/less_fp8x23_broadcast.cairo | 8 +- .../nodes/less_fp8x23_broadcast/input_0.cairo | 41 +- .../nodes/less_fp8x23_broadcast/input_1.cairo | 15 +- .../less_fp8x23_broadcast/output_0.cairo | 17 +- src/tests/nodes/less_i32.cairo | 8 +- src/tests/nodes/less_i32/input_0.cairo | 41 +- src/tests/nodes/less_i32/input_1.cairo | 37 +- src/tests/nodes/less_i32/output_0.cairo | 21 +- src/tests/nodes/less_i32_broadcast.cairo | 8 +- .../nodes/less_i32_broadcast/input_0.cairo | 37 +- .../nodes/less_i32_broadcast/input_1.cairo | 15 +- .../nodes/less_i32_broadcast/output_0.cairo | 21 +- src/tests/nodes/less_i8.cairo | 8 +- src/tests/nodes/less_i8/input_0.cairo | 35 +- src/tests/nodes/less_i8/input_1.cairo | 35 +- src/tests/nodes/less_i8/output_0.cairo | 21 +- src/tests/nodes/less_i8_broadcast.cairo | 8 +- .../nodes/less_i8_broadcast/input_0.cairo | 35 +- .../nodes/less_i8_broadcast/input_1.cairo | 13 +- .../nodes/less_i8_broadcast/output_0.cairo | 21 +- src/tests/nodes/less_u32.cairo | 8 +- src/tests/nodes/less_u32/input_0.cairo | 33 +- src/tests/nodes/less_u32/input_1.cairo | 31 +- src/tests/nodes/less_u32/output_0.cairo | 23 +- src/tests/nodes/less_u32_broadcast.cairo | 8 +- .../nodes/less_u32_broadcast/input_0.cairo | 39 +- .../nodes/less_u32_broadcast/input_1.cairo | 11 +- .../nodes/less_u32_broadcast/output_0.cairo | 15 +- src/tests/nodes/linear_fp16x16.cairo | 9 +- src/tests/nodes/linear_fp16x16/input_0.cairo | 18 +- src/tests/nodes/linear_fp16x16/input_1.cairo | 24 +- src/tests/nodes/linear_fp16x16/input_2.cairo | 16 +- src/tests/nodes/linear_fp16x16/output_0.cairo | 16 +- src/tests/nodes/linear_fp8x23.cairo | 9 +- src/tests/nodes/linear_fp8x23/input_0.cairo | 16 +- src/tests/nodes/linear_fp8x23/input_1.cairo | 22 +- src/tests/nodes/linear_fp8x23/input_2.cairo | 14 +- src/tests/nodes/linear_fp8x23/output_0.cairo | 14 +- src/tests/nodes/linear_i32.cairo | 8 +- src/tests/nodes/linear_i32/input_0.cairo | 17 +- src/tests/nodes/linear_i32/input_1.cairo | 21 +- src/tests/nodes/linear_i32/input_2.cairo | 15 +- src/tests/nodes/linear_i32/output_0.cairo | 15 +- src/tests/nodes/linear_i8.cairo | 8 +- src/tests/nodes/linear_i8/input_0.cairo | 17 +- src/tests/nodes/linear_i8/input_1.cairo | 17 +- src/tests/nodes/linear_i8/input_2.cairo | 13 +- src/tests/nodes/linear_i8/output_0.cairo | 15 +- src/tests/nodes/linear_u32.cairo | 9 +- src/tests/nodes/linear_u32/input_0.cairo | 13 +- src/tests/nodes/linear_u32/input_1.cairo | 19 +- src/tests/nodes/linear_u32/input_2.cairo | 13 +- src/tests/nodes/linear_u32/output_0.cairo | 13 +- src/tests/nodes/log_fp16x16.cairo | 9 +- src/tests/nodes/log_fp16x16/input_0.cairo | 20 +- src/tests/nodes/log_fp16x16/output_0.cairo | 20 +- src/tests/nodes/log_fp8x23.cairo | 9 +- src/tests/nodes/log_fp8x23/input_0.cairo | 18 +- src/tests/nodes/log_fp8x23/output_0.cairo | 18 +- src/tests/nodes/log_i32_fp16x16.cairo | 19 - src/tests/nodes/log_i32_fp16x16/input_0.cairo | 20 - .../nodes/log_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_i32_fp8x23.cairo | 20 - src/tests/nodes/log_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/log_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/log_i8_fp16x16.cairo | 20 - src/tests/nodes/log_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/log_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_i8_fp8x23.cairo | 21 - src/tests/nodes/log_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/log_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/log_u32_fp16x16.cairo | 20 - src/tests/nodes/log_u32_fp16x16/input_0.cairo | 19 - .../nodes/log_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/log_u32_fp8x23.cairo | 19 - src/tests/nodes/log_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/log_u32_fp8x23/output_0.cairo | 20 - .../nodes/logsoftmax_fp16x16_axis_0.cairo | 9 +- .../logsoftmax_fp16x16_axis_0/input_0.cairo | 20 +- .../logsoftmax_fp16x16_axis_0/output_0.cairo | 20 +- .../nodes/logsoftmax_fp16x16_axis_1.cairo | 9 +- .../logsoftmax_fp16x16_axis_1/input_0.cairo | 20 +- .../logsoftmax_fp16x16_axis_1/output_0.cairo | 20 +- .../nodes/logsoftmax_fp8x23_axis_0.cairo | 9 +- .../logsoftmax_fp8x23_axis_0/input_0.cairo | 21 +- .../logsoftmax_fp8x23_axis_0/output_0.cairo | 21 +- .../nodes/logsoftmax_fp8x23_axis_1.cairo | 9 +- .../logsoftmax_fp8x23_axis_1/input_0.cairo | 21 +- .../logsoftmax_fp8x23_axis_1/output_0.cairo | 21 +- .../nodes/logsoftmax_i32_fp16x16_axis_0.cairo | 19 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i32_fp16x16_axis_1.cairo | 19 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i32_fp8x23_axis_0.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i32_fp8x23_axis_1.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i8_fp16x16_axis_0.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i8_fp16x16_axis_1.cairo | 20 - .../input_0.cairo | 20 - .../output_0.cairo | 22 - .../nodes/logsoftmax_i8_fp8x23_axis_0.cairo | 21 - .../logsoftmax_i8_fp8x23_axis_0/input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_i8_fp8x23_axis_1.cairo | 21 - .../logsoftmax_i8_fp8x23_axis_1/input_0.cairo | 20 - .../output_0.cairo | 21 - .../nodes/logsoftmax_u32_fp16x16_axis_0.cairo | 21 - .../input_0.cairo | 19 - .../output_0.cairo | 22 - .../nodes/logsoftmax_u32_fp16x16_axis_1.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 22 - .../nodes/logsoftmax_u32_fp8x23_axis_0.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 21 - .../nodes/logsoftmax_u32_fp8x23_axis_1.cairo | 20 - .../input_0.cairo | 19 - .../output_0.cairo | 21 - src/tests/nodes/matmul_fp16x16_1d.cairo | 9 +- .../nodes/matmul_fp16x16_1d/input_0.cairo | 16 +- .../nodes/matmul_fp16x16_1d/input_1.cairo | 16 +- .../nodes/matmul_fp16x16_1d/output_0.cairo | 14 +- src/tests/nodes/matmul_fp16x16_1x2.cairo | 9 +- .../nodes/matmul_fp16x16_1x2/input_0.cairo | 14 +- .../nodes/matmul_fp16x16_1x2/input_1.cairo | 14 +- .../nodes/matmul_fp16x16_1x2/output_0.cairo | 14 +- src/tests/nodes/matmul_fp16x16_2x1.cairo | 9 +- .../nodes/matmul_fp16x16_2x1/input_0.cairo | 16 +- .../nodes/matmul_fp16x16_2x1/input_1.cairo | 16 +- .../nodes/matmul_fp16x16_2x1/output_0.cairo | 18 +- src/tests/nodes/matmul_fp16x16_2x2.cairo | 9 +- .../nodes/matmul_fp16x16_2x2/input_0.cairo | 16 +- .../nodes/matmul_fp16x16_2x2/input_1.cairo | 16 +- .../nodes/matmul_fp16x16_2x2/output_0.cairo | 20 +- src/tests/nodes/matmul_fp8x23_1d.cairo | 8 +- .../nodes/matmul_fp8x23_1d/input_0.cairo | 15 +- .../nodes/matmul_fp8x23_1d/input_1.cairo | 17 +- .../nodes/matmul_fp8x23_1d/output_0.cairo | 15 +- src/tests/nodes/matmul_fp8x23_1x2.cairo | 8 +- .../nodes/matmul_fp8x23_1x2/input_0.cairo | 15 +- .../nodes/matmul_fp8x23_1x2/input_1.cairo | 15 +- .../nodes/matmul_fp8x23_1x2/output_0.cairo | 13 +- src/tests/nodes/matmul_fp8x23_2x1.cairo | 8 +- .../nodes/matmul_fp8x23_2x1/input_0.cairo | 17 +- .../nodes/matmul_fp8x23_2x1/input_1.cairo | 17 +- .../nodes/matmul_fp8x23_2x1/output_0.cairo | 19 +- src/tests/nodes/matmul_fp8x23_2x2.cairo | 8 +- .../nodes/matmul_fp8x23_2x2/input_0.cairo | 17 +- .../nodes/matmul_fp8x23_2x2/input_1.cairo | 19 +- .../nodes/matmul_fp8x23_2x2/output_0.cairo | 19 +- src/tests/nodes/matmul_i32_1d.cairo | 9 +- src/tests/nodes/matmul_i32_1d/input_0.cairo | 17 +- src/tests/nodes/matmul_i32_1d/input_1.cairo | 17 +- src/tests/nodes/matmul_i32_1d/output_0.cairo | 13 +- src/tests/nodes/matmul_i32_1x2.cairo | 9 +- src/tests/nodes/matmul_i32_1x2/input_0.cairo | 15 +- src/tests/nodes/matmul_i32_1x2/input_1.cairo | 15 +- src/tests/nodes/matmul_i32_1x2/output_0.cairo | 13 +- src/tests/nodes/matmul_i32_2x1.cairo | 9 +- src/tests/nodes/matmul_i32_2x1/input_0.cairo | 15 +- src/tests/nodes/matmul_i32_2x1/input_1.cairo | 15 +- src/tests/nodes/matmul_i32_2x1/output_0.cairo | 19 +- src/tests/nodes/matmul_i32_2x2.cairo | 9 +- src/tests/nodes/matmul_i32_2x2/input_0.cairo | 19 +- src/tests/nodes/matmul_i32_2x2/input_1.cairo | 19 +- src/tests/nodes/matmul_i32_2x2/output_0.cairo | 19 +- src/tests/nodes/matmul_i8_1d.cairo | 9 +- src/tests/nodes/matmul_i8_1d/input_0.cairo | 15 +- src/tests/nodes/matmul_i8_1d/input_1.cairo | 17 +- src/tests/nodes/matmul_i8_1d/output_0.cairo | 13 +- src/tests/nodes/matmul_i8_1x2.cairo | 9 +- src/tests/nodes/matmul_i8_1x2/input_0.cairo | 15 +- src/tests/nodes/matmul_i8_1x2/input_1.cairo | 13 +- src/tests/nodes/matmul_i8_1x2/output_0.cairo | 13 +- src/tests/nodes/matmul_i8_2x1.cairo | 9 +- src/tests/nodes/matmul_i8_2x1/input_0.cairo | 13 +- src/tests/nodes/matmul_i8_2x1/input_1.cairo | 13 +- src/tests/nodes/matmul_i8_2x1/output_0.cairo | 17 +- src/tests/nodes/matmul_i8_2x2.cairo | 9 +- src/tests/nodes/matmul_i8_2x2/input_0.cairo | 17 +- src/tests/nodes/matmul_i8_2x2/input_1.cairo | 19 +- src/tests/nodes/matmul_i8_2x2/output_0.cairo | 19 +- src/tests/nodes/matmul_u32_1d.cairo | 8 +- src/tests/nodes/matmul_u32_1d/input_0.cairo | 15 +- src/tests/nodes/matmul_u32_1d/input_1.cairo | 15 +- src/tests/nodes/matmul_u32_1d/output_0.cairo | 11 +- src/tests/nodes/matmul_u32_1x2.cairo | 8 +- src/tests/nodes/matmul_u32_1x2/input_0.cairo | 13 +- src/tests/nodes/matmul_u32_1x2/input_1.cairo | 13 +- src/tests/nodes/matmul_u32_1x2/output_0.cairo | 11 +- src/tests/nodes/matmul_u32_2x1.cairo | 8 +- src/tests/nodes/matmul_u32_2x1/input_0.cairo | 13 +- src/tests/nodes/matmul_u32_2x1/input_1.cairo | 13 +- src/tests/nodes/matmul_u32_2x1/output_0.cairo | 17 +- src/tests/nodes/matmul_u32_2x2.cairo | 8 +- src/tests/nodes/matmul_u32_2x2/input_0.cairo | 17 +- src/tests/nodes/matmul_u32_2x2/input_1.cairo | 17 +- src/tests/nodes/matmul_u32_2x2/output_0.cairo | 17 +- src/tests/nodes/mul_fp16x16.cairo | 8 +- src/tests/nodes/mul_fp16x16/input_0.cairo | 38 +- src/tests/nodes/mul_fp16x16/input_1.cairo | 36 +- src/tests/nodes/mul_fp16x16/output_0.cairo | 42 +- src/tests/nodes/mul_fp16x16_broadcast.cairo | 8 +- .../nodes/mul_fp16x16_broadcast/input_0.cairo | 36 +- .../nodes/mul_fp16x16_broadcast/input_1.cairo | 16 +- .../mul_fp16x16_broadcast/output_0.cairo | 38 +- src/tests/nodes/mul_fp8x23.cairo | 8 +- src/tests/nodes/mul_fp8x23/input_0.cairo | 38 +- src/tests/nodes/mul_fp8x23/input_1.cairo | 34 +- src/tests/nodes/mul_fp8x23/output_0.cairo | 36 +- src/tests/nodes/mul_fp8x23_broadcast.cairo | 8 +- .../nodes/mul_fp8x23_broadcast/input_0.cairo | 45 +- .../nodes/mul_fp8x23_broadcast/input_1.cairo | 15 +- .../nodes/mul_fp8x23_broadcast/output_0.cairo | 37 +- src/tests/nodes/mul_i32.cairo | 8 +- src/tests/nodes/mul_i32/input_0.cairo | 41 +- src/tests/nodes/mul_i32/input_1.cairo | 33 +- src/tests/nodes/mul_i32/output_0.cairo | 43 +- src/tests/nodes/mul_i32_broadcast.cairo | 9 +- .../nodes/mul_i32_broadcast/input_0.cairo | 37 +- .../nodes/mul_i32_broadcast/input_1.cairo | 15 +- .../nodes/mul_i32_broadcast/output_0.cairo | 37 +- src/tests/nodes/mul_i8.cairo | 9 +- src/tests/nodes/mul_i8/input_0.cairo | 33 +- src/tests/nodes/mul_i8/input_1.cairo | 39 +- src/tests/nodes/mul_i8/output_0.cairo | 41 +- src/tests/nodes/mul_i8_broadcast.cairo | 8 +- .../nodes/mul_i8_broadcast/input_0.cairo | 41 +- .../nodes/mul_i8_broadcast/input_1.cairo | 17 +- .../nodes/mul_i8_broadcast/output_0.cairo | 47 +- src/tests/nodes/mul_u32.cairo | 16 +- src/tests/nodes/mul_u32/input_0.cairo | 29 +- src/tests/nodes/mul_u32/input_1.cairo | 27 +- src/tests/nodes/mul_u32/output_0.cairo | 35 +- src/tests/nodes/mul_u32_broadcast.cairo | 8 +- .../nodes/mul_u32_broadcast/input_0.cairo | 29 +- .../nodes/mul_u32_broadcast/input_1.cairo | 13 +- .../nodes/mul_u32_broadcast/output_0.cairo | 45 +- src/tests/nodes/or_fp16x16.cairo | 8 +- src/tests/nodes/or_fp16x16/input_0.cairo | 40 +- src/tests/nodes/or_fp16x16/input_1.cairo | 40 +- src/tests/nodes/or_fp16x16/output_0.cairo | 11 +- src/tests/nodes/or_fp16x16_broadcast.cairo | 8 +- .../nodes/or_fp16x16_broadcast/input_0.cairo | 16 +- .../nodes/or_fp16x16_broadcast/input_1.cairo | 16 +- .../nodes/or_fp16x16_broadcast/output_0.cairo | 9 +- src/tests/nodes/or_fp8x23.cairo | 8 +- src/tests/nodes/or_fp8x23/input_0.cairo | 38 +- src/tests/nodes/or_fp8x23/input_1.cairo | 38 +- src/tests/nodes/or_fp8x23/output_0.cairo | 11 +- src/tests/nodes/or_fp8x23_broadcast.cairo | 8 +- .../nodes/or_fp8x23_broadcast/input_0.cairo | 19 +- .../nodes/or_fp8x23_broadcast/input_1.cairo | 15 +- .../nodes/or_fp8x23_broadcast/output_0.cairo | 9 +- src/tests/nodes/or_i32.cairo | 8 +- src/tests/nodes/or_i32/input_0.cairo | 41 +- src/tests/nodes/or_i32/input_1.cairo | 39 +- src/tests/nodes/or_i32/output_0.cairo | 11 +- src/tests/nodes/or_i32_broadcast.cairo | 8 +- .../nodes/or_i32_broadcast/input_0.cairo | 15 +- .../nodes/or_i32_broadcast/input_1.cairo | 15 +- .../nodes/or_i32_broadcast/output_0.cairo | 11 +- src/tests/nodes/or_i8.cairo | 8 +- src/tests/nodes/or_i8/input_0.cairo | 43 +- src/tests/nodes/or_i8/input_1.cairo | 39 +- src/tests/nodes/or_i8/output_0.cairo | 11 +- src/tests/nodes/or_i8_broadcast.cairo | 8 +- src/tests/nodes/or_i8_broadcast/input_0.cairo | 17 +- src/tests/nodes/or_i8_broadcast/input_1.cairo | 13 +- .../nodes/or_i8_broadcast/output_0.cairo | 9 +- src/tests/nodes/or_u32.cairo | 8 +- src/tests/nodes/or_u32/input_0.cairo | 31 +- src/tests/nodes/or_u32/input_1.cairo | 27 +- src/tests/nodes/or_u32/output_0.cairo | 11 +- src/tests/nodes/or_u32_broadcast.cairo | 8 +- .../nodes/or_u32_broadcast/input_0.cairo | 15 +- .../nodes/or_u32_broadcast/input_1.cairo | 13 +- .../nodes/or_u32_broadcast/output_0.cairo | 9 +- src/tests/nodes/reduce_sum_fp16x16_1D.cairo | 9 +- .../nodes/reduce_sum_fp16x16_1D/input_0.cairo | 12 +- .../reduce_sum_fp16x16_1D/output_0.cairo | 12 +- .../nodes/reduce_sum_fp16x16_2D_axis_1.cairo | 9 +- .../input_0.cairo | 12 +- .../output_0.cairo | 12 +- .../nodes/reduce_sum_fp16x16_2D_default.cairo | 9 +- .../input_0.cairo | 12 +- .../output_0.cairo | 12 +- .../reduce_sum_fp16x16_2D_keepdims.cairo | 9 +- .../input_0.cairo | 12 +- .../output_0.cairo | 12 +- src/tests/nodes/reduce_sum_fp8x23_1D.cairo | 8 +- .../nodes/reduce_sum_fp8x23_1D/input_0.cairo | 13 +- .../nodes/reduce_sum_fp8x23_1D/output_0.cairo | 13 +- .../nodes/reduce_sum_fp8x23_2D_axis_1.cairo | 8 +- .../reduce_sum_fp8x23_2D_axis_1/input_0.cairo | 13 +- .../output_0.cairo | 13 +- .../nodes/reduce_sum_fp8x23_2D_default.cairo | 8 +- .../input_0.cairo | 13 +- .../output_0.cairo | 13 +- .../nodes/reduce_sum_fp8x23_2D_keepdims.cairo | 8 +- .../input_0.cairo | 13 +- .../output_0.cairo | 13 +- src/tests/nodes/reduce_sum_i32_1D.cairo | 9 +- .../nodes/reduce_sum_i32_1D/input_0.cairo | 11 +- .../nodes/reduce_sum_i32_1D/output_0.cairo | 11 +- .../nodes/reduce_sum_i32_2D_axis_1.cairo | 9 +- .../reduce_sum_i32_2D_axis_1/input_0.cairo | 11 +- .../reduce_sum_i32_2D_axis_1/output_0.cairo | 11 +- .../nodes/reduce_sum_i32_2D_default.cairo | 9 +- .../reduce_sum_i32_2D_default/input_0.cairo | 11 +- .../reduce_sum_i32_2D_default/output_0.cairo | 11 +- .../nodes/reduce_sum_i32_2D_keepdims.cairo | 9 +- .../reduce_sum_i32_2D_keepdims/input_0.cairo | 11 +- .../reduce_sum_i32_2D_keepdims/output_0.cairo | 11 +- src/tests/nodes/reduce_sum_i8_1D.cairo | 8 +- .../nodes/reduce_sum_i8_1D/input_0.cairo | 21 +- .../nodes/reduce_sum_i8_1D/output_0.cairo | 16 +- src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo | 8 +- .../reduce_sum_i8_2D_axis_1/input_0.cairo | 22 +- .../reduce_sum_i8_2D_axis_1/output_0.cairo | 18 +- .../nodes/reduce_sum_i8_2D_default.cairo | 8 +- .../reduce_sum_i8_2D_default/input_0.cairo | 22 +- .../reduce_sum_i8_2D_default/output_0.cairo | 18 +- .../nodes/reduce_sum_i8_2D_keepdims.cairo | 8 +- .../reduce_sum_i8_2D_keepdims/input_0.cairo | 22 +- .../reduce_sum_i8_2D_keepdims/output_0.cairo | 18 +- src/tests/nodes/reduce_sum_u32_1D.cairo | 8 +- .../nodes/reduce_sum_u32_1D/input_0.cairo | 9 +- .../nodes/reduce_sum_u32_1D/output_0.cairo | 9 +- .../nodes/reduce_sum_u32_2D_axis_1.cairo | 8 +- .../reduce_sum_u32_2D_axis_1/input_0.cairo | 9 +- .../reduce_sum_u32_2D_axis_1/output_0.cairo | 9 +- .../nodes/reduce_sum_u32_2D_default.cairo | 8 +- .../reduce_sum_u32_2D_default/input_0.cairo | 9 +- .../reduce_sum_u32_2D_default/output_0.cairo | 9 +- .../nodes/reduce_sum_u32_2D_keepdims.cairo | 8 +- .../reduce_sum_u32_2D_keepdims/input_0.cairo | 9 +- .../reduce_sum_u32_2D_keepdims/output_0.cairo | 9 +- src/tests/nodes/relu_fp16x16.cairo | 9 +- src/tests/nodes/relu_fp16x16/input_0.cairo | 20 +- src/tests/nodes/relu_fp16x16/output_0.cairo | 18 +- src/tests/nodes/relu_fp8x23.cairo | 9 +- src/tests/nodes/relu_fp8x23/input_0.cairo | 18 +- src/tests/nodes/relu_fp8x23/output_0.cairo | 14 +- src/tests/nodes/relu_i32.cairo | 8 +- src/tests/nodes/relu_i32/input_0.cairo | 17 +- src/tests/nodes/relu_i32/output_0.cairo | 15 +- src/tests/nodes/relu_i8.cairo | 8 +- src/tests/nodes/relu_i8/input_0.cairo | 17 +- src/tests/nodes/relu_i8/output_0.cairo | 17 +- src/tests/nodes/sigmoid_fp16x16.cairo | 9 +- src/tests/nodes/sigmoid_fp16x16/input_0.cairo | 20 +- .../nodes/sigmoid_fp16x16/output_0.cairo | 20 +- src/tests/nodes/sigmoid_fp8x23.cairo | 9 +- src/tests/nodes/sigmoid_fp8x23/input_0.cairo | 18 +- src/tests/nodes/sigmoid_fp8x23/output_0.cairo | 18 +- src/tests/nodes/sigmoid_i32_fp16x16.cairo | 19 - .../nodes/sigmoid_i32_fp16x16/input_0.cairo | 20 - .../nodes/sigmoid_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_i32_fp8x23.cairo | 20 - .../nodes/sigmoid_i32_fp8x23/input_0.cairo | 20 - .../nodes/sigmoid_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sigmoid_i8_fp16x16.cairo | 20 - .../nodes/sigmoid_i8_fp16x16/input_0.cairo | 20 - .../nodes/sigmoid_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_i8_fp8x23.cairo | 21 - .../nodes/sigmoid_i8_fp8x23/input_0.cairo | 20 - .../nodes/sigmoid_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sigmoid_u32_fp16x16.cairo | 20 - .../nodes/sigmoid_u32_fp16x16/input_0.cairo | 19 - .../nodes/sigmoid_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sigmoid_u32_fp8x23.cairo | 20 - .../nodes/sigmoid_u32_fp8x23/input_0.cairo | 19 - .../nodes/sigmoid_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_fp16x16.cairo | 9 +- src/tests/nodes/sin_fp16x16/input_0.cairo | 20 +- src/tests/nodes/sin_fp16x16/output_0.cairo | 20 +- src/tests/nodes/sin_fp8x23.cairo | 9 +- src/tests/nodes/sin_fp8x23/input_0.cairo | 18 +- src/tests/nodes/sin_fp8x23/output_0.cairo | 18 +- src/tests/nodes/sin_i32_fp16x16.cairo | 19 - src/tests/nodes/sin_i32_fp16x16/input_0.cairo | 20 - .../nodes/sin_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_i32_fp8x23.cairo | 20 - src/tests/nodes/sin_i32_fp8x23/input_0.cairo | 20 - src/tests/nodes/sin_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_i8_fp16x16.cairo | 20 - src/tests/nodes/sin_i8_fp16x16/input_0.cairo | 20 - src/tests/nodes/sin_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_i8_fp8x23.cairo | 21 - src/tests/nodes/sin_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sin_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sin_u32_fp16x16.cairo | 20 - src/tests/nodes/sin_u32_fp16x16/input_0.cairo | 19 - .../nodes/sin_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sin_u32_fp8x23.cairo | 19 - src/tests/nodes/sin_u32_fp8x23/input_0.cairo | 19 - src/tests/nodes/sin_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_fp16x16.cairo | 9 +- src/tests/nodes/sinh_fp16x16/input_0.cairo | 20 +- src/tests/nodes/sinh_fp16x16/output_0.cairo | 20 +- src/tests/nodes/sinh_fp8x23.cairo | 9 +- src/tests/nodes/sinh_fp8x23/input_0.cairo | 18 +- src/tests/nodes/sinh_fp8x23/output_0.cairo | 18 +- src/tests/nodes/sinh_i32_fp16x16.cairo | 19 - .../nodes/sinh_i32_fp16x16/input_0.cairo | 20 - .../nodes/sinh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_i32_fp8x23.cairo | 20 - src/tests/nodes/sinh_i32_fp8x23/input_0.cairo | 20 - .../nodes/sinh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_i8_fp16x16.cairo | 20 - src/tests/nodes/sinh_i8_fp16x16/input_0.cairo | 20 - .../nodes/sinh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_i8_fp8x23.cairo | 21 - src/tests/nodes/sinh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sinh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sinh_u32_fp16x16.cairo | 20 - .../nodes/sinh_u32_fp16x16/input_0.cairo | 19 - .../nodes/sinh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sinh_u32_fp8x23.cairo | 19 - src/tests/nodes/sinh_u32_fp8x23/input_0.cairo | 19 - .../nodes/sinh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_fp16x16.cairo | 9 +- src/tests/nodes/softmax_fp16x16/input_0.cairo | 20 +- .../nodes/softmax_fp16x16/output_0.cairo | 20 +- src/tests/nodes/softmax_fp8x23.cairo | 9 +- src/tests/nodes/softmax_fp8x23/input_0.cairo | 18 +- src/tests/nodes/softmax_fp8x23/output_0.cairo | 18 +- src/tests/nodes/softmax_i32_fp16x16.cairo | 19 - .../nodes/softmax_i32_fp16x16/input_0.cairo | 20 - .../nodes/softmax_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_i32_fp8x23.cairo | 20 - .../nodes/softmax_i32_fp8x23/input_0.cairo | 20 - .../nodes/softmax_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_i8_fp16x16.cairo | 20 - .../nodes/softmax_i8_fp16x16/input_0.cairo | 20 - .../nodes/softmax_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_i8_fp8x23.cairo | 21 - .../nodes/softmax_i8_fp8x23/input_0.cairo | 20 - .../nodes/softmax_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softmax_u32_fp16x16.cairo | 20 - .../nodes/softmax_u32_fp16x16/input_0.cairo | 19 - .../nodes/softmax_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softmax_u32_fp8x23.cairo | 20 - .../nodes/softmax_u32_fp8x23/input_0.cairo | 19 - .../nodes/softmax_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_fp16x16.cairo | 9 +- .../nodes/softplus_fp16x16/input_0.cairo | 20 +- .../nodes/softplus_fp16x16/output_0.cairo | 20 +- src/tests/nodes/softplus_fp8x23.cairo | 9 +- src/tests/nodes/softplus_fp8x23/input_0.cairo | 18 +- .../nodes/softplus_fp8x23/output_0.cairo | 18 +- src/tests/nodes/softplus_i32_fp16x16.cairo | 19 - .../nodes/softplus_i32_fp16x16/input_0.cairo | 20 - .../nodes/softplus_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_i32_fp8x23.cairo | 20 - .../nodes/softplus_i32_fp8x23/input_0.cairo | 20 - .../nodes/softplus_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_i8_fp16x16.cairo | 20 - .../nodes/softplus_i8_fp16x16/input_0.cairo | 20 - .../nodes/softplus_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_i8_fp8x23.cairo | 21 - .../nodes/softplus_i8_fp8x23/input_0.cairo | 20 - .../nodes/softplus_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softplus_u32_fp16x16.cairo | 20 - .../nodes/softplus_u32_fp16x16/input_0.cairo | 19 - .../nodes/softplus_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softplus_u32_fp8x23.cairo | 20 - .../nodes/softplus_u32_fp8x23/input_0.cairo | 19 - .../nodes/softplus_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_fp16x16.cairo | 9 +- .../nodes/softsign_fp16x16/input_0.cairo | 20 +- .../nodes/softsign_fp16x16/output_0.cairo | 20 +- src/tests/nodes/softsign_fp8x23.cairo | 9 +- src/tests/nodes/softsign_fp8x23/input_0.cairo | 18 +- .../nodes/softsign_fp8x23/output_0.cairo | 18 +- src/tests/nodes/softsign_i32_fp16x16.cairo | 19 - .../nodes/softsign_i32_fp16x16/input_0.cairo | 20 - .../nodes/softsign_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_i32_fp8x23.cairo | 20 - .../nodes/softsign_i32_fp8x23/input_0.cairo | 20 - .../nodes/softsign_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_i8_fp16x16.cairo | 20 - .../nodes/softsign_i8_fp16x16/input_0.cairo | 20 - .../nodes/softsign_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_i8_fp8x23.cairo | 21 - .../nodes/softsign_i8_fp8x23/input_0.cairo | 20 - .../nodes/softsign_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/softsign_u32_fp16x16.cairo | 20 - .../nodes/softsign_u32_fp16x16/input_0.cairo | 19 - .../nodes/softsign_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/softsign_u32_fp8x23.cairo | 20 - .../nodes/softsign_u32_fp8x23/input_0.cairo | 19 - .../nodes/softsign_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_fp16x16.cairo | 9 +- src/tests/nodes/sqrt_fp16x16/input_0.cairo | 20 +- src/tests/nodes/sqrt_fp16x16/output_0.cairo | 20 +- src/tests/nodes/sqrt_fp8x23.cairo | 9 +- src/tests/nodes/sqrt_fp8x23/input_0.cairo | 18 +- src/tests/nodes/sqrt_fp8x23/output_0.cairo | 18 +- src/tests/nodes/sqrt_i32_fp16x16.cairo | 19 - .../nodes/sqrt_i32_fp16x16/input_0.cairo | 20 - .../nodes/sqrt_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_i32_fp8x23.cairo | 20 - src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo | 20 - .../nodes/sqrt_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_i8_fp16x16.cairo | 20 - src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo | 20 - .../nodes/sqrt_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_i8_fp8x23.cairo | 21 - src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/sqrt_u32_fp16x16.cairo | 20 - .../nodes/sqrt_u32_fp16x16/input_0.cairo | 19 - .../nodes/sqrt_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/sqrt_u32_fp8x23.cairo | 19 - src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo | 19 - .../nodes/sqrt_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/sub_fp16x16.cairo | 10 +- src/tests/nodes/sub_fp16x16/input_0.cairo | 36 +- src/tests/nodes/sub_fp16x16/input_1.cairo | 40 +- src/tests/nodes/sub_fp16x16/output_0.cairo | 44 +- src/tests/nodes/sub_fp16x16_broadcast.cairo | 10 +- .../nodes/sub_fp16x16_broadcast/input_0.cairo | 40 +- .../nodes/sub_fp16x16_broadcast/input_1.cairo | 14 +- .../sub_fp16x16_broadcast/output_0.cairo | 44 +- src/tests/nodes/sub_fp8x23.cairo | 10 +- src/tests/nodes/sub_fp8x23/input_0.cairo | 40 +- src/tests/nodes/sub_fp8x23/input_1.cairo | 42 +- src/tests/nodes/sub_fp8x23/output_0.cairo | 44 +- src/tests/nodes/sub_fp8x23_broadcast.cairo | 16 +- .../nodes/sub_fp8x23_broadcast/input_0.cairo | 43 +- .../nodes/sub_fp8x23_broadcast/input_1.cairo | 17 +- .../nodes/sub_fp8x23_broadcast/output_0.cairo | 43 +- src/tests/nodes/sub_i32.cairo | 10 +- src/tests/nodes/sub_i32/input_0.cairo | 37 +- src/tests/nodes/sub_i32/input_1.cairo | 37 +- src/tests/nodes/sub_i32/output_0.cairo | 41 +- src/tests/nodes/sub_i32_broadcast.cairo | 10 +- .../nodes/sub_i32_broadcast/input_0.cairo | 39 +- .../nodes/sub_i32_broadcast/input_1.cairo | 15 +- .../nodes/sub_i32_broadcast/output_0.cairo | 45 +- src/tests/nodes/sub_i8.cairo | 10 +- src/tests/nodes/sub_i8/input_0.cairo | 41 +- src/tests/nodes/sub_i8/input_1.cairo | 35 +- src/tests/nodes/sub_i8/output_0.cairo | 47 +- src/tests/nodes/sub_i8_broadcast.cairo | 16 +- .../nodes/sub_i8_broadcast/input_0.cairo | 41 +- .../nodes/sub_i8_broadcast/input_1.cairo | 15 +- .../nodes/sub_i8_broadcast/output_0.cairo | 35 +- src/tests/nodes/sub_u32.cairo | 10 +- src/tests/nodes/sub_u32/input_0.cairo | 25 +- src/tests/nodes/sub_u32/input_1.cairo | 23 +- src/tests/nodes/sub_u32/output_0.cairo | 33 +- src/tests/nodes/sub_u32_broadcast.cairo | 18 +- .../nodes/sub_u32_broadcast/input_0.cairo | 31 +- .../nodes/sub_u32_broadcast/input_1.cairo | 11 +- .../nodes/sub_u32_broadcast/output_0.cairo | 29 +- src/tests/nodes/tanh_fp16x16.cairo | 9 +- src/tests/nodes/tanh_fp16x16/input_0.cairo | 20 +- src/tests/nodes/tanh_fp16x16/output_0.cairo | 20 +- src/tests/nodes/tanh_fp8x23.cairo | 9 +- src/tests/nodes/tanh_fp8x23/input_0.cairo | 18 +- src/tests/nodes/tanh_fp8x23/output_0.cairo | 18 +- src/tests/nodes/tanh_i32_fp16x16.cairo | 19 - .../nodes/tanh_i32_fp16x16/input_0.cairo | 20 - .../nodes/tanh_i32_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_i32_fp8x23.cairo | 20 - src/tests/nodes/tanh_i32_fp8x23/input_0.cairo | 20 - .../nodes/tanh_i32_fp8x23/output_0.cairo | 20 - src/tests/nodes/tanh_i8_fp16x16.cairo | 20 - src/tests/nodes/tanh_i8_fp16x16/input_0.cairo | 20 - .../nodes/tanh_i8_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_i8_fp8x23.cairo | 21 - src/tests/nodes/tanh_i8_fp8x23/input_0.cairo | 20 - src/tests/nodes/tanh_i8_fp8x23/output_0.cairo | 20 - src/tests/nodes/tanh_u32_fp16x16.cairo | 20 - .../nodes/tanh_u32_fp16x16/input_0.cairo | 19 - .../nodes/tanh_u32_fp16x16/output_0.cairo | 22 - src/tests/nodes/tanh_u32_fp8x23.cairo | 19 - src/tests/nodes/tanh_u32_fp8x23/input_0.cairo | 19 - .../nodes/tanh_u32_fp8x23/output_0.cairo | 20 - src/tests/nodes/transpose_fp16x16_2d.cairo | 9 +- .../nodes/transpose_fp16x16_2d/input_0.cairo | 20 +- .../nodes/transpose_fp16x16_2d/output_0.cairo | 20 +- src/tests/nodes/transpose_fp16x16_3d.cairo | 9 +- .../nodes/transpose_fp16x16_3d/input_0.cairo | 26 +- .../nodes/transpose_fp16x16_3d/output_0.cairo | 26 +- src/tests/nodes/transpose_fp8x23_2d.cairo | 8 +- .../nodes/transpose_fp8x23_2d/input_0.cairo | 21 +- .../nodes/transpose_fp8x23_2d/output_0.cairo | 21 +- src/tests/nodes/transpose_fp8x23_3d.cairo | 8 +- .../nodes/transpose_fp8x23_3d/input_0.cairo | 27 +- .../nodes/transpose_fp8x23_3d/output_0.cairo | 27 +- src/tests/nodes/transpose_i32_2d.cairo | 9 +- .../nodes/transpose_i32_2d/input_0.cairo | 19 +- .../nodes/transpose_i32_2d/output_0.cairo | 19 +- src/tests/nodes/transpose_i32_3d.cairo | 9 +- .../nodes/transpose_i32_3d/input_0.cairo | 25 +- .../nodes/transpose_i32_3d/output_0.cairo | 25 +- src/tests/nodes/transpose_i8_2d.cairo | 9 +- src/tests/nodes/transpose_i8_2d/input_0.cairo | 19 +- .../nodes/transpose_i8_2d/output_0.cairo | 19 +- src/tests/nodes/transpose_i8_3d.cairo | 9 +- src/tests/nodes/transpose_i8_3d/input_0.cairo | 27 +- .../nodes/transpose_i8_3d/output_0.cairo | 27 +- src/tests/nodes/transpose_u32_2d.cairo | 8 +- .../nodes/transpose_u32_2d/input_0.cairo | 17 +- .../nodes/transpose_u32_2d/output_0.cairo | 17 +- src/tests/nodes/transpose_u32_3d.cairo | 8 +- .../nodes/transpose_u32_3d/input_0.cairo | 25 +- .../nodes/transpose_u32_3d/output_0.cairo | 25 +- src/tests/nodes/xor_fp16x16.cairo | 8 +- src/tests/nodes/xor_fp16x16/input_0.cairo | 16 +- src/tests/nodes/xor_fp16x16/input_1.cairo | 16 +- src/tests/nodes/xor_fp16x16/output_0.cairo | 17 +- src/tests/nodes/xor_fp16x16_broadcast.cairo | 8 +- .../nodes/xor_fp16x16_broadcast/input_0.cairo | 18 +- .../nodes/xor_fp16x16_broadcast/input_1.cairo | 16 +- .../xor_fp16x16_broadcast/output_0.cairo | 15 +- src/tests/nodes/xor_fp8x23.cairo | 8 +- src/tests/nodes/xor_fp8x23/input_0.cairo | 36 +- src/tests/nodes/xor_fp8x23/input_1.cairo | 40 +- src/tests/nodes/xor_fp8x23/output_0.cairo | 23 +- src/tests/nodes/xor_fp8x23_broadcast.cairo | 8 +- .../nodes/xor_fp8x23_broadcast/input_0.cairo | 19 +- .../nodes/xor_fp8x23_broadcast/input_1.cairo | 15 +- .../nodes/xor_fp8x23_broadcast/output_0.cairo | 9 +- src/tests/nodes/xor_i32.cairo | 8 +- src/tests/nodes/xor_i32/input_0.cairo | 39 +- src/tests/nodes/xor_i32/input_1.cairo | 41 +- src/tests/nodes/xor_i32/output_0.cairo | 21 +- src/tests/nodes/xor_i32_broadcast.cairo | 8 +- .../nodes/xor_i32_broadcast/input_0.cairo | 17 +- .../nodes/xor_i32_broadcast/input_1.cairo | 15 +- .../nodes/xor_i32_broadcast/output_0.cairo | 9 +- src/tests/nodes/xor_i8.cairo | 8 +- src/tests/nodes/xor_i8/input_0.cairo | 37 +- src/tests/nodes/xor_i8/input_1.cairo | 41 +- src/tests/nodes/xor_i8/output_0.cairo | 23 +- src/tests/nodes/xor_i8_broadcast.cairo | 8 +- .../nodes/xor_i8_broadcast/input_0.cairo | 13 +- .../nodes/xor_i8_broadcast/input_1.cairo | 13 +- .../nodes/xor_i8_broadcast/output_0.cairo | 15 +- src/tests/nodes/xor_u32.cairo | 8 +- src/tests/nodes/xor_u32/input_0.cairo | 35 +- src/tests/nodes/xor_u32/input_1.cairo | 39 +- src/tests/nodes/xor_u32/output_0.cairo | 19 +- src/tests/nodes/xor_u32_broadcast.cairo | 8 +- .../nodes/xor_u32_broadcast/input_0.cairo | 15 +- .../nodes/xor_u32_broadcast/input_1.cairo | 11 +- .../nodes/xor_u32_broadcast/output_0.cairo | 13 +- .../fp_i8_test.cairo | 12 +- .../dequantize_linear_i32_test.cairo | 6 +- .../quantize_linear_fp_test/fp_i8_test.cairo | 12 +- .../quantize_linear_i32_test.cairo | 4 +- .../at/at_fp_test/at_fp16x16_test.cairo | 6 +- .../at/at_fp_test/at_fp8x23_test.cairo | 6 +- src/tests/tensor_core/at/at_i32_test.cairo | 6 +- src/tests/tensor_core/at/at_u32_test.cairo | 6 +- .../flatten_fp16x16_test.cairo | 6 +- .../flatten_fp_test/flatten_fp8x23_test.cairo | 6 +- .../flatten/flatten_i32_test.cairo | 6 +- .../flatten/flatten_u32_test.cairo | 6 +- .../max/max_fp_test/max_fp16x16_test.cairo | 6 +- .../max/max_fp_test/max_fp8x23_test.cairo | 6 +- src/tests/tensor_core/max/max_i32_test.cairo | 6 +- src/tests/tensor_core/max/max_u32_test.cairo | 6 +- .../min/min_fp_test/min_fp16x16_test.cairo | 6 +- .../min/min_fp_test/min_fp8x23_test.cairo | 6 +- src/tests/tensor_core/min/min_i32_test.cairo | 6 +- src/tests/tensor_core/min/min_u32_test.cairo | 6 +- src/tests/tensor_core/onehot.cairo | 3 - .../onehot_fp_test/onehot_fp16x16_test.cairo | 2 +- .../onehot_fp_test/onehot_fp8x23_test.cairo | 2 +- .../tensor_core/onehot/onehot_i32_test.cairo | 494 ----------- .../tensor_core/onehot/onehot_i8_test.cairo | 148 ---- .../tensor_core/onehot/onehot_u32_test.cairo | 444 ---------- .../stride_fp_test/stride_fp16x16_test.cairo | 6 +- .../stride_fp_test/stride_fp8x23_test.cairo | 6 +- .../tensor_core/stride/stride_i32_test.cairo | 6 +- .../tensor_core/stride/stride_u32_test.cairo | 6 +- 1810 files changed, 13218 insertions(+), 25061 deletions(-) create mode 100644 src/operators/nn/implementations/nn_i32.cairo delete mode 100644 src/operators/nn/implementations/nn_i32_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_i32_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_i8.cairo delete mode 100644 src/operators/nn/implementations/nn_i8_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_i8_fp8x23.cairo create mode 100644 src/operators/nn/implementations/nn_u32.cairo delete mode 100644 src/operators/nn/implementations/nn_u32_fp16x16.cairo delete mode 100644 src/operators/nn/implementations/nn_u32_fp8x23.cairo rename src/operators/tensor/implementations/{tensor_i32_fp8x23.cairo => tensor_i32.cairo} (65%) delete mode 100644 src/operators/tensor/implementations/tensor_i32_fp16x16.cairo rename src/operators/tensor/implementations/{tensor_i8_fp8x23.cairo => tensor_i8.cairo} (61%) delete mode 100644 src/operators/tensor/implementations/tensor_i8_fp16x16.cairo rename src/operators/tensor/implementations/{tensor_u32_fp8x23.cairo => tensor_u32.cairo} (65%) delete mode 100644 src/operators/tensor/implementations/tensor_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/acosh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/asinh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/atan_u32_fp8x23/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_1d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_1d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_2d/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_2d/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_default/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo create mode 100644 src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cos_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/cosh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/exp_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/log_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo delete mode 100644 src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sin_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sinh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softmax_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softplus_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/softsign_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i32_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_i8_fp8x23/output_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16/input_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp16x16/output_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23/input_0.cairo delete mode 100644 src/tests/nodes/tanh_u32_fp8x23/output_0.cairo delete mode 100644 src/tests/tensor_core/onehot/onehot_i32_test.cairo delete mode 100644 src/tests/tensor_core/onehot/onehot_i8_test.cairo delete mode 100644 src/tests/tensor_core/onehot/onehot_u32_test.cairo diff --git a/docs/academy/tutorials/implement-new-operators-in-orion.md b/docs/academy/tutorials/implement-new-operators-in-orion.md index fee2ee978..1f6e53ab5 100644 --- a/docs/academy/tutorials/implement-new-operators-in-orion.md +++ b/docs/academy/tutorials/implement-new-operators-in-orion.md @@ -344,10 +344,10 @@ class Softmax(RunAll): y = softmax(x, 0) # Convert the input and output to Tensor class, similar to Orion's Tensor struct: - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I32, x.shape, x.flatten()) # Convert the floats values in `y` to fixed points with `to_fp` method: y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) # Define the name of the generated folder. name = "softmax_i32_fp8x23" @@ -367,9 +367,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i32_fp16x16" make_node([x], [y], name) @@ -385,9 +385,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 1) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_i8_fp8x23" make_node([x], [y], name) @@ -398,9 +398,9 @@ class Softmax(RunAll): x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) y = softmax(x, 0) - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.I8, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_i8_fp16x16" make_node([x], [y], name) @@ -416,9 +416,9 @@ class Softmax(RunAll): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 1) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softmax_u32_fp8x23" make_node([x], [y], name) @@ -429,9 +429,9 @@ class Softmax(RunAll): x = np.random.randint(0, 3, (2, 2)).astype(np.int32) y = softmax(x, 0) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.U32, x.shape, x.flatten()) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softmax_u32_fp16x16" make_node([x], [y], name) diff --git a/docs/framework/operators/neural-network/nn.leaky_relu.md b/docs/framework/operators/neural-network/nn.leaky_relu.md index 4b1e8f4fc..04d671ec3 100644 --- a/docs/framework/operators/neural-network/nn.leaky_relu.md +++ b/docs/framework/operators/neural-network/nn.leaky_relu.md @@ -1,7 +1,7 @@ # NNTrait::leaky_relu ```rust - fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor + fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor ``` Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -10,30 +10,34 @@ The Leaky ReLU function is defined as f(x) = alpha * x if x < 0, f(x) = x otherw ## Args * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. -* `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. +* `alpha`(`@T`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. ## Returns A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn leaky_relu_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 3].span(), data: array![ - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(1, true), - IntegerTrait::new(2, true), - IntegerTrait::new(0, false), - IntegerTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(1, true), + FixedTrait::new(2, true), + FixedTrait::new(0, false), + FixedTrait::new(0, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.linear.md b/docs/framework/operators/neural-network/nn.linear.md index 539daa863..0e37fd268 100644 --- a/docs/framework/operators/neural-network/nn.linear.md +++ b/docs/framework/operators/neural-network/nn.linear.md @@ -25,8 +25,8 @@ A `Tensor` representing the result of the linear transformation. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; +use orion::operators::nn::{NNTrait, I32NN}; use orion::numbers::{i32, IntegerTrait}; fn linear_example() -> Tensor { diff --git a/docs/framework/operators/neural-network/nn.logsoftmax.md b/docs/framework/operators/neural-network/nn.logsoftmax.md index d9555f994..1aba6b01b 100644 --- a/docs/framework/operators/neural-network/nn.logsoftmax.md +++ b/docs/framework/operators/neural-network/nn.logsoftmax.md @@ -1,7 +1,7 @@ # NNTrait::logsoftmax ```rust - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor ``` Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -19,23 +19,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn logsoftmax_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.relu.md b/docs/framework/operators/neural-network/nn.relu.md index 1e51ec1e2..c4f622066 100644 --- a/docs/framework/operators/neural-network/nn.relu.md +++ b/docs/framework/operators/neural-network/nn.relu.md @@ -23,8 +23,8 @@ A `Tensor` with the same shape as the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; +use orion::operators::nn::{NNTrait, I32NN}; use orion::numbers::{i32, IntegerTrait}; fn relu_example() -> Tensor { diff --git a/docs/framework/operators/neural-network/nn.sigmoid.md b/docs/framework/operators/neural-network/nn.sigmoid.md index 9e7f1f2b6..28503f04a 100644 --- a/docs/framework/operators/neural-network/nn.sigmoid.md +++ b/docs/framework/operators/neural-network/nn.sigmoid.md @@ -1,7 +1,7 @@ # NNTrait::sigmoid ```rust - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; ``` Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn sigmoid_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softmax.md b/docs/framework/operators/neural-network/nn.softmax.md index d93f2c1b0..13717bdb3 100644 --- a/docs/framework/operators/neural-network/nn.softmax.md +++ b/docs/framework/operators/neural-network/nn.softmax.md @@ -1,7 +1,7 @@ # NNTrait::softmax ```rust - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; ``` Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -19,23 +19,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softmax_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + NNTrait::new(0, false), + NNTrait::new(1, false), + NNTrait::new(2, false), + NNTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softplus.md b/docs/framework/operators/neural-network/nn.softplus.md index fc336afcf..32caeda7a 100644 --- a/docs/framework/operators/neural-network/nn.softplus.md +++ b/docs/framework/operators/neural-network/nn.softplus.md @@ -1,7 +1,7 @@ # NNTrait::softplus ```rust - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; ``` Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softplus_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/neural-network/nn.softsign.md b/docs/framework/operators/neural-network/nn.softsign.md index 856438bb4..d80b89d7c 100644 --- a/docs/framework/operators/neural-network/nn.softsign.md +++ b/docs/framework/operators/neural-network/nn.softsign.md @@ -1,7 +1,7 @@ # NNTrait::softsign ```rust - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; ``` Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -18,23 +18,27 @@ $$ A Tensor of fixed point numbers with the same shape than the input Tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; -use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; -use orion::numbers::{i32, FP8x23, IntegerTrait}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; +use orion::operators::nn::{NNTrait, FP8x23NN}; +use orion::numbers::{FP8x23, FixedTrait}; fn softsign_example() -> Tensor { - let tensor = TensorTrait::::new( + let tensor = TensorTrait::::new( shape: array![2, 2].span(), data: array![ - IntegerTrait::new(0, false), - IntegerTrait::new(1, false), - IntegerTrait::new(2, false), - IntegerTrait::new(3, false), + FixedTrait::new(0, false), + FixedTrait::new(1, false), + FixedTrait::new(2, false), + FixedTrait::new(3, false), ] .span(), ); diff --git a/docs/framework/operators/tensor/tensor.abs.md b/docs/framework/operators/tensor/tensor.abs.md index bba9ff097..923c7cedc 100644 --- a/docs/framework/operators/tensor/tensor.abs.md +++ b/docs/framework/operators/tensor/tensor.abs.md @@ -21,7 +21,7 @@ the absolute value of all elements in the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; use orion::numbers::{i32, IntegerTrait}; fn abs_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.acos.md b/docs/framework/operators/tensor/tensor.acos.md index 5dc9ad59c..724947e68 100644 --- a/docs/framework/operators/tensor/tensor.acos.md +++ b/docs/framework/operators/tensor/tensor.acos.md @@ -16,12 +16,16 @@ Computes the arccosine (inverse of cosine) of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arccosine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn acos_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.acosh.md b/docs/framework/operators/tensor/tensor.acosh.md index 4811bec00..7dbf6ba09 100644 --- a/docs/framework/operators/tensor/tensor.acosh.md +++ b/docs/framework/operators/tensor/tensor.acosh.md @@ -1,7 +1,7 @@ # tensor.acosh ```rust - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn acosh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.argmax.md b/docs/framework/operators/tensor/tensor.argmax.md index 8334d82a8..511b05c91 100644 --- a/docs/framework/operators/tensor/tensor.argmax.md +++ b/docs/framework/operators/tensor/tensor.argmax.md @@ -28,7 +28,7 @@ Case 1: argmax with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( @@ -45,7 +45,7 @@ Case 2: argmax with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( @@ -64,7 +64,7 @@ Case 3: argmax with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmax_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.argmin.md b/docs/framework/operators/tensor/tensor.argmin.md index 398308e47..cfe15e89b 100644 --- a/docs/framework/operators/tensor/tensor.argmin.md +++ b/docs/framework/operators/tensor/tensor.argmin.md @@ -28,7 +28,7 @@ Case 1: argmin with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( @@ -46,7 +46,7 @@ Case 2: argmin with keepdims set to false ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( @@ -65,7 +65,7 @@ Case 3: argmin with select_last_index set to true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn argmin_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.asin.md b/docs/framework/operators/tensor/tensor.asin.md index 0a3ed6c39..0c29f8735 100644 --- a/docs/framework/operators/tensor/tensor.asin.md +++ b/docs/framework/operators/tensor/tensor.asin.md @@ -16,12 +16,16 @@ Computes the arcsine (inverse of sine) of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arcsine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn asin_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.asinh.md b/docs/framework/operators/tensor/tensor.asinh.md index a447fc8e0..c0193b8b8 100644 --- a/docs/framework/operators/tensor/tensor.asinh.md +++ b/docs/framework/operators/tensor/tensor.asinh.md @@ -1,7 +1,7 @@ # tensor.asinh ```rust - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; ``` Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic sine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn asinh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.at.md b/docs/framework/operators/tensor/tensor.at.md index 1dc48cf57..0cc9833d5 100644 --- a/docs/framework/operators/tensor/tensor.at.md +++ b/docs/framework/operators/tensor/tensor.at.md @@ -24,7 +24,7 @@ The `T` value at the specified indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn at_example() -> u32 { diff --git a/docs/framework/operators/tensor/tensor.atan.md b/docs/framework/operators/tensor/tensor.atan.md index 942a40d1a..f0b7e12ab 100644 --- a/docs/framework/operators/tensor/tensor.atan.md +++ b/docs/framework/operators/tensor/tensor.atan.md @@ -16,12 +16,16 @@ Computes the arctangent (inverse of tangent) of all elements of the input tensor A new `Tensor` of the same shape as the input tensor with the arctangent (inverse of tangent) value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn atan_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.ceil.md b/docs/framework/operators/tensor/tensor.ceil.md index 3186b16fa..33a0bf932 100644 --- a/docs/framework/operators/tensor/tensor.ceil.md +++ b/docs/framework/operators/tensor/tensor.ceil.md @@ -16,12 +16,16 @@ Rounds up the value of each element in the input tensor. A new `Tensor` of the same shape as the input tensor with the rounded up value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn ceil_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.concat.md b/docs/framework/operators/tensor/tensor.concat.md index 3383a13fa..0e134a288 100644 --- a/docs/framework/operators/tensor/tensor.concat.md +++ b/docs/framework/operators/tensor/tensor.concat.md @@ -25,7 +25,7 @@ A new `Tensor` concatenated tensor of the input tensors. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn concat_example() -> Tensor { let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); diff --git a/docs/framework/operators/tensor/tensor.cos.md b/docs/framework/operators/tensor/tensor.cos.md index 9118d1ab9..f9384ec6d 100644 --- a/docs/framework/operators/tensor/tensor.cos.md +++ b/docs/framework/operators/tensor/tensor.cos.md @@ -16,12 +16,16 @@ Computes the cosine of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the cosine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn cos_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.cosh.md b/docs/framework/operators/tensor/tensor.cosh.md index 754c300da..3668e8ca0 100644 --- a/docs/framework/operators/tensor/tensor.cosh.md +++ b/docs/framework/operators/tensor/tensor.cosh.md @@ -1,7 +1,7 @@ # tensor.cosh ```rust - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic cosine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn cosh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.cumsum.md b/docs/framework/operators/tensor/tensor.cumsum.md index c48dc08cc..c93fa4d94 100644 --- a/docs/framework/operators/tensor/tensor.cumsum.md +++ b/docs/framework/operators/tensor/tensor.cumsum.md @@ -28,7 +28,7 @@ Case 1: cumsum with default parameters ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( @@ -45,7 +45,7 @@ Case 2: cumsum with exclusive = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( @@ -62,7 +62,7 @@ Case 3: cumsum with exclusive = true and reverse = true ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn cumsum_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.dequantize_linear.md b/docs/framework/operators/tensor/tensor.dequantize_linear.md index c1bdecf36..c3476f9c2 100644 --- a/docs/framework/operators/tensor/tensor.dequantize_linear.md +++ b/docs/framework/operators/tensor/tensor.dequantize_linear.md @@ -21,12 +21,16 @@ or a 1-D tensor for per-axis quantization. A new `Tensor` with the same shape as the input tensor, containing the dequantized values. +## Type Constraints + +u32 tensor, not supported. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; - use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; use orion::numbers::{i8, i32, IntegerTrait}; fn dequantize_linear_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.equal.md b/docs/framework/operators/tensor/tensor.equal.md index 740eee776..83bb52a5d 100644 --- a/docs/framework/operators/tensor/tensor.equal.md +++ b/docs/framework/operators/tensor/tensor.equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn eq_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.exp.md b/docs/framework/operators/tensor/tensor.exp.md index 959dc7924..187d9becd 100644 --- a/docs/framework/operators/tensor/tensor.exp.md +++ b/docs/framework/operators/tensor/tensor.exp.md @@ -1,7 +1,7 @@ # tensor.exp ```rust - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; ``` Computes the exponential of all elements of the input tensor. @@ -15,19 +15,29 @@ $$ ## Returns -Returns a new tensor in `F` with the exponential of the elements of the input tensor. +Returns a new tensor in `T` with the exponential of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; -use orion::numbers::FP8x23; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; fn exp_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), + shape: array![2, 2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(3, false), + ] ); // We can call `exp` function as follows. diff --git a/docs/framework/operators/tensor/tensor.flatten.md b/docs/framework/operators/tensor/tensor.flatten.md index 506101077..0740346b4 100644 --- a/docs/framework/operators/tensor/tensor.flatten.md +++ b/docs/framework/operators/tensor/tensor.flatten.md @@ -43,7 +43,7 @@ Case 2: flatten with axis 1 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( @@ -60,7 +60,7 @@ Case 3: flatten with axis 2 ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn flatten_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.greater.md b/docs/framework/operators/tensor/tensor.greater.md index 477cb229c..677bc1220 100644 --- a/docs/framework/operators/tensor/tensor.greater.md +++ b/docs/framework/operators/tensor/tensor.greater.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.greater_equal.md b/docs/framework/operators/tensor/tensor.greater_equal.md index 128368ec7..8a2d6637d 100644 --- a/docs/framework/operators/tensor/tensor.greater_equal.md +++ b/docs/framework/operators/tensor/tensor.greater_equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn greater_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.less.md b/docs/framework/operators/tensor/tensor.less.md index 04ab98a66..0413fa7ea 100644 --- a/docs/framework/operators/tensor/tensor.less.md +++ b/docs/framework/operators/tensor/tensor.less.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.less_equal.md b/docs/framework/operators/tensor/tensor.less_equal.md index 6c22ebc61..23d3356fa 100644 --- a/docs/framework/operators/tensor/tensor.less_equal.md +++ b/docs/framework/operators/tensor/tensor.less_equal.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -51,7 +51,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn less_equal_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.log.md b/docs/framework/operators/tensor/tensor.log.md index 82ebe3304..d14245e47 100644 --- a/docs/framework/operators/tensor/tensor.log.md +++ b/docs/framework/operators/tensor/tensor.log.md @@ -1,7 +1,7 @@ # tensor.log ```rust - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; ``` Computes the natural log of all elements of the input tensor. @@ -15,19 +15,29 @@ $$ ## Returns -Returns a new tensor in `F` with the natural log of the elements of the input tensor. +Returns a new tensor in `T` with the natural log of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; -use orion::numbers::FP8x23; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; fn log_example() -> Tensor { let tensor = TensorTrait::::new( - shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), + shape: array![2, 2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(100, false), + ] ); // We can call `log` function as follows. diff --git a/docs/framework/operators/tensor/tensor.matmul.md b/docs/framework/operators/tensor/tensor.matmul.md index 08f371bca..21e828a76 100644 --- a/docs/framework/operators/tensor/tensor.matmul.md +++ b/docs/framework/operators/tensor/tensor.matmul.md @@ -31,7 +31,7 @@ Case 1: Dot product of two vectors (1D \* 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn dot_product_example() -> Tensor { let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); @@ -49,7 +49,7 @@ Case 2: Matrix multiplication (2D \* 2D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn matrix_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -71,7 +71,7 @@ Case 3: Matrix-Vector multiplication (2D x 1D) ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn matrix_vec_mul_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.max.md b/docs/framework/operators/tensor/tensor.max.md index 74a63d6e6..e115cc559 100644 --- a/docs/framework/operators/tensor/tensor.max.md +++ b/docs/framework/operators/tensor/tensor.max.md @@ -19,7 +19,7 @@ Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn max_example() -> u32 { let tensor = TensorTrait::new( diff --git a/docs/framework/operators/tensor/tensor.min.md b/docs/framework/operators/tensor/tensor.min.md index 2569168dc..037c4067f 100644 --- a/docs/framework/operators/tensor/tensor.min.md +++ b/docs/framework/operators/tensor/tensor.min.md @@ -19,7 +19,7 @@ The minimum `T` value in the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn min_example() -> u32 { let tensor = TensorTrait::new( diff --git a/docs/framework/operators/tensor/tensor.new.md b/docs/framework/operators/tensor/tensor.new.md index 80e0f5179..3d29c9da3 100644 --- a/docs/framework/operators/tensor/tensor.new.md +++ b/docs/framework/operators/tensor/tensor.new.md @@ -29,8 +29,7 @@ use array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{ TensorTrait, // we import the trait Tensor, // we import the type - Tensor_u32_fp16x16 // we import the implementation. - //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). + U32Tensor // we import the implementation. }; // 1D TENSOR diff --git a/docs/framework/operators/tensor/tensor.onehot.md b/docs/framework/operators/tensor/tensor.onehot.md index 031935a0e..09e88f02d 100644 --- a/docs/framework/operators/tensor/tensor.onehot.md +++ b/docs/framework/operators/tensor/tensor.onehot.md @@ -21,15 +21,29 @@ Produces one-hot tensor based on input. A new `Tensor` one-hot encode of the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - -fn onehot_example() -> Tensor { - let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; +use orion::numbers::{FP8x23, FixedTrait}; + +fn onehot_example() -> Tensor { + let tensor = TensorTrait::::new( + shape: array![2,2].span(), + data: array![ + FixedTrait::new_unscaled(0, false), + FixedTrait::new_unscaled(1, false), + FixedTrait::new_unscaled(2, false), + FixedTrait::new_unscaled(3, false), + ] + .span(), + ); return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); } diff --git a/docs/framework/operators/tensor/tensor.or.md b/docs/framework/operators/tensor/tensor.or.md index 572a266d1..ec92f7bab 100644 --- a/docs/framework/operators/tensor/tensor.or.md +++ b/docs/framework/operators/tensor/tensor.or.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -50,7 +50,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn or_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.quantize_linear.md b/docs/framework/operators/tensor/tensor.quantize_linear.md index 80e17f34e..312cb94cb 100644 --- a/docs/framework/operators/tensor/tensor.quantize_linear.md +++ b/docs/framework/operators/tensor/tensor.quantize_linear.md @@ -22,12 +22,16 @@ For (x / y_scale), it's rounding to the nearest even. A new `Tensor` with the same shape as the input tensor, containing the quantized values. +## Type Constraints + +u32 tensor, not supported. + ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; use orion::numbers::{i8, i32, IntegerTrait}; fn quantize_linear_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.ravel_index.md b/docs/framework/operators/tensor/tensor.ravel_index.md index 916da0009..6d6ff9725 100644 --- a/docs/framework/operators/tensor/tensor.ravel_index.md +++ b/docs/framework/operators/tensor/tensor.ravel_index.md @@ -24,7 +24,7 @@ The index corresponding to the given indices. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn ravel_index_example() -> usize { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.reduce_sum.md b/docs/framework/operators/tensor/tensor.reduce_sum.md index 4e4b0b2a9..e596ba311 100644 --- a/docs/framework/operators/tensor/tensor.reduce_sum.md +++ b/docs/framework/operators/tensor/tensor.reduce_sum.md @@ -25,7 +25,7 @@ A new `Tensor` instance with the specified axis reduced by summing its elemen ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn reduce_sum_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.reshape.md b/docs/framework/operators/tensor/tensor.reshape.md index 48d8ccbd0..998c40c1a 100644 --- a/docs/framework/operators/tensor/tensor.reshape.md +++ b/docs/framework/operators/tensor/tensor.reshape.md @@ -24,7 +24,7 @@ A new `Tensor` with the specified target shape and the same data. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn reshape_tensor_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.sin.md b/docs/framework/operators/tensor/tensor.sin.md index 0776cf0be..3c7e0da17 100644 --- a/docs/framework/operators/tensor/tensor.sin.md +++ b/docs/framework/operators/tensor/tensor.sin.md @@ -16,12 +16,16 @@ Computes the sine of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the sine value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FP8x23, FixedTrait}; fn sin_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.sinh.md b/docs/framework/operators/tensor/tensor.sinh.md index 329e74aff..c89f40ecb 100644 --- a/docs/framework/operators/tensor/tensor.sinh.md +++ b/docs/framework/operators/tensor/tensor.sinh.md @@ -1,7 +1,7 @@ # tensor.sinh ```rust - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic sine of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. +Returns a new tensor in `T` with the hyperbolic sine of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn sinh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.sqrt.md b/docs/framework/operators/tensor/tensor.sqrt.md index 2494d52a2..918913f0b 100644 --- a/docs/framework/operators/tensor/tensor.sqrt.md +++ b/docs/framework/operators/tensor/tensor.sqrt.md @@ -16,12 +16,16 @@ Computes the square root of all elements of the input tensor. A new `Tensor` of the same shape as the input tensor with the arctangent (inverse of tangent) value of all elements in the input tensor. +## Type Constraints + +Constrain input and output types to fixed point tensors. + ## Example ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn sqrt_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.stride.md b/docs/framework/operators/tensor/tensor.stride.md index e17b35828..75313770a 100644 --- a/docs/framework/operators/tensor/tensor.stride.md +++ b/docs/framework/operators/tensor/tensor.stride.md @@ -18,7 +18,7 @@ A span of usize representing the stride for each dimension of the tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn stride_example() -> Span { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.tanh.md b/docs/framework/operators/tensor/tensor.tanh.md index 9b818081e..9ffec7780 100644 --- a/docs/framework/operators/tensor/tensor.tanh.md +++ b/docs/framework/operators/tensor/tensor.tanh.md @@ -1,7 +1,7 @@ # tensor.tanh ```rust - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; ``` Computes the hyperbolic tangent of all elements of the input tensor. @@ -15,14 +15,18 @@ $$ ## Returns -Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. +Returns a new tensor in `T` with the hyperbolic tangent of the elements of the input tensor. + +## Type Constraints + +Constrain input and output types to fixed point tensors. ## Examples ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; use orion::numbers::{FixedTrait, FP8x23}; fn tanh_example() -> Tensor { diff --git a/docs/framework/operators/tensor/tensor.transpose.md b/docs/framework/operators/tensor/tensor.transpose.md index 54f14bbaa..0dee6e2fb 100644 --- a/docs/framework/operators/tensor/tensor.transpose.md +++ b/docs/framework/operators/tensor/tensor.transpose.md @@ -24,7 +24,7 @@ A `Tensor` instance with the axes reordered according to the given permutatio ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn transpose_tensor_example() -> Tensor { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.unravel_index.md b/docs/framework/operators/tensor/tensor.unravel_index.md index 5ac532fff..6221a5bd7 100644 --- a/docs/framework/operators/tensor/tensor.unravel_index.md +++ b/docs/framework/operators/tensor/tensor.unravel_index.md @@ -24,7 +24,7 @@ The unraveled indices corresponding to the given index. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn unravel_index_example() -> Span { let tensor = TensorTrait::::new( diff --git a/docs/framework/operators/tensor/tensor.xor.md b/docs/framework/operators/tensor/tensor.xor.md index 09f0bf011..53d89b24e 100644 --- a/docs/framework/operators/tensor/tensor.xor.md +++ b/docs/framework/operators/tensor/tensor.xor.md @@ -29,7 +29,7 @@ Case 1: Compare tensors with same shape ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( @@ -50,7 +50,7 @@ Case 2: Compare tensors with different shapes ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn xor_example() -> Tensor { let tensor_1 = TensorTrait::::new( diff --git a/nodegen/helpers.py b/nodegen/helpers.py index 0020f8513..0a3099c1b 100644 --- a/nodegen/helpers.py +++ b/nodegen/helpers.py @@ -23,11 +23,10 @@ class FixedImpl(Enum): class Tensor: - def __init__(self, dtype: Dtype, shape: [], data: [], extra_fp=FixedImpl.FP16x16): + def __init__(self, dtype: Dtype, shape: [], data: []): self.dtype = dtype self.shape = shape self.data = data - self.extra_fp = extra_fp class Trait(Enum): @@ -64,138 +63,71 @@ def make_test(inputs: [Tensor], output: Tensor, func_sig: str, file_name: str, t code.append("use orion::operators::tensor::TensorTrait;\n") match type_of_first_input: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_u32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_u32_fp16x16;\n") + code.append( + "use orion::operators::tensor::U32Tensor;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_i32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_i32_fp16x16;\n") + code.append( + "use orion::operators::tensor::I32Tensor;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::Tensor_i8_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::Tensor_i8_fp16x16;\n") + code.append( + "use orion::operators::tensor::I8Tensor;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::Tensor_fp8x23;\n") + "use orion::operators::tensor::FP8x23Tensor;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::Tensor_fp16x16;\n") + "use orion::operators::tensor::FP16x16Tensor;\n") match type_of_output: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::U32TensorPartialEq;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I32TensorPartialEq;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") + "use orion::operators::tensor::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") + "use orion::operators::tensor::FP8x23TensorPartialEq;\n") case Trait.NN: - code.append("\n\nuse orion::operators::nn::core::NNTrait;\n") + code.append("\n\nuse orion::operators::nn::NNTrait;\n") code.append("use orion::numbers::FixedTrait;\n") match type_of_first_input: case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_i32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_i32_fp16x16;\n") + code.append( + "use orion::operators::nn::I32NN;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_i8_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_i8_fp16x16;\n") + code.append( + "use orion::operators::nn::I8NN;\n") case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::nn::NN_u32_fp8x23;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::nn::NN_u32_fp16x16;\n") + code.append( + "use orion::operators::nn::U32NN;\n") case Dtype.FP8x23: code.append( - "use orion::operators::nn::NN_fp8x23;\n") + "use orion::operators::nn::FP8x23NN;\n") case Dtype.FP16x16: code.append( - "use orion::operators::nn::NN_fp16x16;\n") - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::numbers::FP8x23Impl;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::numbers::FP16x16Impl;\n") + "use orion::operators::nn::FP16x16NN;\n") match type_of_output: case Dtype.U32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp8x23::u32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::U32TensorPartialEq;\n") case Dtype.I32: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp8x23::i32TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I32TensorPartialEq;\n") case Dtype.I8: - match inputs[0].extra_fp: - case FixedImpl.FP8x23: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp8x23::i8TensorPartialEq;\n") - case FixedImpl.FP16x16: - code.append( - "use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq;\n") + code.append( + "use orion::operators::tensor::I8TensorPartialEq;\n") case Dtype.FP16x16: code.append( - "use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq;\n") + "use orion::operators::tensor::FP16x16TensorPartialEq;\n") case Dtype.FP8x23: code.append( - "use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq;\n") + "use orion::operators::tensor::FP8x23TensorPartialEq;\n") code.append("use orion::utils::assert_eq;\n\n") code.append("#[test]\n") @@ -238,45 +170,30 @@ def __build_tensor_code(tensor: Tensor, name: str, type_string: str, is_fixed: b match tensor.dtype: case Dtype.U32: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_u32_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_u32_fp16x16;\n") + result.append( + "use orion::operators::tensor::U32Tensor;\n") case Dtype.I32: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_i32_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_i32_fp16x16;\n") result.append( - "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32};\n") + "use orion::operators::tensor::I32Tensor;\n") + result.append( + "use orion::numbers::{IntegerTrait, i32};\n") case Dtype.I8: - match tensor.extra_fp: - case FixedImpl.FP8x23: - result.append( - "use orion::operators::tensor::Tensor_i8_fp8x23;\n") - case FixedImpl.FP16x16: - result.append( - "use orion::operators::tensor::Tensor_i8_fp16x16;\n") result.append( - "use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8};\n") + "use orion::operators::tensor::I8Tensor;\n") + result.append( + "use orion::numbers::{IntegerTrait, i8};\n") case Dtype.FP8x23: result.append( - "use orion::operators::tensor::Tensor_fp8x23;\n") + "use orion::operators::tensor::FP8x23Tensor;\n") result.append( - "use orion::numbers::fixed_point::core::{FixedTrait};\n") + "use orion::numbers::FixedTrait;\n") result.append( "use orion::numbers::FP8x23;\n") case Dtype.FP16x16: result.append( - "use orion::operators::tensor::Tensor_fp16x16;\n") + "use orion::operators::tensor::FP16x16Tensor;\n") result.append( - "use orion::numbers::fixed_point::core::{FixedTrait};\n") + "use orion::numbers::FixedTrait;\n") result.append( "use orion::numbers::FP16x16;\n") diff --git a/nodegen/node/abs.py b/nodegen/node/abs.py index 75a3e668f..13467e4ea 100644 --- a/nodegen/node/abs.py +++ b/nodegen/node/abs.py @@ -14,7 +14,7 @@ def abs_i32(): name = "abs_i32" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_i8(): @@ -26,7 +26,7 @@ def abs_i8(): name = "abs_i8" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_fp8x23(): @@ -34,12 +34,12 @@ def abs_fp8x23(): ).astype(np.int64), FixedImpl.FP8x23) y = abs(x) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "abs_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) @staticmethod def abs_fp16x16(): @@ -47,9 +47,9 @@ def abs_fp16x16(): ).astype(np.int64), FixedImpl.FP16x16) y = abs(x) - x = Tensor(Dtype.FP16x16, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, y.flatten(), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, x.flatten()) + y = Tensor(Dtype.FP16x16, y.shape, y.flatten()) name = "abs_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.abs()", name) + make_test([x], y, "input_0.abs()", name) diff --git a/nodegen/node/acos.py b/nodegen/node/acos.py index 224c5f53d..6b7015e6e 100644 --- a/nodegen/node/acos.py +++ b/nodegen/node/acos.py @@ -9,24 +9,24 @@ def acos_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arccos(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "acos_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.acos()", name) + make_test([x], y, "input_0.acos()", name) @staticmethod def acos_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arccos(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "acos_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.acos()", name) + make_test([x], y, "input_0.acos()", name) diff --git a/nodegen/node/acosh.py b/nodegen/node/acosh.py index d55bbb033..62f870206 100644 --- a/nodegen/node/acosh.py +++ b/nodegen/node/acosh.py @@ -4,110 +4,19 @@ class Acosh(RunAll): - - @staticmethod - def acosh_i32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def acosh_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.arccosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arccosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def acosh_u32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arccosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "acosh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arccosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "acosh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) - - fp8x23() - fp16x16() - @staticmethod def acosh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) y = np.arccosh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "acosh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) + make_test([x], y, "input_0.acosh()", name) @staticmethod def acosh_fp16x16(): @@ -115,10 +24,10 @@ def acosh_fp16x16(): y = np.arccosh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "acosh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.acosh()", name) + make_test([x], y, "input_0.acosh()", name) diff --git a/nodegen/node/add.py b/nodegen/node/add.py index 2a77a88a3..1f274208c 100644 --- a/nodegen/node/add.py +++ b/nodegen/node/add.py @@ -17,7 +17,7 @@ def default(): name = "add_u32" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(0, 3, (3, 3, 3)).astype(np.uint32) @@ -30,7 +30,7 @@ def broadcast(): name = "add_u32_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -48,7 +48,7 @@ def default(): name = "add_i32" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.int32) @@ -61,7 +61,7 @@ def broadcast(): name = "add_i32_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -79,7 +79,7 @@ def default(): name = "add_i8" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.int8) @@ -92,7 +92,7 @@ def broadcast(): name = "add_i8_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -105,15 +105,15 @@ def default(): z = x + y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "add_fp8x23" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.float64) @@ -121,15 +121,15 @@ def broadcast(): z = x + y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "add_fp8x23_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() @@ -142,15 +142,15 @@ def default(): z = x + y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "add_fp16x16" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) def broadcast(): x = np.random.randint(-3, 3, (3, 3, 3)).astype(np.float64) @@ -158,15 +158,15 @@ def broadcast(): z = x + y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "add_fp16x16_broadcast" make_node([x, y], [z], name) - make_test([x, y], z, "input_0.add(@input_1)", name) + make_test([x, y], z, "input_0 + input_1", name) default() broadcast() diff --git a/nodegen/node/argmax.py b/nodegen/node/argmax.py index 433be1064..bf5dfa432 100644 --- a/nodegen/node/argmax.py +++ b/nodegen/node/argmax.py @@ -36,7 +36,7 @@ def default_params(): name = "argmax_u32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -49,7 +49,7 @@ def keepdims_false(): name = "argmax_u32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -62,7 +62,7 @@ def last_index(): name = "argmax_u32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -80,7 +80,7 @@ def default_params(): name = "argmax_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -93,7 +93,7 @@ def keepdims_false(): name = "argmax_u32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -106,7 +106,7 @@ def last_index(): name = "argmax_u32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -124,7 +124,7 @@ def default_params(): name = "argmax_u32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -137,7 +137,7 @@ def keepdims_false(): name = "argmax_u32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -150,7 +150,7 @@ def last_index(): name = "argmax_u32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -170,7 +170,7 @@ def default_params(): name = "argmax_i32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int32) @@ -183,7 +183,7 @@ def keepdims_false(): name = "argmax_i32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int32) @@ -196,7 +196,7 @@ def last_index(): name = "argmax_i32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -214,7 +214,7 @@ def default_params(): name = "argmax_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -227,7 +227,7 @@ def keepdims_false(): name = "argmax_i32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -240,7 +240,7 @@ def last_index(): name = "argmax_i32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -258,7 +258,7 @@ def default_params(): name = "argmax_i32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -271,7 +271,7 @@ def keepdims_false(): name = "argmax_i32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -284,7 +284,7 @@ def last_index(): name = "argmax_i32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -304,7 +304,7 @@ def default_params(): name = "argmax_i8_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int8) @@ -317,7 +317,7 @@ def keepdims_false(): name = "argmax_i8_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int8) @@ -330,7 +330,7 @@ def last_index(): name = "argmax_i8_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -348,7 +348,7 @@ def default_params(): name = "argmax_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -361,7 +361,7 @@ def keepdims_false(): name = "argmax_i8_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -374,7 +374,7 @@ def last_index(): name = "argmax_i8_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -392,7 +392,7 @@ def default_params(): name = "argmax_i8_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -405,7 +405,7 @@ def keepdims_false(): name = "argmax_i8_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -418,7 +418,7 @@ def last_index(): name = "argmax_i8_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -439,7 +439,7 @@ def default_params(): name = "argmax_fp16x16_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -453,7 +453,7 @@ def keepdims_false(): name = "argmax_fp16x16_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -467,7 +467,7 @@ def last_index(): name = "argmax_fp16x16_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -486,7 +486,7 @@ def default_params(): name = "argmax_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -500,7 +500,7 @@ def keepdims_false(): name = "argmax_fp16x16_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -514,7 +514,7 @@ def last_index(): name = "argmax_fp16x16_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -533,7 +533,7 @@ def default_params(): name = "argmax_fp16x16_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -547,7 +547,7 @@ def keepdims_false(): name = "argmax_fp16x16_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -561,7 +561,7 @@ def last_index(): name = "argmax_fp16x16_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -577,13 +577,13 @@ def default_params(): y = argmax_use_numpy(x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -592,13 +592,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -607,13 +607,13 @@ def last_index(): x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -632,7 +632,7 @@ def default_params(): name = "argmax_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -641,13 +641,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -656,13 +656,13 @@ def last_index(): x, dtype=np.int8) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -676,13 +676,13 @@ def default_params(): y = argmax_use_numpy(x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -691,13 +691,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmax(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -706,13 +706,13 @@ def last_index(): x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmax_fp8x23_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmax(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmax(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() diff --git a/nodegen/node/argmin.py b/nodegen/node/argmin.py index e81fb205d..fd3249a55 100644 --- a/nodegen/node/argmin.py +++ b/nodegen/node/argmin.py @@ -36,7 +36,7 @@ def default_params(): name = "argmin_u32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -49,7 +49,7 @@ def keepdims_false(): name = "argmin_u32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.uint32) @@ -62,7 +62,7 @@ def last_index(): name = "argmin_u32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -80,7 +80,7 @@ def default_params(): name = "argmin_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -93,7 +93,7 @@ def keepdims_false(): name = "argmin_u32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2)).astype(np.uint32) @@ -106,7 +106,7 @@ def last_index(): name = "argmin_u32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -124,7 +124,7 @@ def default_params(): name = "argmin_u32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -137,7 +137,7 @@ def keepdims_false(): name = "argmin_u32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (2, 2, 2)).astype(np.uint32) @@ -150,7 +150,7 @@ def last_index(): name = "argmin_u32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -170,7 +170,7 @@ def default_params(): name = "argmin_i32_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int32) @@ -183,7 +183,7 @@ def keepdims_false(): name = "argmin_i32_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int32) @@ -196,7 +196,7 @@ def last_index(): name = "argmin_i32_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -214,7 +214,7 @@ def default_params(): name = "argmin_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -227,7 +227,7 @@ def keepdims_false(): name = "argmin_i32_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int32) @@ -240,7 +240,7 @@ def last_index(): name = "argmin_i32_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -258,7 +258,7 @@ def default_params(): name = "argmin_i32_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -271,7 +271,7 @@ def keepdims_false(): name = "argmin_i32_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int32) @@ -284,7 +284,7 @@ def last_index(): name = "argmin_i32_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -304,7 +304,7 @@ def default_params(): name = "argmin_i8_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (3)).astype(np.int8) @@ -317,7 +317,7 @@ def keepdims_false(): name = "argmin_i8_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(0, 255, (3)).astype(np.int8) @@ -330,7 +330,7 @@ def last_index(): name = "argmin_i8_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -348,7 +348,7 @@ def default_params(): name = "argmin_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -361,7 +361,7 @@ def keepdims_false(): name = "argmin_i8_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2)).astype(np.int8) @@ -374,7 +374,7 @@ def last_index(): name = "argmin_i8_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -392,7 +392,7 @@ def default_params(): name = "argmin_i8_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -405,7 +405,7 @@ def keepdims_false(): name = "argmin_i8_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = np.random.randint(-127, 127, (2, 2, 2)).astype(np.int8) @@ -418,7 +418,7 @@ def last_index(): name = "argmin_i8_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -439,7 +439,7 @@ def default_params(): name = "argmin_fp16x16_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -453,7 +453,7 @@ def keepdims_false(): name = "argmin_fp16x16_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -467,7 +467,7 @@ def last_index(): name = "argmin_fp16x16_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -486,7 +486,7 @@ def default_params(): name = "argmin_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -500,7 +500,7 @@ def keepdims_false(): name = "argmin_fp16x16_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -514,7 +514,7 @@ def last_index(): name = "argmin_fp16x16_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -533,7 +533,7 @@ def default_params(): name = "argmin_fp16x16_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -547,7 +547,7 @@ def keepdims_false(): name = "argmin_fp16x16_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -561,7 +561,7 @@ def last_index(): name = "argmin_fp16x16_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -577,13 +577,13 @@ def default_params(): y = argmin_use_numpy(x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (3) @@ -592,13 +592,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(0, 255, (3)).astype( @@ -607,13 +607,13 @@ def last_index(): x, dtype=np.uint32).reshape((1)) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_1D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -632,7 +632,7 @@ def default_params(): name = "argmin_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -641,13 +641,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_2D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2) @@ -656,13 +656,13 @@ def last_index(): x, dtype=np.int8) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_2D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() @@ -676,13 +676,13 @@ def default_params(): y = argmin_use_numpy(x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_default" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::None(()))", name) def keepdims_false(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -691,13 +691,13 @@ def keepdims_false(): x, keepdims=0, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_keepdims_false" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::Some(false), Option::None(()))", name) + [x], y, "input_0.argmin(0, Option::Some(false), Option::None(()))", name) def last_index(): x = to_fp(np.random.randint(-127, 127, (2, 2, 2) @@ -706,13 +706,13 @@ def last_index(): x, dtype=np.uint32) x = Tensor(Dtype.FP8x23, x.shape, - x.flatten(), FixedImpl.FP8x23) + x.flatten()) y = Tensor(Dtype.U32, y.shape, y.flatten()) name = "argmin_fp8x23_3D_last_index" make_node([x], [y], name) make_test( - [x], y, "x.argmin(0, Option::None(()), Option::Some(true))", name) + [x], y, "input_0.argmin(0, Option::None(()), Option::Some(true))", name) default_params() keepdims_false() diff --git a/nodegen/node/asin.py b/nodegen/node/asin.py index a8874e133..7268666ed 100644 --- a/nodegen/node/asin.py +++ b/nodegen/node/asin.py @@ -9,24 +9,24 @@ def asin_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arcsin(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "asin_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.asin()", name) + make_test([x], y, "input_0.asin()", name) @staticmethod def asin_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.arcsin(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "asin_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.asin()", name) + make_test([x], y, "input_0.asin()", name) diff --git a/nodegen/node/asinh.py b/nodegen/node/asinh.py index 036ad5155..995e93d4a 100644 --- a/nodegen/node/asinh.py +++ b/nodegen/node/asinh.py @@ -5,109 +5,19 @@ class Asinh(RunAll): - @staticmethod - def asinh_i32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def asinh_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.arcsinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int32) - y = np.arcsinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def asinh_u32(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arcsinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "asinh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - def fp16x16(): - x = np.random.randint(1, 5, (2, 2)).astype(np.uint32) - y = np.arcsinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "asinh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) - - fp8x23() - fp16x16() - @staticmethod def asinh_fp8x23(): x = np.random.uniform(1, 5, (2, 2)).astype(np.float64) y = np.arcsinh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "asinh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) + make_test([x], y, "input_0.asinh()", name) @staticmethod def asinh_fp16x16(): @@ -115,10 +25,10 @@ def asinh_fp16x16(): y = np.arcsinh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "asinh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.asinh()", name) + make_test([x], y, "input_0.asinh()", name) diff --git a/nodegen/node/atan.py b/nodegen/node/atan.py index eee25e59f..8731a6838 100644 --- a/nodegen/node/atan.py +++ b/nodegen/node/atan.py @@ -4,110 +4,19 @@ class Atan(RunAll): - - @staticmethod - def atan_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - - @staticmethod - def atan_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.arctan(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.arctan(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - - @staticmethod - def atan_u32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.uint32) - y = np.arctan(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "atan_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.uint32) - y = np.arctan(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "atan_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.atan()", name) - - fp8x23() - fp16x16() - @staticmethod def atan_fp8x23(): x = np.random.uniform(-10, 127, (2, 2)).astype(np.float64) y = np.arctan(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "atan_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.atan()", name) + make_test([x], y, "input_0.atan()", name) @staticmethod def atan_fp16x16(): @@ -115,10 +24,10 @@ def atan_fp16x16(): y = np.arctan(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "atan_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.atan()", name) + make_test([x], y, "input_0.atan()", name) diff --git a/nodegen/node/ceil.py b/nodegen/node/ceil.py index 1bf58a2ff..361cf74d4 100644 --- a/nodegen/node/ceil.py +++ b/nodegen/node/ceil.py @@ -9,24 +9,24 @@ def ceil_fp8x23(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.ceil(x) - x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp(x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp(y.flatten(), FixedImpl.FP8x23)) name = "ceil_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.ceil()", name) + make_test([x], y, "input_0.ceil()", name) @staticmethod def ceil_fp16x16(): x = np.random.uniform(-1, 1, (2, 2)).astype(np.float64) y = np.ceil(x) - x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp(x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp(y.flatten(), FixedImpl.FP16x16)) name = "ceil_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.ceil()", name) + make_test([x], y, "input_0.ceil()", name) diff --git a/nodegen/node/concat.py b/nodegen/node/concat.py index 3df9decce..794fedd8d 100644 --- a/nodegen/node/concat.py +++ b/nodegen/node/concat.py @@ -18,7 +18,7 @@ def concat_1D(): name = "concat_u32_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) @@ -34,7 +34,7 @@ def concat_2D(): name = "concat_u32_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -50,7 +50,7 @@ def default(): name = "concat_u32_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -145,7 +145,7 @@ def concat_1D(): name = "concat_i32_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -161,7 +161,7 @@ def concat_2D(): name = "concat_i32_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -177,7 +177,7 @@ def default(): name = "concat_i32_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -272,7 +272,7 @@ def concat_1D(): name = "concat_i8_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -288,7 +288,7 @@ def concat_2D(): name = "concat_i8_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -304,7 +304,7 @@ def default(): name = "concat_i8_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -393,16 +393,16 @@ def concat_1D(): y = np.concatenate((x1, x2)) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -412,16 +412,16 @@ def concat_2D(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -431,16 +431,16 @@ def default(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape,to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -449,11 +449,11 @@ def axis_1(): y = np.concatenate((x1, x2), axis=1) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_axis_1" make_node([x1, x2], [y], name) @@ -467,11 +467,11 @@ def axis_2(): y = np.concatenate((x1, x2), axis=2) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_axis_2" make_node([x1, x2], [y], name) @@ -487,14 +487,14 @@ def three_tensors_axis_1(): y = np.concatenate((x1, x2, x3), axis=1) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) x3 = Tensor(Dtype.FP8x23, x3.shape,to_fp( - x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_three_tensors_axis_1" make_node([x1, x2, x3], [y], name) @@ -510,14 +510,14 @@ def three_tensors_axis_2(): y = np.concatenate((x1, x2, x3), axis=2) x1 = Tensor(Dtype.FP8x23, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x1.flatten(), FixedImpl.FP8x23)) x2 = Tensor(Dtype.FP8x23, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x2.flatten(), FixedImpl.FP8x23)) x3 = Tensor(Dtype.FP8x23, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x3.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "concat_fp8x23_3d_three_tensors_axis_2" make_node([x1, x2, x3], [y], name) @@ -543,16 +543,16 @@ def concat_1D(): y = np.concatenate((x1, x2)) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_1d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR.TENSOR) @@ -562,16 +562,16 @@ def concat_2D(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_2d" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def concat_3D(): @@ -581,16 +581,16 @@ def default(): y = np.concatenate((x1, x2), axis=0) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_default" make_node([x1, x2], [y], name) make_test( - inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0)", + inputs = [x1, x2], output = y, func_sig = "TensorTrait::concat(array![input_0, input_1].span(), 0);", file_name= name, trait_type= Trait.TENSOR) def axis_1(): @@ -599,11 +599,11 @@ def axis_1(): y = np.concatenate((x1, x2), axis=1) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape,to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape ,to_fp( + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_axis_1" make_node([x1, x2], [y], name) @@ -617,11 +617,11 @@ def axis_2(): y = np.concatenate((x1, x2), axis=2) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_axis_2" make_node([x1, x2], [y], name) @@ -637,14 +637,14 @@ def three_tensors_axis_1(): y = np.concatenate((x1, x2, x3), axis=1) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) + x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( + x3.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_three_tensors_axis_1" make_node([x1, x2, x3], [y], name) @@ -660,14 +660,14 @@ def three_tensors_axis_2(): y = np.concatenate((x1, x2, x3), axis=2) x1 = Tensor(Dtype.FP16x16, x1.shape, to_fp( - x1.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x1.flatten(), FixedImpl.FP16x16)) x2 = Tensor(Dtype.FP16x16, x2.shape, to_fp( - x2.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x2.flatten(), FixedImpl.FP16x16)) x3 = Tensor(Dtype.FP16x16, x3.shape, to_fp( - x3.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x3.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape,to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "concat_fp16x16_3d_three_tensors_axis_2" make_node([x1, x2, x3], [y], name) diff --git a/nodegen/node/cos.py b/nodegen/node/cos.py index 7e75cd393..c6f965432 100644 --- a/nodegen/node/cos.py +++ b/nodegen/node/cos.py @@ -5,109 +5,19 @@ class Cos(RunAll): - @staticmethod - def cos_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cos_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cos_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cos_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.cos(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cos_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.cos(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cos_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cos_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.cos(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cos_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.cos(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cos_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cos()", name) - - fp8x23() - fp16x16() - @staticmethod def cos_fp8x23(): x = np.random.uniform(-10, 127, (2, 2)).astype(np.float64) y = np.cos(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cos_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.cos()", name) + make_test([x], y, "input_0.cos()", name) @staticmethod def cos_fp16x16(): @@ -115,10 +25,10 @@ def cos_fp16x16(): y = np.cos(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cos_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.cos()", name) + make_test([x], y, "input_0.cos()", name) diff --git a/nodegen/node/cosh.py b/nodegen/node/cosh.py index 129ff87e2..fac5f3ef5 100644 --- a/nodegen/node/cosh.py +++ b/nodegen/node/cosh.py @@ -5,109 +5,19 @@ class Cosh(RunAll): - @staticmethod - def cosh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cosh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cosh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cosh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.cosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cosh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.cosh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cosh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def cosh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.cosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "cosh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.cosh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "cosh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) - - fp8x23() - fp16x16() - @staticmethod def cosh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = np.cosh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cosh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) + make_test([x], y, "input_0.cosh()", name) @staticmethod def cosh_fp16x16(): @@ -115,10 +25,10 @@ def cosh_fp16x16(): y = np.cosh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cosh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.cosh()", name) + make_test([x], y, "input_0.cosh()", name) diff --git a/nodegen/node/cumsum.py b/nodegen/node/cumsum.py index 9ca74e07b..9ed5c6747 100644 --- a/nodegen/node/cumsum.py +++ b/nodegen/node/cumsum.py @@ -17,7 +17,7 @@ def default(): name = "cumsum_u32_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -29,7 +29,7 @@ def exclusive(): name = "cumsum_u32_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -41,7 +41,7 @@ def reverse(): name = "cumsum_u32_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.uint32) @@ -53,7 +53,7 @@ def reverse_exclusive(): name = "cumsum_u32_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -74,7 +74,7 @@ def axis_0(): name = "cumsum_u32_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -88,7 +88,7 @@ def axis_1(): name = "cumsum_u32_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -107,7 +107,7 @@ def default(): name = "cumsum_i32_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -119,7 +119,7 @@ def exclusive(): name = "cumsum_i32_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -131,7 +131,7 @@ def reverse(): name = "cumsum_i32_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int32) @@ -143,7 +143,7 @@ def reverse_exclusive(): name = "cumsum_i32_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -164,7 +164,7 @@ def axis_0(): name = "cumsum_i32_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -178,7 +178,7 @@ def axis_1(): name = "cumsum_i32_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -197,7 +197,7 @@ def default(): name = "cumsum_i8_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -209,7 +209,7 @@ def exclusive(): name = "cumsum_i8_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -221,7 +221,7 @@ def reverse(): name = "cumsum_i8_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int8) @@ -233,7 +233,7 @@ def reverse_exclusive(): name = "cumsum_i8_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -254,7 +254,7 @@ def axis_0(): name = "cumsum_i8_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -268,7 +268,7 @@ def axis_1(): name = "cumsum_i8_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -282,56 +282,56 @@ def default(): y = np.array([1, 3, 6, 10, 15]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([0, 1, 3, 6, 10]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([15, 14, 12, 9, 5]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([14, 12, 9, 5, 0]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -347,14 +347,14 @@ def axis_0(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -363,14 +363,14 @@ def axis_1(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "cumsum_fp8x23_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() @@ -384,56 +384,56 @@ def default(): y = np.array([1, 3, 6, 10, 15]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_default" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([0, 1, 3, 6, 10]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(false))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(false))", name) def reverse(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([15, 14, 12, 9, 5]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_reverse" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(false), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(false), Option::Some(true))", name) def reverse_exclusive(): x = np.array([1, 2, 3, 4, 5]).astype(np.int64) y = np.array([14, 12, 9, 5, 0]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_1d_reverse_exclusive" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::Some(true), Option::Some(true))", name) + [x], y, "input_0.cumsum(0, Option::Some(true), Option::Some(true))", name) default() exclusive() @@ -449,14 +449,14 @@ def axis_0(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_2d_axis_0" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(0, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(0, Option::None(()), Option::None(()))", name) def axis_1(): x = np.array([1, 2, 3, 4, 5, 6]).astype( @@ -465,14 +465,14 @@ def axis_1(): np.int64).reshape((2, 3)) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "cumsum_fp16x16_2d_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.cumsum(1, Option::None(()), Option::None(()))", name) + [x], y, "input_0.cumsum(1, Option::None(()), Option::None(()))", name) axis_0() axis_1() diff --git a/nodegen/node/div.py b/nodegen/node/div.py index b9ddbb69a..92fe6cc1a 100644 --- a/nodegen/node/div.py +++ b/nodegen/node/div.py @@ -105,11 +105,11 @@ def default(): z = x / y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "div_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x / y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "div_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x / y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "div_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x / y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "div_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/equal.py b/nodegen/node/equal.py index 0ce6c7327..a4b6c070a 100644 --- a/nodegen/node/equal.py +++ b/nodegen/node/equal.py @@ -105,9 +105,9 @@ def default(): z = np.equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "equal_fp16x16_broadcast" diff --git a/nodegen/node/exp.py b/nodegen/node/exp.py index e13103c5b..3194c1081 100644 --- a/nodegen/node/exp.py +++ b/nodegen/node/exp.py @@ -5,109 +5,19 @@ class Exp(RunAll): - @staticmethod - def exp_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "exp_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "exp_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - fp8x23() - fp16x16() - - @staticmethod - def exp_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.exp(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "exp_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.exp(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "exp_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - fp8x23() - fp16x16() - - @staticmethod - def exp_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.exp(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "exp_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.exp(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "exp_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.exp()", name) - - fp8x23() - fp16x16() - @staticmethod def exp_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = np.exp(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "exp_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) @staticmethod def exp_fp16x16(): @@ -115,10 +25,10 @@ def exp_fp16x16(): y = np.exp(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "exp_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.exp()", name) + make_test([x], y, "input_0.exp()", name) diff --git a/nodegen/node/greater.py b/nodegen/node/greater.py index fb534db36..8abf66f47 100644 --- a/nodegen/node/greater.py +++ b/nodegen/node/greater.py @@ -105,9 +105,9 @@ def default(): z = np.greater(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.greater(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.greater(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.greater(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_fp16x16_broadcast" diff --git a/nodegen/node/greater_equal.py b/nodegen/node/greater_equal.py index 3a6a08e75..1606150ff 100644 --- a/nodegen/node/greater_equal.py +++ b/nodegen/node/greater_equal.py @@ -105,9 +105,9 @@ def default(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.greater_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "greater_equal_fp16x16_broadcast" diff --git a/nodegen/node/leaky_relu.py b/nodegen/node/leaky_relu.py index 9119d192e..a20704f3c 100644 --- a/nodegen/node/leaky_relu.py +++ b/nodegen/node/leaky_relu.py @@ -6,72 +6,6 @@ class Leaky_relu(RunAll): - @staticmethod - def leaky_relu_i32(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "leaky_relu_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false))", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "leaky_relu_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false))", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def leaky_relu_i8(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "leaky_relu_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false))", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - layer = tf.keras.layers.LeakyReLU(alpha=0.1) - y = layer(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "leaky_relu_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false))", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def leaky_relu_fp8x23(): @@ -80,9 +14,9 @@ def leaky_relu_fp8x23(): y = layer(x).numpy() x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "leaky_relu_fp8x23" make_node([x], [y], name) @@ -97,9 +31,9 @@ def leaky_relu_fp16x16(): y = layer(x).numpy() x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "leaky_relu_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/less.py b/nodegen/node/less.py index c6a2c8f35..8b694ef5d 100644 --- a/nodegen/node/less.py +++ b/nodegen/node/less.py @@ -105,9 +105,9 @@ def default(): z = np.less(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.less(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.less(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.less(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_fp16x16_broadcast" diff --git a/nodegen/node/less_equal.py b/nodegen/node/less_equal.py index e041ab0ad..26cef6453 100644 --- a/nodegen/node/less_equal.py +++ b/nodegen/node/less_equal.py @@ -105,9 +105,9 @@ def default(): z = np.less_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.less_equal(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.less_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.less_equal(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "less_equal_fp16x16_broadcast" diff --git a/nodegen/node/linear.py b/nodegen/node/linear.py index 1b577fd32..b3a486398 100644 --- a/nodegen/node/linear.py +++ b/nodegen/node/linear.py @@ -74,13 +74,13 @@ def linear_fp8x23(): y = linear(i, w, b) i = Tensor(Dtype.FP8x23, i.shape, to_fp( - i.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + i.flatten(), FixedImpl.FP8x23)) w = Tensor(Dtype.FP8x23, w.shape, to_fp( - w.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + w.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "linear_fp8x23" make_node([i, w, b], [y], name) @@ -95,13 +95,13 @@ def linear_fp16x16(): y = linear(i, w, b) i = Tensor(Dtype.FP16x16, i.shape, to_fp( - i.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + i.flatten(), FixedImpl.FP16x16)) w = Tensor(Dtype.FP16x16, w.shape, to_fp( - w.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + w.flatten(), FixedImpl.FP16x16)) b = Tensor(Dtype.FP16x16, b.shape, to_fp( - b.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + b.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "linear_fp16x16" make_node([i, w, b], [y], name) diff --git a/nodegen/node/log.py b/nodegen/node/log.py index c25256154..0465dc95f 100644 --- a/nodegen/node/log.py +++ b/nodegen/node/log.py @@ -5,109 +5,19 @@ class Log(RunAll): - @staticmethod - def log_i32(): - - def fp8x23(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "log_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "log_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - fp8x23() - fp16x16() - - @staticmethod - def log_i8(): - - def fp8x23(): - x = np.random.randint(1, 5, (2, 2)).astype(np.int8) - y = np.log(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "log_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - def fp16x16(): - x = np.random.randint(1, 127, (2, 2)).astype(np.int32) - y = np.log(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "log_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - fp8x23() - fp16x16() - - @staticmethod - def log_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.log(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "log_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.log(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "log_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.log()", name) - - fp8x23() - fp16x16() - @staticmethod def log_fp8x23(): x = np.random.uniform(1, 127, (2, 2)).astype(np.float64) y = np.log(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "log_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) @staticmethod def log_fp16x16(): @@ -115,10 +25,10 @@ def log_fp16x16(): y = np.log(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "log_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.log()", name) + make_test([x], y, "input_0.log()", name) diff --git a/nodegen/node/logsoftmax.py b/nodegen/node/logsoftmax.py index 942dc52ed..af87e76ee 100644 --- a/nodegen/node/logsoftmax.py +++ b/nodegen/node/logsoftmax.py @@ -11,208 +11,35 @@ def logsoftmax(x: np.ndarray, axis: int = -1) -> np.ndarray: class Logsoftmax(RunAll): - def logsoftmax_i32(): - def fp8x23_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_i32_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_i32_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "logsoftmax_i32_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "logsoftmax_i32_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - - def logsoftmax_i8(): - def fp8x23_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_i8_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_i8_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - name = "logsoftmax_i8_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "logsoftmax_i8_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - - def logsoftmax_u32(): - def fp8x23_axis_0(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_u32_fp8x23_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp8x23_axis_1(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "logsoftmax_u32_fp8x23_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16_axis_0(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 0) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "logsoftmax_u32_fp16x16_axis_0" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16_axis_1(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = logsoftmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "logsoftmax_u32_fp16x16_axis_1" - make_node([x], [y], name) - make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) - - fp8x23_axis_0() - fp8x23_axis_1() - fp16x16_axis_0() - fp16x16_axis_1() - def logsoftmax_fp8x23(): def axis_0(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = logsoftmax(x, 0) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_fp8x23_axis_0" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) + name, Trait.NN) def axis_1(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = logsoftmax(x, 1) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "logsoftmax_fp8x23_axis_1" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) + name, Trait.NN) axis_0() axis_1() @@ -223,30 +50,28 @@ def axis_0(): y = logsoftmax(x, 0) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_fp16x16_axis_0" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 0)", - name, Trait.NN) + name, Trait.NN) def axis_1(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = logsoftmax(x, 1) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "logsoftmax_fp16x16_axis_1" make_node([x], [y], name) make_test([x], y, "NNTrait::logsoftmax(@input_0, 1)", - name, Trait.NN) + name, Trait.NN) axis_0() axis_1() - - diff --git a/nodegen/node/matmul.py b/nodegen/node/matmul.py index ae367f696..6965fcc41 100644 --- a/nodegen/node/matmul.py +++ b/nodegen/node/matmul.py @@ -202,11 +202,11 @@ def matmul_1D(): y = np.matmul(a, b).reshape((1)) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_1d" make_node([a, b], [y], name) @@ -219,11 +219,11 @@ def matmul_2x2(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_2x2" make_node([a, b], [y], name) @@ -236,11 +236,11 @@ def matmul_2x1(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_2x1" make_node([a, b], [y], name) @@ -253,11 +253,11 @@ def matmul_1x2(): y = np.matmul(a, b) a = Tensor(Dtype.FP8x23, a.shape, to_fp( - a.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + a.flatten(), FixedImpl.FP8x23)) b = Tensor(Dtype.FP8x23, b.shape, to_fp( - b.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + b.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "matmul_fp8x23_1x2" make_node([a, b], [y], name) diff --git a/nodegen/node/mul.py b/nodegen/node/mul.py index bd070eeb0..2922c6bc1 100644 --- a/nodegen/node/mul.py +++ b/nodegen/node/mul.py @@ -105,11 +105,11 @@ def default(): z = x * y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "mul_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x * y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "mul_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x * y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "mul_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x * y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "mul_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/or.py b/nodegen/node/or.py index 7bacf76ac..f67778749 100644 --- a/nodegen/node/or.py +++ b/nodegen/node/or.py @@ -105,9 +105,9 @@ def default(): z = np.logical_or(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp8x23" @@ -120,9 +120,9 @@ def broadcast(): z = np.logical_or(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp8x23_broadcast" @@ -140,9 +140,9 @@ def default(): z = np.logical_or(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp16x16" @@ -155,9 +155,9 @@ def broadcast(): z = np.logical_or(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "or_fp16x16_broadcast" diff --git a/nodegen/node/reduce_sum.py b/nodegen/node/reduce_sum.py index 8647f3e5b..3a4449032 100644 --- a/nodegen/node/reduce_sum.py +++ b/nodegen/node/reduce_sum.py @@ -16,7 +16,7 @@ def reduce_sum_1D(): name = "reduce_sum_u32_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -29,7 +29,7 @@ def default(): name = "reduce_sum_u32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.uint32).reshape(2, 2) @@ -41,7 +41,7 @@ def keepdims(): name = "reduce_sum_u32_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.uint32).reshape(2, 2) @@ -53,7 +53,7 @@ def axis_1(): name = "reduce_sum_u32_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -73,7 +73,7 @@ def reduce_sum_1D(): name = "reduce_sum_i32_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -86,7 +86,7 @@ def default(): name = "reduce_sum_i32_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int32).reshape(2, 2) @@ -98,7 +98,7 @@ def keepdims(): name = "reduce_sum_i32_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int32).reshape(2, 2) @@ -110,7 +110,7 @@ def axis_1(): name = "reduce_sum_i32_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -130,7 +130,7 @@ def reduce_sum_1D(): name = "reduce_sum_i8_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -143,7 +143,7 @@ def default(): name = "reduce_sum_i8_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int8).reshape(2, 2) @@ -155,7 +155,7 @@ def keepdims(): name = "reduce_sum_i8_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int8).reshape(2, 2) @@ -167,7 +167,7 @@ def axis_1(): name = "reduce_sum_i8_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -182,14 +182,14 @@ def reduce_sum_1D(): y = np.array([3]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -197,42 +197,42 @@ def default(): y = np.array([2, 4]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) y = np.array([2, 4]).astype(np.int64).reshape(1, 2) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) y = np.array([1, 5]).astype(np.int64) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "reduce_sum_fp8x23_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() @@ -248,14 +248,14 @@ def reduce_sum_1D(): y = np.array([3]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_1D" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def reduce_sum_2D(): def default(): @@ -263,42 +263,42 @@ def default(): y = np.array([2, 4]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_default" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, false)", name) + [x], y, "input_0.reduce_sum(0, false)", name) def keepdims(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) y = np.array([2, 4]).astype(np.int64).reshape(1, 2) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_keepdims" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(0, true)", name) + [x], y, "input_0.reduce_sum(0, true)", name) def axis_1(): x = np.array([0, 1, 2, 3]).astype(np.int64).reshape(2, 2) y = np.array([1, 5]).astype(np.int64) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "reduce_sum_fp16x16_2D_axis_1" make_node([x], [y], name) make_test( - [x], y, "x.reduce_sum(1, false)", name) + [x], y, "input_0.reduce_sum(1, false)", name) default() keepdims() diff --git a/nodegen/node/relu.py b/nodegen/node/relu.py index eb1032906..5e72850b5 100644 --- a/nodegen/node/relu.py +++ b/nodegen/node/relu.py @@ -41,9 +41,9 @@ def relu_fp8x23(): y = layer(x).numpy() x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "relu_fp8x23" make_node([x], [y], name) @@ -57,9 +57,9 @@ def relu_fp16x16(): y = layer(x).numpy() x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "relu_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sigmoid.py b/nodegen/node/sigmoid.py index 5a4090473..0f5052eae 100644 --- a/nodegen/node/sigmoid.py +++ b/nodegen/node/sigmoid.py @@ -7,127 +7,33 @@ class Sigmoid(RunAll): @staticmethod - def sigmoid_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() + def fp8x23(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) + y = tf.keras.activations.sigmoid(x).numpy() - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, to_fp( + x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23)) - name = "sigmoid_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sigmoid_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def sigmoid_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sigmoid_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sigmoid_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() + name = "sigmoid_fp8x23" + make_node([x], [y], name) + make_test([x], y, "NNTrait::sigmoid(@input_0)", + name, Trait.NN) @staticmethod - def sigmoid_u32(): - def fp8x23(): - x = np.random.randint(0, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sigmoid_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sigmoid_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def sigmoid_fp(): - def fp8x23(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() - - x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sigmoid_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) + def fp16x16(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) + y = tf.keras.activations.sigmoid(x).numpy() - def fp16x16(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float32) - y = tf.keras.activations.sigmoid(x).numpy() + x = Tensor(Dtype.FP16x16, x.shape, to_fp( + x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16)) - x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + name = "sigmoid_fp16x16" + make_node([x], [y], name) + make_test([x], y, "NNTrait::sigmoid(@input_0)", + name, Trait.NN) - name = "sigmoid_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::sigmoid(@input_0)", - name, Trait.NN) - fp8x23() - fp16x16() diff --git a/nodegen/node/sin.py b/nodegen/node/sin.py index da1995ce1..e62eb38d8 100644 --- a/nodegen/node/sin.py +++ b/nodegen/node/sin.py @@ -4,110 +4,20 @@ class Sin(RunAll): - - @staticmethod - def sin_i32(): - - def fp8x23(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sin_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sin_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sin_i8(): - - def fp8x23(): - x = np.random.randint(-10, 5, (2, 2)).astype(np.int8) - y = np.sin(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sin_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - def fp16x16(): - x = np.random.randint(-10, 127, (2, 2)).astype(np.int32) - y = np.sin(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sin_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sin_u32(): - - def fp8x23(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.sin(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sin_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - def fp16x16(): - x = np.random.randint(0, 127, (2, 2)).astype(np.uint32) - y = np.sin(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sin_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sin()", name) - - fp8x23() - fp16x16() - + @staticmethod def sin_fp8x23(): x = np.random.uniform(-3, 7, (2, 2)).astype(np.float64) y = np.sin(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sin_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) @staticmethod def sin_fp16x16(): @@ -115,10 +25,10 @@ def sin_fp16x16(): y = np.sin(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sin_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sin()", name) + make_test([x], y, "input_0.sin()", name) diff --git a/nodegen/node/sinh.py b/nodegen/node/sinh.py index 6b2117a59..27710d3ed 100644 --- a/nodegen/node/sinh.py +++ b/nodegen/node/sinh.py @@ -5,109 +5,19 @@ class Sinh(RunAll): - @staticmethod - def sinh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sinh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sinh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sinh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.sinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sinh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.sinh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sinh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sinh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sinh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sinh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sinh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) - - fp8x23() - fp16x16() - @staticmethod def sinh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = np.sinh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sinh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) @staticmethod def sinh_fp16x16(): @@ -115,10 +25,10 @@ def sinh_fp16x16(): y = np.sinh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sinh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sinh()", name) + make_test([x], y, "input_0.sinh()", name) diff --git a/nodegen/node/softmax.py b/nodegen/node/softmax.py index 041c21a72..2c42b9844 100644 --- a/nodegen/node/softmax.py +++ b/nodegen/node/softmax.py @@ -12,128 +12,34 @@ def softmax(x: np.ndarray, axis: int = -1) -> np.ndarray: class Softmax(RunAll): - @staticmethod - def softmax_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softmax(x, 0) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softmax_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softmax(x, 1) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softmax_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softmax_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softmax(x, 1) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softmax_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softmax(x, 0) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softmax_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - fp8x23() - fp16x16() @staticmethod - def softmax_u32(): - def fp8x23(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = softmax(x, 1) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softmax_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) + def fp8x23(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) + y = softmax(x, 0) - def fp16x16(): - x = np.random.randint(0, 3, (2, 2)).astype(np.int32) - y = softmax(x, 0) + x = Tensor(Dtype.FP8x23, x.shape, to_fp( + x.flatten(), FixedImpl.FP8x23)) + y = Tensor(Dtype.FP8x23, y.shape, to_fp( + y.flatten(), FixedImpl.FP8x23)) - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softmax_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - fp8x23() - fp16x16() + name = "softmax_fp8x23" + make_node([x], [y], name) + make_test([x], y, "NNTrait::softmax(@input_0, 0)", + name, Trait.NN) @staticmethod - def softmax_fp(): - def fp8x23(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) - y = softmax(x, 0) - - x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softmax_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) - y = softmax(x, 1) + def fp16x16(): + x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) + y = softmax(x, 1) - x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x = Tensor(Dtype.FP16x16, x.shape, to_fp( + x.flatten(), FixedImpl.FP16x16)) + y = Tensor(Dtype.FP16x16, y.shape, to_fp( + y.flatten(), FixedImpl.FP16x16)) - name = "softmax_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softmax(@input_0, 1)", - name, Trait.NN) + name = "softmax_fp16x16" + make_node([x], [y], name) + make_test([x], y, "NNTrait::softmax(@input_0, 1)", + name, Trait.NN) - fp8x23() - fp16x16() diff --git a/nodegen/node/softplus.py b/nodegen/node/softplus.py index 0783f39cb..9c8b72106 100644 --- a/nodegen/node/softplus.py +++ b/nodegen/node/softplus.py @@ -9,99 +9,6 @@ def softplus(x: np.ndarray) -> np.ndarray: class Softplus(RunAll): - @staticmethod - def softplus_i32(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softplus_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softplus_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softplus_i8(): - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softplus(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softplus_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = softplus(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softplus_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softplus_u32(): - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softplus_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = softplus(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softplus_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softplus(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def softplus_fp(): def fp8x23(): @@ -109,9 +16,9 @@ def fp8x23(): y = softplus(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softplus_fp8x23" make_node([x], [y], name) @@ -123,9 +30,9 @@ def fp16x16(): y = softplus(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softplus_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/softsign.py b/nodegen/node/softsign.py index 6d00955b2..381d3e2d7 100644 --- a/nodegen/node/softsign.py +++ b/nodegen/node/softsign.py @@ -9,99 +9,6 @@ def softsign(x: np.ndarray) -> np.ndarray: class Softsign(RunAll): - @staticmethod - def softsign_i32(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softsign_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softsign_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softsign_i8(): - def fp8x23(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) - y = softsign(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softsign_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(-5, 9, (2, 2)).astype(np.int8) - y = softsign(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softsign_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - - @staticmethod - def softsign_u32(): - def fp8x23(): - x = np.random.randint(0, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "softsign_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - def fp16x16(): - x = np.random.randint(0, 9, (2, 2)).astype(np.int32) - y = softsign(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "softsign_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "NNTrait::softsign(@input_0)", - name, Trait.NN) - - fp8x23() - fp16x16() - @staticmethod def softsign_fp(): def fp8x23(): @@ -109,9 +16,9 @@ def fp8x23(): y = softsign(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "softsign_fp8x23" make_node([x], [y], name) @@ -123,9 +30,9 @@ def fp16x16(): y = softsign(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "softsign_fp16x16" make_node([x], [y], name) diff --git a/nodegen/node/sqrt.py b/nodegen/node/sqrt.py index 7bc150944..62222c43b 100644 --- a/nodegen/node/sqrt.py +++ b/nodegen/node/sqrt.py @@ -2,97 +2,8 @@ from nodegen.node import RunAll from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl -class Sqrt(RunAll): - - @staticmethod - def sqrt_i32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sqrt_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sqrt_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sqrt_i8(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int8) - y = np.sqrt(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - name = "sqrt_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.int32) - y = np.sqrt(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sqrt_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - fp8x23() - fp16x16() - - @staticmethod - def sqrt_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sqrt(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "sqrt_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.sqrt(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "sqrt_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) - - fp8x23() - fp16x16() +class Sqrt(RunAll): @staticmethod def sqrt_fp8x23(): @@ -100,13 +11,13 @@ def sqrt_fp8x23(): y = np.sqrt(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "sqrt_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) @staticmethod def sqrt_fp16x16(): @@ -114,10 +25,10 @@ def sqrt_fp16x16(): y = np.sqrt(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "sqrt_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.sqrt()", name) + make_test([x], y, "input_0.sqrt()", name) diff --git a/nodegen/node/sub.py b/nodegen/node/sub.py index f941b6668..b16ef020f 100644 --- a/nodegen/node/sub.py +++ b/nodegen/node/sub.py @@ -105,11 +105,11 @@ def default(): z = x - y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "sub_fp8x23" make_node([x, y], [z], name) @@ -121,11 +121,11 @@ def broadcast(): z = x - y x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.FP8x23, z.shape, to_fp( - z.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + z.flatten(), FixedImpl.FP8x23)) name = "sub_fp8x23_broadcast" make_node([x, y], [z], name) @@ -142,11 +142,11 @@ def default(): z = x - y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "sub_fp16x16" make_node([x, y], [z], name) @@ -158,11 +158,11 @@ def broadcast(): z = x - y x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.FP16x16, z.shape, to_fp( - z.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + z.flatten(), FixedImpl.FP16x16)) name = "sub_fp16x16_broadcast" make_node([x, y], [z], name) diff --git a/nodegen/node/tanh.py b/nodegen/node/tanh.py index 70813a516..f09dc1342 100644 --- a/nodegen/node/tanh.py +++ b/nodegen/node/tanh.py @@ -5,109 +5,19 @@ class Tanh(RunAll): - @staticmethod - def tanh_i32(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "tanh_i32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "tanh_i32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def tanh_i8(): - - def fp8x23(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int8) - y = np.tanh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "tanh_i8_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - def fp16x16(): - x = np.random.randint(-3, 3, (2, 2)).astype(np.int32) - y = np.tanh(x) - - x = Tensor(Dtype.I8, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "tanh_i8_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - fp8x23() - fp16x16() - - @staticmethod - def tanh_u32(): - - def fp8x23(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.tanh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) - - name = "tanh_u32_fp8x23" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - def fp16x16(): - x = np.random.randint(0, 6, (2, 2)).astype(np.uint32) - y = np.tanh(x) - - x = Tensor(Dtype.U32, x.shape, x.flatten(), FixedImpl.FP16x16) - y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) - - name = "tanh_u32_fp16x16" - make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) - - fp8x23() - fp16x16() - @staticmethod def tanh_fp8x23(): x = np.random.uniform(-3, 3, (2, 2)).astype(np.float64) y = np.tanh(x) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) name = "tanh_fp8x23" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) @staticmethod def tanh_fp16x16(): @@ -115,10 +25,10 @@ def tanh_fp16x16(): y = np.tanh(x) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) name = "tanh_fp16x16" make_node([x], [y], name) - make_test([x], y, "x.tanh()", name) + make_test([x], y, "input_0.tanh()", name) diff --git a/nodegen/node/transpose.py b/nodegen/node/transpose.py index 39f5f0518..f18e82faf 100644 --- a/nodegen/node/transpose.py +++ b/nodegen/node/transpose.py @@ -99,8 +99,8 @@ def transpose_2D(): ).astype(np.int64), FixedImpl.FP8x23) y = np.transpose(x, [1, 0]) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "transpose_fp8x23_2d" make_node([x], [y], name) @@ -112,8 +112,8 @@ def transpose_3D(): ).astype(np.int64), FixedImpl.FP8x23) y = np.transpose(x, [1, 2, 0]) - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "transpose_fp8x23_3d" make_node([x], [y], name) diff --git a/nodegen/node/xor.py b/nodegen/node/xor.py index 5d5a7466a..0b77a0f5a 100644 --- a/nodegen/node/xor.py +++ b/nodegen/node/xor.py @@ -106,9 +106,9 @@ def default(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp8x23" @@ -121,9 +121,9 @@ def broadcast(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP8x23, x.shape, to_fp( - x.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + x.flatten(), FixedImpl.FP8x23)) y = Tensor(Dtype.FP8x23, y.shape, to_fp( - y.flatten(), FixedImpl.FP8x23), FixedImpl.FP8x23) + y.flatten(), FixedImpl.FP8x23)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp8x23_broadcast" @@ -141,9 +141,9 @@ def default(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp16x16" @@ -156,9 +156,9 @@ def broadcast(): z = np.logical_xor(x, y) x = Tensor(Dtype.FP16x16, x.shape, to_fp( - x.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + x.flatten(), FixedImpl.FP16x16)) y = Tensor(Dtype.FP16x16, y.shape, to_fp( - y.flatten(), FixedImpl.FP16x16), FixedImpl.FP16x16) + y.flatten(), FixedImpl.FP16x16)) z = Tensor(Dtype.U32, z.shape, z.flatten()) name = "xor_fp16x16_broadcast" diff --git a/src/numbers.cairo b/src/numbers.cairo index e2072fb4c..b52fd57ef 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -7,28 +7,43 @@ use orion::numbers::fixed_point::core::FixedTrait; // Common methods from Fixed Point and Signed Integers. trait NumberTrait { fn new(mag: MAG, sign: bool) -> T; - + fn new_unscaled(mag: MAG, sign: bool) -> T; + fn from_felt(val: felt252) -> T; + fn abs(self: T) -> T; + fn ceil(self: T) -> T; + fn exp(self: T) -> T; + fn exp2(self: T) -> T; + fn floor(self: T) -> T; + fn ln(self: T) -> T; + fn log2(self: T) -> T; + fn log10(self: T) -> T; + fn pow(self: T, b: T) -> T; + fn round(self: T) -> T; + fn sqrt(self: T) -> T; + fn acos(self: T) -> T; + fn asin(self: T) -> T; + fn atan(self: T) -> T; + fn cos(self: T) -> T; + fn sin(self: T) -> T; + fn tan(self: T) -> T; + fn acosh(self: T) -> T; + fn asinh(self: T) -> T; + fn atanh(self: T) -> T; + fn cosh(self: T) -> T; + fn sinh(self: T) -> T; + fn tanh(self: T) -> T; fn zero() -> T; fn is_zero(self: T) -> bool; - fn one() -> T; fn is_one(self: T) -> bool; - fn neg_one() -> T; - - fn abs(self: T) -> T; - fn min_value() -> T; fn max_value() -> T; - fn min(self: T, other: T) -> T; fn max(self: T, other: T) -> T; - fn mag(self: T) -> MAG; fn is_neg(self: T) -> bool; - fn xor(lhs: T, rhs: T) -> bool; - fn or(lhs: T, rhs: T) -> bool; } @@ -41,6 +56,102 @@ impl FP8x23Number of NumberTrait { FP8x23Impl::new(mag, sign) } + fn new_unscaled(mag: u32, sign: bool) -> FP8x23 { + FP8x23Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP8x23 { + FP8x23Impl::from_felt(val) + } + + fn ceil(self: FP8x23) -> FP8x23 { + FP8x23Impl::ceil(self) + } + + fn exp(self: FP8x23) -> FP8x23 { + FP8x23Impl::exp(self) + } + + fn exp2(self: FP8x23) -> FP8x23 { + FP8x23Impl::exp2(self) + } + + fn floor(self: FP8x23) -> FP8x23 { + FP8x23Impl::floor(self) + } + + fn ln(self: FP8x23) -> FP8x23 { + FP8x23Impl::ln(self) + } + + fn log2(self: FP8x23) -> FP8x23 { + FP8x23Impl::log2(self) + } + + fn log10(self: FP8x23) -> FP8x23 { + FP8x23Impl::log10(self) + } + + fn pow(self: FP8x23, b: FP8x23) -> FP8x23 { + FP8x23Impl::pow(self, b) + } + + fn round(self: FP8x23) -> FP8x23 { + FP8x23Impl::round(self) + } + + fn sqrt(self: FP8x23) -> FP8x23 { + FP8x23Impl::sqrt(self) + } + + fn acos(self: FP8x23) -> FP8x23 { + FP8x23Impl::acos(self) + } + + fn asin(self: FP8x23) -> FP8x23 { + FP8x23Impl::asin(self) + } + + fn atan(self: FP8x23) -> FP8x23 { + FP8x23Impl::atan(self) + } + + fn cos(self: FP8x23) -> FP8x23 { + FP8x23Impl::cos(self) + } + + fn sin(self: FP8x23) -> FP8x23 { + FP8x23Impl::sin(self) + } + + fn tan(self: FP8x23) -> FP8x23 { + FP8x23Impl::tan(self) + } + + fn acosh(self: FP8x23) -> FP8x23 { + FP8x23Impl::acosh(self) + } + + fn asinh(self: FP8x23) -> FP8x23 { + FP8x23Impl::asinh(self) + } + + fn atanh(self: FP8x23) -> FP8x23 { + FP8x23Impl::atanh(self) + } + + fn cosh(self: FP8x23) -> FP8x23 { + FP8x23Impl::cosh(self) + } + + fn sinh(self: FP8x23) -> FP8x23 { + FP8x23Impl::sinh(self) + } + + fn tanh(self: FP8x23) -> FP8x23 { + FP8x23Impl::tanh(self) + } + fn zero() -> FP8x23 { FP8x23Impl::ZERO() } @@ -106,6 +217,102 @@ impl FP16x16Number of NumberTrait { FP16x16Impl::new(mag, sign) } + fn new_unscaled(mag: u32, sign: bool) -> FP16x16 { + FP16x16Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP16x16 { + FP16x16Impl::from_felt(val) + } + + fn ceil(self: FP16x16) -> FP16x16 { + FP16x16Impl::ceil(self) + } + + fn exp(self: FP16x16) -> FP16x16 { + FP16x16Impl::exp(self) + } + + fn exp2(self: FP16x16) -> FP16x16 { + FP16x16Impl::exp2(self) + } + + fn floor(self: FP16x16) -> FP16x16 { + FP16x16Impl::floor(self) + } + + fn ln(self: FP16x16) -> FP16x16 { + FP16x16Impl::ln(self) + } + + fn log2(self: FP16x16) -> FP16x16 { + FP16x16Impl::log2(self) + } + + fn log10(self: FP16x16) -> FP16x16 { + FP16x16Impl::log10(self) + } + + fn pow(self: FP16x16, b: FP16x16) -> FP16x16 { + FP16x16Impl::pow(self, b) + } + + fn round(self: FP16x16) -> FP16x16 { + FP16x16Impl::round(self) + } + + fn sqrt(self: FP16x16) -> FP16x16 { + FP16x16Impl::sqrt(self) + } + + fn acos(self: FP16x16) -> FP16x16 { + FP16x16Impl::acos(self) + } + + fn asin(self: FP16x16) -> FP16x16 { + FP16x16Impl::asin(self) + } + + fn atan(self: FP16x16) -> FP16x16 { + FP16x16Impl::atan(self) + } + + fn cos(self: FP16x16) -> FP16x16 { + FP16x16Impl::cos(self) + } + + fn sin(self: FP16x16) -> FP16x16 { + FP16x16Impl::sin(self) + } + + fn tan(self: FP16x16) -> FP16x16 { + FP16x16Impl::tan(self) + } + + fn acosh(self: FP16x16) -> FP16x16 { + FP16x16Impl::acosh(self) + } + + fn asinh(self: FP16x16) -> FP16x16 { + FP16x16Impl::asinh(self) + } + + fn atanh(self: FP16x16) -> FP16x16 { + FP16x16Impl::atanh(self) + } + + fn cosh(self: FP16x16) -> FP16x16 { + FP16x16Impl::cosh(self) + } + + fn sinh(self: FP16x16) -> FP16x16 { + FP16x16Impl::sinh(self) + } + + fn tanh(self: FP16x16) -> FP16x16 { + FP16x16Impl::tanh(self) + } + fn zero() -> FP16x16 { FP16x16Impl::ZERO() } @@ -233,7 +440,103 @@ use orion::numbers::signed_integer::i8::i8; impl I8Number of NumberTrait { fn new(mag: u8, sign: bool) -> i8 { - i8 { mag: mag, sign: false } + i8 { mag, sign } + } + + fn new_unscaled(mag: u8, sign: bool) -> i8 { + i8 { mag, sign } + } + + fn from_felt(val: felt252) -> i8 { + panic(array!['not supported!']) + } + + fn ceil(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn exp(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn exp2(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn floor(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn ln(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn log2(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn log10(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn pow(self: i8, b: i8) -> i8 { + panic(array!['not supported!']) + } + + fn round(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sqrt(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn acos(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn asin(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn atan(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn cos(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sin(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn tan(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn acosh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn asinh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn atanh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn cosh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn sinh(self: i8) -> i8 { + panic(array!['not supported!']) + } + + fn tanh(self: i8) -> i8 { + panic(array!['not supported!']) } fn zero() -> i8 { @@ -305,7 +608,103 @@ use orion::numbers::signed_integer::i16::i16; impl i16Number of NumberTrait { fn new(mag: u16, sign: bool) -> i16 { - i16 { mag: mag, sign: false } + i16 { mag, sign } + } + + fn new_unscaled(mag: u16, sign: bool) -> i16 { + i16 { mag, sign } + } + + fn from_felt(val: felt252) -> i16 { + panic(array!['not supported!']) + } + + fn ceil(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn exp(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn exp2(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn floor(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn ln(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn log2(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn log10(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn pow(self: i16, b: i16) -> i16 { + panic(array!['not supported!']) + } + + fn round(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sqrt(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn acos(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn asin(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn atan(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn cos(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sin(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn tan(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn acosh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn asinh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn atanh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn cosh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn sinh(self: i16) -> i16 { + panic(array!['not supported!']) + } + + fn tanh(self: i16) -> i16 { + panic(array!['not supported!']) } fn zero() -> i16 { @@ -377,9 +776,104 @@ use orion::numbers::signed_integer::i32::i32; impl i32Number of NumberTrait { fn new(mag: u32, sign: bool) -> i32 { - i32 { mag: mag, sign: false } + i32 { mag, sign } + } + + fn new_unscaled(mag: u32, sign: bool) -> i32 { + i32 { mag, sign } + } + + fn from_felt(val: felt252) -> i32 { + panic(array!['not supported!']) + } + + fn ceil(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn exp(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn exp2(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn floor(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn ln(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn log2(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn log10(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn pow(self: i32, b: i32) -> i32 { + panic(array!['not supported!']) + } + + fn round(self: i32) -> i32 { + panic(array!['not supported!']) } + fn sqrt(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn acos(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn asin(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn atan(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn cos(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn sin(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn tan(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn acosh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn asinh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn atanh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn cosh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn sinh(self: i32) -> i32 { + panic(array!['not supported!']) + } + + fn tanh(self: i32) -> i32 { + panic(array!['not supported!']) + } fn zero() -> i32 { i32 { mag: 0, sign: false } @@ -450,9 +944,104 @@ use orion::numbers::signed_integer::i64::i64; impl i64Number of NumberTrait { fn new(mag: u64, sign: bool) -> i64 { - i64 { mag: mag, sign: false } + i64 { mag, sign } } + fn new_unscaled(mag: u64, sign: bool) -> i64 { + i64 { mag, sign } + } + + fn from_felt(val: felt252) -> i64 { + panic(array!['not supported!']) + } + + fn ceil(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn exp(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn exp2(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn floor(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn ln(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn log2(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn log10(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn pow(self: i64, b: i64) -> i64 { + panic(array!['not supported!']) + } + + fn round(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sqrt(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn acos(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn asin(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn atan(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn cos(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sin(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn tan(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn acosh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn asinh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn atanh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn cosh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn sinh(self: i64) -> i64 { + panic(array!['not supported!']) + } + + fn tanh(self: i64) -> i64 { + panic(array!['not supported!']) + } fn zero() -> i64 { i64 { mag: 0, sign: false } @@ -523,7 +1112,103 @@ use orion::numbers::signed_integer::i128::i128; impl i128Number of NumberTrait { fn new(mag: u128, sign: bool) -> i128 { - i128 { mag: mag, sign: false } + i128 { mag, sign } + } + + fn new_unscaled(mag: u128, sign: bool) -> i128 { + i128 { mag, sign } + } + + fn from_felt(val: felt252) -> i128 { + panic(array!['not supported!']) + } + + fn ceil(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn exp(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn exp2(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn floor(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn ln(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn log2(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn log10(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn pow(self: i128, b: i128) -> i128 { + panic(array!['not supported!']) + } + + fn round(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sqrt(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn acos(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn asin(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn atan(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn cos(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sin(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn tan(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn acosh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn asinh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn atanh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn cosh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn sinh(self: i128) -> i128 { + panic(array!['not supported!']) + } + + fn tanh(self: i128) -> i128 { + panic(array!['not supported!']) } @@ -596,6 +1281,102 @@ impl u32Number of NumberTrait { mag } + fn new_unscaled(mag: u32, sign: bool) -> u32 { + mag + } + + fn from_felt(val: felt252) -> u32 { + panic(array!['not supported!']) + } + + fn ceil(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn exp(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn exp2(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn floor(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn ln(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn log2(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn log10(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn pow(self: u32, b: u32) -> u32 { + panic(array!['not supported!']) + } + + fn round(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sqrt(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn acos(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn asin(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn atan(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn cos(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sin(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn tan(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn acosh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn asinh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn atanh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn cosh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn sinh(self: u32) -> u32 { + panic(array!['not supported!']) + } + + fn tanh(self: u32) -> u32 { + panic(array!['not supported!']) + } + fn zero() -> u32 { 0 diff --git a/src/operators/nn.cairo b/src/operators/nn.cairo index 9d226494d..1f7a3abe5 100644 --- a/src/operators/nn.cairo +++ b/src/operators/nn.cairo @@ -4,14 +4,8 @@ mod functional; use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; - -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; - -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; - -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; +use orion::operators::nn::implementations::nn_fp8x23::FP8x23NN; +use orion::operators::nn::implementations::nn_fp16x16::FP16x16NN; +use orion::operators::nn::implementations::nn_i8::I8NN; +use orion::operators::nn::implementations::nn_i32::I32NN; +use orion::operators::nn::implementations::nn_u32::U32NN; diff --git a/src/operators/nn/core.cairo b/src/operators/nn/core.cairo index 99e09f4da..476616e30 100644 --- a/src/operators/nn/core.cairo +++ b/src/operators/nn/core.cairo @@ -10,7 +10,7 @@ use orion::operators::tensor::core::Tensor; /// softsign - Applies the Softsign function element-wise. /// softplus - Applies the Softplus function element-wise. /// linear - Performs a linear transformation of the input tensor using the provided weights and bias. -trait NNTrait { +trait NNTrait { /// # NNTrait::relu /// /// ```rust @@ -36,8 +36,8 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; + /// use orion::operators::nn::{NNTrait, I32NN}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn relu_example() -> Tensor { @@ -61,7 +61,7 @@ trait NNTrait { /// # NNTrait::softmax /// /// ```rust - /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + /// fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// ``` /// /// Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1] and sum to 1. @@ -79,23 +79,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softmax_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// NNTrait::new(0, false), + /// NNTrait::new(1, false), + /// NNTrait::new(2, false), + /// NNTrait::new(3, false), /// ] /// .span(), /// ); @@ -107,11 +111,11 @@ trait NNTrait { /// // [[0.2689, 0.7311],[0.2689, 0.7311]] /// ``` /// - fn softmax(tensor: @Tensor, axis: usize) -> Tensor; + fn softmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::logsoftmax /// /// ```rust - /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor + /// fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor /// ``` /// /// Applies the natural log to Softmax function to an n-dimensional input Tensor consisting of values in the range \[0,1]. @@ -129,23 +133,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn logsoftmax_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -163,11 +171,11 @@ trait NNTrait { /// // [[-1.3134, -0.3132],[-1.3134, -0.3132]] /// ``` /// - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor; /// # NNTrait::sigmoid /// /// ```rust - /// fn sigmoid(tensor: @Tensor) -> Tensor; + /// fn sigmoid(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Sigmoid function to an n-dimensional input tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range \[0,1]. @@ -184,23 +192,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn sigmoid_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -212,11 +224,11 @@ trait NNTrait { /// // [[0.5, 0.7310586],[0.88079703, 0.95257413]] /// ``` /// - fn sigmoid(tensor: @Tensor) -> Tensor; + fn sigmoid(tensor: @Tensor) -> Tensor; /// # NNTrait::softsign /// /// ```rust - /// fn softsign(tensor: @Tensor) -> Tensor; + /// fn softsign(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softsign function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -233,23 +245,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softsign_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -261,11 +277,11 @@ trait NNTrait { /// // [[0, 0.5],[0.67, 0.75]] /// ``` /// - fn softsign(tensor: @Tensor) -> Tensor; + fn softsign(tensor: @Tensor) -> Tensor; /// # NNTrait::softplus /// /// ```rust - /// fn softplus(tensor: @Tensor) -> Tensor; + /// fn softplus(tensor: @Tensor) -> Tensor; /// ``` /// /// Applies the Softplus function to an n-dimensional input Tensor such that the elements of the n-dimensional output Tensor lie in the range \[-1,1]. @@ -282,23 +298,27 @@ trait NNTrait { /// /// A Tensor of fixed point numbers with the same shape than the input Tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn softplus_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 2].span(), /// data: array![ - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(3, false), + /// FixedTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(3, false), /// ] /// .span(), /// ); @@ -310,7 +330,7 @@ trait NNTrait { /// // [[0.6931452, 1.31326096],[2.12692796, 3.04858728]] /// ``` /// - fn softplus(tensor: @Tensor) -> Tensor; + fn softplus(tensor: @Tensor) -> Tensor; /// # NNTrait::linear /// /// ```rust @@ -338,8 +358,8 @@ trait NNTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; + /// use orion::operators::nn::{NNTrait, I32NN}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn linear_example() -> Tensor { @@ -381,7 +401,7 @@ trait NNTrait { /// # NNTrait::leaky_relu /// /// ```rust - /// fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor + /// fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor /// ``` /// /// Applies the leaky rectified linear unit (Leaky ReLU) activation function element-wise to a given tensor. @@ -390,30 +410,34 @@ trait NNTrait { /// /// ## Args /// * `inputs`(`@Tensor`) - A snapshot of a tensor to which the Leaky ReLU function will be applied. - /// * `alpha`(`@F`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. + /// * `alpha`(`@T`) - A snapshot of a fixed point scalar that defines the alpha value of the Leaky ReLU function. /// /// ## Returns /// A new fixed point tensor with the same shape as the input tensor and the Leaky ReLU function applied element-wise. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; - /// use orion::operators::nn::{NNTrait, NN_i32_fp8x23}; - /// use orion::numbers::{i32, FP8x23, IntegerTrait, FixedTrait}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23}; + /// use orion::operators::nn::{NNTrait, FP8x23NN}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn leaky_relu_example() -> Tensor { - /// let tensor = TensorTrait::::new( + /// let tensor = TensorTrait::::new( /// shape: array![2, 3].span(), /// data: array![ - /// IntegerTrait::new(1, false), - /// IntegerTrait::new(2, false), - /// IntegerTrait::new(1, true), - /// IntegerTrait::new(2, true), - /// IntegerTrait::new(0, false), - /// IntegerTrait::new(0, false), + /// FixedTrait::new(1, false), + /// FixedTrait::new(2, false), + /// FixedTrait::new(1, true), + /// FixedTrait::new(2, true), + /// FixedTrait::new(0, false), + /// FixedTrait::new(0, false), /// ] /// .span(), /// ); @@ -426,5 +450,5 @@ trait NNTrait { /// [[1, 2, 0.1], [0.2, 0, 0]] /// ``` /// - fn leaky_relu(inputs: @Tensor, alpha: @F) -> Tensor; + fn leaky_relu(inputs: @Tensor, alpha: @T) -> Tensor; } diff --git a/src/operators/nn/functional/leaky_relu.cairo b/src/operators/nn/functional/leaky_relu.cairo index 5fdcd46a1..5ad8c3e02 100644 --- a/src/operators/nn/functional/leaky_relu.cairo +++ b/src/operators/nn/functional/leaky_relu.cairo @@ -7,68 +7,23 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; -/// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FMul: Mul, - impl TPartialOrd: PartialOrd, - impl FPartialOrd: PartialOrd, - impl TCopy: Copy, - impl TDrop: Drop, - impl FCopy: Copy, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut z: Tensor, alpha: @F -) -> Tensor { - assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); - - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - if (*item >= NumberTrait::zero()) { - data_result.append(fp_current_index); - } else { - data_result.append(fp_current_index * *alpha); - }; - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} /// Cf: NNTrait::leaky_relu docstring -fn leaky_relu_from_fp< - F, +fn leaky_relu< + T, MAG, - impl FNumber: NumberTrait, - impl FTensor: TensorTrait, - impl FPartialOrd: PartialOrd, - impl FMul: Mul, - impl FCopy: Copy, - impl FDrop: Drop, + impl FNumber: NumberTrait, + impl FTensor: TensorTrait, + impl FPartialOrd: PartialOrd, + impl FMul: Mul, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut z: Tensor, alpha: @F -) -> Tensor { + mut z: Tensor, alpha: @T +) -> Tensor { assert(*alpha < NumberTrait::one(), 'alpha must be less than 1'); - let mut data_result = ArrayTrait::::new(); + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/linear.cairo b/src/operators/nn/functional/linear.cairo index e08cb3b99..b65e0cee7 100644 --- a/src/operators/nn/functional/linear.cairo +++ b/src/operators/nn/functional/linear.cairo @@ -6,8 +6,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::linear docstring fn linear< T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TAddTensor: Add>, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/nn/functional/logsoftmax.cairo b/src/operators/nn/functional/logsoftmax.cairo index 892f16d60..6d19cbb62 100644 --- a/src/operators/nn/functional/logsoftmax.cairo +++ b/src/operators/nn/functional/logsoftmax.cairo @@ -5,15 +5,10 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::logsoftmax docstring fn logsoftmax< - T, - F, - impl TTensor: TensorTrait, - impl FTensor: TensorTrait, - impl FDivTensor: Div>, - impl FDrop: Drop + T, impl TTensor: TensorTrait, impl TDivTensor: Div>, impl TDrop: Drop >( z: @Tensor, axis: usize -) -> Tensor { +) -> Tensor { let exp_tensor = z.exp(); let sum = exp_tensor.reduce_sum(axis, true); let softmax = exp_tensor / sum; diff --git a/src/operators/nn/functional/relu.cairo b/src/operators/nn/functional/relu.cairo index de487d8fa..f8f1bb99d 100644 --- a/src/operators/nn/functional/relu.cairo +++ b/src/operators/nn/functional/relu.cairo @@ -8,9 +8,8 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::relu docstring fn relu< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, diff --git a/src/operators/nn/functional/sigmoid.cairo b/src/operators/nn/functional/sigmoid.cairo index 577393974..23f444e23 100644 --- a/src/operators/nn/functional/sigmoid.cairo +++ b/src/operators/nn/functional/sigmoid.cairo @@ -9,61 +9,21 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; /// Cf: NNTrait::sigmoid docstring -fn sigmoid_from_int< +fn sigmoid< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, - impl FMul: Mul, - impl FDiv: Div, + MAG, + impl TNumber: NumberTrait, + impl TTensor: TensorTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TMul: Mul, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_index = FixedTrait::::new_unscaled(((*item).mag()).into(), !(*item).is_neg()); - let result = FixedTrait::ONE() / (FixedTrait::ONE() + fp_current_index.exp()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - -/// Cf: NNTrait::sigmoid docstring -fn sigmoid_from_fp< - F, - MAG, - impl FNumber: NumberTrait, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FMul: Mul, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/softmax.cairo b/src/operators/nn/functional/softmax.cairo index e07969e8b..528856265 100644 --- a/src/operators/nn/functional/softmax.cairo +++ b/src/operators/nn/functional/softmax.cairo @@ -4,15 +4,14 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: NNTrait::softmax docstring fn softmax< T, - F, - impl TTensor: TensorTrait, - impl FTensor: TensorTrait, - impl FTensorDiv: Div>, - impl FCopy: Copy, - impl FDrop: Drop, + impl TTensor: TensorTrait, + impl TTensor: TensorTrait, + impl TTensorDiv: Div>, + impl TCopy: Copy, + impl TDrop: Drop, >( z: @Tensor, axis: usize -) -> Tensor { +) -> Tensor { let exp_tensor = z.exp(); let sum = exp_tensor.reduce_sum(axis, true); let softmax = exp_tensor / sum; diff --git a/src/operators/nn/functional/softplus.cairo b/src/operators/nn/functional/softplus.cairo index b65150bcc..1d98a848b 100644 --- a/src/operators/nn/functional/softplus.cairo +++ b/src/operators/nn/functional/softplus.cairo @@ -7,59 +7,22 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; + /// Cf: NNTrait::softplus docstring -fn softplus_from_int< +fn softplus< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, + MAG, + impl TTensor: TensorTrait, + impl TFixed: FixedTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - let result = (FixedTrait::ONE() + fp_current_item.exp()).ln(); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - - -/// Cf: NNTrait::softplus docstring -fn softplus_from_fp< - F, - MAG, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/nn/functional/softsign.cairo b/src/operators/nn/functional/softsign.cairo index f2dda6c2e..7d88ae2ce 100644 --- a/src/operators/nn/functional/softsign.cairo +++ b/src/operators/nn/functional/softsign.cairo @@ -7,59 +7,21 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; use orion::numbers::NumberTrait; + /// Cf: NNTrait::softsign docstring -fn softsign_from_int< +fn softsign< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl FAdd: Add, - impl FDiv: Div, + MAG, + impl TTensor: TensorTrait, + impl TFixed: FixedTrait, + impl TPartialOrd: PartialOrd, + impl TAdd: Add, + impl TDiv: Div, impl TCopy: Copy, impl TDrop: Drop, - impl FCopy: Copy, - impl FDrop: Drop, - impl FPMAGDrop: Drop >( mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::new(); - - loop { - match z.data.pop_front() { - Option::Some(item) => { - let fp_current_item = FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()); - let result = fp_current_item / (FixedTrait::ONE() + fp_current_item.abs()); - data_result.append(result); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(z.shape, data_result.span()); -} - -/// Cf: NNTrait::softsign docstring -fn softsign_from_fp< - F, - MAG, - impl FTensor: TensorTrait, - impl FFixed: FixedTrait, - impl FPartialOrd: PartialOrd, - impl FAdd: Add, - impl FDiv: Div, - impl FCopy: Copy, - impl FDrop: Drop, ->( - mut z: Tensor -) -> Tensor { +) -> Tensor { let mut data_result = ArrayTrait::new(); loop { diff --git a/src/operators/nn/implementations.cairo b/src/operators/nn/implementations.cairo index 50a1cde62..4f0b9f719 100644 --- a/src/operators/nn/implementations.cairo +++ b/src/operators/nn/implementations.cairo @@ -1,10 +1,6 @@ -mod nn_i8_fp8x23; -mod nn_i32_fp8x23; -mod nn_u32_fp8x23; +mod nn_i8; +mod nn_i32; +mod nn_u32; mod nn_fp8x23; - -mod nn_i8_fp16x16; -mod nn_i32_fp16x16; -mod nn_u32_fp16x16; mod nn_fp16x16; diff --git a/src/operators/nn/implementations/nn_fp16x16.cairo b/src/operators/nn/implementations/nn_fp16x16.cairo index 271b1d321..a0094de29 100644 --- a/src/operators/nn/implementations/nn_fp16x16.cairo +++ b/src/operators/nn/implementations/nn_fp16x16.cairo @@ -5,16 +5,16 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorDiv, FP16x16TensorAdd + FP16x16Tensor, FP16x16TensorDiv, FP16x16TensorAdd }; -impl NN_fp16x16 of NNTrait { +impl FP16x16NN of NNTrait { fn relu(tensor: @Tensor) -> Tensor { functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_fp(*tensor) + functional::sigmoid::sigmoid(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { @@ -26,11 +26,11 @@ impl NN_fp16x16 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_fp(*tensor) + functional::softsign::softsign(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_fp(*tensor) + functional::softplus::softplus(*tensor) } fn linear( @@ -40,6 +40,6 @@ impl NN_fp16x16 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) + functional::leaky_relu::leaky_relu(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_fp8x23.cairo b/src/operators/nn/implementations/nn_fp8x23.cairo index aa93229f8..305eeaba2 100644 --- a/src/operators/nn/implementations/nn_fp8x23.cairo +++ b/src/operators/nn/implementations/nn_fp8x23.cairo @@ -5,16 +5,16 @@ use orion::operators::nn::core::NNTrait; use orion::operators::nn::functional; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorDiv, FP8x23TensorAdd + FP8x23Tensor, FP8x23TensorDiv, FP8x23TensorAdd }; -impl NN_fp8x23 of NNTrait { +impl FP8x23NN of NNTrait { fn relu(tensor: @Tensor) -> Tensor { functional::relu::relu(*tensor) } fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_fp(*tensor) + functional::sigmoid::sigmoid(*tensor) } fn softmax(tensor: @Tensor, axis: usize) -> Tensor { @@ -26,11 +26,11 @@ impl NN_fp8x23 of NNTrait { } fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_fp(*tensor) + functional::softsign::softsign(*tensor) } fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_fp(*tensor) + functional::softplus::softplus(*tensor) } fn linear( @@ -40,6 +40,6 @@ impl NN_fp8x23 of NNTrait { } fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_fp(*inputs, alpha) + functional::leaky_relu::leaky_relu(*inputs, alpha) } } diff --git a/src/operators/nn/implementations/nn_i32.cairo b/src/operators/nn/implementations/nn_i32.cairo new file mode 100644 index 000000000..c74dfc268 --- /dev/null +++ b/src/operators/nn/implementations/nn_i32.cairo @@ -0,0 +1,41 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i32::i32; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_i32::{I32Tensor, I32TensorAdd}; + +impl I32NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @i32) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_i32_fp16x16.cairo b/src/operators/nn/implementations/nn_i32_fp16x16.cairo deleted file mode 100644 index 270587c14..000000000 --- a/src/operators/nn/implementations/nn_i32_fp16x16.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_i32_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i32_fp8x23.cairo b/src/operators/nn/implementations/nn_i32_fp8x23.cairo deleted file mode 100644 index bf8781ca5..000000000 --- a/src/operators/nn/implementations/nn_i32_fp8x23.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i32::i32; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{Tensor_i32_fp8x23, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_i32_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i8.cairo b/src/operators/nn/implementations/nn_i8.cairo new file mode 100644 index 000000000..12e9812a1 --- /dev/null +++ b/src/operators/nn/implementations/nn_i8.cairo @@ -0,0 +1,41 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::numbers::signed_integer::i8::i8; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_i8::{I8Tensor, I8TensorAdd}; + +impl I8NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @i8) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_i8_fp16x16.cairo b/src/operators/nn/implementations/nn_i8_fp16x16.cairo deleted file mode 100644 index e0e29d515..000000000 --- a/src/operators/nn/implementations/nn_i8_fp16x16.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_i8_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_i8_fp8x23.cairo b/src/operators/nn/implementations/nn_i8_fp8x23.cairo deleted file mode 100644 index 433761a3e..000000000 --- a/src/operators/nn/implementations/nn_i8_fp8x23.cairo +++ /dev/null @@ -1,43 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::numbers::signed_integer::i8::i8; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{Tensor_i8_fp8x23, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_i8_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_u32.cairo b/src/operators/nn/implementations/nn_u32.cairo new file mode 100644 index 000000000..0da74d544 --- /dev/null +++ b/src/operators/nn/implementations/nn_u32.cairo @@ -0,0 +1,40 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::operators::tensor::implementations::tensor_u32::{U32Tensor, U32TensorAdd}; + +impl U32NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + panic(array!['not supported!']) + } + + fn softsign(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn softplus(tensor: @Tensor) -> Tensor { + panic(array!['not supported!']) + } + + fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @u32) -> Tensor { + panic(array!['not supported!']) + } +} diff --git a/src/operators/nn/implementations/nn_u32_fp16x16.cairo b/src/operators/nn/implementations/nn_u32_fp16x16.cairo deleted file mode 100644 index 02088a5d8..000000000 --- a/src/operators/nn/implementations/nn_u32_fp16x16.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; - -impl NN_u32_fp16x16 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP16x16) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/nn/implementations/nn_u32_fp8x23.cairo b/src/operators/nn/implementations/nn_u32_fp8x23.cairo deleted file mode 100644 index a31a9daf6..000000000 --- a/src/operators/nn/implementations/nn_u32_fp8x23.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use core::option::OptionTrait; - -use orion::operators::tensor::core::Tensor; -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::functional; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{Tensor_u32_fp8x23, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; - -impl NN_u32_fp8x23 of NNTrait { - fn relu(tensor: @Tensor) -> Tensor { - functional::relu::relu(*tensor) - } - - fn sigmoid(tensor: @Tensor) -> Tensor { - functional::sigmoid::sigmoid_from_int(*tensor) - } - - fn softmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::softmax::softmax(tensor, axis) - } - - fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { - functional::logsoftmax::logsoftmax(tensor, axis) - } - - fn softsign(tensor: @Tensor) -> Tensor { - functional::softsign::softsign_from_int(*tensor) - } - - fn softplus(tensor: @Tensor) -> Tensor { - functional::softplus::softplus_from_int(*tensor) - } - - fn linear(inputs: Tensor, weights: Tensor, bias: Tensor) -> Tensor { - functional::linear::linear(inputs, weights, bias) - } - - fn leaky_relu(inputs: @Tensor, alpha: @FP8x23) -> Tensor { - functional::leaky_relu::leaky_relu_from_int(*inputs, alpha) - } -} diff --git a/src/operators/tensor.cairo b/src/operators/tensor.cairo index 2ac87e32b..976102b52 100644 --- a/src/operators/tensor.cairo +++ b/src/operators/tensor.cairo @@ -8,45 +8,25 @@ mod implementations; use orion::operators::tensor::core::{Tensor, TensorSerde, TensorTrait}; use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, + FP8x23Tensor, FP8x23TensorAdd, FP8x23TensorSub, FP8x23TensorMul, FP8x23TensorDiv, FP8x23TensorPartialEq, }; use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, + FP16x16Tensor, FP16x16TensorAdd, FP16x16TensorSub, FP16x16TensorMul, FP16x16TensorDiv, FP16x16TensorPartialEq, }; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, i8TensorAdd as i8FP8x23TensorAdd, i8TensorSub as i8FP8x23Sub, - i8TensorMul as i8FP8x23Mul, i8TensorDiv as i8FP8x23Div, - TensorI8IntoTensorI32 as TensorI8FP8x23IntoTensorI32, - TensorI8IntoTensorFP8x23 as TensorI8FP8x23IntoTensorFP8x23, +use orion::operators::tensor::implementations::tensor_i8::{ + I8Tensor, I8TensorAdd, I8TensorSub, I8TensorMul, I8TensorDiv, I8TensorPartialEq, }; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorAdd as i8FP16x16TensorAdd, i8TensorSub as i8FP16x16Sub, - i8TensorMul as i8FP16x16Mul, i8TensorDiv as i8FP16x16Div, - TensorI8IntoTensorI32 as TensorI8FP16x16IntoTensorI32, - TensorI8IntoTensorFP16x16 as TensorI8FP16x16IntoTensorFP16x16, +use orion::operators::tensor::implementations::tensor_i32::{ + I32Tensor, I32TensorAdd, I32TensorSub, I32TensorMul, I32TensorDiv, I32TensorPartialEq, + TensorI8IntoTensorI32 }; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ - Tensor_i32_fp8x23, i32TensorAdd as i32FP8x23TensorAdd, i32TensorSub as i32FP8x23Sub, - i32TensorMul as i32FP8x23Mul, i32TensorDiv as i32FP8x23Div, +use orion::operators::tensor::implementations::tensor_u32::{ + U32Tensor, U32TensorAdd, U32TensorSub, U32TensorMul, U32TensorDiv, U32TensorPartialEq }; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorAdd as i32FP16x16TensorAdd, i32TensorSub as i32FP16x16Sub, - i32TensorMul as i32FP16x16Mul, i32TensorDiv as i32FP16x16Div, -}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{ - Tensor_u32_fp8x23, u32TensorAdd as u32FP8x23TensorAdd, u32TensorSub as u32FP8x23Sub, - u32TensorMul as u32FP8x23Mul, u32TensorDiv as u32FP8x23Div, -}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_u32_fp16x16, u32TensorAdd as u32FP16x16TensorAdd, u32TensorSub as u32FP16x16Sub, - u32TensorMul as u32FP16x16Mul, u32TensorDiv as u32FP16x16Div, -}; diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 2c9e2d696..0b76cd2f5 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -69,7 +69,7 @@ impl TensorSerde, impl TDrop: Drop> of Serde { +trait TensorTrait { /// # tensor.new /// /// ```rust @@ -101,8 +101,7 @@ trait TensorTrait { /// use orion::operators::tensor::{ /// TensorTrait, // we import the trait /// Tensor, // we import the type - /// Tensor_u32_fp16x16 // we import the implementation. - /// //Here, it uses FP16x16 fixed-point for certain intermediate calculations (if needed). + /// U32Tensor // we import the implementation. /// }; /// /// // 1D TENSOR @@ -156,7 +155,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// /// fn at_example() -> u32 { @@ -192,7 +191,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn min_example() -> u32 { /// let tensor = TensorTrait::new( @@ -228,7 +227,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn max_example() -> u32 { /// let tensor = TensorTrait::new( @@ -262,7 +261,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn stride_example() -> Span { /// let tensor = TensorTrait::::new( @@ -302,7 +301,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn ravel_index_example() -> usize { /// let tensor = TensorTrait::::new( @@ -344,7 +343,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn unravel_index_example() -> Span { /// let tensor = TensorTrait::::new( @@ -386,7 +385,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn reshape_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -426,7 +425,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn transpose_tensor_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -467,7 +466,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn reduce_sum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -511,7 +510,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -528,7 +527,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -547,7 +546,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmax_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -594,7 +593,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -612,7 +611,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -631,7 +630,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn argmin_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -681,7 +680,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn dot_product_example() -> Tensor { /// let tensor_1 = TensorTrait::::new(shape: array![3].span(), data: array![0, 1, 2].span(),); @@ -699,7 +698,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn matrix_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -721,7 +720,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp16x16}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn matrix_vec_mul_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -740,7 +739,7 @@ trait TensorTrait { /// # tensor.exp /// /// ```rust - /// fn exp(self: @Tensor) -> Tensor; + /// fn exp(self: @Tensor) -> Tensor; /// ``` /// /// Computes the exponential of all elements of the input tensor. @@ -754,19 +753,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the exponential of the elements of the input tensor. + /// Returns a new tensor in `T` with the exponential of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - /// use orion::numbers::FP8x23; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn exp_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(), + /// shape: array![2, 2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(3, false), + /// ] /// ); /// /// // We can call `exp` function as follows. @@ -777,11 +786,11 @@ trait TensorTrait { /// // [[1, 2.718281],[7.38905, 20.085536]] /// ``` /// - fn exp(self: @Tensor) -> Tensor; + fn exp(self: @Tensor) -> Tensor; /// # tensor.log /// /// ```rust - /// fn log(self: @Tensor) -> Tensor; + /// fn log(self: @Tensor) -> Tensor; /// ``` /// /// Computes the natural log of all elements of the input tensor. @@ -795,19 +804,29 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the natural log of the elements of the input tensor. + /// Returns a new tensor in `T` with the natural log of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; - /// use orion::numbers::FP8x23; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn log_example() -> Tensor { /// let tensor = TensorTrait::::new( - /// shape: array![2, 2].span(), data: array![1, 2, 3, 100].span(), + /// shape: array![2, 2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(100, false), + /// ] /// ); /// /// // We can call `log` function as follows. @@ -818,7 +837,7 @@ trait TensorTrait { /// /// [[0, 0.693147, 1.098612, 4.605170]] /// ``` /// - fn log(self: @Tensor) -> Tensor; + fn log(self: @Tensor) -> Tensor; /// #tensor.equal /// /// ```rust @@ -850,7 +869,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -872,7 +891,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn eq_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -919,7 +938,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -941,7 +960,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -988,7 +1007,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1010,7 +1029,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn greater_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1057,7 +1076,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1079,7 +1098,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1126,7 +1145,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1148,7 +1167,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn less_equal_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1187,7 +1206,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor}; /// use orion::numbers::{i32, IntegerTrait}; /// /// fn abs_example() -> Tensor { @@ -1223,12 +1242,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the rounded up value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn ceil_example() -> Tensor { @@ -1266,12 +1289,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the sine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn sin_example() -> Tensor { @@ -1292,7 +1319,7 @@ trait TensorTrait { /// // [0,0.8414...,0.9092...] /// ``` /// - fn sin(self: @Tensor) -> Tensor; + fn sin(self: @Tensor) -> Tensor; /// #tensor.cos /// /// ```rust @@ -1311,12 +1338,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the cosine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn cos_example() -> Tensor { @@ -1337,7 +1368,7 @@ trait TensorTrait { /// // [1, 0.5403...,-0.4161] /// ``` /// - fn cos(self: @Tensor) -> Tensor; + fn cos(self: @Tensor) -> Tensor; /// # tensor.cumsum /// /// ```rust @@ -1368,7 +1399,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1385,7 +1416,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1402,7 +1433,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn cumsum_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1462,7 +1493,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1479,7 +1510,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn flatten_example() -> Tensor { /// let tensor = TensorTrait::::new( @@ -1495,7 +1526,7 @@ trait TensorTrait { /// # tensor.sinh /// /// ```rust - /// fn sinh(self: @Tensor) -> Tensor; + /// fn sinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic sine of all elements of the input tensor. @@ -1509,14 +1540,18 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperbolic sine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperbolic sine of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn sinh_example() -> Tensor { @@ -1538,11 +1573,11 @@ trait TensorTrait { /// // [[0, 1.175201],[3.62686, 10.0178749]] /// ``` /// - fn sinh(self: @Tensor) -> Tensor; + fn sinh(self: @Tensor) -> Tensor; /// # tensor.tanh /// /// ```rust - /// fn tanh(self: @Tensor) -> Tensor; + /// fn tanh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic tangent of all elements of the input tensor. @@ -1556,14 +1591,18 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperbolic tangent of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperbolic tangent of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn tanh_example() -> Tensor { @@ -1585,11 +1624,11 @@ trait TensorTrait { /// // [[0, 0.761594],[0.96403, 0.9951]] /// ``` /// - fn tanh(self: @Tensor) -> Tensor; + fn tanh(self: @Tensor) -> Tensor; /// # tensor.cosh /// /// ```rust - /// fn cosh(self: @Tensor) -> Tensor; + /// fn cosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the hyperbolic cosine of all elements of the input tensor. @@ -1603,14 +1642,18 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn cosh_example() -> Tensor { @@ -1632,11 +1675,11 @@ trait TensorTrait { /// // [[, 1.54308],[3.762196, 10.067662]] /// ``` /// - fn cosh(self: @Tensor) -> Tensor; + fn cosh(self: @Tensor) -> Tensor; /// # tensor.asinh /// /// ```rust - /// fn asinh(self: @Tensor) -> Tensor; + /// fn asinh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic sine of all elements of the input tensor. @@ -1650,14 +1693,18 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic sine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic sine of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn asinh_example() -> Tensor { @@ -1679,11 +1726,11 @@ trait TensorTrait { /// // [[0, 0.8814],[1.44364, 1.8185]] /// ``` /// - fn asinh(self: @Tensor) -> Tensor; + fn asinh(self: @Tensor) -> Tensor; /// # tensor.acosh /// /// ```rust - /// fn acosh(self: @Tensor) -> Tensor; + /// fn acosh(self: @Tensor) -> Tensor; /// ``` /// /// Computes the inverse hyperbolic cosine of all elements of the input tensor. @@ -1697,14 +1744,18 @@ trait TensorTrait { /// /// ## Returns /// - /// Returns a new tensor in `F` with the hyperblic cosine of the elements of the input tensor. + /// Returns a new tensor in `T` with the hyperblic cosine of the elements of the input tensor. + /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn acosh_example() -> Tensor { @@ -1726,7 +1777,7 @@ trait TensorTrait { /// // [[0, 1.31696],[1.76275, 2.06344]] /// ``` /// - fn acosh(self: @Tensor) -> Tensor; + fn acosh(self: @Tensor) -> Tensor; /// #tensor.atan /// /// ```rust @@ -1745,12 +1796,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arctangent (inverse of tangent) value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn atan_example() -> Tensor { @@ -1771,7 +1826,7 @@ trait TensorTrait { /// // [0,0.7853...,1.1071...] /// ``` /// - fn atan(self: @Tensor) -> Tensor; + fn atan(self: @Tensor) -> Tensor; /// #tensor.asin /// /// ```rust @@ -1790,12 +1845,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arcsine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn asin_example() -> Tensor { @@ -1812,7 +1871,7 @@ trait TensorTrait { /// // [0, 1.5707...] /// ``` /// - fn asin(self: @Tensor) -> Tensor; + fn asin(self: @Tensor) -> Tensor; /// #tensor.or /// /// ```rust @@ -1844,7 +1903,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1865,7 +1924,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn or_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1913,7 +1972,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1934,7 +1993,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn xor_example() -> Tensor { /// let tensor_1 = TensorTrait::::new( @@ -1969,12 +2028,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arccosine value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FP8x23, FixedTrait}; /// /// fn acos_example() -> Tensor { @@ -1991,7 +2054,7 @@ trait TensorTrait { /// // [1.5707..., 0] /// ``` /// - fn acos(self: @Tensor) -> Tensor; + fn acos(self: @Tensor) -> Tensor; /// # tensor.onehot /// /// ```rust @@ -2015,15 +2078,29 @@ trait TensorTrait { /// /// A new `Tensor` one-hot encode of the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; + /// use orion::numbers::{FP8x23, FixedTrait}; /// - /// fn onehot_example() -> Tensor { - /// let tensor = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); + /// fn onehot_example() -> Tensor { + /// let tensor = TensorTrait::::new( + /// shape: array![2,2].span(), + /// data: array![ + /// FixedTrait::new_unscaled(0, false), + /// FixedTrait::new_unscaled(1, false), + /// FixedTrait::new_unscaled(2, false), + /// FixedTrait::new_unscaled(3, false), + /// ] + /// .span(), + /// ); /// /// return tensor.onehot(depth: 3, axis: Option::None(()), values: array![0, 1].span()); /// } @@ -2053,12 +2130,16 @@ trait TensorTrait { /// A new `Tensor` of the same shape as the input tensor with /// the arctangent (inverse of tangent) value of all elements in the input tensor. /// + /// ## Type Constraints + /// + /// Constrain input and output types to fixed point tensors. + /// /// ## Example /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, FP8x23Tensor}; /// use orion::numbers::{FixedTrait, FP8x23}; /// /// fn sqrt_example() -> Tensor { @@ -2079,7 +2160,7 @@ trait TensorTrait { /// // [0,1,1.4142...] /// ``` /// - fn sqrt(self: @Tensor) -> Tensor; + fn sqrt(self: @Tensor) -> Tensor; /// # tensor.concat /// /// ```rust @@ -2107,7 +2188,7 @@ trait TensorTrait { /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_u32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; /// /// fn concat_example() -> Tensor { /// let tensor1 = TensorTrait::new(shape: array![2, 2].span(), data: array![0, 1, 2, 3].span(),); @@ -2158,12 +2239,16 @@ trait TensorTrait { /// /// A new `Tensor` with the same shape as the input tensor, containing the quantized values. /// + /// ## Type Constraints + /// + /// u32 tensor, not supported. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; /// use orion::numbers::{i8, i32, IntegerTrait}; /// /// fn quantize_linear_example() -> Tensor { @@ -2222,12 +2307,16 @@ trait TensorTrait { /// /// A new `Tensor` with the same shape as the input tensor, containing the dequantized values. /// + /// ## Type Constraints + /// + /// u32 tensor, not supported. + /// /// ## Examples /// /// ```rust /// use array::{ArrayTrait, SpanTrait}; /// - /// use orion::operators::tensor::{TensorTrait, Tensor, Tensor_i8_fp8x23, Tensor_i32_fp8x23}; + /// use orion::operators::tensor::{TensorTrait, Tensor, I8Tensor, I32Tensor}; /// use orion::numbers::{i8, i32, IntegerTrait}; /// /// fn dequantize_linear_example() -> Tensor { diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index ea84e8aba..cee4bc7ac 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -1,9 +1,5 @@ +mod tensor_u32; +mod tensor_i8; +mod tensor_i32; mod tensor_fp8x23; -mod tensor_i32_fp8x23; -mod tensor_u32_fp8x23; -mod tensor_i8_fp8x23; - mod tensor_fp16x16; -mod tensor_i32_fp16x16; -mod tensor_u32_fp16x16; -mod tensor_i8_fp16x16; diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index 0b2e43023..af44eb78e 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -1,24 +1,17 @@ -//! This module defines and implement a Tensor for FP16x16 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, TensorI8IntoTensorFP16x16 -}; -use orion::numbers::i8; +use orion::numbers::{i8, NumberTrait, FP16x16}; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; -impl Tensor_fp16x16 of TensorTrait { +impl FP16x16Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -28,7 +21,7 @@ impl Tensor_fp16x16 of TensorTrait { } fn min(self: @Tensor) -> FP16x16 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> FP16x16 { @@ -58,13 +51,13 @@ impl Tensor_fp16x16 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,11 +69,11 @@ impl Tensor_fp16x16 of TensorTrait { } fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_fp::(*self) + math::exp::exp(*self) } fn log(self: @Tensor) -> Tensor { - math::log::log_from_fp::(*self) + math::log::log(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -112,11 +105,11 @@ impl Tensor_fp16x16 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sin::sin(*self) } fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_fp(*self) + math::cos::cos(*self) } fn asin(self: @Tensor) -> Tensor { @@ -134,27 +127,27 @@ impl Tensor_fp16x16 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_fp(*self) + math::sinh::sinh(*self) } fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_fp(*self) + math::tanh::tanh(*self) } fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_fp(*self) + math::cosh::cosh(*self) } fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_fp(*self) + math::acosh::acosh(*self) } fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_fp(*self) + math::asinh::asinh(*self) } fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_fp(*self) + math::atan::atan(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -164,6 +157,7 @@ impl Tensor_fp16x16 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } + fn acos(self: @Tensor) -> Tensor { math::acos::acos(*self) } @@ -171,11 +165,11 @@ impl Tensor_fp16x16 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_fp(self, depth, axis, values) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_fp(*self) + math::sqrt::sqrt(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -189,8 +183,8 @@ impl Tensor_fp16x16 of TensorTrait { self, y_scale, y_zero_point, - FixedTrait::new(8388608, true), - FixedTrait::new(8323072, false) + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -278,8 +272,14 @@ impl U32TryIntoU32 of TryInto { } } -// Internals +impl TensorI8IntoTensorFP16x16 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp16x16(@self) + } +} + +// Internals const PRECISION: u32 = 589; // 0.009 fn relative_eq(lhs: @FP16x16, rhs: @FP16x16) -> bool { @@ -320,3 +320,18 @@ fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { return is_eq; } + +fn tensor_i8_to_tensor_fp16x16(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 8ff83d9e4..9ddc0f6a5 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -1,24 +1,17 @@ -//! This module defines and implement a Tensor for FP8x23 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, TensorI8IntoTensorFP8x23 -}; -use orion::numbers::i8; +use orion::numbers::{i8, NumberTrait, FP8x23}; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; -impl Tensor_fp8x23 of TensorTrait { +impl FP8x23Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -28,7 +21,7 @@ impl Tensor_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> FP8x23 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> FP8x23 { @@ -58,13 +51,13 @@ impl Tensor_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,11 +69,11 @@ impl Tensor_fp8x23 of TensorTrait { } fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_fp::(*self) + math::exp::exp(*self) } fn log(self: @Tensor) -> Tensor { - math::log::log_from_fp::(*self) + math::log::log(*self) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -112,11 +105,11 @@ impl Tensor_fp8x23 of TensorTrait { } fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_fp(*self) + math::sin::sin(*self) } fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_fp(*self) + math::cos::cos(*self) } fn asin(self: @Tensor) -> Tensor { @@ -134,27 +127,27 @@ impl Tensor_fp8x23 of TensorTrait { } fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_fp(*self) + math::sinh::sinh(*self) } fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_fp(*self) + math::tanh::tanh(*self) } fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_fp(*self) + math::cosh::cosh(*self) } fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_fp(*self) + math::acosh::acosh(*self) } fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_fp(*self) + math::asinh::asinh(*self) } fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_fp(*self) + math::atan::atan(*self) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -164,6 +157,7 @@ impl Tensor_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } + fn acos(self: @Tensor) -> Tensor { math::acos::acos(*self) } @@ -171,11 +165,11 @@ impl Tensor_fp8x23 of TensorTrait { fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_fp(self, depth, axis, values) + math::onehot::onehot(self, depth, axis, values) } fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_fp(*self) + math::sqrt::sqrt(*self) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -189,8 +183,8 @@ impl Tensor_fp8x23 of TensorTrait { self, y_scale, y_zero_point, - FixedTrait::new(1073741824, true), - FixedTrait::new(1065353216, false) + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -202,7 +196,13 @@ impl Tensor_fp8x23 of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl FP8x23TensorAdd of Add> { +impl FP8x23TensorAdd< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TAdd: Add, + impl TCopy: Copy, + impl TDrop: Drop +> of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -217,7 +217,13 @@ impl FP8x23TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl FP8x23TensorSub of Sub> { +impl FP8x23TensorSub< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TSub: Sub, + impl TCopy: Copy, + impl TDrop: Drop +> of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -232,7 +238,13 @@ impl FP8x23TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl FP8x23TensorMul of Mul> { +impl FP8x23TensorMul< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TMul: Mul, + impl TCopy: Copy, + impl TDrop: Drop +> of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -247,7 +259,13 @@ impl FP8x23TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl FP8x23TensorDiv of Div> { +impl FP8x23TensorDiv< + FP8x23, + impl FP8x23Tensor: TensorTrait, + impl TDiv: Div, + impl TCopy: Copy, + impl TDrop: Drop +> of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -278,6 +296,13 @@ impl U32TryIntoU32 of TryInto { } } +impl TensorI8IntoTensorFP8x23 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp8x23(@self) + } +} + + // Internals const PRECISION: u32 = 75497; // 0.009 @@ -319,3 +344,18 @@ fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { return is_eq; } + +fn tensor_i8_to_tensor_fp8x23(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i32.cairo similarity index 65% rename from src/operators/tensor/implementations/tensor_i32_fp8x23.cairo rename to src/operators/tensor/implementations/tensor_i32.cairo index 09d9c5121..9e6cf7ca7 100644 --- a/src/operators/tensor/implementations/tensor_i32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i32.cairo @@ -1,25 +1,18 @@ -//! This module defines and implement a Tensor for i32 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::{Into, TryInto}; +use traits::{TryInto, Into}; -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq }; use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::{ - Tensor_i8_fp8x23, TensorI8IntoTensorI32 -}; -use orion::numbers::i8; +use orion::numbers::{i32, i8, NumberTrait}; +use orion::operators::tensor::implementations::{tensor_u32::U32Tensor, tensor_i8::I8Tensor}; + -impl Tensor_i32_fp8x23 of TensorTrait { +impl I32Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -29,7 +22,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> i32 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> i32 { @@ -59,13 +52,13 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -76,12 +69,12 @@ impl Tensor_i32_fp8x23 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -109,19 +102,19 @@ impl Tensor_i32_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -134,28 +127,28 @@ impl Tensor_i32_fp8x23 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -165,18 +158,19 @@ impl Tensor_i32_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -190,8 +184,8 @@ impl Tensor_i32_fp8x23 of TensorTrait { self, y_scale, y_zero_point, - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) ) } @@ -203,7 +197,7 @@ impl Tensor_i32_fp8x23 of TensorTrait { } /// Implements addition for `Tensor` using the `Add` trait. -impl i32TensorAdd of Add> { +impl I32TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -218,7 +212,7 @@ impl i32TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl i32TensorSub of Sub> { +impl I32TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -233,7 +227,7 @@ impl i32TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl i32TensorMul of Mul> { +impl I32TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -248,7 +242,7 @@ impl i32TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl i32TensorDiv of Div> { +impl I32TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -262,9 +256,8 @@ impl i32TensorDiv of Div> { } } - /// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i32TensorPartialEq of PartialEq> { +impl I32TensorPartialEq of PartialEq> { fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { tensor_eq(*lhs, *rhs) } @@ -274,8 +267,60 @@ impl i32TensorPartialEq of PartialEq> { } } -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { +impl I8TryIntoI8 of TryInto { + fn try_into(self: i32) -> Option { Option::Some(self) } } + +impl TensorI8IntoTensorI32 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_i32(@self) + } +} + + +// Internals + +fn tensor_eq( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + }; + + return is_eq; +} + +fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} diff --git a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo deleted file mode 100644 index d176dcf1f..000000000 --- a/src/operators/tensor/implementations/tensor_i32_fp16x16.cairo +++ /dev/null @@ -1,281 +0,0 @@ -//! This module defines and implement a Tensor for i32 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::{Into, TryInto}; - -use orion::numbers::signed_integer::i32::i32; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq -}; -use orion::operators::tensor::{math, linalg, quantization}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, TensorI8IntoTensorI32 -}; -use orion::numbers::i8; - -impl Tensor_i32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span,) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> i32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> i32 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> i32 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i32']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - quantization::quantize_linear::quantize_linear( - self, - y_scale, - y_zero_point, - i32 { mag: 128, sign: true }, - i32 { mag: 127, sign: false }, - ) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl i32TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl i32TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl i32TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl i32TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} - -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } -} diff --git a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo b/src/operators/tensor/implementations/tensor_i8.cairo similarity index 61% rename from src/operators/tensor/implementations/tensor_i8_fp8x23.cairo rename to src/operators/tensor/implementations/tensor_i8.cairo index 9638a4a4b..a4c5efe82 100644 --- a/src/operators/tensor/implementations/tensor_i8_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_i8.cairo @@ -1,23 +1,17 @@ -//! This module defines and implement a Tensor for i8 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::{Into, TryInto}; +use traits::{TryInto, Into}; -use orion::numbers::signed_integer::{i8::i8, i32::i32}; -use orion::numbers::signed_integer::i8::{i8_to_fp8x23}; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; +use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait}; +use orion::operators::tensor::implementations::tensor_u32::U32Tensor; -impl Tensor_i8_fp8x23 of TensorTrait { +impl I8Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -27,7 +21,7 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> i8 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> i8 { @@ -57,13 +51,13 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -74,12 +68,12 @@ impl Tensor_i8_fp8x23 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -107,19 +101,19 @@ impl Tensor_i8_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -132,28 +126,28 @@ impl Tensor_i8_fp8x23 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -163,18 +157,19 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn or(self: @Tensor, other: @Tensor) -> Tensor { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) + + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -184,18 +179,24 @@ impl Tensor_i8_fp8x23 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) + ) } fn dequantize_linear( self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with i8']) + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } } /// Implements addition for `Tensor` using the `Add` trait. -impl i8TensorAdd of Add> { +impl I8TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -210,7 +211,7 @@ impl i8TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl i8TensorSub of Sub> { +impl I8TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -225,7 +226,7 @@ impl i8TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl i8TensorMul of Mul> { +impl I8TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -240,7 +241,7 @@ impl i8TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl i8TensorDiv of Div> { +impl I8TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -254,58 +255,49 @@ impl i8TensorDiv of Div> { } } -// Implements the Into trait for i8 tensor to i32 tensor. -impl TensorI8IntoTensorI32 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_tensor_i32(@self) +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl I8TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) } } -// Implements the Into trait for i8 tensor to fp tensor. -impl TensorI8IntoTensorFP8x23 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_fp8x23(@self) +impl I8TryIntoI8 of TryInto { + fn try_into(self: i8) -> Option { + Option::Some(self) } } -fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; +// Internals + +fn tensor_eq( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; loop { - result_data.append((*data.pop_front().unwrap()).into()); + if lhs.shape.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); }; - return TensorTrait::new(*x.shape, result_data.span()); -} - - -fn tensor_i8_to_fp8x23(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; + if !is_eq { + return false; + } loop { - result_data.append(i8_to_fp8x23(*data.pop_front().unwrap())); + if lhs.data.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); }; - return TensorTrait::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i8TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } + return is_eq; } diff --git a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo b/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo deleted file mode 100644 index 0eac14104..000000000 --- a/src/operators/tensor/implementations/tensor_i8_fp16x16.cairo +++ /dev/null @@ -1,311 +0,0 @@ -//! This module defines and implement a Tensor for i8 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::{Into, TryInto}; - -use orion::numbers::signed_integer::{i8::i8, i32::i32}; -use orion::numbers::signed_integer::i8::{i8_to_fp16x16}; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, - at_tensor, tensor_eq -}; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - -impl Tensor_i8_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> i8 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> i8 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> i8 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with i8']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with i8']) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with i8']) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl i8TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl i8TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl i8TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl i8TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - -// Implements the Into trait for i8 tensor to i32 tensor. -impl TensorI8IntoTensorI32 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_tensor_i32(@self) - } -} - -// Implements the Into trait for i8 tensor to fp tensor. -impl TensorI8IntoTensorFP16x16 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_i8_to_fp16x16(@self) - } -} - -fn tensor_i8_to_tensor_i32(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append((*data.pop_front().unwrap()).into()); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::new(*x.shape, result_data.span()); -} - - -fn tensor_i8_to_fp16x16(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append(i8_to_fp16x16(*data.pop_front().unwrap())); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl i8TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} diff --git a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo b/src/operators/tensor/implementations/tensor_u32.cairo similarity index 65% rename from src/operators/tensor/implementations/tensor_u32_fp8x23.cairo rename to src/operators/tensor/implementations/tensor_u32.cairo index ec660cf0e..7ac0f0a7b 100644 --- a/src/operators/tensor/implementations/tensor_u32_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_u32.cairo @@ -1,22 +1,17 @@ -//! This module defines and implement a Tensor for u32 values. - use array::ArrayTrait; use array::SpanTrait; use option::OptionTrait; -use traits::Into; +use traits::{TryInto, Into}; use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq }; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::i8; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait}; +use orion::operators::tensor::implementations::tensor_i8::I8Tensor; -impl Tensor_u32_fp8x23 of TensorTrait { +impl U32Tensor of TensorTrait { fn new(shape: Span, data: Span) -> Tensor { new_tensor(shape, data) } @@ -26,7 +21,7 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn min(self: @Tensor) -> u32 { - math::min::min_in_tensor(*self.data) + math::min::min_in_tensor::(*self.data) } fn max(self: @Tensor) -> u32 { @@ -56,13 +51,13 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn argmax( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) + math::argmax::argmax(self, axis, keepdims, select_last_index) } fn argmin( self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) + math::argmin::argmin(self, axis, keepdims, select_last_index) } fn transpose(self: @Tensor, axes: Span) -> Tensor { @@ -73,12 +68,12 @@ impl Tensor_u32_fp8x23 of TensorTrait { linalg::matmul::matmul(self, other) } - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) + fn exp(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) + fn log(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn equal(self: @Tensor, other: @Tensor) -> Tensor { @@ -106,19 +101,19 @@ impl Tensor_u32_fp8x23 of TensorTrait { } fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) + fn sin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) + fn cos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + fn asin(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn cumsum( @@ -131,28 +126,28 @@ impl Tensor_u32_fp8x23 of TensorTrait { math::flatten::flatten(self, axis) } - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) + fn sinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) + fn tanh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) + fn cosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) + fn acosh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) + fn asinh(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) + fn atan(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn xor(self: @Tensor, other: @Tensor) -> Tensor { @@ -163,18 +158,18 @@ impl Tensor_u32_fp8x23 of TensorTrait { math::or::or(self, other) } - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) + fn acos(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn onehot( self: @Tensor, depth: usize, axis: Option, values: Span ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) + panic(array!['not supported!']) } - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) + fn sqrt(self: @Tensor) -> Tensor { + panic(array!['not supported!']) } fn concat(tensors: Span>, axis: usize,) -> Tensor { @@ -184,18 +179,18 @@ impl Tensor_u32_fp8x23 of TensorTrait { fn quantize_linear( self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } fn dequantize_linear( self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor ) -> Tensor:: { - panic(array!['not supported with u32']) + panic(array!['not supported!']) } } /// Implements addition for `Tensor` using the `Add` trait. -impl u32TensorAdd of Add> { +impl U32TensorAdd of Add> { /// Adds two `Tensor` instances element-wise. /// /// # Arguments @@ -210,7 +205,7 @@ impl u32TensorAdd of Add> { } /// Implements subtraction for `Tensor` using the `Sub` trait. -impl u32TensorSub of Sub> { +impl U32TensorSub of Sub> { /// Subtracts two `Tensor` instances element-wise. /// /// # Arguments @@ -225,7 +220,7 @@ impl u32TensorSub of Sub> { } /// Implements multiplication for `Tensor` using the `Mul` trait. -impl u32TensorMul of Mul> { +impl U32TensorMul of Mul> { /// Multiplies two `Tensor` instances element-wise. /// /// # Arguments @@ -240,7 +235,7 @@ impl u32TensorMul of Mul> { } /// Implements division for `Tensor` using the `Div` trait. -impl u32TensorDiv of Div> { +impl U32TensorDiv of Div> { /// Divides two `Tensor` instances element-wise. /// /// # Arguments @@ -254,43 +249,50 @@ impl u32TensorDiv of Div> { } } +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl U32TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + -// Implements the Into trait for u32 tensor to fp tensor. -impl Tensoru32IntoTensorFP8x23 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_u32_to_fp8x23(@self) +impl U32TryIntoI8 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(i8 { mag: self.try_into().unwrap(), sign: false }) } } +// Internals -fn tensor_u32_to_fp8x23(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; +fn tensor_eq( + mut lhs: Tensor, mut rhs: Tensor, +) -> bool { + let mut is_eq = true; loop { - result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); + if lhs.shape.len() == 0 || !is_eq { + break; + } - if data.len() == 0 { - break (); - }; + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); }; - return TensorTrait::::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl u32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) + if !is_eq { + return false; } - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } + is_eq = lhs.data.pop_front().unwrap() == rhs.data.pop_front().unwrap(); + }; + + return is_eq; } diff --git a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo b/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo deleted file mode 100644 index c694d10e3..000000000 --- a/src/operators/tensor/implementations/tensor_u32_fp16x16.cairo +++ /dev/null @@ -1,296 +0,0 @@ -//! This module defines and implement a Tensor for u32 values. - -use array::ArrayTrait; -use array::SpanTrait; -use option::OptionTrait; -use traits::Into; - -use orion::numbers::fixed_point::core::FixedTrait; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::core::{ - new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, - tensor_eq -}; -use orion::operators::tensor::{math, linalg}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::i8; - -impl Tensor_u32_fp16x16 of TensorTrait { - fn new(shape: Span, data: Span) -> Tensor { - new_tensor(shape, data) - } - - fn at(self: @Tensor, indices: Span) -> u32 { - *at_tensor(self, indices) - } - - fn min(self: @Tensor) -> u32 { - math::min::min_in_tensor(*self.data) - } - - fn max(self: @Tensor) -> u32 { - math::max::max_in_tensor(*self.data) - } - - fn stride(self: @Tensor) -> Span { - stride(*self.shape) - } - - fn ravel_index(self: @Tensor, indices: Span) -> usize { - ravel_index(*self.shape, indices) - } - - fn unravel_index(self: @Tensor, index: usize) -> Span { - unravel_index(index, *self.shape) - } - - fn reshape(self: @Tensor, target_shape: Span) -> Tensor { - reshape(self, target_shape) - } - - fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { - math::reduce_sum::reduce_sum(self, axis, keepdims) - } - - fn argmax( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmax::argmax::(self, axis, keepdims, select_last_index) - } - - fn argmin( - self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option - ) -> Tensor { - math::argmin::argmin::(self, axis, keepdims, select_last_index) - } - - fn transpose(self: @Tensor, axes: Span) -> Tensor { - linalg::transpose::transpose(self, axes) - } - - fn matmul(self: @Tensor, other: @Tensor) -> Tensor { - linalg::matmul::matmul(self, other) - } - - fn exp(self: @Tensor) -> Tensor { - math::exp::exp_from_int::(*self) - } - - fn log(self: @Tensor) -> Tensor { - math::log::log_from_int::(*self) - } - - fn equal(self: @Tensor, other: @Tensor) -> Tensor { - math::equal::equal(self, other) - } - - fn greater(self: @Tensor, other: @Tensor) -> Tensor { - math::greater::greater(self, other) - } - - fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::greater_equal::greater_equal(self, other) - } - - fn less(self: @Tensor, other: @Tensor) -> Tensor { - math::less::less(self, other) - } - - fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { - math::less_equal::less_equal(self, other) - } - - fn abs(self: @Tensor) -> Tensor { - math::abs::abs(*self) - } - - fn ceil(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn sin(self: @Tensor) -> Tensor { - math::sin::sin_from_int(*self) - } - - fn cos(self: @Tensor) -> Tensor { - math::cos::cos_from_int(*self) - } - - fn asin(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn cumsum( - self: @Tensor, axis: usize, exclusive: Option, reverse: Option - ) -> Tensor { - math::cumsum::cumsum(self, axis, exclusive, reverse) - } - - fn flatten(self: @Tensor, axis: usize) -> Tensor { - math::flatten::flatten(self, axis) - } - - fn sinh(self: @Tensor) -> Tensor { - math::sinh::sinh_from_int(*self) - } - - fn tanh(self: @Tensor) -> Tensor { - math::tanh::tanh_from_int(*self) - } - - fn cosh(self: @Tensor) -> Tensor { - math::cosh::cosh_from_int(*self) - } - - fn acosh(self: @Tensor) -> Tensor { - math::acosh::acosh_from_int(*self) - } - - fn asinh(self: @Tensor) -> Tensor { - math::asinh::asinh_from_int(*self) - } - - fn atan(self: @Tensor) -> Tensor { - math::atan::atan_from_int(*self) - } - - fn xor(self: @Tensor, other: @Tensor) -> Tensor { - math::xor::xor(self, other) - } - - fn or(self: @Tensor, other: @Tensor) -> Tensor { - math::or::or(self, other) - } - - fn acos(self: @Tensor) -> Tensor { - panic(array!['not supported with u32']) - } - - fn onehot( - self: @Tensor, depth: usize, axis: Option, values: Span - ) -> Tensor { - math::onehot::onehot_from_int(self, depth, axis, values) - } - - fn sqrt(self: @Tensor) -> Tensor { - math::sqrt::sqrt_from_int(*self) - } - - fn concat(tensors: Span>, axis: usize,) -> Tensor { - math::concat::concat(tensors, axis) - } - - fn quantize_linear( - self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with u32']) - } - - fn dequantize_linear( - self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor - ) -> Tensor:: { - panic(array!['not supported with u32']) - } -} - -/// Implements addition for `Tensor` using the `Add` trait. -impl u32TensorAdd of Add> { - /// Adds two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise addition. - fn add(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::add(@lhs, @rhs) - } -} - -/// Implements subtraction for `Tensor` using the `Sub` trait. -impl u32TensorSub of Sub> { - /// Subtracts two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise subtraction. - fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::sub(@lhs, @rhs) - } -} - -/// Implements multiplication for `Tensor` using the `Mul` trait. -impl u32TensorMul of Mul> { - /// Multiplies two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise multiplication. - fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::mul(@lhs, @rhs) - } -} - -/// Implements division for `Tensor` using the `Div` trait. -impl u32TensorDiv of Div> { - /// Divides two `Tensor` instances element-wise. - /// - /// # Arguments - /// * `lhs` - The first tensor. - /// * `rhs` - The second tensor. - /// - /// # Returns - /// * A `Tensor` instance representing the result of the element-wise division. - fn div(lhs: Tensor, rhs: Tensor) -> Tensor { - math::arithmetic::div(@lhs, @rhs) - } -} - - -// Implements the Into trait for u32 tensor to fp tensor. -impl Tensoru32IntoTensorFP16x16 of Into, Tensor> { - fn into(self: Tensor) -> Tensor { - tensor_u32_to_fp16x16(@self) - } -} - - -fn tensor_u32_to_fp16x16(x: @Tensor) -> Tensor { - let mut result_data = ArrayTrait::::new(); - let mut data = *x.data; - - loop { - result_data.append(FixedTrait::::new_unscaled(*data.pop_front().unwrap(), false)); - - if data.len() == 0 { - break (); - }; - }; - - return TensorTrait::::new(*x.shape, result_data.span()); -} - -/// Implements partial equal for two `Tensor` using the `PartialEq` trait. -impl u32TensorPartialEq of PartialEq> { - fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { - tensor_eq(*lhs, *rhs) - } - - fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { - !tensor_eq(*lhs, *rhs) - } -} - -impl U32TryIntoU32 of TryInto { - fn try_into(self: u32) -> Option { - Option::Some(self) - } -} diff --git a/src/operators/tensor/linalg/matmul.cairo b/src/operators/tensor/linalg/matmul.cairo index 3259ce1a8..ca72ba74a 100644 --- a/src/operators/tensor/linalg/matmul.cairo +++ b/src/operators/tensor/linalg/matmul.cairo @@ -8,9 +8,8 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::matmul docstring fn matmul< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TMul: Mul, impl TAddEq: AddEq, @@ -105,9 +104,8 @@ fn dot_product< /// * Returns the restulting i32 tensor. fn matrix_multiply< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TMul: Mul, impl TAddEq: AddEq, diff --git a/src/operators/tensor/linalg/transpose.cairo b/src/operators/tensor/linalg/transpose.cairo index 52cb22ea6..dc972e9a3 100644 --- a/src/operators/tensor/linalg/transpose.cairo +++ b/src/operators/tensor/linalg/transpose.cairo @@ -8,7 +8,7 @@ use orion::operators::tensor::helpers::{len_from_shape, find_axis, permutation_o use orion::numbers::NumberTrait; /// Cf: TensorTrait::transpose docstring -fn transpose, impl TCopy: Copy, impl TDrop: Drop>( +fn transpose, impl TCopy: Copy, impl TDrop: Drop>( self: @Tensor, axes: Span ) -> Tensor { assert((*self.shape).len() > 1, 'cannot transpose a 1D tensor'); diff --git a/src/operators/tensor/math/abs.cairo b/src/operators/tensor/math/abs.cairo index 1e47109db..56662aa6c 100644 --- a/src/operators/tensor/math/abs.cairo +++ b/src/operators/tensor/math/abs.cairo @@ -8,9 +8,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::abs docstring fn abs< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumberTrait: NumberTrait, impl TCopy: Copy, impl TDrop: Drop diff --git a/src/operators/tensor/math/acos.cairo b/src/operators/tensor/math/acos.cairo index 0bedc919c..b394620cd 100644 --- a/src/operators/tensor/math/acos.cairo +++ b/src/operators/tensor/math/acos.cairo @@ -7,15 +7,15 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::acos docstring fn acos< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { match self.data.pop_front() { @@ -28,6 +28,6 @@ fn acos< }; }; - return TensorTrait::::new(self.shape, result.span()); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/acosh.cairo b/src/operators/tensor/math/acosh.cairo index 030a50222..ed253063e 100644 --- a/src/operators/tensor/math/acosh.cairo +++ b/src/operators/tensor/math/acosh.cairo @@ -8,54 +8,16 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::acosh docstring -fn acosh_from_int< +fn acosh< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .acosh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::acosh docstring -fn acosh_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/argmax.cairo b/src/operators/tensor/math/argmax.cairo index 5a76b9802..d270e0c4c 100644 --- a/src/operators/tensor/math/argmax.cairo +++ b/src/operators/tensor/math/argmax.cairo @@ -10,9 +10,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::argmax docstring fn argmax< T, - F, MAG, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, @@ -34,7 +33,7 @@ fn argmax< assert(axis <= (*self.shape).len(), 'axis out of dimensions'); if (*self.shape).len() == 1 { - return find_argmax_1D::(*self, axis, true, select_last_index); + return find_argmax_1D::(*self, axis, true, select_last_index); } let mut output_data = ArrayTrait::new(); @@ -77,8 +76,7 @@ fn argmax< /// * A usize value representing the index of the maximum value along the specified axis. fn find_argmax_1D< T, - F, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, @@ -91,8 +89,7 @@ fn find_argmax_1D< let mut max = match input.data.pop_front() { Option::Some(item) => *item, Option::None(_) => { - return TensorTrait::::new( + return TensorTrait::::new( reduce_output_shape(input.shape, axis, keepdims), output_data.span() ); } @@ -122,8 +119,9 @@ fn find_argmax_1D< output_data.append(max_index); - return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span() + ); } diff --git a/src/operators/tensor/math/argmin.cairo b/src/operators/tensor/math/argmin.cairo index fd9c26fff..77217a9ab 100644 --- a/src/operators/tensor/math/argmin.cairo +++ b/src/operators/tensor/math/argmin.cairo @@ -10,9 +10,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::argmin docstring fn argmin< T, - F, MAG, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TNumber: NumberTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, @@ -78,8 +77,7 @@ fn argmin< /// * A usize value representing the index of the minimum value along the specified axis. fn find_argmin_1D< T, - F, - impl UsizeTensor: TensorTrait, + impl UsizeTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TPartialEq: PartialEq, impl TCopy: Copy, @@ -92,8 +90,9 @@ fn find_argmin_1D< let mut min = match input.data.pop_front() { Option::Some(item) => *item, Option::None(_) => { - return TensorTrait::::new(reduce_output_shape(input.shape, axis, keepdims), output_data.span()); + return TensorTrait::::new( + reduce_output_shape(input.shape, axis, keepdims), output_data.span() + ); } }; let mut min_index = 0; diff --git a/src/operators/tensor/math/arithmetic.cairo b/src/operators/tensor/math/arithmetic.cairo index cc7592d4e..075f565b8 100644 --- a/src/operators/tensor/math/arithmetic.cairo +++ b/src/operators/tensor/math/arithmetic.cairo @@ -10,12 +10,7 @@ use orion::operators::tensor::helpers::{broadcast_index_mapping, len_from_shape, use orion::utils::saturate; fn add< - T, - F, - impl TTensor: TensorTrait, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -44,10 +39,9 @@ fn add< fn saturated_add< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -86,16 +80,11 @@ fn saturated_add< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn sub< - T, - F, - impl TTensor: TensorTrait, - impl TSub: Sub, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TSub: Sub, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -124,10 +113,9 @@ fn sub< fn saturated_sub< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TSub: Sub, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -166,16 +154,11 @@ fn saturated_sub< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn mul< - T, - F, - impl TTensor: TensorTrait, - impl TMul: Mul, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TMul: Mul, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -204,10 +187,9 @@ fn mul< fn saturated_mul< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TMul: Mul, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -246,16 +228,11 @@ fn saturated_mul< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } fn div< - T, - F, - impl TTensor: TensorTrait, - impl TMul: Div, - impl TCopy: Copy, - impl TDrop: Drop + T, impl TTensor: TensorTrait, impl TMul: Div, impl TCopy: Copy, impl TDrop: Drop >( self: @Tensor, other: @Tensor ) -> Tensor { @@ -284,10 +261,9 @@ fn div< fn saturated_div< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TDiv: Div, impl TPartialOrd: PartialOrd, impl TTryInto: TryInto, @@ -326,5 +302,5 @@ fn saturated_div< }; }; - return TensorTrait::::new(broadcasted_shape, result.span()); + return TensorTrait::::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/asin.cairo b/src/operators/tensor/math/asin.cairo index 3e2b8ec95..712c34575 100644 --- a/src/operators/tensor/math/asin.cairo +++ b/src/operators/tensor/math/asin.cairo @@ -7,15 +7,15 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::asin docstring fn asin< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/asinh.cairo b/src/operators/tensor/math/asinh.cairo index 182086281..4fe92bc16 100644 --- a/src/operators/tensor/math/asinh.cairo +++ b/src/operators/tensor/math/asinh.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::asinh docstring -fn asinh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .asinh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::asinh docstring -fn asinh_from_fp< - F, +fn asinh< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/atan.cairo b/src/operators/tensor/math/atan.cairo index d93649fa3..d1a0ab3b3 100644 --- a/src/operators/tensor/math/atan.cairo +++ b/src/operators/tensor/math/atan.cairo @@ -8,53 +8,16 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -fn atan_from_int< +fn atan< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .atan() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -fn atan_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/ceil.cairo b/src/operators/tensor/math/ceil.cairo index ea61b2ba4..6b8e68d4b 100644 --- a/src/operators/tensor/math/ceil.cairo +++ b/src/operators/tensor/math/ceil.cairo @@ -7,16 +7,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::ceil docstring fn ceil< - F, + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop >( - mut z: Tensor -) -> Tensor { - let mut data_result = ArrayTrait::::new(); + mut z: Tensor +) -> Tensor { + let mut data_result = ArrayTrait::::new(); loop { match z.data.pop_front() { diff --git a/src/operators/tensor/math/concat.cairo b/src/operators/tensor/math/concat.cairo index 61d9867ff..e4baf6c91 100644 --- a/src/operators/tensor/math/concat.cairo +++ b/src/operators/tensor/math/concat.cairo @@ -5,10 +5,10 @@ use debug::PrintTrait; use core::traits::Into; use orion::operators::tensor::helpers::replace_index; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; -fn concat, impl TCopy: Copy, impl TDrop: Drop,>( +fn concat, impl TCopy: Copy, impl TDrop: Drop,>( mut tensors: Span>, axis: usize ) -> Tensor { assert(tensors.len() >= 2, 'Input tensors must be > 1'); diff --git a/src/operators/tensor/math/cos.cairo b/src/operators/tensor/math/cos.cairo index 15a3cdb5d..e27ad5c1d 100644 --- a/src/operators/tensor/math/cos.cairo +++ b/src/operators/tensor/math/cos.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::cos docstring -fn cos_from_int< +fn cos< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .cos() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::cos docstring -fn cos_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/cosh.cairo b/src/operators/tensor/math/cosh.cairo index 4a1eef5a9..d0c2d8515 100644 --- a/src/operators/tensor/math/cosh.cairo +++ b/src/operators/tensor/math/cosh.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::cosh docstring -fn cosh_from_int< +fn cosh< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .cosh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::cosh docstring -fn cosh_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/cumsum.cairo b/src/operators/tensor/math/cumsum.cairo index 062506305..97a755874 100644 --- a/src/operators/tensor/math/cumsum.cairo +++ b/src/operators/tensor/math/cumsum.cairo @@ -10,9 +10,8 @@ use orion::numbers::NumberTrait; /// Cf: TensorTrait::cumsum docstring fn cumsum< T, - F, MAG, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TAdd: Add, @@ -28,17 +27,16 @@ fn cumsum< }; if reverse { - cumsum_reverse::(self, axis, exclusive, NumberTrait::zero()) + cumsum_reverse::(self, axis, exclusive, NumberTrait::zero()) } else { - cumsum_forward::(self, axis, exclusive, NumberTrait::zero()) + cumsum_forward::(self, axis, exclusive, NumberTrait::zero()) } } /// Cf: TensorTrait::cumsum docstring fn cumsum_forward< T, - F, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TAdd: Add, impl TCopy: Copy, impl TDrop: Drop, @@ -100,8 +98,7 @@ fn cumsum_forward< /// Cf: TensorTrait::cumsum docstring fn cumsum_reverse< T, - F, - impl TTensorTrait: TensorTrait, + impl TTensorTrait: TensorTrait, impl TAddEq: AddEq, impl TSub: Sub, impl TCopy: Copy, diff --git a/src/operators/tensor/math/equal.cairo b/src/operators/tensor/math/equal.cairo index 3ad337372..9de0c9fe4 100644 --- a/src/operators/tensor/math/equal.cairo +++ b/src/operators/tensor/math/equal.cairo @@ -2,49 +2,44 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::equal docstring fn equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialEq: PartialEq, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger) = if (*y.data).len() < (*z.data).len() { - (y, z) - } else { - (z, y) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - if bigger_current_index == smaller_current_index { - data_result.append(1); + if *(*y.data)[indices_self] == *(*z.data)[indices_other] { + result.append(1); } else { - data_result.append(0); - }; + result.append(0); + } - smaller_index = (1 + smaller_index) % smaller_data.len(); + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/exp.cairo b/src/operators/tensor/math/exp.cairo index b0f1b8fff..3ba1e97d7 100644 --- a/src/operators/tensor/math/exp.cairo +++ b/src/operators/tensor/math/exp.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::exp docstring -fn exp_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .exp() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span()); -} /// Cf: TensorTrait::exp docstring -fn exp_from_fp< - F, +fn exp< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/flatten.cairo b/src/operators/tensor/math/flatten.cairo index bede9adc7..a15bb13ef 100644 --- a/src/operators/tensor/math/flatten.cairo +++ b/src/operators/tensor/math/flatten.cairo @@ -5,7 +5,7 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::flatten docstring -fn flatten>(self: @Tensor, axis: usize) -> Tensor { +fn flatten>(self: @Tensor, axis: usize) -> Tensor { let current_shape = *self.shape; assert(axis < current_shape.len(), 'axis out of dimensions'); diff --git a/src/operators/tensor/math/greater.cairo b/src/operators/tensor/math/greater.cairo index bf2e0096f..7d4825b12 100644 --- a/src/operators/tensor/math/greater.cairo +++ b/src/operators/tensor/math/greater.cairo @@ -1,56 +1,45 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::greater docstring fn greater< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] > *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value > z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/greater_equal.cairo b/src/operators/tensor/math/greater_equal.cairo index 2897a4dbb..9edb87373 100644 --- a/src/operators/tensor/math/greater_equal.cairo +++ b/src/operators/tensor/math/greater_equal.cairo @@ -2,55 +2,44 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::greater_equal docstring fn greater_equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] >= *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value >= z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/less.cairo b/src/operators/tensor/math/less.cairo index 423ed1152..e578ec426 100644 --- a/src/operators/tensor/math/less.cairo +++ b/src/operators/tensor/math/less.cairo @@ -1,57 +1,45 @@ -use core::debug::PrintTrait; use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::less docstring fn less< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] < *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value < z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/less_equal.cairo b/src/operators/tensor/math/less_equal.cairo index 49d3354c2..9b970a999 100644 --- a/src/operators/tensor/math/less_equal.cairo +++ b/src/operators/tensor/math/less_equal.cairo @@ -2,55 +2,44 @@ use array::ArrayTrait; use option::OptionTrait; use array::SpanTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::less_equal docstring fn less_equal< T, - F, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TPartialOrd: PartialOrd, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if *(*y.data)[indices_self] <= *(*z.data)[indices_other] { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; + result.append(0); + } - if y_value <= z_value { - data_result.append(1); - } else { - data_result.append(0); + n += 1; + if n == num_elements { + break (); }; - - smaller_index = (1 + smaller_index) % smaller_data.len(); }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/log.cairo b/src/operators/tensor/math/log.cairo index 34c2258fe..1b9413e57 100644 --- a/src/operators/tensor/math/log.cairo +++ b/src/operators/tensor/math/log.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::log docstring -fn log_from_int< +fn log< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .ln() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::log docstring -fn log_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { @@ -70,5 +32,5 @@ fn log_from_fp< }; }; - return TensorTrait::::new(self.shape, result.span()); + return TensorTrait::::new(self.shape, result.span()); } diff --git a/src/operators/tensor/math/onehot.cairo b/src/operators/tensor/math/onehot.cairo index 7803efe1c..56f465e0b 100644 --- a/src/operators/tensor/math/onehot.cairo +++ b/src/operators/tensor/math/onehot.cairo @@ -10,20 +10,21 @@ use option::OptionTrait; use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::{TensorTrait, Tensor}; + /// Cf: TensorTrait::onehot docstring -fn onehot_encode_from_int< +fn onehot_encode< T, - F, MAG, - impl TTensorTrait: TensorTrait, - impl TNumber: NumberTrait, - impl TTryInto: TryInto, - impl TPartialEq: PartialEq, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, >( self: @Tensor, depth: usize, axis: Option, values: Tensor ) -> Tensor { @@ -67,14 +68,15 @@ fn onehot_encode_from_int< let mut fixed_number = *(*self.data).at(outer_index); if fixed_number.is_neg() { - fixed_number = NumberTrait::new(depth.try_into().unwrap(), false) + fixed_number + fixed_number = FixedTrait::::new_unscaled(depth.try_into().unwrap(), false) + + fixed_number } loop { if inner_index == depth { break (); }; - let ind = NumberTrait::new(inner_index.try_into().unwrap(), false); + let ind = FixedTrait::::new_unscaled(inner_index.try_into().unwrap(), false); if fixed_number == ind { output_data.append(*values.data.at(1)); @@ -114,17 +116,17 @@ fn onehot_encode_from_int< return output_tensor; } -fn onehot_from_int< +fn onehot< T, - F, MAG, - impl TTensorTrait: TensorTrait, - impl TNumber: NumberTrait, - impl TInto: TryInto, - impl TPartialEq: PartialEq, - impl TAdd: Add, - impl TCopy: Copy, - impl TDrop: Drop, + impl FFixed: FixedTrait, + impl FTensorTrait: TensorTrait, + impl FNumber: NumberTrait, + impl U32TryIntoMAG: TryInto, + impl FPartialEq: PartialEq, + impl FAdd: Add, + impl FCopy: Copy, + impl FDrop: Drop, >( self: @Tensor, depth: usize, axis: Option, mut values: Span, ) -> Tensor { @@ -137,142 +139,9 @@ fn onehot_from_int< let mut second = *values.pop_front().unwrap(); let mut data = ArrayTrait::new(); - data.append(NumberTrait::new(first.try_into().unwrap(), false)); - data.append(NumberTrait::new(second.try_into().unwrap(), false)); - - let values = TensorTrait::new(sizes.span(), data.span()); - onehot_encode_from_int(self, depth, axis, values) -} - -/// Cf: TensorTrait::onehot docstring -fn onehot_encode_from_fp< - F, - MAG, - impl FFixed: FixedTrait, - impl FTensorTrait: TensorTrait, - impl FNumber: NumberTrait, - impl U32TryIntoMAG: TryInto, - impl FPartialEq: PartialEq, - impl FAdd: Add, - impl FCopy: Copy, - impl FDrop: Drop, ->( - self: @Tensor, depth: usize, axis: Option, values: Tensor -) -> Tensor { - let data = *self.data; - let shape = *self.shape; - let rank = shape.len(); - - // using 999 to denote -1, innermost dimension - let axis = match axis { - Option::Some(val) => val, - Option::None(_) => 999 - }; - - assert(((axis == 999) | (axis.into() <= rank)), 'axis out of dimensions'); - - let tensor_len: usize = data.len(); - - let mut output_data = ArrayTrait::new(); - let mut output_size = ArrayTrait::::new(); - - // New shape for output data - let mut index: usize = 0; - loop { - if index == shape.len() { - break (); - }; - let size: usize = *shape.at(index); - output_size.append(size); - index += 1; - }; - output_size.append(depth.into()); - - // OneHot enocde loop - let mut outer_index: usize = 0; - loop { - if outer_index == tensor_len { - break (); - }; - - let mut inner_index = 0; - let mut fixed_number = *(*self.data).at(outer_index); - - if fixed_number.is_neg() { - fixed_number = FixedTrait::::new_unscaled(depth.try_into().unwrap(), false) - + fixed_number - } - - loop { - if inner_index == depth { - break (); - }; - let ind = FixedTrait::::new_unscaled(inner_index.try_into().unwrap(), false); - - if fixed_number == ind { - output_data.append(*values.data.at(1)); - } else { - output_data.append(*values.data.at(0)); - }; - - inner_index += 1; - }; - - outer_index += 1; - }; - - let mut output_tensor = TensorTrait::new(output_size.span(), output_data.span()); - let mut tranpose_axes = ArrayTrait::new(); - // Get New shape is axis is not last dimension - if (axis != 999) & (axis.into() != rank) { - let mut index: usize = 0; - loop { - let max_dim = output_size.len() - 1; - if index.into() == max_dim { - break (); - }; - - if axis == index { - tranpose_axes.append(max_dim.into()) - } - tranpose_axes.append(index.into()); - index += 1; - }; - - let mut index: usize = 0; - - output_tensor = output_tensor.transpose(tranpose_axes.span()); - } - - return output_tensor; -} - -fn onehot_from_fp< - F, - MAG, - impl FFixed: FixedTrait, - impl FTensorTrait: TensorTrait, - impl FNumber: NumberTrait, - impl U32TryIntoMAG: TryInto, - impl FPartialEq: PartialEq, - impl FAdd: Add, - impl FCopy: Copy, - impl FDrop: Drop, ->( - self: @Tensor, depth: usize, axis: Option, mut values: Span, -) -> Tensor { - assert(values.len() == 2, 'Wrong values dimensions'); - - let mut sizes = ArrayTrait::new(); - sizes.append(2); - - let mut first = *values.pop_front().unwrap(); - let mut second = *values.pop_front().unwrap(); - - let mut data = ArrayTrait::new(); - data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); - data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); + data.append(FixedTrait::::new_unscaled(first.try_into().unwrap(), false)); + data.append(FixedTrait::::new_unscaled(second.try_into().unwrap(), false)); let values = TensorTrait::new(sizes.span(), data.span()); - onehot_encode_from_fp(self, depth, axis, values) + onehot_encode(self, depth, axis, values) } diff --git a/src/operators/tensor/math/or.cairo b/src/operators/tensor/math/or.cairo index 1cb4bdf8d..95f3f9fab 100644 --- a/src/operators/tensor/math/or.cairo +++ b/src/operators/tensor/math/or.cairo @@ -3,56 +3,45 @@ use option::OptionTrait; use array::SpanTrait; use orion::numbers::NumberTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::or docstring fn or< T, - F, MAG, impl TNumber: NumberTrait, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) + if NumberTrait::or(*(*y.data)[indices_self], *(*z.data)[indices_other]) { + result.append(1); } else { - (bigger_current_index, smaller_current_index) - }; - - if NumberTrait::or(y_value, z_value) { - data_result.append(1); - } else { - data_result.append(0); + result.append(0); } - smaller_index = (1 + smaller_index) % smaller_data.len(); + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/math/reduce_sum.cairo b/src/operators/tensor/math/reduce_sum.cairo index ee4e9af9a..fb27c9c26 100644 --- a/src/operators/tensor/math/reduce_sum.cairo +++ b/src/operators/tensor/math/reduce_sum.cairo @@ -10,9 +10,8 @@ use orion::operators::tensor::helpers::{reduce_output_shape, len_from_shape, com /// Cf: TensorTrait::reduce_sum docstring fn reduce_sum< T, - F, MAG, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TNumber: NumberTrait, impl TAddEq: AddEq, impl TCopy: Copy, diff --git a/src/operators/tensor/math/sin.cairo b/src/operators/tensor/math/sin.cairo index 4f28285fd..fb8212a77 100644 --- a/src/operators/tensor/math/sin.cairo +++ b/src/operators/tensor/math/sin.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::sin docstring -fn sin_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sin() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::sin docstring -fn sin_from_fp< - F, +fn sin< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/sinh.cairo b/src/operators/tensor/math/sinh.cairo index 719dd2a29..f728bf966 100644 --- a/src/operators/tensor/math/sinh.cairo +++ b/src/operators/tensor/math/sinh.cairo @@ -7,55 +7,18 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -/// Cf: TensorTrait::sinh docstring -fn sinh_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sinh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} /// Cf: TensorTrait::sinh docstring -fn sinh_from_fp< - F, +fn sinh< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/sqrt.cairo b/src/operators/tensor/math/sqrt.cairo index b67bab792..39cae98a4 100644 --- a/src/operators/tensor/math/sqrt.cairo +++ b/src/operators/tensor/math/sqrt.cairo @@ -7,53 +7,17 @@ use orion::numbers::NumberTrait; use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{Tensor, TensorTrait}; -fn sqrt_from_int< - T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .sqrt() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -fn sqrt_from_fp< - F, +fn sqrt< + T, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/tanh.cairo b/src/operators/tensor/math/tanh.cairo index 36fb7f385..cb12690c5 100644 --- a/src/operators/tensor/math/tanh.cairo +++ b/src/operators/tensor/math/tanh.cairo @@ -9,54 +9,16 @@ use orion::operators::tensor::core::{Tensor, TensorTrait}; /// Cf: TensorTrait::tanh docstring -fn tanh_from_int< +fn tanh< T, - F, - INTMAG, - FPMAG, - impl TNumber: NumberTrait, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl MAGInto: Into, - impl TCopy: Copy, - impl TDrop: Drop, - impl FDrop: Drop, - impl FPMAGDrop: Drop ->( - mut self: Tensor -) -> Tensor { - let mut result = ArrayTrait::new(); - - loop { - match self.data.pop_front() { - Option::Some(item) => { - result - .append( - FixedTrait::::new_unscaled(((*item).mag()).into(), (*item).is_neg()) - .tanh() - ); - }, - Option::None(_) => { - break; - } - }; - }; - - return TensorTrait::new(self.shape, result.span()); -} - -/// Cf: TensorTrait::tanh docstring -fn tanh_from_fp< - F, MAG, - impl FFixedTrait: FixedTrait, - impl FTensor: TensorTrait, - impl FCopy: Copy, - impl FDrop: Drop, + impl FFixedTrait: FixedTrait, + impl FTensor: TensorTrait, + impl FCopy: Copy, + impl FDrop: Drop, >( - mut self: Tensor -) -> Tensor { + mut self: Tensor +) -> Tensor { let mut result = ArrayTrait::new(); loop { diff --git a/src/operators/tensor/math/xor.cairo b/src/operators/tensor/math/xor.cairo index 3c7b5999b..690a768d7 100644 --- a/src/operators/tensor/math/xor.cairo +++ b/src/operators/tensor/math/xor.cairo @@ -3,55 +3,45 @@ use option::OptionTrait; use array::SpanTrait; use orion::numbers::NumberTrait; -use orion::operators::tensor::core::{Tensor, TensorTrait}; -use orion::operators::tensor::helpers::check_compatibility; +use orion::operators::tensor::core::{Tensor, TensorTrait, unravel_index}; +use orion::operators::tensor::helpers::{ + broadcast_shape, broadcast_index_mapping, len_from_shape, check_compatibility +}; /// Cf: TensorTrait::xor docstring fn xor< T, - F, MAG, impl TNumber: NumberTrait, - impl UsizeFTensor: TensorTrait, + impl UsizeFTensor: TensorTrait, impl TCopy: Copy, impl TDrop: Drop >( y: @Tensor, z: @Tensor ) -> Tensor { - check_compatibility(*y.shape, *z.shape); + let broadcasted_shape = broadcast_shape(*y.shape, *z.shape); + let mut result: Array = ArrayTrait::new(); - let mut data_result = ArrayTrait::::new(); - let (mut smaller, mut bigger, retains_input_order) = if (*y.data).len() < (*z.data).len() { - (y, z, true) - } else { - (z, y, false) - }; - - let mut bigger_data = *bigger.data; - let mut smaller_data = *smaller.data; - let mut smaller_index = 0; + let num_elements = len_from_shape(broadcasted_shape); + let mut n: usize = 0; loop { - if bigger_data.len() == 0 { - break (); - }; - - let bigger_current_index = *bigger_data.pop_front().unwrap(); - let smaller_current_index = *smaller_data[smaller_index]; + let indices_broadcasted = unravel_index(n, broadcasted_shape); - let (y_value, z_value) = if retains_input_order { - (smaller_current_index, bigger_current_index) - } else { - (bigger_current_index, smaller_current_index) - }; + let indices_self = broadcast_index_mapping(*y.shape, indices_broadcasted); + let indices_other = broadcast_index_mapping(*z.shape, indices_broadcasted); - if NumberTrait::xor(y_value, z_value) { - data_result.append(1); + if NumberTrait::xor(*(*y.data)[indices_self], *(*z.data)[indices_other]) { + result.append(1); } else { - data_result.append(0); + result.append(0); } - smaller_index = (1 + smaller_index) % smaller_data.len(); + + n += 1; + if n == num_elements { + break (); + }; }; - return TensorTrait::::new(*bigger.shape, data_result.span()); + return TensorTrait::new(broadcasted_shape, result.span()); } diff --git a/src/operators/tensor/quantization/dequantize_linear.cairo b/src/operators/tensor/quantization/dequantize_linear.cairo index dc558ae6d..1ca4bf8d5 100644 --- a/src/operators/tensor/quantization/dequantize_linear.cairo +++ b/src/operators/tensor/quantization/dequantize_linear.cairo @@ -11,8 +11,7 @@ use orion::utils::saturate; fn dequantize_linear< Q, T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl QIntoT: Into, impl TSub: Sub, impl TMul: Mul, @@ -38,8 +37,7 @@ fn dequantize_linear< fn dequantize_per_axis< T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl TTensorSub: Sub>, impl TTensorMul: Mul>, impl TCopy: Copy, @@ -55,8 +53,7 @@ fn dequantize_per_axis< fn dequantize_element_wise< Q, T, - F, - impl TTensor: TensorTrait, + impl TTensor: TensorTrait, impl QIntoT: Into, impl TSub: Sub, impl TMul: Mul, diff --git a/src/operators/tensor/quantization/quantize_linear.cairo b/src/operators/tensor/quantization/quantize_linear.cairo index a91b405db..4c68edfe4 100644 --- a/src/operators/tensor/quantization/quantize_linear.cairo +++ b/src/operators/tensor/quantization/quantize_linear.cairo @@ -12,10 +12,9 @@ use orion::utils::saturate; /// Cf: TensorTrait::quantize_linear docstring fn quantize_linear< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TDiv: Div, impl TTensorDiv: Div>, @@ -40,10 +39,9 @@ fn quantize_linear< fn quantize_per_axis< T, - F, Q, - impl TTensor: TensorTrait, - impl QTensor: TensorTrait, + impl TTensor: TensorTrait, + impl QTensor: TensorTrait, impl TAdd: Add, impl TTensorDiv: Div>, impl TPartialOrd: PartialOrd, @@ -59,7 +57,6 @@ fn quantize_per_axis< fn quantize_element_wise< T, - F, Q, impl TCopy: Copy, impl TDrop: Drop, @@ -69,7 +66,7 @@ fn quantize_element_wise< impl TDiv: Div, impl TAdd: Add, impl TTryIntoQ: TryInto, - impl QTensor: TensorTrait + impl QTensor: TensorTrait >( mut x: Tensor::, y_scale: T, y_zero_point: T, min: T, max: T ) -> Tensor:: { diff --git a/src/tests.cairo b/src/tests.cairo index 8463adb0a..ca676bffd 100644 --- a/src/tests.cairo +++ b/src/tests.cairo @@ -3,3 +3,4 @@ mod performance; mod tensor_core; mod nodes; mod helpers; + diff --git a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo index 92658c5d0..8ec365032 100644 --- a/src/tests/helpers/tensor/fixed_point/fp16x16.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp16x16.cairo @@ -2,8 +2,8 @@ use array::ArrayTrait; use array::SpanTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo index 0d60fa651..57f4475b7 100644 --- a/src/tests/helpers/tensor/fixed_point/fp8x23.cairo +++ b/src/tests/helpers/tensor/fixed_point/fp8x23.cairo @@ -2,8 +2,8 @@ use array::ArrayTrait; use array::SpanTrait; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn fp_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/i32.cairo b/src/tests/helpers/tensor/i32.cairo index 28e51857c..5de4889ff 100644 --- a/src/tests/helpers/tensor/i32.cairo +++ b/src/tests/helpers/tensor/i32.cairo @@ -3,8 +3,8 @@ use array::SpanTrait; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn i32_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/helpers/tensor/i8.cairo b/src/tests/helpers/tensor/i8.cairo index 14693ae94..27274dcc4 100644 --- a/src/tests/helpers/tensor/i8.cairo +++ b/src/tests/helpers/tensor/i8.cairo @@ -2,10 +2,9 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; // 1D @@ -16,7 +15,7 @@ fn i8_tensor_1x3_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -28,7 +27,7 @@ fn i8_tensor_1x3_neg_helper() -> Tensor { data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - + let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; } @@ -45,7 +44,6 @@ fn i8_tensor_2x2_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: false }); - let tensor = TensorTrait::new(sizes.span(), data.span()); @@ -62,7 +60,6 @@ fn i8_tensor_2x2_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - let tensor = TensorTrait::new(sizes.span(), data.span()); @@ -85,8 +82,6 @@ fn i8_tensor_3x3_helper() -> Tensor { data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 8, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -108,8 +103,6 @@ fn i8_tensor_3x3_neg_helper() -> Tensor { data.append(i8 { mag: 7, sign: true }); data.append(i8 { mag: 8, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -128,8 +121,6 @@ fn i8_tensor_3x2_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -148,8 +139,6 @@ fn i8_tensor_3x2_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -165,8 +154,6 @@ fn i8_tensor_3x1_helper() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -182,8 +169,6 @@ fn i8_tensor_3x1_neg_helper() -> Tensor { data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -202,8 +187,6 @@ fn i8_tensor_2x3_helper() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -222,8 +205,6 @@ fn i8_tensor_2x3_neg_helper() -> Tensor { data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 5, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -247,8 +228,6 @@ fn i8_tensor_2x2x2_helper() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 7, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -270,8 +249,6 @@ fn i8_tensor_2x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 7, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -297,8 +274,6 @@ fn i8_tensor_3x2x2_helper() -> Tensor { data.append(i8 { mag: 10, sign: false }); data.append(i8 { mag: 11, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -324,8 +299,6 @@ fn i8_tensor_3x2x2_neg_helper() -> Tensor { data.append(i8 { mag: 10, sign: true }); data.append(i8 { mag: 11, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -366,8 +339,6 @@ fn i8_tensor_3x3x3_helper() -> Tensor { data.append(i8 { mag: 25, sign: false }); data.append(i8 { mag: 26, sign: false }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; @@ -408,8 +379,6 @@ fn i8_tensor_3x3x3_neg_helper() -> Tensor { data.append(i8 { mag: 25, sign: true }); data.append(i8 { mag: 26, sign: true }); - - let tensor = TensorTrait::new(sizes.span(), data.span()); return tensor; diff --git a/src/tests/helpers/tensor/u32.cairo b/src/tests/helpers/tensor/u32.cairo index bcdd70f71..4395faffc 100644 --- a/src/tests/helpers/tensor/u32.cairo +++ b/src/tests/helpers/tensor/u32.cairo @@ -1,7 +1,7 @@ use array::ArrayTrait; use array::SpanTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; // 1D fn u32_tensor_1x3_helper() -> Tensor { diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 27e9d74e7..61da084a1 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -1,219 +1,198 @@ -mod abs_fp16x16; -mod abs_fp8x23; -mod abs_i32; -mod abs_i8; -mod acos_fp8x23; -mod acos_fp16x16; -mod argmax_fp16x16_1D_default; -mod argmax_fp16x16_1D_keepdims_false; -mod argmax_fp16x16_1D_last_index; -mod argmax_fp16x16_2D_default; -mod argmax_fp16x16_2D_keepdims_false; -mod argmax_fp16x16_2D_last_index; -mod argmax_fp16x16_3D_default; -mod argmax_fp16x16_3D_keepdims_false; -mod argmax_fp16x16_3D_last_index; -mod argmax_fp8x23_1D_default; -mod argmax_fp8x23_1D_keepdims_false; -mod argmax_fp8x23_1D_last_index; -mod argmax_fp8x23_2D_default; -mod argmax_fp8x23_2D_keepdims_false; -mod argmax_fp8x23_2D_last_index; -mod argmax_fp8x23_3D_default; -mod argmax_fp8x23_3D_keepdims_false; -mod argmax_fp8x23_3D_last_index; -mod argmax_i32_1D_default; -mod argmax_i32_1D_keepdims_false; -mod argmax_i32_1D_last_index; -mod argmax_i32_2D_default; -mod argmax_i32_2D_keepdims_false; -mod argmax_i32_2D_last_index; -mod argmax_i32_3D_default; -mod argmax_i32_3D_keepdims_false; -mod argmax_i32_3D_last_index; -mod argmax_i8_1D_default; -mod argmax_i8_1D_keepdims_false; -mod argmax_i8_1D_last_index; -mod argmax_i8_2D_default; -mod argmax_i8_2D_keepdims_false; -mod argmax_i8_2D_last_index; -mod argmax_i8_3D_default; -mod argmax_i8_3D_keepdims_false; -mod argmax_i8_3D_last_index; -mod argmax_u32_1D_default; -mod argmax_u32_1D_keepdims_false; -mod argmax_u32_1D_last_index; -mod argmax_u32_2D_default; -mod argmax_u32_2D_keepdims_false; -mod argmax_u32_2D_last_index; -mod argmax_u32_3D_default; -mod argmax_u32_3D_keepdims_false; -mod argmax_u32_3D_last_index; -mod argmin_fp16x16_1D_default; -mod argmin_fp16x16_1D_keepdims_false; -mod argmin_fp16x16_1D_last_index; -mod argmin_fp16x16_2D_default; -mod argmin_fp16x16_2D_keepdims_false; -mod argmin_fp16x16_2D_last_index; -mod argmin_fp16x16_3D_default; -mod argmin_fp16x16_3D_keepdims_false; -mod argmin_fp16x16_3D_last_index; -mod argmin_fp8x23_1D_default; -mod argmin_fp8x23_1D_keepdims_false; -mod argmin_fp8x23_1D_last_index; -mod argmin_fp8x23_2D_default; -mod argmin_fp8x23_2D_keepdims_false; -mod argmin_fp8x23_2D_last_index; -mod argmin_fp8x23_3D_default; -mod argmin_fp8x23_3D_keepdims_false; -mod argmin_fp8x23_3D_last_index; -mod argmin_i32_1D_default; -mod argmin_i32_1D_keepdims_false; -mod argmin_i32_1D_last_index; -mod argmin_i32_2D_default; -mod argmin_i32_2D_keepdims_false; -mod argmin_i32_2D_last_index; -mod argmin_i32_3D_default; -mod argmin_i32_3D_keepdims_false; -mod argmin_i32_3D_last_index; -mod argmin_i8_1D_default; -mod argmin_i8_1D_keepdims_false; -mod argmin_i8_1D_last_index; -mod argmin_i8_2D_default; -mod argmin_i8_2D_keepdims_false; -mod argmin_i8_2D_last_index; -mod argmin_i8_3D_default; -mod argmin_i8_3D_keepdims_false; -mod argmin_i8_3D_last_index; -mod argmin_u32_1D_default; -mod argmin_u32_1D_keepdims_false; -mod argmin_u32_1D_last_index; -mod argmin_u32_2D_default; -mod argmin_u32_2D_keepdims_false; -mod argmin_u32_2D_last_index; -mod argmin_u32_3D_default; -mod argmin_u32_3D_keepdims_false; -mod argmin_u32_3D_last_index; -mod transpose_fp16x16_2d; -mod transpose_fp16x16_3d; -mod transpose_fp8x23_2d; -mod transpose_fp8x23_3d; -mod transpose_i32_2d; -mod transpose_i32_3d; -mod transpose_i8_2d; -mod transpose_i8_3d; -mod transpose_u32_2d; -mod transpose_u32_3d; -mod asin_fp16x16; -mod asin_fp8x23; -mod atan_fp16x16; -mod atan_fp8x23; -mod atan_i32_fp8x23; -mod atan_i32_fp16x16; -mod atan_i8_fp8x23; -mod atan_i8_fp16x16; -mod atan_u32_fp8x23; -mod atan_u32_fp16x16; -mod ceil_fp16x16; -mod ceil_fp8x23; -mod cos_fp16x16; -mod cos_fp8x23; -mod cos_i32_fp8x23; -mod cos_i32_fp16x16; -mod cos_i8_fp8x23; -mod cos_i8_fp16x16; -mod cos_u32_fp8x23; -mod cos_u32_fp16x16; -mod cumsum_fp16x16_1d_default; -mod cumsum_fp16x16_1d_exclusive; -mod cumsum_fp16x16_1d_reverse; -mod cumsum_fp16x16_1d_reverse_exclusive; -mod cumsum_fp16x16_2d_axis_0; -mod cumsum_fp16x16_2d_axis_1; -mod cumsum_fp8x23_1d_default; -mod cumsum_fp8x23_1d_exclusive; -mod cumsum_fp8x23_1d_reverse; -mod cumsum_fp8x23_1d_reverse_exclusive; -mod cumsum_fp8x23_2d_axis_0; -mod cumsum_fp8x23_2d_axis_1; -mod cumsum_i32_1d_default; -mod cumsum_i32_1d_exclusive; -mod cumsum_i32_1d_reverse; -mod cumsum_i32_1d_reverse_exclusive; -mod cumsum_i32_2d_axis_0; -mod cumsum_i32_2d_axis_1; -mod cumsum_i8_1d_default; -mod cumsum_i8_1d_exclusive; -mod cumsum_i8_1d_reverse; -mod cumsum_i8_1d_reverse_exclusive; -mod cumsum_i8_2d_axis_0; -mod cumsum_i8_2d_axis_1; -mod cumsum_u32_1d_default; -mod cumsum_u32_1d_exclusive; -mod cumsum_u32_1d_reverse; -mod cumsum_u32_1d_reverse_exclusive; -mod cumsum_u32_2d_axis_0; -mod cumsum_u32_2d_axis_1; -mod cosh_fp16x16; -mod cosh_fp8x23; -mod cosh_i32_fp8x23; -mod cosh_i32_fp16x16; -mod cosh_i8_fp8x23; -mod cosh_i8_fp16x16; -mod cosh_u32_fp8x23; -mod cosh_u32_fp16x16; -mod sinh_fp16x16; -mod sinh_fp8x23; -mod sinh_i32_fp8x23; -mod sinh_i32_fp16x16; -mod sinh_i8_fp8x23; -mod sinh_i8_fp16x16; -mod sinh_u32_fp8x23; -mod sinh_u32_fp16x16; -mod tanh_fp16x16; -mod tanh_fp8x23; -mod tanh_i32_fp8x23; -mod tanh_i32_fp16x16; -mod tanh_i8_fp8x23; -mod tanh_i8_fp16x16; -mod tanh_u32_fp8x23; -mod tanh_u32_fp16x16; -mod log_fp16x16; -mod log_fp8x23; -mod log_i32_fp8x23; -mod log_i32_fp16x16; -mod log_i8_fp8x23; -mod log_i8_fp16x16; -mod log_u32_fp8x23; -mod log_u32_fp16x16; -mod reduce_sum_fp16x16_1D; -mod reduce_sum_fp16x16_2D_default; -mod reduce_sum_fp16x16_2D_keepdims; -mod reduce_sum_fp16x16_2D_axis_1; -mod reduce_sum_fp8x23_1D; -mod reduce_sum_fp8x23_2D_default; -mod reduce_sum_fp8x23_2D_keepdims; -mod reduce_sum_fp8x23_2D_axis_1; -mod reduce_sum_i32_1D; -mod reduce_sum_i32_2D_default; -mod reduce_sum_i32_2D_keepdims; -mod reduce_sum_i32_2D_axis_1; -mod reduce_sum_i8_1D; -mod reduce_sum_i8_2D_default; -mod reduce_sum_i8_2D_keepdims; -mod reduce_sum_i8_2D_axis_1; -mod reduce_sum_u32_1D; -mod reduce_sum_u32_2D_default; -mod reduce_sum_u32_2D_keepdims; -mod reduce_sum_u32_2D_axis_1; -mod exp_fp16x16; -mod exp_fp8x23; -mod exp_i32_fp8x23; -mod exp_i32_fp16x16; -mod exp_i8_fp8x23; -mod exp_i8_fp16x16; -mod exp_u32_fp8x23; -mod exp_u32_fp16x16; +mod abs_fp16x16; +mod abs_fp8x23; +mod abs_i32; +mod abs_i8; +mod acos_fp16x16; +mod acos_fp8x23; +mod acosh_fp16x16; +mod acosh_fp8x23; +mod add_fp16x16; +mod add_fp16x16_broadcast; +mod add_fp8x23; +mod add_fp8x23_broadcast; +mod add_i32; +mod add_i32_broadcast; +mod add_i8; +mod add_i8_broadcast; +mod add_u32; +mod add_u32_broadcast; +mod argmax_fp16x16_1D_default; +mod argmax_fp16x16_1D_keepdims_false; +mod argmax_fp16x16_1D_last_index; +mod argmax_fp16x16_2D_default; +mod argmax_fp16x16_2D_keepdims_false; +mod argmax_fp16x16_2D_last_index; +mod argmax_fp16x16_3D_default; +mod argmax_fp16x16_3D_keepdims_false; +mod argmax_fp16x16_3D_last_index; +mod argmax_fp8x23_1D_default; +mod argmax_fp8x23_1D_keepdims_false; +mod argmax_fp8x23_1D_last_index; +mod argmax_fp8x23_2D_default; +mod argmax_fp8x23_2D_keepdims_false; +mod argmax_fp8x23_2D_last_index; +mod argmax_fp8x23_3D_default; +mod argmax_fp8x23_3D_keepdims_false; +mod argmax_fp8x23_3D_last_index; +mod argmax_i32_1D_default; +mod argmax_i32_1D_keepdims_false; +mod argmax_i32_1D_last_index; +mod argmax_i32_2D_default; +mod argmax_i32_2D_keepdims_false; +mod argmax_i32_2D_last_index; +mod argmax_i32_3D_default; +mod argmax_i32_3D_keepdims_false; +mod argmax_i32_3D_last_index; +mod argmax_i8_1D_default; +mod argmax_i8_1D_keepdims_false; +mod argmax_i8_1D_last_index; +mod argmax_i8_2D_default; +mod argmax_i8_2D_keepdims_false; +mod argmax_i8_2D_last_index; +mod argmax_i8_3D_default; +mod argmax_i8_3D_keepdims_false; +mod argmax_i8_3D_last_index; +mod argmax_u32_1D_default; +mod argmax_u32_1D_keepdims_false; +mod argmax_u32_1D_last_index; +mod argmax_u32_2D_default; +mod argmax_u32_2D_keepdims_false; +mod argmax_u32_2D_last_index; +mod argmax_u32_3D_default; +mod argmax_u32_3D_keepdims_false; +mod argmax_u32_3D_last_index; +mod argmin_fp16x16_1D_default; +mod argmin_fp16x16_1D_keepdims_false; +mod argmin_fp16x16_1D_last_index; +mod argmin_fp16x16_2D_default; +mod argmin_fp16x16_2D_keepdims_false; +mod argmin_fp16x16_2D_last_index; +mod argmin_fp16x16_3D_default; +mod argmin_fp16x16_3D_keepdims_false; +mod argmin_fp16x16_3D_last_index; +mod argmin_fp8x23_1D_default; +mod argmin_fp8x23_1D_keepdims_false; +mod argmin_fp8x23_1D_last_index; +mod argmin_fp8x23_2D_default; +mod argmin_fp8x23_2D_keepdims_false; +mod argmin_fp8x23_2D_last_index; +mod argmin_fp8x23_3D_default; +mod argmin_fp8x23_3D_keepdims_false; +mod argmin_fp8x23_3D_last_index; +mod argmin_i32_1D_default; +mod argmin_i32_1D_keepdims_false; +mod argmin_i32_1D_last_index; +mod argmin_i32_2D_default; +mod argmin_i32_2D_keepdims_false; +mod argmin_i32_2D_last_index; +mod argmin_i32_3D_default; +mod argmin_i32_3D_keepdims_false; +mod argmin_i32_3D_last_index; +mod argmin_i8_1D_default; +mod argmin_i8_1D_keepdims_false; +mod argmin_i8_1D_last_index; +mod argmin_i8_2D_default; +mod argmin_i8_2D_keepdims_false; +mod argmin_i8_2D_last_index; +mod argmin_i8_3D_default; +mod argmin_i8_3D_keepdims_false; +mod argmin_i8_3D_last_index; +mod argmin_u32_1D_default; +mod argmin_u32_1D_keepdims_false; +mod argmin_u32_1D_last_index; +mod argmin_u32_2D_default; +mod argmin_u32_2D_keepdims_false; +mod argmin_u32_2D_last_index; +mod argmin_u32_3D_default; +mod argmin_u32_3D_keepdims_false; +mod argmin_u32_3D_last_index; +mod asin_fp16x16; +mod asin_fp8x23; +mod asinh_fp16x16; +mod asinh_fp8x23; +mod atan_fp16x16; +mod atan_fp8x23; +mod ceil_fp16x16; +mod ceil_fp8x23; +mod concat_fp16x16_1d; +mod concat_fp16x16_2d; +mod concat_fp16x16_3d_default; +mod concat_fp16x16_3d_axis_1; +mod concat_fp16x16_3d_axis_2; +mod concat_fp16x16_3d_three_tensors_axis_1; +mod concat_fp16x16_3d_three_tensors_axis_2; +mod concat_fp8x23_1d; +mod concat_fp8x23_2d; +mod concat_fp8x23_3d_default; +mod concat_fp8x23_3d_axis_1; +mod concat_fp8x23_3d_axis_2; +mod concat_fp8x23_3d_three_tensors_axis_1; +mod concat_fp8x23_3d_three_tensors_axis_2; +mod concat_i32_1d; +mod concat_i32_2d; +mod concat_i32_3d_default; +mod concat_i32_3d_axis_1; +mod concat_i32_3d_axis_2; +mod concat_i32_3d_three_tensors_axis_1; +mod concat_i32_3d_three_tensors_axis_2; +mod concat_i8_1d; +mod concat_i8_2d; +mod concat_i8_3d_default; +mod concat_i8_3d_axis_1; +mod concat_i8_3d_axis_2; +mod concat_i8_3d_three_tensors_axis_1; +mod concat_i8_3d_three_tensors_axis_2; +mod concat_u32_1d; +mod concat_u32_2d; +mod concat_u32_3d_default; +mod concat_u32_3d_axis_1; +mod concat_u32_3d_axis_2; +mod concat_u32_3d_three_tensors_axis_1; +mod concat_u32_3d_three_tensors_axis_2; +mod cos_fp16x16; +mod cos_fp8x23; +mod cosh_fp16x16; +mod cosh_fp8x23; +mod cumsum_fp16x16_1d_default; +mod cumsum_fp16x16_1d_exclusive; +mod cumsum_fp16x16_1d_reverse; +mod cumsum_fp16x16_1d_reverse_exclusive; +mod cumsum_fp16x16_2d_axis_0; +mod cumsum_fp16x16_2d_axis_1; +mod cumsum_fp8x23_1d_default; +mod cumsum_fp8x23_1d_exclusive; +mod cumsum_fp8x23_1d_reverse; +mod cumsum_fp8x23_1d_reverse_exclusive; +mod cumsum_fp8x23_2d_axis_0; +mod cumsum_fp8x23_2d_axis_1; +mod cumsum_i32_1d_default; +mod cumsum_i32_1d_exclusive; +mod cumsum_i32_1d_reverse; +mod cumsum_i32_1d_reverse_exclusive; +mod cumsum_i32_2d_axis_0; +mod cumsum_i32_2d_axis_1; +mod cumsum_i8_1d_default; +mod cumsum_i8_1d_exclusive; +mod cumsum_i8_1d_reverse; +mod cumsum_i8_1d_reverse_exclusive; +mod cumsum_i8_2d_axis_0; +mod cumsum_i8_2d_axis_1; +mod cumsum_u32_1d_default; +mod cumsum_u32_1d_exclusive; +mod cumsum_u32_1d_reverse; +mod cumsum_u32_1d_reverse_exclusive; +mod cumsum_u32_2d_axis_0; +mod cumsum_u32_2d_axis_1; +mod div_fp16x16; +mod div_fp16x16_broadcast; +mod div_fp8x23; +mod div_fp8x23_broadcast; +mod div_i32; +mod div_i32_broadcast; +mod div_i8; +mod div_i8_broadcast; +mod div_u32; +mod div_u32_broadcast; mod equal_fp16x16; mod equal_fp16x16_broadcast; mod equal_fp8x23; @@ -224,16 +203,8 @@ mod equal_i8; mod equal_i8_broadcast; mod equal_u32; mod equal_u32_broadcast; -mod greater_fp16x16; -mod greater_fp16x16_broadcast; -mod greater_fp8x23; -mod greater_fp8x23_broadcast; -mod greater_i32; -mod greater_i32_broadcast; -mod greater_i8; -mod greater_i8_broadcast; -mod greater_u32; -mod greater_u32_broadcast; +mod exp_fp16x16; +mod exp_fp8x23; mod less_equal_fp16x16; mod less_equal_fp16x16_broadcast; mod less_equal_fp8x23; @@ -244,34 +215,29 @@ mod less_equal_i8; mod less_equal_i8_broadcast; mod less_equal_u32; mod less_equal_u32_broadcast; -mod sqrt_fp16x16; -mod sqrt_fp8x23; -mod sqrt_i32_fp8x23; -mod sqrt_i32_fp16x16; -mod sqrt_i8_fp8x23; -mod sqrt_i8_fp16x16; -mod sqrt_u32_fp8x23; -mod sqrt_u32_fp16x16; -mod or_fp16x16; -mod or_fp16x16_broadcast; -mod or_fp8x23; -mod or_fp8x23_broadcast; -mod or_i32; -mod or_i32_broadcast; -mod or_i8; -mod or_i8_broadcast; -mod or_u32; -mod or_u32_broadcast; -mod xor_fp16x16; -mod xor_fp16x16_broadcast; -mod xor_fp8x23; -mod xor_fp8x23_broadcast; -mod xor_i32; -mod xor_i32_broadcast; -mod xor_i8; -mod xor_i8_broadcast; -mod xor_u32; -mod xor_u32_broadcast; +mod greater_fp16x16; +mod greater_fp16x16_broadcast; +mod greater_fp8x23; +mod greater_fp8x23_broadcast; +mod greater_i32; +mod greater_i32_broadcast; +mod greater_i8; +mod greater_i8_broadcast; +mod greater_u32; +mod greater_u32_broadcast; +mod leaky_relu_fp16x16; +mod leaky_relu_fp8x23; +mod linear_fp16x16; +mod linear_fp8x23; +mod linear_i32; +mod linear_i8; +mod linear_u32; +mod log_fp16x16; +mod log_fp8x23; +mod logsoftmax_fp16x16_axis_0; +mod logsoftmax_fp16x16_axis_1; +mod logsoftmax_fp8x23_axis_0; +mod logsoftmax_fp8x23_axis_1; mod matmul_fp16x16_1d; mod matmul_fp16x16_2x2; mod matmul_fp16x16_2x1; @@ -292,42 +258,6 @@ mod matmul_u32_1d; mod matmul_u32_2x2; mod matmul_u32_2x1; mod matmul_u32_1x2; -mod acosh_fp16x16; -mod acosh_fp8x23; -mod acosh_i32_fp8x23; -mod acosh_i32_fp16x16; -mod acosh_i8_fp8x23; -mod acosh_i8_fp16x16; -mod acosh_u32_fp8x23; -mod acosh_u32_fp16x16; -mod asinh_fp16x16; -mod asinh_fp8x23; -mod asinh_i32_fp8x23; -mod asinh_i32_fp16x16; -mod asinh_i8_fp8x23; -mod asinh_i8_fp16x16; -mod asinh_u32_fp8x23; -mod asinh_u32_fp16x16; -mod add_fp16x16; -mod add_fp16x16_broadcast; -mod add_fp8x23; -mod add_fp8x23_broadcast; -mod add_i32; -mod add_i32_broadcast; -mod add_i8; -mod add_i8_broadcast; -mod add_u32; -mod add_u32_broadcast; -mod sub_fp16x16; -mod sub_fp16x16_broadcast; -mod sub_fp8x23; -mod sub_fp8x23_broadcast; -mod sub_i32; -mod sub_i32_broadcast; -mod sub_i8; -mod sub_i8_broadcast; -mod sub_u32; -mod sub_u32_broadcast; mod mul_fp16x16; mod mul_fp16x16_broadcast; mod mul_fp8x23; @@ -338,112 +268,103 @@ mod mul_i8; mod mul_i8_broadcast; mod mul_u32; mod mul_u32_broadcast; -mod div_fp16x16; -mod div_fp16x16_broadcast; -mod div_fp8x23; -mod div_fp8x23_broadcast; -mod div_i32; -mod div_i32_broadcast; -mod div_i8; -mod div_i8_broadcast; -mod div_u32; -mod div_u32_broadcast; -mod leaky_relu_fp16x16; -mod leaky_relu_fp8x23; -mod leaky_relu_i32_fp8x23; -mod leaky_relu_i32_fp16x16; -mod leaky_relu_i8_fp8x23; -mod leaky_relu_i8_fp16x16; -mod linear_fp16x16; -mod linear_fp8x23; -mod linear_i32; -mod linear_i8; -mod linear_u32; -mod logsoftmax_fp16x16_axis_0; -mod logsoftmax_fp16x16_axis_1; -mod logsoftmax_fp8x23_axis_0; -mod logsoftmax_fp8x23_axis_1; -mod logsoftmax_i32_fp8x23_axis_0; -mod logsoftmax_i32_fp8x23_axis_1; -mod logsoftmax_i32_fp16x16_axis_0; -mod logsoftmax_i32_fp16x16_axis_1; -mod logsoftmax_i8_fp8x23_axis_0; -mod logsoftmax_i8_fp8x23_axis_1; -mod logsoftmax_i8_fp16x16_axis_0; -mod logsoftmax_i8_fp16x16_axis_1; -mod logsoftmax_u32_fp8x23_axis_0; -mod logsoftmax_u32_fp8x23_axis_1; -mod logsoftmax_u32_fp16x16_axis_0; -mod logsoftmax_u32_fp16x16_axis_1; +mod or_fp16x16; +mod or_fp16x16_broadcast; +mod or_fp8x23; +mod or_fp8x23_broadcast; +mod or_i32; +mod or_i32_broadcast; +mod or_i8; +mod or_i8_broadcast; +mod or_u32; +mod or_u32_broadcast; +mod reduce_sum_fp16x16_1D; +mod reduce_sum_fp16x16_2D_default; +mod reduce_sum_fp16x16_2D_keepdims; +mod reduce_sum_fp16x16_2D_axis_1; +mod reduce_sum_fp8x23_1D; +mod reduce_sum_fp8x23_2D_default; +mod reduce_sum_fp8x23_2D_keepdims; +mod reduce_sum_fp8x23_2D_axis_1; +mod reduce_sum_i32_1D; +mod reduce_sum_i32_2D_default; +mod reduce_sum_i32_2D_keepdims; +mod reduce_sum_i32_2D_axis_1; +mod reduce_sum_i8_1D; +mod reduce_sum_i8_2D_default; +mod reduce_sum_i8_2D_keepdims; +mod reduce_sum_i8_2D_axis_1; +mod reduce_sum_u32_1D; +mod reduce_sum_u32_2D_default; +mod reduce_sum_u32_2D_keepdims; +mod reduce_sum_u32_2D_axis_1; mod relu_fp16x16; mod relu_fp8x23; mod relu_i32; mod relu_i8; -mod sigmoid_fp8x23; mod sigmoid_fp16x16; -mod sigmoid_i32_fp8x23; -mod sigmoid_i32_fp16x16; -mod sigmoid_i8_fp8x23; -mod sigmoid_i8_fp16x16; -mod sigmoid_u32_fp8x23; -mod sigmoid_u32_fp16x16; -mod softmax_fp8x23; +mod sigmoid_fp8x23; +mod sin_fp16x16; +mod sin_fp8x23; +mod sinh_fp16x16; +mod sinh_fp8x23; mod softmax_fp16x16; -mod softmax_i32_fp8x23; -mod softmax_i32_fp16x16; -mod softmax_i8_fp8x23; -mod softmax_i8_fp16x16; -mod softmax_u32_fp8x23; -mod softmax_u32_fp16x16; +mod softmax_fp8x23; mod softplus_fp8x23; mod softplus_fp16x16; -mod softplus_i32_fp8x23; -mod softplus_i32_fp16x16; -mod softplus_i8_fp8x23; -mod softplus_i8_fp16x16; -mod softplus_u32_fp8x23; -mod softplus_u32_fp16x16; mod softsign_fp8x23; mod softsign_fp16x16; -mod softsign_i32_fp8x23; -mod softsign_i32_fp16x16; -mod softsign_i8_fp8x23; -mod softsign_i8_fp16x16; -mod softsign_u32_fp8x23; -mod softsign_u32_fp16x16; -mod sin_fp16x16; -mod sin_fp8x23; -mod sin_i32_fp8x23; -mod sin_i32_fp16x16; -mod sin_i8_fp8x23; -mod sin_i8_fp16x16; -mod sin_u32_fp8x23; -mod sin_u32_fp16x16; -mod concat_fp16x16_1d; -mod concat_fp16x16_2d; -mod concat_fp16x16_3d_default; -mod concat_fp16x16_3d_axis_1; -mod concat_fp16x16_3d_axis_2; -mod concat_fp16x16_3d_three_tensors_axis_1; -mod concat_fp16x16_3d_three_tensors_axis_2; -mod concat_fp8x23_1d; -mod concat_fp8x23_2d; -mod concat_fp8x23_3d_default; -mod concat_fp8x23_3d_axis_1; -mod concat_fp8x23_3d_axis_2; -mod concat_fp8x23_3d_three_tensors_axis_1; -mod concat_fp8x23_3d_three_tensors_axis_2; -mod concat_i32_1d; -mod concat_i32_2d; -mod concat_i32_3d_default; -mod concat_i32_3d_axis_1; -mod concat_i32_3d_axis_2; -mod concat_i32_3d_three_tensors_axis_1; -mod concat_i32_3d_three_tensors_axis_2; -mod concat_u32_1d; -mod concat_u32_2d; -mod concat_u32_3d_default; -mod concat_u32_3d_axis_1; -mod concat_u32_3d_axis_2; -mod concat_u32_3d_three_tensors_axis_1; -mod concat_u32_3d_three_tensors_axis_2; +mod sqrt_fp16x16; +mod sqrt_fp8x23; +mod sub_fp16x16; +mod sub_fp16x16_broadcast; +mod sub_fp8x23; +mod sub_fp8x23_broadcast; +mod sub_i32; +mod sub_i32_broadcast; +mod sub_i8; +mod sub_i8_broadcast; +mod sub_u32; +mod sub_u32_broadcast; +mod tanh_fp16x16; +mod tanh_fp8x23; +mod transpose_fp16x16_2d; +mod transpose_fp16x16_3d; +mod transpose_fp8x23_2d; +mod transpose_fp8x23_3d; +mod transpose_i32_2d; +mod transpose_i32_3d; +mod transpose_i8_2d; +mod transpose_i8_3d; +mod transpose_u32_2d; +mod transpose_u32_3d; +mod xor_fp16x16; +mod xor_fp16x16_broadcast; +mod xor_fp8x23; +mod xor_fp8x23_broadcast; +mod xor_i32; +mod xor_i32_broadcast; +mod xor_i8; +mod xor_i8_broadcast; +mod xor_u32; +mod xor_u32_broadcast; +mod less_fp16x16; +mod less_fp16x16_broadcast; +mod less_fp8x23; +mod less_fp8x23_broadcast; +mod less_i32; +mod less_i32_broadcast; +mod less_i8; +mod less_i8_broadcast; +mod less_u32; +mod less_u32_broadcast; +mod greater_equal_fp16x16; +mod greater_equal_fp16x16_broadcast; +mod greater_equal_fp8x23; +mod greater_equal_fp8x23_broadcast; +mod greater_equal_i32; +mod greater_equal_i32_broadcast; +mod greater_equal_i8; +mod greater_equal_i8_broadcast; +mod greater_equal_u32; +mod greater_equal_u32_broadcast; diff --git a/src/tests/nodes/abs_fp16x16.cairo b/src/tests/nodes/abs_fp16x16.cairo index 7a20b16d9..70d99c0bd 100644 --- a/src/tests/nodes/abs_fp16x16.cairo +++ b/src/tests/nodes/abs_fp16x16.cairo @@ -1,12 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +17,4 @@ fn test_abs_fp16x16() { let y = input_0.abs(); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp16x16/input_0.cairo b/src/tests/nodes/abs_fp16x16/input_0.cairo index 6a45ab1ef..b7b95b898 100644 --- a/src/tests/nodes/abs_fp16x16/input_0.cairo +++ b/src/tests/nodes/abs_fp16x16/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: true }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 7536640, sign: true }); - data.append(FP16x16 { mag: 7929856, sign: true }); - - + data.append(FP16x16 { mag: 8192000, sign: true }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: true }); TensorTrait::new(shape.span(), data.span()) -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp16x16/output_0.cairo b/src/tests/nodes/abs_fp16x16/output_0.cairo index f78d1b2ce..d48f57bdd 100644 --- a/src/tests/nodes/abs_fp16x16/output_0.cairo +++ b/src/tests/nodes/abs_fp16x16/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 7536640, sign: false }); - data.append(FP16x16 { mag: 7929856, sign: false }); - - + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); TensorTrait::new(shape.span(), data.span()) -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23.cairo b/src/tests/nodes/abs_fp8x23.cairo index 53987cac7..cd8851f74 100644 --- a/src/tests/nodes/abs_fp8x23.cairo +++ b/src/tests/nodes/abs_fp8x23.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_abs_fp8x23() { let y = input_0.abs(); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/input_0.cairo b/src/tests/nodes/abs_fp8x23/input_0.cairo index 9e7694db9..399e80f63 100644 --- a/src/tests/nodes/abs_fp8x23/input_0.cairo +++ b/src/tests/nodes/abs_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 788529152, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: true }); - - + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_fp8x23/output_0.cairo b/src/tests/nodes/abs_fp8x23/output_0.cairo index 9001ec514..060e575b3 100644 --- a/src/tests/nodes/abs_fp8x23/output_0.cairo +++ b/src/tests/nodes/abs_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 788529152, sign: false }); - data.append(FP8x23 { mag: 150994944, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 612368384, sign: false }); - - + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_i32.cairo b/src/tests/nodes/abs_i32.cairo index 3b3660668..8a9e21e62 100644 --- a/src/tests/nodes/abs_i32.cairo +++ b/src/tests/nodes/abs_i32.cairo @@ -1,12 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::{ - Tensor_i32_fp8x23, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +17,4 @@ fn test_abs_i32() { let y = input_0.abs(); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32/input_0.cairo b/src/tests/nodes/abs_i32/input_0.cairo index 479de4311..38b5eacd5 100644 --- a/src/tests/nodes/abs_i32/input_0.cairo +++ b/src/tests/nodes/abs_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 101, sign: true }); - - + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 67, sign: true }); TensorTrait::new(shape.span(), data.span()) -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i32/output_0.cairo b/src/tests/nodes/abs_i32/output_0.cairo index 45c2a40f9..043732383 100644 --- a/src/tests/nodes/abs_i32/output_0.cairo +++ b/src/tests/nodes/abs_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 69, sign: false }); data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 101, sign: false }); - - + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 67, sign: false }); TensorTrait::new(shape.span(), data.span()) -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8.cairo b/src/tests/nodes/abs_i8.cairo index 411d404ac..60ddd91ec 100644 --- a/src/tests/nodes/abs_i8.cairo +++ b/src/tests/nodes/abs_i8.cairo @@ -1,12 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +17,4 @@ fn test_abs_i8() { let y = input_0.abs(); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/input_0.cairo b/src/tests/nodes/abs_i8/input_0.cairo index 51c28093e..b746a1d05 100644 --- a/src/tests/nodes/abs_i8/input_0.cairo +++ b/src/tests/nodes/abs_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 41, sign: true }); - - + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 24, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/abs_i8/output_0.cairo b/src/tests/nodes/abs_i8/output_0.cairo index 195ec686f..447c92e0c 100644 --- a/src/tests/nodes/abs_i8/output_0.cairo +++ b/src/tests/nodes/abs_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 103, sign: false }); data.append(i8 { mag: 41, sign: false }); - - + data.append(i8 { mag: 24, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16.cairo b/src/tests/nodes/acos_fp16x16.cairo index 705927846..51d2ba037 100644 --- a/src/tests/nodes/acos_fp16x16.cairo +++ b/src/tests/nodes/acos_fp16x16.cairo @@ -1,12 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +17,4 @@ fn test_acos_fp16x16() { let y = input_0.acos(); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16/input_0.cairo b/src/tests/nodes/acos_fp16x16/input_0.cairo index 17e0d5e64..d8cfb2281 100644 --- a/src/tests/nodes/acos_fp16x16/input_0.cairo +++ b/src/tests/nodes/acos_fp16x16/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; fn input_0() -> Tensor { @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57673, sign: false }); - data.append(FP16x16 { mag: 46735, sign: false }); - data.append(FP16x16 { mag: 47892, sign: false }); - data.append(FP16x16 { mag: 52526, sign: false }); - - + data.append(FP16x16 { mag: 47767, sign: false }); + data.append(FP16x16 { mag: 33238, sign: true }); + data.append(FP16x16 { mag: 47744, sign: false }); + data.append(FP16x16 { mag: 21178, sign: true }); TensorTrait::new(shape.span(), data.span()) -} +} \ No newline at end of file diff --git a/src/tests/nodes/acos_fp16x16/output_0.cairo b/src/tests/nodes/acos_fp16x16/output_0.cairo index 0b39ad9e7..3b9cb8230 100644 --- a/src/tests/nodes/acos_fp16x16/output_0.cairo +++ b/src/tests/nodes/acos_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 32432, sign: false }); - data.append(FP16x16 { mag: 50911, sign: false }); - data.append(FP16x16 { mag: 49239, sign: false }); - data.append(FP16x16 { mag: 42008, sign: false }); - - + data.append(FP16x16 { mag: 49421, sign: false }); + data.append(FP16x16 { mag: 137802, sign: false }); + data.append(FP16x16 { mag: 49455, sign: false }); + data.append(FP16x16 { mag: 124509, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23.cairo b/src/tests/nodes/acos_fp8x23.cairo index 4b0c9d965..3efe7353a 100644 --- a/src/tests/nodes/acos_fp8x23.cairo +++ b/src/tests/nodes/acos_fp8x23.cairo @@ -1,15 +1,11 @@ -use core::traits::Into; -use core::array::SpanTrait; -use debug::PrintTrait; mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acos_fp8x23/input_0.cairo b/src/tests/nodes/acos_fp8x23/input_0.cairo index 9ffdabbb0..b948c697b 100644 --- a/src/tests/nodes/acos_fp8x23/input_0.cairo +++ b/src/tests/nodes/acos_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 3385979, sign: true }); - data.append(FP8x23 { mag: 6224397, sign: false }); - data.append(FP8x23 { mag: 190013, sign: true }); - data.append(FP8x23 { mag: 8257919, sign: true }); - - + data.append(FP8x23 { mag: 3985911, sign: false }); + data.append(FP8x23 { mag: 4254306, sign: true }); + data.append(FP8x23 { mag: 5997528, sign: true }); + data.append(FP8x23 { mag: 3494756, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acos_fp8x23/output_0.cairo b/src/tests/nodes/acos_fp8x23/output_0.cairo index 950b70ab0..41234983f 100644 --- a/src/tests/nodes/acos_fp8x23/output_0.cairo +++ b/src/tests/nodes/acos_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16662195, sign: false }); - data.append(FP8x23 { mag: 6163433, sign: false }); - data.append(FP8x23 { mag: 13366824, sign: false }); - data.append(FP8x23 { mag: 24870922, sign: false }); - - + data.append(FP8x23 { mag: 9023232, sign: false }); + data.append(FP8x23 { mag: 17638511, sign: false }); + data.append(FP8x23 { mag: 19858895, sign: false }); + data.append(FP8x23 { mag: 16781466, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16.cairo b/src/tests/nodes/acosh_fp16x16.cairo index 309547d0e..b72263a43 100644 --- a/src/tests/nodes/acosh_fp16x16.cairo +++ b/src/tests/nodes/acosh_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_fp16x16/input_0.cairo b/src/tests/nodes/acosh_fp16x16/input_0.cairo index 00ca0f127..bcc909846 100644 --- a/src/tests/nodes/acosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 141514, sign: false }); - data.append(FP16x16 { mag: 155360, sign: false }); - data.append(FP16x16 { mag: 119042, sign: false }); - data.append(FP16x16 { mag: 312767, sign: false }); - - + data.append(FP16x16 { mag: 257246, sign: false }); + data.append(FP16x16 { mag: 273870, sign: false }); + data.append(FP16x16 { mag: 185580, sign: false }); + data.append(FP16x16 { mag: 308003, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp16x16/output_0.cairo b/src/tests/nodes/acosh_fp16x16/output_0.cairo index e51f2e0c5..a6be6f408 100644 --- a/src/tests/nodes/acosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/acosh_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 92040, sign: false }); - data.append(FP16x16 { mag: 98861, sign: false }); - data.append(FP16x16 { mag: 78893, sign: false }); - data.append(FP16x16 { mag: 147118, sign: false }); - - + data.append(FP16x16 { mag: 133952, sign: false }); + data.append(FP16x16 { mag: 138187, sign: false }); + data.append(FP16x16 { mag: 111495, sign: false }); + data.append(FP16x16 { mag: 146089, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23.cairo b/src/tests/nodes/acosh_fp8x23.cairo index 91f99ab6f..d416a1ca8 100644 --- a/src/tests/nodes/acosh_fp8x23.cairo +++ b/src/tests/nodes/acosh_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/acosh_fp8x23/input_0.cairo b/src/tests/nodes/acosh_fp8x23/input_0.cairo index 4313439c1..66b687af8 100644 --- a/src/tests/nodes/acosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9774601, sign: false }); - data.append(FP8x23 { mag: 29725534, sign: false }); - data.append(FP8x23 { mag: 20607627, sign: false }); - data.append(FP8x23 { mag: 39982645, sign: false }); - - + data.append(FP8x23 { mag: 26479692, sign: false }); + data.append(FP8x23 { mag: 34552514, sign: false }); + data.append(FP8x23 { mag: 21028116, sign: false }); + data.append(FP8x23 { mag: 39741582, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_fp8x23/output_0.cairo b/src/tests/nodes/acosh_fp8x23/output_0.cairo index 96806d869..34ed86b13 100644 --- a/src/tests/nodes/acosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/acosh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4758107, sign: false }); - data.append(FP8x23 { mag: 16255001, sign: false }); - data.append(FP8x23 { mag: 12982783, sign: false }); - data.append(FP8x23 { mag: 18820070, sign: false }); - - + data.append(FP8x23 { mag: 15238413, sign: false }); + data.append(FP8x23 { mag: 17563067, sign: false }); + data.append(FP8x23 { mag: 13167925, sign: false }); + data.append(FP8x23 { mag: 18768178, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16.cairo b/src/tests/nodes/acosh_i32_fp16x16.cairo deleted file mode 100644 index b179ee1ad..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_acosh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo deleted file mode 100644 index ea52e85fb..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 6e3a187ca..000000000 --- a/src/tests/nodes/acosh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 135229, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23.cairo b/src/tests/nodes/acosh_i32_fp8x23.cairo deleted file mode 100644 index c2506eef1..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo deleted file mode 100644 index d4a204e87..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 1e1b3ce52..000000000 --- a/src/tests/nodes/acosh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 14786995, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16.cairo b/src/tests/nodes/acosh_i8_fp16x16.cairo deleted file mode 100644 index 899d3f77d..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 9779ebd97..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 247adde60..000000000 --- a/src/tests/nodes/acosh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 86308, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23.cairo b/src/tests/nodes/acosh_i8_fp8x23.cairo deleted file mode 100644 index fc4583b91..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_acosh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo deleted file mode 100644 index fceca83ea..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo deleted file mode 100644 index a369ec21d..000000000 --- a/src/tests/nodes/acosh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786560, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 17301504, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16.cairo b/src/tests/nodes/acosh_u32_fp16x16.cairo deleted file mode 100644 index e513caa26..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_acosh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 841f732bd..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo deleted file mode 100644 index 429d6ad18..000000000 --- a/src/tests/nodes/acosh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 135229, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23.cairo b/src/tests/nodes/acosh_u32_fp8x23.cairo deleted file mode 100644 index e06ad030f..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_acosh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.acosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo deleted file mode 100644 index f988508a8..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(2); - data.append(2); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo deleted file mode 100644 index dd6ddf580..000000000 --- a/src/tests/nodes/acosh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14786995, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - data.append(FP8x23 { mag: 11047443, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16.cairo b/src/tests/nodes/add_fp16x16.cairo index 431877f06..e9b665573 100644 --- a/src/tests/nodes/add_fp16x16.cairo +++ b/src/tests/nodes/add_fp16x16.cairo @@ -1,11 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,4 +19,4 @@ fn test_add_fp16x16() { let y = input_0 + input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_0.cairo b/src/tests/nodes/add_fp16x16/input_0.cairo index 205d8e20b..f8a4ff052 100644 --- a/src/tests/nodes/add_fp16x16/input_0.cairo +++ b/src/tests/nodes/add_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/input_1.cairo b/src/tests/nodes/add_fp16x16/input_1.cairo index 883fa3f37..74ed543f4 100644 --- a/src/tests/nodes/add_fp16x16/input_1.cairo +++ b/src/tests/nodes/add_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 196608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16/output_0.cairo b/src/tests/nodes/add_fp16x16/output_0.cairo index c408ca8e3..564b17a50 100644 --- a/src/tests/nodes/add_fp16x16/output_0.cairo +++ b/src/tests/nodes/add_fp16x16/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 327680, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 327680, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 327680, sign: true }); - data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - - + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast.cairo b/src/tests/nodes/add_fp16x16_broadcast.cairo index 6956a73fc..8e5aa2265 100644 --- a/src/tests/nodes/add_fp16x16_broadcast.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo index a211d0266..da0ed021d 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - - + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo index c56726c2e..c9f1cf735 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -14,9 +12,7 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo index 88d53d94d..7b3c06bad 100644 --- a/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp16x16_broadcast/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23.cairo b/src/tests/nodes/add_fp8x23.cairo index 6cef78b83..036664ec7 100644 --- a/src/tests/nodes/add_fp8x23.cairo +++ b/src/tests/nodes/add_fp8x23.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp8x23/input_0.cairo b/src/tests/nodes/add_fp8x23/input_0.cairo index 0fbf9553c..bebbe1f55 100644 --- a/src/tests/nodes/add_fp8x23/input_0.cairo +++ b/src/tests/nodes/add_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/input_1.cairo b/src/tests/nodes/add_fp8x23/input_1.cairo index b2c352a25..f931fac67 100644 --- a/src/tests/nodes/add_fp8x23/input_1.cairo +++ b/src/tests/nodes/add_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23/output_0.cairo b/src/tests/nodes/add_fp8x23/output_0.cairo index 5c1b047e5..b19076e39 100644 --- a/src/tests/nodes/add_fp8x23/output_0.cairo +++ b/src/tests/nodes/add_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast.cairo b/src/tests/nodes/add_fp8x23_broadcast.cairo index 18441d6f0..be1d3f286 100644 --- a/src/tests/nodes/add_fp8x23_broadcast.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorAdd}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo index cbb8f7e30..4ed90ce0f 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo index ae39bb3f7..cf8066ef2 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - - + data.append(FP8x23 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo index bf4926eea..daf198e84 100644 --- a/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/add_fp8x23_broadcast/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33554432, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32.cairo b/src/tests/nodes/add_i32.cairo index 7ac3e7c1f..cd7821e3b 100644 --- a/src/tests/nodes/add_i32.cairo +++ b/src/tests/nodes/add_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorAdd}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_add_i32() { let y = input_0 + input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_0.cairo b/src/tests/nodes/add_i32/input_0.cairo index 546cf7f35..c61672795 100644 --- a/src/tests/nodes/add_i32/input_0.cairo +++ b/src/tests/nodes/add_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32/input_1.cairo b/src/tests/nodes/add_i32/input_1.cairo index 6b4b147a3..3a48a3bab 100644 --- a/src/tests/nodes/add_i32/input_1.cairo +++ b/src/tests/nodes/add_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32/output_0.cairo b/src/tests/nodes/add_i32/output_0.cairo index 4b84bd019..7ba2f56ba 100644 --- a/src/tests/nodes/add_i32/output_0.cairo +++ b/src/tests/nodes/add_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 5, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 6, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast.cairo b/src/tests/nodes/add_i32_broadcast.cairo index cfe007309..73678c376 100644 --- a/src/tests/nodes/add_i32_broadcast.cairo +++ b/src/tests/nodes/add_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorAdd}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorAdd}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_add_i32_broadcast() { let y = input_0 + input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_0.cairo b/src/tests/nodes/add_i32_broadcast/input_0.cairo index 9d1d930e9..33350ec16 100644 --- a/src/tests/nodes/add_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/input_1.cairo b/src/tests/nodes/add_i32_broadcast/input_1.cairo index 22b8002f2..190e0eb30 100644 --- a/src/tests/nodes/add_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i32_broadcast/output_0.cairo b/src/tests/nodes/add_i32_broadcast/output_0.cairo index 0e49d8977..b30c8eddc 100644 --- a/src/tests/nodes/add_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i32_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 4, sign: true }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 6, sign: true }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8.cairo b/src/tests/nodes/add_i8.cairo index fa7dbd131..64c8eb2ae 100644 --- a/src/tests/nodes/add_i8.cairo +++ b/src/tests/nodes/add_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorAdd}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_add_i8() { let y = input_0 + input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_0.cairo b/src/tests/nodes/add_i8/input_0.cairo index 01bc9d830..bc2d2b810 100644 --- a/src/tests/nodes/add_i8/input_0.cairo +++ b/src/tests/nodes/add_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8/input_1.cairo b/src/tests/nodes/add_i8/input_1.cairo index 10b07ea72..f135bdbbf 100644 --- a/src/tests/nodes/add_i8/input_1.cairo +++ b/src/tests/nodes/add_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8/output_0.cairo b/src/tests/nodes/add_i8/output_0.cairo index 7e472ce6e..c46103db2 100644 --- a/src/tests/nodes/add_i8/output_0.cairo +++ b/src/tests/nodes/add_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast.cairo b/src/tests/nodes/add_i8_broadcast.cairo index 156c401f7..83644ae26 100644 --- a/src/tests/nodes/add_i8_broadcast.cairo +++ b/src/tests/nodes/add_i8_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorAdd}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorAdd}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,5 +19,4 @@ fn test_add_i8_broadcast() { let y = input_0 + input_1; assert_eq(y, z); -} - +} \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_0.cairo b/src/tests/nodes/add_i8_broadcast/input_0.cairo index b15bb5310..8d4d4d989 100644 --- a/src/tests/nodes/add_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/input_1.cairo b/src/tests/nodes/add_i8_broadcast/input_1.cairo index eca978b79..4df125dec 100644 --- a/src/tests/nodes/add_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/add_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_i8_broadcast/output_0.cairo b/src/tests/nodes/add_i8_broadcast/output_0.cairo index 589b11227..49e3377a1 100644 --- a/src/tests/nodes/add_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/add_i8_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32.cairo b/src/tests/nodes/add_u32.cairo index 195a158ea..8aa827616 100644 --- a/src/tests/nodes/add_u32.cairo +++ b/src/tests/nodes/add_u32.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorAdd}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_add_u32() { let y = input_0 + input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_0.cairo b/src/tests/nodes/add_u32/input_0.cairo index 07d7d0368..00c1a646a 100644 --- a/src/tests/nodes/add_u32/input_0.cairo +++ b/src/tests/nodes/add_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - data.append(2); data.append(1); data.append(1); - data.append(2); - data.append(2); data.append(1); data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(2); data.append(0); + data.append(1); data.append(0); data.append(2); - data.append(2); - data.append(2); + data.append(0); data.append(1); data.append(2); data.append(2); - data.append(2); data.append(0); + data.append(1); + data.append(1); data.append(2); data.append(0); + data.append(1); data.append(2); + data.append(1); data.append(2); data.append(2); - - + data.append(0); + data.append(0); + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32/input_1.cairo b/src/tests/nodes/add_u32/input_1.cairo index de25d58f4..7b3139dc5 100644 --- a/src/tests/nodes/add_u32/input_1.cairo +++ b/src/tests/nodes/add_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(2); - data.append(2); - data.append(1); - data.append(1); data.append(0); data.append(1); - data.append(2); + data.append(0); data.append(1); data.append(1); data.append(1); data.append(1); data.append(2); data.append(0); - data.append(0); - data.append(0); - data.append(0); + data.append(2); data.append(1); data.append(1); data.append(0); data.append(1); data.append(1); + data.append(2); + data.append(1); data.append(0); + data.append(2); data.append(1); + data.append(2); data.append(1); + data.append(2); + data.append(2); + data.append(2); data.append(0); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32/output_0.cairo b/src/tests/nodes/add_u32/output_0.cairo index b93e7079c..d85c4172f 100644 --- a/src/tests/nodes/add_u32/output_0.cairo +++ b/src/tests/nodes/add_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(3); - data.append(4); - data.append(3); + data.append(1); data.append(2); + data.append(1); data.append(3); + data.append(1); data.append(2); - data.append(2); + data.append(1); data.append(4); - data.append(2); - data.append(2); + data.append(0); + data.append(3); data.append(3); data.append(3); - data.append(2); data.append(0); data.append(2); data.append(2); + data.append(4); + data.append(1); + data.append(1); + data.append(4); data.append(2); - data.append(2); + data.append(4); data.append(3); data.append(2); - data.append(3); - data.append(1); data.append(2); - data.append(1); - data.append(3); data.append(2); - data.append(3); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast.cairo b/src/tests/nodes/add_u32_broadcast.cairo index 24752ac2b..447dba22f 100644 --- a/src/tests/nodes/add_u32_broadcast.cairo +++ b/src/tests/nodes/add_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorAdd}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorAdd}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/add_u32_broadcast/input_0.cairo b/src/tests/nodes/add_u32_broadcast/input_0.cairo index d6bc759d4..95f2dd5bf 100644 --- a/src/tests/nodes/add_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); - data.append(2); data.append(0); - data.append(1); data.append(2); - data.append(1); data.append(0); - data.append(2); - data.append(2); - data.append(1); - data.append(1); - data.append(2); - data.append(1); data.append(0); data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); + data.append(2); + data.append(0); + data.append(0); data.append(1); data.append(0); data.append(2); + data.append(0); data.append(2); data.append(0); data.append(0); - data.append(2); - - + data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/input_1.cairo b/src/tests/nodes/add_u32_broadcast/input_1.cairo index 10e87537e..79e305aa6 100644 --- a/src/tests/nodes/add_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/add_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(2); - data.append(2); - - + data.append(0); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/add_u32_broadcast/output_0.cairo b/src/tests/nodes/add_u32_broadcast/output_0.cairo index 86f417ba8..ed0af4825 100644 --- a/src/tests/nodes/add_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/add_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - data.append(2); - data.append(3); - data.append(2); - data.append(3); - data.append(4); + data.append(1); data.append(3); + data.append(0); + data.append(0); + data.append(0); data.append(2); - data.append(4); - data.append(3); data.append(2); + data.append(1); data.append(2); - data.append(4); data.append(3); - data.append(2); - data.append(2); + data.append(1); + data.append(0); + data.append(1); + data.append(0); data.append(3); + data.append(1); data.append(3); data.append(1); + data.append(1); data.append(2); + data.append(0); + data.append(0); + data.append(0); + data.append(1); data.append(2); - data.append(2); - data.append(4); - data.append(4); - data.append(2); - data.append(2); - data.append(4); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default.cairo b/src/tests/nodes/argmax_fp16x16_1D_default.cairo index f6419914e..58b6a68a3 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_fp16x16_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo index ad46362cd..f23d32b16 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8257536, sign: false }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 3997696, sign: true }); - - + data.append(FP16x16 { mag: 5832704, sign: true }); + data.append(FP16x16 { mag: 8323072, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo index 02af17401..56f9cff0f 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo index 30d25cb78..a315caa9b 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo index 5d92f7e12..f514f7acb 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 6684672, sign: true }); - data.append(FP16x16 { mag: 7733248, sign: true }); - - + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 1376256, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo index 02af17401..1565560fe 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo index fd893d35b..c12d59b17 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo index 8acfeb912..1ee7073b4 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1310720, sign: false }); - data.append(FP16x16 { mag: 2293760, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: true }); - - + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo index da7c37eb4..1565560fe 100644 --- a/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_1D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default.cairo b/src/tests/nodes/argmax_fp16x16_2D_default.cairo index 4a6e4a79b..4ce5de2e6 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo index 749ba2419..cd8f41c61 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6422528, sign: true }); - data.append(FP16x16 { mag: 5373952, sign: true }); - data.append(FP16x16 { mag: 3473408, sign: true }); - data.append(FP16x16 { mag: 5505024, sign: true }); - - + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo index 377152f30..18c2bb3fe 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo index 4772e1bdd..8bbde673a 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo index 6e219e889..f1f9169ed 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2424832, sign: true }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: true }); - data.append(FP16x16 { mag: 7340032, sign: true }); - - + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo index b17cecf19..af0e54527 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo index 027b5780b..f91b15c85 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo index 5ab75d2a6..1243376fe 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8126464, sign: true }); - data.append(FP16x16 { mag: 1114112, sign: false }); - data.append(FP16x16 { mag: 6619136, sign: false }); - data.append(FP16x16 { mag: 6488064, sign: true }); - - + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: true }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo index 377152f30..4fb656f2a 100644 --- a/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default.cairo b/src/tests/nodes/argmax_fp16x16_3D_default.cairo index 20df65650..f8c7c1589 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo index 7e478c01d..cacca75ec 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7143424, sign: false }); - data.append(FP16x16 { mag: 7471104, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 1835008, sign: false }); - data.append(FP16x16 { mag: 2883584, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: true }); - data.append(FP16x16 { mag: 3145728, sign: true }); - data.append(FP16x16 { mag: 4521984, sign: true }); - - + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo index 195c9348f..b5312855b 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo index aea9d2496..54243bd59 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo index ddc37f740..540435864 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4390912, sign: true }); - data.append(FP16x16 { mag: 7274496, sign: true }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 6684672, sign: true }); - data.append(FP16x16 { mag: 2818048, sign: true }); - data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: false }); data.append(FP16x16 { mag: 3407872, sign: true }); - - + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo index a5785e938..fdae52d6a 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo index 1f368a019..4d633778d 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo index 20a3579b6..57d1f9c07 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 4653056, sign: false }); - data.append(FP16x16 { mag: 6750208, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 6160384, sign: true }); - data.append(FP16x16 { mag: 4063232, sign: true }); - data.append(FP16x16 { mag: 3932160, sign: true }); - data.append(FP16x16 { mag: 8257536, sign: false }); - - + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: false }); + data.append(FP16x16 { mag: 5636096, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo index 51e873382..0a783bab9 100644 --- a/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,9 +11,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - data.append(1); - data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default.cairo b/src/tests/nodes/argmax_fp8x23_1D_default.cairo index 9c4606446..173032fc3 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo index 30fd5f2fa..f456b6a3e 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 754974720, sign: true }); - data.append(FP8x23 { mag: 763363328, sign: false }); - data.append(FP8x23 { mag: 427819008, sign: true }); - - + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo index 27813c347..eda6965eb 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo index 18348d6dd..1dde67779 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo index 7f8e487d8..690040b55 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 629145600, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 989855744, sign: true }); - - + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo index 677e4493a..1565560fe 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo index ade2f6df9..9b2094325 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo index 011789634..530bfdf08 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 1056964608, sign: true }); - data.append(FP8x23 { mag: 109051904, sign: true }); - - + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo index 33352224c..56f9cff0f 100644 --- a/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_1D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default.cairo b/src/tests/nodes/argmax_fp8x23_2D_default.cairo index 21e7a2908..b5e22f49d 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo index 83d905d82..1075d4252 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 411041792, sign: false }); - data.append(FP8x23 { mag: 956301312, sign: false }); - data.append(FP8x23 { mag: 385875968, sign: false }); - - + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo index 7678d6def..6e8934615 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo index 27658df23..c8e819a0a 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo index 37f0ee7e6..15b48a8d1 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 780140544, sign: true }); - data.append(FP8x23 { mag: 897581056, sign: false }); - data.append(FP8x23 { mag: 201326592, sign: true }); - data.append(FP8x23 { mag: 662700032, sign: true }); - - + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 805306368, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo index f7e6d0630..d895ba817 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,8 +8,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo index 6e3aaee54..871ba2be0 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo index 6ea1d4345..d7f58ab66 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 503316480, sign: true }); - data.append(FP8x23 { mag: 914358272, sign: false }); - data.append(FP8x23 { mag: 754974720, sign: true }); - data.append(FP8x23 { mag: 696254464, sign: true }); - - + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo index 9436ef375..4fb656f2a 100644 --- a/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default.cairo b/src/tests/nodes/argmax_fp8x23_3D_default.cairo index 4feb747c1..478037446 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo index a0ed37e8b..6d7523e62 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1031798784, sign: false }); - data.append(FP8x23 { mag: 687865856, sign: true }); - data.append(FP8x23 { mag: 612368384, sign: false }); - data.append(FP8x23 { mag: 822083584, sign: true }); - data.append(FP8x23 { mag: 746586112, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 268435456, sign: false }); - data.append(FP8x23 { mag: 553648128, sign: false }); - - + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 201326592, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo index f3a503686..9763d507f 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,9 +11,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(1); - data.append(0); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo index 75401571c..23414b00c 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo index 07f1e22d1..af97ff18f 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 721420288, sign: true }); - data.append(FP8x23 { mag: 796917760, sign: false }); - data.append(FP8x23 { mag: 1040187392, sign: true }); - data.append(FP8x23 { mag: 109051904, sign: true }); - data.append(FP8x23 { mag: 1056964608, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 360710144, sign: true }); - - + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo index 785b6f87b..2094003c4 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); data.append(0); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo index f238237a0..940bc9669 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo index f6b5ef345..1fe0ce7fe 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 268435456, sign: true }); - data.append(FP8x23 { mag: 939524096, sign: false }); - data.append(FP8x23 { mag: 100663296, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: false }); - data.append(FP8x23 { mag: 301989888, sign: true }); - data.append(FP8x23 { mag: 964689920, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 897581056, sign: false }); - - + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 536870912, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo index 2f36933a3..1cb8809eb 100644 --- a/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_fp8x23_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,9 +11,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(1); + data.append(0); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default.cairo b/src/tests/nodes/argmax_i32_1D_default.cairo index 7e9e1bc63..8a5a5d5b5 100644 --- a/src/tests/nodes/argmax_i32_1D_default.cairo +++ b/src/tests/nodes/argmax_i32_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_i32_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo index 836d62c0e..c12dae57e 100644 --- a/src/tests/nodes/argmax_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 108, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo index da7c37eb4..1565560fe 100644 --- a/src/tests/nodes/argmax_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo index 862255e47..13dbb21a4 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo index fdff564e7..a465f823f 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8, sign: true }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 62, sign: true }); - - + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 92, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index.cairo b/src/tests/nodes/argmax_i32_1D_last_index.cairo index 11e173897..1a1e84a2e 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo index 75fda421e..76e714b0d 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 243, sign: false }); - data.append(i32 { mag: 101, sign: false }); - - + data.append(i32 { mag: 232, sign: false }); + data.append(i32 { mag: 204, sign: false }); + data.append(i32 { mag: 189, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo index da7c37eb4..eda6965eb 100644 --- a/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default.cairo b/src/tests/nodes/argmax_i32_2D_default.cairo index 8faa8a041..b2638c25e 100644 --- a/src/tests/nodes/argmax_i32_2D_default.cairo +++ b/src/tests/nodes/argmax_i32_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo index c26192745..4f06af5d9 100644 --- a/src/tests/nodes/argmax_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 124, sign: true }); - data.append(i32 { mag: 84, sign: true }); - - + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 103, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo index 377152f30..4fb656f2a 100644 --- a/src/tests/nodes/argmax_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo index 5eb2f3881..c4dd18979 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo index 4950d0ec3..4a58a036d 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 65, sign: true }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 119, sign: false }); - - + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 108, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo index ffa5b8fca..d895ba817 100644 --- a/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index.cairo b/src/tests/nodes/argmax_i32_2D_last_index.cairo index 719503095..93143b8e3 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo index cb1a902fd..0199493ad 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 25, sign: true }); - - + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 127, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo index 377152f30..5541876d4 100644 --- a/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default.cairo b/src/tests/nodes/argmax_i32_3D_default.cairo index f2eb2321f..669db2212 100644 --- a/src/tests/nodes/argmax_i32_3D_default.cairo +++ b/src/tests/nodes/argmax_i32_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo index c7070452d..f534aa0f0 100644 --- a/src/tests/nodes/argmax_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 39, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 63, sign: true }); - data.append(i32 { mag: 95, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 120, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 70, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo index 172baa773..a698fcbf9 100644 --- a/src/tests/nodes/argmax_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); data.append(1); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo index dc9458264..7b3d014fa 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo index 29f97de73..bdcee588b 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 30, sign: true }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 60, sign: true }); - data.append(i32 { mag: 59, sign: false }); - - + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 124, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo index 352a5ae44..0cc7de207 100644 --- a/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index.cairo b/src/tests/nodes/argmax_i32_3D_last_index.cairo index a0b63c136..2855ba0cd 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo index d0e711e2c..ebcfa868e 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 21, sign: true }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 12, sign: true }); - data.append(i32 { mag: 77, sign: false }); - - + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 88, sign: false }); + data.append(i32 { mag: 46, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 110, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo index 66a58ab2a..49547e6c9 100644 --- a/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i32_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); + data.append(0); data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default.cairo b/src/tests/nodes/argmax_i8_1D_default.cairo index ac0a22420..14112acf6 100644 --- a/src/tests/nodes/argmax_i8_1D_default.cairo +++ b/src/tests/nodes/argmax_i8_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo index 444222bb3..011898e90 100644 --- a/src/tests/nodes/argmax_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 58, sign: true }); - data.append(i8 { mag: 52, sign: false }); - - + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 109, sign: true }); + data.append(i8 { mag: 77, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmax_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo index 3c74d3bc4..05baf1c96 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo index 02a5efda3..8cec9600d 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 53, sign: true }); - - + data.append(i8 { mag: 78, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 52, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index.cairo b/src/tests/nodes/argmax_i8_1D_last_index.cairo index 6cc95fe41..f4c00289c 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo index 544307351..a8c356d5e 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 94, sign: true }); - data.append(i8 { mag: 81, sign: true }); - data.append(i8 { mag: 119, sign: false }); - - + data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 63, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo index a67ee926d..eda6965eb 100644 --- a/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(2); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default.cairo b/src/tests/nodes/argmax_i8_2D_default.cairo index 17ddafa92..d0b9881cc 100644 --- a/src/tests/nodes/argmax_i8_2D_default.cairo +++ b/src/tests/nodes/argmax_i8_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo index 1710b0e18..aba762fd1 100644 --- a/src/tests/nodes/argmax_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 95, sign: true }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 118, sign: true }); - - + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 123, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo index 377152f30..5541876d4 100644 --- a/src/tests/nodes/argmax_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo index f434690a9..06c55c802 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo index 41b4ab422..6d532e7b6 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 80, sign: true }); - data.append(i8 { mag: 111, sign: true }); - data.append(i8 { mag: 47, sign: false }); - data.append(i8 { mag: 71, sign: true }); - - + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 66, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo index ffa5b8fca..eb0060f3e 100644 --- a/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_keepdims_false/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index.cairo b/src/tests/nodes/argmax_i8_2D_last_index.cairo index c95a30d97..6a9ebb9bc 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo index 64e414805..ab4f8f6fa 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 115, sign: true }); - - + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 84, sign: true }); + data.append(i8 { mag: 15, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo index 13835338e..6e8934615 100644 --- a/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default.cairo b/src/tests/nodes/argmax_i8_3D_default.cairo index 4dd1aa32b..fd4bfaf05 100644 --- a/src/tests/nodes/argmax_i8_3D_default.cairo +++ b/src/tests/nodes/argmax_i8_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo index 26d6eb5ac..9f5b78aea 100644 --- a/src/tests/nodes/argmax_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 29, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 61, sign: false }); - - + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 49, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo index 88365399e..47371f78a 100644 --- a/src/tests/nodes/argmax_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,9 +11,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - data.append(0); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo index 056a2aeff..c477a9858 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo index ce37efb86..7086d8dd8 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 48, sign: false }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 72, sign: true }); - - + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 39, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo index 54020fa6e..b7f7a3c83 100644 --- a/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); + data.append(1); data.append(0); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index.cairo b/src/tests/nodes/argmax_i8_3D_last_index.cairo index 1a691b3f0..1c1006fa6 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo index fbd780b20..a18462dc9 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 43, sign: true }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 49, sign: false }); - data.append(i8 { mag: 127, sign: true }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 61, sign: true }); - - + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 10, sign: false }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 87, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo index 06984466e..9763d507f 100644 --- a/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_i8_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); data.append(1); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default.cairo b/src/tests/nodes/argmax_u32_1D_default.cairo index 2366062dd..0bbfe1dc7 100644 --- a/src/tests/nodes/argmax_u32_1D_default.cairo +++ b/src/tests/nodes/argmax_u32_1D_default.cairo @@ -1,11 +1,11 @@ -mod input_0; -mod output_0; +mod input_0; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,4 +17,4 @@ fn test_argmax_u32_1D_default() { let y = input_0.argmax(0, Option::None(()), Option::None(())); assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo index a808637e4..baf00496a 100644 --- a/src/tests/nodes/argmax_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(99); - data.append(86); - data.append(10); - - + data.append(22); + data.append(149); + data.append(157); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo index 02af17401..56f9cff0f 100644 --- a/src/tests/nodes/argmax_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo index bc25381e8..1b4410a8d 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo index 6a7bc89d5..3508dd9f2 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(146); - data.append(163); - data.append(109); - - + data.append(159); + data.append(31); + data.append(202); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo index da7c37eb4..56f9cff0f 100644 --- a/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index.cairo b/src/tests/nodes/argmax_u32_1D_last_index.cairo index e48020b0e..0065e3f25 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo index 8864e62dd..28eabceaf 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(2); - data.append(116); - data.append(115); - - + data.append(177); + data.append(78); + data.append(187); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo index da7c37eb4..56f9cff0f 100644 --- a/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default.cairo b/src/tests/nodes/argmax_u32_2D_default.cairo index cc31349b8..e2416badc 100644 --- a/src/tests/nodes/argmax_u32_2D_default.cairo +++ b/src/tests/nodes/argmax_u32_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo index f859375f9..90fd94e8b 100644 --- a/src/tests/nodes/argmax_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(99); - data.append(74); - data.append(145); - data.append(211); - - + data.append(208); + data.append(4); + data.append(108); + data.append(60); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo index 02d44a9af..6e8934615 100644 --- a/src/tests/nodes/argmax_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo index 1764728b8..ddda36dda 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo index 622fbb162..a2c436dbd 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(68); - data.append(141); - data.append(8); - data.append(59); - - + data.append(229); + data.append(129); + data.append(171); + data.append(10); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo index b17cecf19..af0e54527 100644 --- a/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index.cairo b/src/tests/nodes/argmax_u32_2D_last_index.cairo index c1047a564..97f5bd13b 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo index 8b69b7475..91083cbff 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(194); - data.append(52); - data.append(102); - data.append(202); - - + data.append(162); + data.append(67); + data.append(147); + data.append(150); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo index 9c78877f7..6e8934615 100644 --- a/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default.cairo b/src/tests/nodes/argmax_u32_3D_default.cairo index c8f61e89f..2115a9d15 100644 --- a/src/tests/nodes/argmax_u32_3D_default.cairo +++ b/src/tests/nodes/argmax_u32_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo index d41551f38..cc7a436d2 100644 --- a/src/tests/nodes/argmax_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(205); - data.append(21); - data.append(93); - data.append(199); - data.append(44); - data.append(76); - data.append(60); - data.append(73); - - + data.append(113); + data.append(207); + data.append(34); + data.append(249); + data.append(186); + data.append(56); + data.append(153); + data.append(92); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo index 195c9348f..b0d2c103c 100644 --- a/src/tests/nodes/argmax_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); + data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo index 3b33c7dd0..402adf2d7 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo index b5b0e5571..00aba455e 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(126); - data.append(36); - data.append(190); - data.append(190); - data.append(114); - data.append(158); - data.append(103); - data.append(89); - - + data.append(37); + data.append(156); + data.append(115); + data.append(212); + data.append(45); + data.append(237); + data.append(24); + data.append(136); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo index 0ff4ae4f1..386b678ef 100644 --- a/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); + data.append(1); data.append(1); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index.cairo b/src/tests/nodes/argmax_u32_3D_last_index.cairo index cf99d65fa..a670579ec 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo index 56e8b7b10..f9a0aa88e 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(238); - data.append(156); - data.append(136); - data.append(146); - data.append(150); - data.append(69); - data.append(43); - data.append(25); - - + data.append(39); + data.append(86); + data.append(127); + data.append(185); + data.append(36); + data.append(197); + data.append(160); + data.append(37); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo index f2789da70..1970e5f5a 100644 --- a/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmax_u32_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); + data.append(1); + data.append(1); data.append(0); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default.cairo b/src/tests/nodes/argmin_fp16x16_1D_default.cairo index 714cfd034..1b1ca67e6 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo index 4d33fa09c..dcc350ee5 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7012352, sign: true }); - data.append(FP16x16 { mag: 6029312, sign: false }); - data.append(FP16x16 { mag: 7340032, sign: true }); - - + data.append(FP16x16 { mag: 1114112, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 3276800, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo index a67ee926d..eda6965eb 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(2); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo index dccfc4671..699b99db3 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo index 054ef1f67..dd5476cd9 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 5242880, sign: true }); - data.append(FP16x16 { mag: 2818048, sign: true }); - - + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo index da7c37eb4..56f9cff0f 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo index 6bc534eed..52d96accc 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo index 68852809c..c5dfb9f2b 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3670016, sign: false }); - data.append(FP16x16 { mag: 6488064, sign: false }); - data.append(FP16x16 { mag: 7471104, sign: true }); - - + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo index a67ee926d..1565560fe 100644 --- a/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(2); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default.cairo b/src/tests/nodes/argmin_fp16x16_2D_default.cairo index fcf6f2286..8890ede98 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo index 945591c1a..456fb9a91 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5898240, sign: false }); - data.append(FP16x16 { mag: 1245184, sign: false }); - data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: true }); data.append(FP16x16 { mag: 8060928, sign: false }); - - + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo index 13835338e..18c2bb3fe 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo index a2600b3f6..115a5dbd5 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo index 073496918..8b660c61b 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6946816, sign: false }); - data.append(FP16x16 { mag: 6029312, sign: false }); - data.append(FP16x16 { mag: 4980736, sign: true }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo index ffa5b8fca..d895ba817 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo index d2749adeb..151f78614 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo index 11fa1e517..c42a678da 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7274496, sign: true }); - data.append(FP16x16 { mag: 1376256, sign: true }); - data.append(FP16x16 { mag: 4259840, sign: false }); - data.append(FP16x16 { mag: 4784128, sign: false }); - - + data.append(FP16x16 { mag: 8060928, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo index 13835338e..6e8934615 100644 --- a/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default.cairo b/src/tests/nodes/argmin_fp16x16_3D_default.cairo index ba167948a..7a69bd614 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo index c68d5b943..ea0cdb441 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7995392, sign: false }); - data.append(FP16x16 { mag: 3014656, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 4128768, sign: false }); - data.append(FP16x16 { mag: 5046272, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 4456448, sign: true }); - data.append(FP16x16 { mag: 5570560, sign: true }); - - + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo index f7502c1f3..bfea2aecb 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); - data.append(1); data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo index 171cc0a9d..1c3ed9e49 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo index 963ea1a0c..d4ceeab3f 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 5570560, sign: false }); - data.append(FP16x16 { mag: 2097152, sign: true }); - data.append(FP16x16 { mag: 7602176, sign: true }); - data.append(FP16x16 { mag: 5373952, sign: false }); - data.append(FP16x16 { mag: 1179648, sign: true }); - data.append(FP16x16 { mag: 2162688, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: true }); - - + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: true }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo index 4d79b7b34..ea6cc3c4d 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); + data.append(0); data.append(1); data.append(1); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo index 1e37ac066..66fa5aee2 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo index e19a9a2d3..21be41b2b 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: false }); - data.append(FP16x16 { mag: 7667712, sign: true }); - data.append(FP16x16 { mag: 6815744, sign: true }); - data.append(FP16x16 { mag: 6488064, sign: true }); - data.append(FP16x16 { mag: 7274496, sign: false }); - data.append(FP16x16 { mag: 6750208, sign: false }); - data.append(FP16x16 { mag: 7405568, sign: false }); - data.append(FP16x16 { mag: 720896, sign: false }); - - + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo index f2789da70..9763d507f 100644 --- a/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp16x16_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - data.append(0); - data.append(0); - - + data.append(1); + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default.cairo b/src/tests/nodes/argmin_fp8x23_1D_default.cairo index a28d4ee41..2e591e8dc 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo index f11ecf26e..5b477194d 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 914358272, sign: true }); - data.append(FP8x23 { mag: 570425344, sign: true }); - - + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo index 27813c347..56f9cff0f 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo index 5ca425414..21b291ae2 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo index 4a8c148eb..b1b78c84d 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 360710144, sign: true }); - data.append(FP8x23 { mag: 956301312, sign: false }); - - + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo index 677e4493a..1565560fe 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo index ab254b5db..52fac5d7c 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo index 064313e33..5d61a20e0 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 805306368, sign: true }); - data.append(FP8x23 { mag: 159383552, sign: true }); - data.append(FP8x23 { mag: 335544320, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 738197504, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo index 677e4493a..1565560fe 100644 --- a/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default.cairo b/src/tests/nodes/argmin_fp8x23_2D_default.cairo index 3b3ab4bdb..e0f07cc0c 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo index 111f0c5ba..750ea8e95 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 125829120, sign: true }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 595591168, sign: false }); - data.append(FP8x23 { mag: 570425344, sign: true }); - - + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo index 55682a53f..18c2bb3fe 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo index 15feb889a..365e0fd30 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo index 936fc7424..448042f28 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 595591168, sign: true }); - data.append(FP8x23 { mag: 922746880, sign: true }); - data.append(FP8x23 { mag: 75497472, sign: true }); - data.append(FP8x23 { mag: 360710144, sign: false }); - - + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo index 8ddfaae45..2f17092da 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_keepdims_false/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo index 258a9aef6..3eac0de88 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo index 66c0551f9..87198252b 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 545259520, sign: true }); - data.append(FP8x23 { mag: 763363328, sign: true }); - data.append(FP8x23 { mag: 679477248, sign: false }); - data.append(FP8x23 { mag: 343932928, sign: true }); - - + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 738197504, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo index 9436ef375..6e8934615 100644 --- a/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default.cairo b/src/tests/nodes/argmin_fp8x23_3D_default.cairo index e0bedf385..29bd82f7c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo index 079ed090c..cf05b975c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 134217728, sign: true }); - data.append(FP8x23 { mag: 511705088, sign: true }); - data.append(FP8x23 { mag: 637534208, sign: false }); - data.append(FP8x23 { mag: 167772160, sign: true }); - data.append(FP8x23 { mag: 746586112, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: true }); - data.append(FP8x23 { mag: 461373440, sign: true }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo index 18a497632..8851cfbb7 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); data.append(1); data.append(1); - - + data.append(1); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo index aa2c8ec15..f5478105e 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo index 563c7e76b..08e88c4de 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 92274688, sign: false }); - data.append(FP8x23 { mag: 218103808, sign: false }); - data.append(FP8x23 { mag: 545259520, sign: true }); - data.append(FP8x23 { mag: 855638016, sign: false }); - data.append(FP8x23 { mag: 377487360, sign: true }); - data.append(FP8x23 { mag: 209715200, sign: true }); - data.append(FP8x23 { mag: 92274688, sign: true }); - data.append(FP8x23 { mag: 654311424, sign: false }); - - + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 729808896, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo index 785b6f87b..386b678ef 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(0); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo index e47bdbb0d..fcf5ebef3 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo index f19286fe2..6c6ee884c 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 603979776, sign: false }); - data.append(FP8x23 { mag: 671088640, sign: true }); - data.append(FP8x23 { mag: 822083584, sign: false }); - data.append(FP8x23 { mag: 746586112, sign: true }); - data.append(FP8x23 { mag: 377487360, sign: false }); - data.append(FP8x23 { mag: 293601280, sign: false }); - data.append(FP8x23 { mag: 645922816, sign: false }); - data.append(FP8x23 { mag: 880803840, sign: true }); - - + data.append(FP8x23 { mag: 713031680, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo index 64a6bc737..8851cfbb7 100644 --- a/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_fp8x23_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); data.append(1); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default.cairo b/src/tests/nodes/argmin_i32_1D_default.cairo index e5388a3aa..1c5becbe1 100644 --- a/src/tests/nodes/argmin_i32_1D_default.cairo +++ b/src/tests/nodes/argmin_i32_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo index 17cabca29..6bee6657d 100644 --- a/src/tests/nodes/argmin_i32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 10, sign: true }); - data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 18, sign: false }); - - + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 117, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo index da7c37eb4..56f9cff0f 100644 --- a/src/tests/nodes/argmin_i32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_default/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo index 8c558ab22..8fb6cfbb7 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo index 6428d6fe0..eb195d6dd 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 80, sign: true }); - - + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 39, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo index a67ee926d..56f9cff0f 100644 --- a/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index.cairo b/src/tests/nodes/argmin_i32_1D_last_index.cairo index b092293b8..bdd262983 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo index 005e8270f..963804af6 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 201, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 149, sign: false }); - - + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 249, sign: false }); + data.append(i32 { mag: 73, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo index da7c37eb4..eda6965eb 100644 --- a/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_1D_last_index/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default.cairo b/src/tests/nodes/argmin_i32_2D_default.cairo index d97ab6f04..a47464d74 100644 --- a/src/tests/nodes/argmin_i32_2D_default.cairo +++ b/src/tests/nodes/argmin_i32_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo index 92af493ee..6c2ecdc75 100644 --- a/src/tests/nodes/argmin_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 64, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 28, sign: true }); - - + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 52, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo index 377152f30..4fb656f2a 100644 --- a/src/tests/nodes/argmin_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo index d475ad6d5..f350ee0c0 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo index 6f6f9297f..cb4190105 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 89, sign: true }); - - + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 68, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo index ffa5b8fca..af0e54527 100644 --- a/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_keepdims_false/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index.cairo b/src/tests/nodes/argmin_i32_2D_last_index.cairo index c7cc4c6b2..f845bfb3b 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo index 03eda0fdc..893757290 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 54, sign: true }); - data.append(i32 { mag: 59, sign: false }); - - + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 14, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo index 02d44a9af..18c2bb3fe 100644 --- a/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default.cairo b/src/tests/nodes/argmin_i32_3D_default.cairo index 8f0999fae..e7f363236 100644 --- a/src/tests/nodes/argmin_i32_3D_default.cairo +++ b/src/tests/nodes/argmin_i32_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo index e9a9fa2f7..2c763628a 100644 --- a/src/tests/nodes/argmin_i32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 40, sign: true }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 4, sign: false }); - - + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 108, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo index be944a9d1..8851cfbb7 100644 --- a/src/tests/nodes/argmin_i32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo index 596adeb1c..39acd02cf 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo index af6b48d07..96a3094b8 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 80, sign: true }); data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 68, sign: true }); - data.append(i32 { mag: 41, sign: true }); - data.append(i32 { mag: 32, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo index a5785e938..8304bcded 100644 --- a/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(1); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index.cairo b/src/tests/nodes/argmin_i32_3D_last_index.cairo index 111a7d66f..619963622 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo index 30476108c..672970547 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 92, sign: true }); data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 33, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo index 7d611909b..a698fcbf9 100644 --- a/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i32_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default.cairo b/src/tests/nodes/argmin_i8_1D_default.cairo index e12f3290a..de5a94bc9 100644 --- a/src/tests/nodes/argmin_i8_1D_default.cairo +++ b/src/tests/nodes/argmin_i8_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo index 05abc7998..6dbaca36a 100644 --- a/src/tests/nodes/argmin_i8_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 122, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 94, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmin_i8_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo index 2b1287185..a5b9b2b46 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo index adef9a836..78b033855 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 116, sign: false }); - - + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 72, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index.cairo b/src/tests/nodes/argmin_i8_1D_last_index.cairo index b54b17238..7e7105583 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo index 6875015e7..276a97682 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 48, sign: false }); - - + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 17, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo index da7c37eb4..1565560fe 100644 --- a/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_1D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default.cairo b/src/tests/nodes/argmin_i8_2D_default.cairo index b04856fa2..a29c862d7 100644 --- a/src/tests/nodes/argmin_i8_2D_default.cairo +++ b/src/tests/nodes/argmin_i8_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo index e0ebc90f2..2e4de7245 100644 --- a/src/tests/nodes/argmin_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 14, sign: false }); - - + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 73, sign: true }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 113, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo index 13835338e..6e8934615 100644 --- a/src/tests/nodes/argmin_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo index 650584f89..986a30216 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo index 750cdcda2..023aabe50 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 43, sign: true }); - - + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 103, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo index ffa5b8fca..2f17092da 100644 --- a/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,8 +8,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index.cairo b/src/tests/nodes/argmin_i8_2D_last_index.cairo index 822e6a939..55a20cbb2 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo index 543f7c5f2..8831598a9 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 68, sign: true }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 13, sign: false }); - data.append(i8 { mag: 91, sign: false }); - - + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 24, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo index 13835338e..18c2bb3fe 100644 --- a/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default.cairo b/src/tests/nodes/argmin_i8_3D_default.cairo index e25240235..76eaa3aa0 100644 --- a/src/tests/nodes/argmin_i8_3D_default.cairo +++ b/src/tests/nodes/argmin_i8_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo index 416b77545..ecb9c7434 100644 --- a/src/tests/nodes/argmin_i8_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 78, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 106, sign: false }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 14, sign: false }); - - + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 114, sign: true }); + data.append(i8 { mag: 70, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo index f2789da70..b0d2c103c 100644 --- a/src/tests/nodes/argmin_i8_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); + data.append(1); data.append(0); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo index d040750ed..58a17208a 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo index 9fbf341db..cf55d4fa2 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,14 +11,12 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 122, sign: true }); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 109, sign: true }); - data.append(i8 { mag: 107, sign: false }); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 78, sign: false }); - - + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 89, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo index a5785e938..8304bcded 100644 --- a/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(1); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index.cairo b/src/tests/nodes/argmin_i8_3D_last_index.cairo index ae1a6fae1..68d7ff9e8 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo index 1444a2d05..fbc71e6ef 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 110, sign: true }); - data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 96, sign: false }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 47, sign: true }); - data.append(i8 { mag: 74, sign: false }); - data.append(i8 { mag: 73, sign: true }); - - + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 114, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo index a4bc0e46d..451c4b7ce 100644 --- a/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_i8_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); + data.append(1); data.append(1); data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default.cairo b/src/tests/nodes/argmin_u32_1D_default.cairo index 5b8d68d12..4c50c9862 100644 --- a/src/tests/nodes/argmin_u32_1D_default.cairo +++ b/src/tests/nodes/argmin_u32_1D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo index 9e248f9c8..64da2a068 100644 --- a/src/tests/nodes/argmin_u32_1D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(91); - data.append(218); - data.append(115); - - + data.append(4); + data.append(97); + data.append(18); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo index 02af17401..eda6965eb 100644 --- a/src/tests/nodes/argmin_u32_1D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo index d3b930f2a..bb48fb618 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo index 959707ae7..bf6f439f7 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(119); - data.append(212); - data.append(167); - - + data.append(36); + data.append(24); + data.append(185); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo index 02af17401..1565560fe 100644 --- a/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_keepdims_false/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index.cairo b/src/tests/nodes/argmin_u32_1D_last_index.cairo index 91e0c2596..ff0a959c2 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo index 001dfdbde..e8fc6e12b 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(235); - data.append(37); - data.append(139); - - + data.append(202); + data.append(105); + data.append(177); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo index da7c37eb4..1565560fe 100644 --- a/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_1D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default.cairo b/src/tests/nodes/argmin_u32_2D_default.cairo index bef55bfb4..ca41d100b 100644 --- a/src/tests/nodes/argmin_u32_2D_default.cairo +++ b/src/tests/nodes/argmin_u32_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo index ade11e51c..b90f77a87 100644 --- a/src/tests/nodes/argmin_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(5); - data.append(48); - data.append(65); - data.append(136); - - + data.append(250); + data.append(71); + data.append(159); + data.append(119); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo index 13835338e..5541876d4 100644 --- a/src/tests/nodes/argmin_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo index 559e4739e..0f689a77c 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo index c27fbf9a5..8a488d6a4 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(119); - data.append(10); - data.append(247); - data.append(85); - - + data.append(205); + data.append(39); + data.append(206); + data.append(94); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo index b17cecf19..af0e54527 100644 --- a/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index.cairo b/src/tests/nodes/argmin_u32_2D_last_index.cairo index aa78bde3e..358077442 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo index e7e4c7404..4282a704b 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(173); - data.append(178); - data.append(94); - data.append(35); - - + data.append(182); + data.append(6); + data.append(161); + data.append(123); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo index 02d44a9af..5541876d4 100644 --- a/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_2D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default.cairo b/src/tests/nodes/argmin_u32_3D_default.cairo index e73589229..a68092a38 100644 --- a/src/tests/nodes/argmin_u32_3D_default.cairo +++ b/src/tests/nodes/argmin_u32_3D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo index 5362c67a3..3e8155d19 100644 --- a/src/tests/nodes/argmin_u32_3D_default/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(137); - data.append(2); - data.append(134); - data.append(142); - data.append(236); - data.append(246); - data.append(96); - data.append(150); - - + data.append(183); + data.append(101); + data.append(207); + data.append(197); + data.append(120); + data.append(204); + data.append(156); + data.append(234); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo index 06984466e..b0d2c103c 100644 --- a/src/tests/nodes/argmin_u32_3D_default/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo index ddb40ec07..d4cc43f00 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo index c81364173..24ab83d7e 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(136); - data.append(153); - data.append(113); - data.append(185); - data.append(177); - data.append(209); - data.append(38); - data.append(211); - - + data.append(15); + data.append(205); + data.append(192); + data.append(220); + data.append(182); + data.append(184); + data.append(11); + data.append(97); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo index 8b96ad6d7..fdae52d6a 100644 --- a/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_keepdims_false/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); data.append(1); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index.cairo b/src/tests/nodes/argmin_u32_3D_last_index.cairo index 641e6c5c1..1bf0bf127 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo index 46fcc91d1..0182a32a3 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(238); - data.append(240); - data.append(209); - data.append(189); - data.append(242); - data.append(56); - data.append(128); - data.append(113); - - + data.append(153); + data.append(28); + data.append(204); + data.append(0); + data.append(69); + data.append(220); + data.append(126); + data.append(80); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo index 20893c6f6..b0d2c103c 100644 --- a/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo +++ b/src/tests/nodes/argmin_u32_3D_last_index/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); data.append(1); + data.append(0); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16.cairo b/src/tests/nodes/asin_fp16x16.cairo index c4e9804c5..4ed6e61f5 100644 --- a/src/tests/nodes/asin_fp16x16.cairo +++ b/src/tests/nodes/asin_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asin_fp16x16/input_0.cairo b/src/tests/nodes/asin_fp16x16/input_0.cairo index 1109f01df..7fc563b23 100644 --- a/src/tests/nodes/asin_fp16x16/input_0.cairo +++ b/src/tests/nodes/asin_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 39178, sign: true }); - data.append(FP16x16 { mag: 15181, sign: true }); - data.append(FP16x16 { mag: 30205, sign: true }); - data.append(FP16x16 { mag: 13386, sign: false }); - - + data.append(FP16x16 { mag: 24425, sign: false }); + data.append(FP16x16 { mag: 40100, sign: true }); + data.append(FP16x16 { mag: 37592, sign: true }); + data.append(FP16x16 { mag: 55159, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp16x16/output_0.cairo b/src/tests/nodes/asin_fp16x16/output_0.cairo index b7a5453f3..1501342b1 100644 --- a/src/tests/nodes/asin_fp16x16/output_0.cairo +++ b/src/tests/nodes/asin_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 41993, sign: true }); - data.append(FP16x16 { mag: 15320, sign: true }); - data.append(FP16x16 { mag: 31391, sign: true }); - data.append(FP16x16 { mag: 13480, sign: false }); - - + data.append(FP16x16 { mag: 25029, sign: false }); + data.append(FP16x16 { mag: 43152, sign: true }); + data.append(FP16x16 { mag: 40036, sign: true }); + data.append(FP16x16 { mag: 65559, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23.cairo b/src/tests/nodes/asin_fp8x23.cairo index f986b0794..1ab699444 100644 --- a/src/tests/nodes/asin_fp8x23.cairo +++ b/src/tests/nodes/asin_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asin_fp8x23/input_0.cairo b/src/tests/nodes/asin_fp8x23/input_0.cairo index 00a785abc..8e3fe6424 100644 --- a/src/tests/nodes/asin_fp8x23/input_0.cairo +++ b/src/tests/nodes/asin_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2340803, sign: true }); - data.append(FP8x23 { mag: 1785691, sign: false }); - data.append(FP8x23 { mag: 1184830, sign: true }); - data.append(FP8x23 { mag: 2276088, sign: true }); - - + data.append(FP8x23 { mag: 5018963, sign: true }); + data.append(FP8x23 { mag: 1475178, sign: false }); + data.append(FP8x23 { mag: 4332453, sign: false }); + data.append(FP8x23 { mag: 3833460, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asin_fp8x23/output_0.cairo b/src/tests/nodes/asin_fp8x23/output_0.cairo index e799677ee..114fd9150 100644 --- a/src/tests/nodes/asin_fp8x23/output_0.cairo +++ b/src/tests/nodes/asin_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2372298, sign: true }); - data.append(FP8x23 { mag: 1799460, sign: false }); - data.append(FP8x23 { mag: 1188806, sign: true }); - data.append(FP8x23 { mag: 2304984, sign: true }); - - + data.append(FP8x23 { mag: 5380341, sign: true }); + data.append(FP8x23 { mag: 1482889, sign: false }); + data.append(FP8x23 { mag: 4552681, sign: false }); + data.append(FP8x23 { mag: 3981246, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16.cairo b/src/tests/nodes/asinh_fp16x16.cairo index 5afdc5a5b..1a94c21d4 100644 --- a/src/tests/nodes/asinh_fp16x16.cairo +++ b/src/tests/nodes/asinh_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_fp16x16/input_0.cairo b/src/tests/nodes/asinh_fp16x16/input_0.cairo index e937ae9ef..94ef84d7a 100644 --- a/src/tests/nodes/asinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 276699, sign: false }); - data.append(FP16x16 { mag: 249503, sign: false }); - data.append(FP16x16 { mag: 249091, sign: false }); - data.append(FP16x16 { mag: 241997, sign: false }); - - + data.append(FP16x16 { mag: 184210, sign: false }); + data.append(FP16x16 { mag: 129479, sign: false }); + data.append(FP16x16 { mag: 277479, sign: false }); + data.append(FP16x16 { mag: 131054, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp16x16/output_0.cairo b/src/tests/nodes/asinh_fp16x16/output_0.cairo index 8a06869b8..6376e4230 100644 --- a/src/tests/nodes/asinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/asinh_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 140720, sign: false }); - data.append(FP16x16 { mag: 134141, sign: false }); - data.append(FP16x16 { mag: 134037, sign: false }); - data.append(FP16x16 { mag: 132207, sign: false }); - - + data.append(FP16x16 { mag: 115137, sign: false }); + data.append(FP16x16 { mag: 93894, sign: false }); + data.append(FP16x16 { mag: 140899, sign: false }); + data.append(FP16x16 { mag: 94602, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23.cairo b/src/tests/nodes/asinh_fp8x23.cairo index 243c8bdc2..f4670f968 100644 --- a/src/tests/nodes/asinh_fp8x23.cairo +++ b/src/tests/nodes/asinh_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/asinh_fp8x23/input_0.cairo b/src/tests/nodes/asinh_fp8x23/input_0.cairo index d152e7f5c..f59934d7b 100644 --- a/src/tests/nodes/asinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 33826578, sign: false }); - data.append(FP8x23 { mag: 11114336, sign: false }); - data.append(FP8x23 { mag: 28274183, sign: false }); - data.append(FP8x23 { mag: 11950034, sign: false }); - - + data.append(FP8x23 { mag: 27455781, sign: false }); + data.append(FP8x23 { mag: 18897191, sign: false }); + data.append(FP8x23 { mag: 21438360, sign: false }); + data.append(FP8x23 { mag: 14100507, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_fp8x23/output_0.cairo b/src/tests/nodes/asinh_fp8x23/output_0.cairo index df65c9fa0..19b823afe 100644 --- a/src/tests/nodes/asinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/asinh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17637476, sign: false }); - data.append(FP8x23 { mag: 9173457, sign: false }); - data.append(FP8x23 { mag: 16186111, sign: false }); - data.append(FP8x23 { mag: 9665119, sign: false }); - - + data.append(FP8x23 { mag: 15950180, sign: false }); + data.append(FP8x23 { mag: 13012932, sign: false }); + data.append(FP8x23 { mag: 13989712, sign: false }); + data.append(FP8x23 { mag: 10830545, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16.cairo b/src/tests/nodes/asinh_i32_fp16x16.cairo deleted file mode 100644 index d66d05948..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_asinh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 460038553..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 82b2ebf08..000000000 --- a/src/tests/nodes/asinh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 119173, sign: false }); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 94610, sign: false }); - data.append(FP16x16 { mag: 57761, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23.cairo b/src/tests/nodes/asinh_i32_fp8x23.cairo deleted file mode 100644 index 415a0451e..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 8913e07cd..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo deleted file mode 100644 index 030e6be33..000000000 --- a/src/tests/nodes/asinh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12110092, sign: false }); - data.append(FP8x23 { mag: 7393497, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - data.append(FP8x23 { mag: 15254234, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16.cairo b/src/tests/nodes/asinh_i8_fp16x16.cairo deleted file mode 100644 index 4cfdcc4dd..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 0b4a1417b..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo deleted file mode 100644 index e32b27b55..000000000 --- a/src/tests/nodes/asinh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 94610, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23.cairo b/src/tests/nodes/asinh_i8_fp8x23.cairo deleted file mode 100644 index 48a6f52c0..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_asinh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo deleted file mode 100644 index f012abb30..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo deleted file mode 100644 index b3f140ef1..000000000 --- a/src/tests/nodes/asinh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7393280, sign: false }); - data.append(FP8x23 { mag: 17563648, sign: false }); - data.append(FP8x23 { mag: 12107776, sign: false }); - data.append(FP8x23 { mag: 17563648, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16.cairo b/src/tests/nodes/asinh_u32_fp16x16.cairo deleted file mode 100644 index e5d39a217..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_asinh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo deleted file mode 100644 index dcce3c169..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(3); - data.append(4); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo deleted file mode 100644 index d423ace19..000000000 --- a/src/tests/nodes/asinh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 57761, sign: false }); - data.append(FP16x16 { mag: 119173, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - data.append(FP16x16 { mag: 137279, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23.cairo b/src/tests/nodes/asinh_u32_fp8x23.cairo deleted file mode 100644 index 7c093315b..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_asinh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.asinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo deleted file mode 100644 index bd1bd7931..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(4); - data.append(1); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo deleted file mode 100644 index ac58fc4b7..000000000 --- a/src/tests/nodes/asinh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15254234, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - data.append(FP8x23 { mag: 7393497, sign: false }); - data.append(FP8x23 { mag: 17571722, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16.cairo b/src/tests/nodes/atan_fp16x16.cairo index 8f6744cd7..e112ce4f5 100644 --- a/src/tests/nodes/atan_fp16x16.cairo +++ b/src/tests/nodes/atan_fp16x16.cairo @@ -1,11 +1,11 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_fp16x16/input_0.cairo b/src/tests/nodes/atan_fp16x16/input_0.cairo index 9bc95f034..6101ec85b 100644 --- a/src/tests/nodes/atan_fp16x16/input_0.cairo +++ b/src/tests/nodes/atan_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7774631, sign: false }); - data.append(FP16x16 { mag: 6318193, sign: false }); - data.append(FP16x16 { mag: 90137, sign: true }); - data.append(FP16x16 { mag: 3857711, sign: false }); - - + data.append(FP16x16 { mag: 6783373, sign: false }); + data.append(FP16x16 { mag: 8040908, sign: false }); + data.append(FP16x16 { mag: 4875319, sign: false }); + data.append(FP16x16 { mag: 7007700, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp16x16/output_0.cairo b/src/tests/nodes/atan_fp16x16/output_0.cairo index 250147b80..72126e5ce 100644 --- a/src/tests/nodes/atan_fp16x16/output_0.cairo +++ b/src/tests/nodes/atan_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102391, sign: false }); - data.append(FP16x16 { mag: 102263, sign: false }); - data.append(FP16x16 { mag: 61743, sign: true }); - data.append(FP16x16 { mag: 101830, sign: false }); - - + data.append(FP16x16 { mag: 102310, sign: false }); + data.append(FP16x16 { mag: 102409, sign: false }); + data.append(FP16x16 { mag: 102062, sign: false }); + data.append(FP16x16 { mag: 102330, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23.cairo b/src/tests/nodes/atan_fp8x23.cairo index dc743bd29..71c6d2168 100644 --- a/src/tests/nodes/atan_fp8x23.cairo +++ b/src/tests/nodes/atan_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/atan_fp8x23/input_0.cairo b/src/tests/nodes/atan_fp8x23/input_0.cairo index ed1e35225..b83196538 100644 --- a/src/tests/nodes/atan_fp8x23/input_0.cairo +++ b/src/tests/nodes/atan_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 912484668, sign: false }); - data.append(FP8x23 { mag: 261874397, sign: false }); - data.append(FP8x23 { mag: 35394242, sign: true }); - data.append(FP8x23 { mag: 977878458, sign: false }); - - + data.append(FP8x23 { mag: 18618993, sign: false }); + data.append(FP8x23 { mag: 5949940, sign: false }); + data.append(FP8x23 { mag: 999751667, sign: false }); + data.append(FP8x23 { mag: 150920617, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_fp8x23/output_0.cairo b/src/tests/nodes/atan_fp8x23/output_0.cairo index 7e51ef6f4..aba8b0eb5 100644 --- a/src/tests/nodes/atan_fp8x23/output_0.cairo +++ b/src/tests/nodes/atan_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13099679, sign: false }); - data.append(FP8x23 { mag: 12908174, sign: false }); - data.append(FP8x23 { mag: 11224672, sign: true }); - data.append(FP8x23 { mag: 13104835, sign: false }); - - + data.append(FP8x23 { mag: 9625869, sign: false }); + data.append(FP8x23 { mag: 5175204, sign: false }); + data.append(FP8x23 { mag: 13106410, sign: false }); + data.append(FP8x23 { mag: 12711010, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16.cairo b/src/tests/nodes/atan_i32_fp16x16.cairo deleted file mode 100644 index 7095ca34b..000000000 --- a/src/tests/nodes/atan_i32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo b/src/tests/nodes/atan_i32_fp16x16/input_0.cairo deleted file mode 100644 index d6ba29844..000000000 --- a/src/tests/nodes/atan_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 48, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo b/src/tests/nodes/atan_i32_fp16x16/output_0.cairo deleted file mode 100644 index 103bb5fea..000000000 --- a/src/tests/nodes/atan_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102358, sign: false }); - data.append(FP16x16 { mag: 102378, sign: false }); - data.append(FP16x16 { mag: 98270, sign: false }); - data.append(FP16x16 { mag: 101578, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23.cairo b/src/tests/nodes/atan_i32_fp8x23.cairo deleted file mode 100644 index a817fb050..000000000 --- a/src/tests/nodes/atan_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo b/src/tests/nodes/atan_i32_fp8x23/input_0.cairo deleted file mode 100644 index 988bdae06..000000000 --- a/src/tests/nodes/atan_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 108, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 120, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo b/src/tests/nodes/atan_i32_fp8x23/output_0.cairo deleted file mode 100644 index c62213ed4..000000000 --- a/src/tests/nodes/atan_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11121764, sign: false }); - data.append(FP8x23 { mag: 13099124, sign: false }); - data.append(FP8x23 { mag: 13081473, sign: false }); - data.append(FP8x23 { mag: 13106891, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16.cairo b/src/tests/nodes/atan_i8_fp16x16.cairo deleted file mode 100644 index 54e65d9e5..000000000 --- a/src/tests/nodes/atan_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo b/src/tests/nodes/atan_i8_fp16x16/input_0.cairo deleted file mode 100644 index 18e53424f..000000000 --- a/src/tests/nodes/atan_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 40, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo b/src/tests/nodes/atan_i8_fp16x16/output_0.cairo deleted file mode 100644 index 3e7e5748d..000000000 --- a/src/tests/nodes/atan_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102373, sign: false }); - data.append(FP16x16 { mag: 101658, sign: false }); - data.append(FP16x16 { mag: 102134, sign: false }); - data.append(FP16x16 { mag: 101305, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23.cairo b/src/tests/nodes/atan_i8_fp8x23.cairo deleted file mode 100644 index 0d3efc784..000000000 --- a/src/tests/nodes/atan_i8_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo b/src/tests/nodes/atan_i8_fp8x23/input_0.cairo deleted file mode 100644 index bd77e4920..000000000 --- a/src/tests/nodes/atan_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 10, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo b/src/tests/nodes/atan_i8_fp8x23/output_0.cairo deleted file mode 100644 index 87dfe59f0..000000000 --- a/src/tests/nodes/atan_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12247040, sign: true }); - data.append(FP8x23 { mag: 12337152, sign: true }); - data.append(FP8x23 { mag: 12247040, sign: true }); - data.append(FP8x23 { mag: 10477568, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16.cairo b/src/tests/nodes/atan_u32_fp16x16.cairo deleted file mode 100644 index bbca2c8f0..000000000 --- a/src/tests/nodes/atan_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo b/src/tests/nodes/atan_u32_fp16x16/input_0.cairo deleted file mode 100644 index 8f63b12a7..000000000 --- a/src/tests/nodes/atan_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(92); - data.append(11); - data.append(66); - data.append(123); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo b/src/tests/nodes/atan_u32_fp16x16/output_0.cairo deleted file mode 100644 index f74f0cb17..000000000 --- a/src/tests/nodes/atan_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 102231, sign: false }); - data.append(FP16x16 { mag: 97002, sign: false }); - data.append(FP16x16 { mag: 101950, sign: false }); - data.append(FP16x16 { mag: 102410, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23.cairo b/src/tests/nodes/atan_u32_fp8x23.cairo deleted file mode 100644 index a82ac8aad..000000000 --- a/src/tests/nodes/atan_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_atan_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.atan(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo b/src/tests/nodes/atan_u32_fp8x23/input_0.cairo deleted file mode 100644 index 9f2960112..000000000 --- a/src/tests/nodes/atan_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(102); - data.append(114); - data.append(119); - data.append(93); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo b/src/tests/nodes/atan_u32_fp8x23/output_0.cairo deleted file mode 100644 index b9394f904..000000000 --- a/src/tests/nodes/atan_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13094556, sign: false }); - data.append(FP8x23 { mag: 13103212, sign: false }); - data.append(FP8x23 { mag: 13106303, sign: false }); - data.append(FP8x23 { mag: 13086598, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16.cairo b/src/tests/nodes/ceil_fp16x16.cairo index ed58a66d9..8f1c60b48 100644 --- a/src/tests/nodes/ceil_fp16x16.cairo +++ b/src/tests/nodes/ceil_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/ceil_fp16x16/input_0.cairo b/src/tests/nodes/ceil_fp16x16/input_0.cairo index 253460137..b1665abb1 100644 --- a/src/tests/nodes/ceil_fp16x16/input_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 23485, sign: false }); - data.append(FP16x16 { mag: 36237, sign: true }); - data.append(FP16x16 { mag: 31610, sign: false }); - data.append(FP16x16 { mag: 1040, sign: false }); - - + data.append(FP16x16 { mag: 57980, sign: false }); + data.append(FP16x16 { mag: 13481, sign: false }); + data.append(FP16x16 { mag: 37024, sign: false }); + data.append(FP16x16 { mag: 38899, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp16x16/output_0.cairo b/src/tests/nodes/ceil_fp16x16/output_0.cairo index b75ca726c..c30a1e465 100644 --- a/src/tests/nodes/ceil_fp16x16/output_0.cairo +++ b/src/tests/nodes/ceil_fp16x16/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,10 +11,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23.cairo b/src/tests/nodes/ceil_fp8x23.cairo index 73d90864a..15b9eb6d3 100644 --- a/src/tests/nodes/ceil_fp8x23.cairo +++ b/src/tests/nodes/ceil_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/ceil_fp8x23/input_0.cairo b/src/tests/nodes/ceil_fp8x23/input_0.cairo index 4008a5b79..c708e015d 100644 --- a/src/tests/nodes/ceil_fp8x23/input_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4332983, sign: true }); - data.append(FP8x23 { mag: 5907229, sign: true }); - data.append(FP8x23 { mag: 7324851, sign: false }); - data.append(FP8x23 { mag: 1964182, sign: false }); - - + data.append(FP8x23 { mag: 395238, sign: true }); + data.append(FP8x23 { mag: 8327668, sign: false }); + data.append(FP8x23 { mag: 3848433, sign: true }); + data.append(FP8x23 { mag: 3761123, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/ceil_fp8x23/output_0.cairo b/src/tests/nodes/ceil_fp8x23/output_0.cairo index ba8c25372..1b4e2b036 100644 --- a/src/tests/nodes/ceil_fp8x23/output_0.cairo +++ b/src/tests/nodes/ceil_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +11,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d.cairo b/src/tests/nodes/concat_fp16x16_1d.cairo index 68c1be1a0..7f5c0604c 100644 --- a/src/tests/nodes/concat_fp16x16_1d.cairo +++ b/src/tests/nodes/concat_fp16x16_1d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo index fe673e49f..3bb7db502 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,7 +12,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo index c46b70c37..babceb629 100644 --- a/src/tests/nodes/concat_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,7 +12,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo index 534bce1f4..a7d1a2cb4 100644 --- a/src/tests/nodes/concat_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_1d/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); @@ -17,7 +15,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d.cairo b/src/tests/nodes/concat_fp16x16_2d.cairo index f16a209ba..5667ab403 100644 --- a/src/tests/nodes/concat_fp16x16_2d.cairo +++ b/src/tests/nodes/concat_fp16x16_2d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo index ab66a57c5..8009dcc45 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo index a70d8ad82..488c15f80 100644 --- a/src/tests/nodes/concat_fp16x16_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -16,7 +14,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo index 4229624bb..2f8bd96c2 100644 --- a/src/tests/nodes/concat_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_2d/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(4); @@ -20,7 +18,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo index bcbf0ef64..2f6976d58 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -17,7 +16,7 @@ fn test_concat_fp16x16_3d_axis_1() { let input_1 = input_1::input_1(); let z = output_0::output_0(); - let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + let y = TensorTrait::concat(array![input_0, input_1 ].span(), 1); assert_eq(y, z); } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo index 62f5c0c10..e0824f678 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo index 659703dbf..c233f3bb8 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo index 298534a32..ee0f5f514 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_1/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -67,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo index 1bf642b07..4f6e55520 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2.cairo @@ -1,13 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,6 +17,6 @@ fn test_concat_fp16x16_3d_axis_2() { let z = output_0::output_0(); let y = TensorTrait::concat(array![input_0, input_1].span(), 2); - + assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo index 62f5c0c10..e0824f678 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo index 659703dbf..c233f3bb8 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo index 00a914a6f..ea28151bc 100644 --- a/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_axis_2/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -67,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default.cairo b/src/tests/nodes/concat_fp16x16_3d_default.cairo index 10153f1ca..f7ab8a10d 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo index 62f5c0c10..e0824f678 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo index 659703dbf..c233f3bb8 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo index 85b380441..e754615e0 100644 --- a/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_default/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(6); @@ -67,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo index 439fcf616..29b38d736 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1.cairo @@ -1,14 +1,13 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; +mod input_0; +mod input_1; +mod input_2; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -22,4 +21,4 @@ fn test_concat_fp16x16_3d_three_tensors_axis_1() { let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo index 62f5c0c10..e0824f678 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo index 659703dbf..c233f3bb8 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo index b86c6b754..cbde97f54 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/input_2.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_2() -> Tensor { data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo index 9eef2491a..08a81cd42 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_1/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -94,7 +92,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo index 36031e9fc..ee8a5efac 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2.cairo @@ -1,14 +1,13 @@ -mod input_0; -mod input_1; -mod input_2; -mod output_0; +mod input_0; +mod input_1; +mod input_2; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -22,4 +21,4 @@ fn test_concat_fp16x16_3d_three_tensors_axis_2() { let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); assert_eq(y, z); -} \ No newline at end of file +} diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo index 62f5c0c10..e0824f678 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo index 659703dbf..c233f3bb8 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo index b86c6b754..cbde97f54 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/input_2.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -40,7 +38,5 @@ fn input_2() -> Tensor { data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo index 18d73421b..198aca06b 100644 --- a/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp16x16_3d_three_tensors_axis_2/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -94,7 +92,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d.cairo b/src/tests/nodes/concat_fp8x23_1d.cairo index 2fbd0843a..f4558f2dc 100644 --- a/src/tests/nodes/concat_fp8x23_1d.cairo +++ b/src/tests/nodes/concat_fp8x23_1d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo index 70f856b7b..617c82eee 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo index 9940d8904..41cc35eff 100644 --- a/src/tests/nodes/concat_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo index c749e3416..93ad38d28 100644 --- a/src/tests/nodes/concat_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_1d/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d.cairo b/src/tests/nodes/concat_fp8x23_2d.cairo index 6c5f44d2b..1161ae825 100644 --- a/src/tests/nodes/concat_fp8x23_2d.cairo +++ b/src/tests/nodes/concat_fp8x23_2d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo index a864bb8cd..738ae80d4 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo index 057e3e4dc..1fbbf0089 100644 --- a/src/tests/nodes/concat_fp8x23_2d/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 58720256, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo index 5a7a25a0b..c4ed893d9 100644 --- a/src/tests/nodes/concat_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_2d/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -19,7 +18,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 58720256, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo index 8a0287144..608eab0ac 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo index 9f3390a22..372300cc0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: false }); data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo index 452e70970..686b022f0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo index c2b79bef3..2d44abdfe 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -66,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo index bb7faef59..1e372ed29 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo index 9f3390a22..372300cc0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: false }); data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo index 452e70970..686b022f0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo index 3dc43ac7f..bfa59db9b 100644 --- a/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_axis_2/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -66,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default.cairo b/src/tests/nodes/concat_fp8x23_3d_default.cairo index 01ccd7b85..58d71551b 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo index 9f3390a22..372300cc0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: false }); data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo index 452e70970..686b022f0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo index e69bc4196..27027c97c 100644 --- a/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_default/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -66,7 +65,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo index f2663361a..2ff90ab30 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,7 +18,7 @@ fn test_concat_fp8x23_3d_three_tensors_axis_1() { let input_2 = input_2::input_2(); let z = output_0::output_0(); - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + let y = TensorTrait::concat(array![input_0, input_1, input_2 ].span(), 1); assert_eq(y, z); } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo index 9f3390a22..372300cc0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: false }); data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo index 452e70970..686b022f0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo index 36c8e320b..c37d60e56 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/input_2.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_2() -> Tensor { data.append(FP8x23 { mag: 654311424, sign: false }); data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo index f67a3f7b1..e7c521235 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -93,7 +92,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 654311424, sign: false }); data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo index 254692893..5c1722456 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -18,7 +18,7 @@ fn test_concat_fp8x23_3d_three_tensors_axis_2() { let input_2 = input_2::input_2(); let z = output_0::output_0(); - let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + let y = TensorTrait::concat(array![input_0, input_1, input_2 ].span(), 2); assert_eq(y, z); } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo index 9f3390a22..372300cc0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 201326592, sign: false }); data.append(FP8x23 { mag: 209715200, sign: false }); data.append(FP8x23 { mag: 218103808, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo index 452e70970..686b022f0 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 427819008, sign: false }); data.append(FP8x23 { mag: 436207616, sign: false }); data.append(FP8x23 { mag: 444596224, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo index 36c8e320b..c37d60e56 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/input_2.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -39,7 +38,5 @@ fn input_2() -> Tensor { data.append(FP8x23 { mag: 654311424, sign: false }); data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo index e41d95a88..f79ebe78e 100644 --- a/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_fp8x23_3d_three_tensors_axis_2/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -93,7 +92,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 654311424, sign: false }); data.append(FP8x23 { mag: 662700032, sign: false }); data.append(FP8x23 { mag: 671088640, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d.cairo b/src/tests/nodes/concat_i32_1d.cairo index 2f8367b0d..153e9d6c1 100644 --- a/src/tests/nodes/concat_i32_1d.cairo +++ b/src/tests/nodes/concat_i32_1d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_1d/input_0.cairo b/src/tests/nodes/concat_i32_1d/input_0.cairo index c00a2d702..e9ce9f192 100644 --- a/src/tests/nodes/concat_i32_1d/input_0.cairo +++ b/src/tests/nodes/concat_i32_1d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/input_1.cairo b/src/tests/nodes/concat_i32_1d/input_1.cairo index e1650050d..3694655d5 100644 --- a/src/tests/nodes/concat_i32_1d/input_1.cairo +++ b/src/tests/nodes/concat_i32_1d/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_1d/output_0.cairo b/src/tests/nodes/concat_i32_1d/output_0.cairo index 23d89eb46..8513ed945 100644 --- a/src/tests/nodes/concat_i32_1d/output_0.cairo +++ b/src/tests/nodes/concat_i32_1d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d.cairo b/src/tests/nodes/concat_i32_2d.cairo index 2543ec4cc..4946993fc 100644 --- a/src/tests/nodes/concat_i32_2d.cairo +++ b/src/tests/nodes/concat_i32_2d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_2d/input_0.cairo b/src/tests/nodes/concat_i32_2d/input_0.cairo index b98f20165..fb4bacc7b 100644 --- a/src/tests/nodes/concat_i32_2d/input_0.cairo +++ b/src/tests/nodes/concat_i32_2d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/input_1.cairo b/src/tests/nodes/concat_i32_2d/input_1.cairo index 96a8d3e2d..e2ff14a65 100644 --- a/src/tests/nodes/concat_i32_2d/input_1.cairo +++ b/src/tests/nodes/concat_i32_2d/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 7, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_2d/output_0.cairo b/src/tests/nodes/concat_i32_2d/output_0.cairo index 5b676d07e..8940f4f2e 100644 --- a/src/tests/nodes/concat_i32_2d/output_0.cairo +++ b/src/tests/nodes/concat_i32_2d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -18,7 +17,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 7, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1.cairo index d5abf611a..cec13240f 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo index 8a3e3213d..aa97ad7e4 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo index 0ea0eec3f..edf434c98 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo index 8c18ca2d5..8e0dae429 100644 --- a/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -65,7 +64,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2.cairo b/src/tests/nodes/concat_i32_3d_axis_2.cairo index 1656922ed..6ff92f720 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo index 8a3e3213d..aa97ad7e4 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo index 0ea0eec3f..edf434c98 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo index 6927c5a4a..f424384cf 100644 --- a/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_axis_2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -65,7 +64,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default.cairo b/src/tests/nodes/concat_i32_3d_default.cairo index a6c651e3a..936890cd3 100644 --- a/src/tests/nodes/concat_i32_3d_default.cairo +++ b/src/tests/nodes/concat_i32_3d_default.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_default/input_0.cairo b/src/tests/nodes/concat_i32_3d_default/input_0.cairo index 8a3e3213d..aa97ad7e4 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/input_1.cairo b/src/tests/nodes/concat_i32_3d_default/input_1.cairo index 0ea0eec3f..edf434c98 100644 --- a/src/tests/nodes/concat_i32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_default/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_default/output_0.cairo b/src/tests/nodes/concat_i32_3d_default/output_0.cairo index 60dc21bd3..4ccedc484 100644 --- a/src/tests/nodes/concat_i32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_default/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -65,7 +64,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo index c7a42ba21..f83b54529 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1.cairo @@ -4,11 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo index 8a3e3213d..aa97ad7e4 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo index 0ea0eec3f..edf434c98 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo index fe57b4d80..26b58e89a 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/input_2.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_2() -> Tensor { data.append(i32 { mag: 78, sign: false }); data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo index 91d9fe8ea..bd6dca687 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -92,7 +91,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 78, sign: false }); data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo index 7293314c3..56bad9b55 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2.cairo @@ -4,11 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo index 8a3e3213d..aa97ad7e4 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 26, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo index 0ea0eec3f..edf434c98 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_1() -> Tensor { data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 52, sign: false }); data.append(i32 { mag: 53, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo index fe57b4d80..26b58e89a 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/input_2.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -38,7 +37,5 @@ fn input_2() -> Tensor { data.append(i32 { mag: 78, sign: false }); data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo index f218cc354..47a42821b 100644 --- a/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_i32_3d_three_tensors_axis_2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -92,7 +91,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 78, sign: false }); data.append(i32 { mag: 79, sign: false }); data.append(i32 { mag: 80, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d.cairo b/src/tests/nodes/concat_i8_1d.cairo new file mode 100644 index 000000000..82587bdbd --- /dev/null +++ b/src/tests/nodes/concat_i8_1d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_1d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_0.cairo b/src/tests/nodes/concat_i8_1d/input_0.cairo new file mode 100644 index 000000000..345f34d8c --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_0.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/input_1.cairo b/src/tests/nodes/concat_i8_1d/input_1.cairo new file mode 100644 index 000000000..e52565231 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/input_1.cairo @@ -0,0 +1,16 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_1d/output_0.cairo b/src/tests/nodes/concat_i8_1d/output_0.cairo new file mode 100644 index 000000000..d595c6ff9 --- /dev/null +++ b/src/tests/nodes/concat_i8_1d/output_0.cairo @@ -0,0 +1,19 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d.cairo b/src/tests/nodes/concat_i8_2d.cairo new file mode 100644 index 000000000..662e0c669 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_2d() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_0.cairo b/src/tests/nodes/concat_i8_2d/input_0.cairo new file mode 100644 index 000000000..06f8f1737 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_0.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/input_1.cairo b/src/tests/nodes/concat_i8_2d/input_1.cairo new file mode 100644 index 000000000..38a8a66a8 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/input_1.cairo @@ -0,0 +1,18 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(2); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_2d/output_0.cairo b/src/tests/nodes/concat_i8_2d/output_0.cairo new file mode 100644 index 000000000..77011ad63 --- /dev/null +++ b/src/tests/nodes/concat_i8_2d/output_0.cairo @@ -0,0 +1,22 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(4); + shape.append(2); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1.cairo new file mode 100644 index 000000000..d8587be03 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo new file mode 100644 index 000000000..0c57d7014 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_1/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(6); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2.cairo b/src/tests/nodes/concat_i8_3d_axis_2.cairo new file mode 100644 index 000000000..f974a8273 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo new file mode 100644 index 000000000..49d2702e1 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_axis_2/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(6); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default.cairo b/src/tests/nodes/concat_i8_3d_default.cairo new file mode 100644 index 000000000..9c1159d15 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default.cairo @@ -0,0 +1,22 @@ +mod input_0; +mod input_1; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_default() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1].span(), 0); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_0.cairo b/src/tests/nodes/concat_i8_3d_default/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/input_1.cairo b/src/tests/nodes/concat_i8_3d_default/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_default/output_0.cairo b/src/tests/nodes/concat_i8_3d_default/output_0.cairo new file mode 100644 index 000000000..58df2dbe5 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_default/output_0.cairo @@ -0,0 +1,69 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(6); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo new file mode 100644 index 000000000..6fc3f9b99 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_1() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 1); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo new file mode 100644 index 000000000..7ae4b9db0 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo new file mode 100644 index 000000000..fff9fef15 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_1/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(9); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo new file mode 100644 index 000000000..549959afa --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2.cairo @@ -0,0 +1,24 @@ +mod input_0; +mod input_1; +mod input_2; +mod output_0; + + +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; +use orion::utils::assert_eq; + +#[test] +#[available_gas(2000000000)] +fn test_concat_i8_3d_three_tensors_axis_2() { + let input_0 = input_0::input_0(); + let input_1 = input_1::input_1(); + let input_2 = input_2::input_2(); + let z = output_0::output_0(); + + let y = TensorTrait::concat(array![input_0, input_1, input_2].span(), 2); + + assert_eq(y, z); +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo new file mode 100644 index 000000000..609111d3d --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_0.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo new file mode 100644 index 000000000..c38024167 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_1.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_1() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo new file mode 100644 index 000000000..7ae4b9db0 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/input_2.cairo @@ -0,0 +1,42 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn input_2() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(3); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo new file mode 100644 index 000000000..49d8bb277 --- /dev/null +++ b/src/tests/nodes/concat_i8_3d_three_tensors_axis_2/output_0.cairo @@ -0,0 +1,96 @@ +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; + +fn output_0() -> Tensor { + let mut shape = ArrayTrait::::new(); + shape.append(3); + shape.append(3); + shape.append(9); + + let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 27, sign: false }); + data.append(FP8x23 { mag: 28, sign: false }); + data.append(FP8x23 { mag: 29, sign: false }); + data.append(FP8x23 { mag: 54, sign: false }); + data.append(FP8x23 { mag: 55, sign: false }); + data.append(FP8x23 { mag: 56, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); + data.append(FP8x23 { mag: 30, sign: false }); + data.append(FP8x23 { mag: 31, sign: false }); + data.append(FP8x23 { mag: 32, sign: false }); + data.append(FP8x23 { mag: 57, sign: false }); + data.append(FP8x23 { mag: 58, sign: false }); + data.append(FP8x23 { mag: 59, sign: false }); + data.append(FP8x23 { mag: 6, sign: false }); + data.append(FP8x23 { mag: 7, sign: false }); + data.append(FP8x23 { mag: 8, sign: false }); + data.append(FP8x23 { mag: 33, sign: false }); + data.append(FP8x23 { mag: 34, sign: false }); + data.append(FP8x23 { mag: 35, sign: false }); + data.append(FP8x23 { mag: 60, sign: false }); + data.append(FP8x23 { mag: 61, sign: false }); + data.append(FP8x23 { mag: 62, sign: false }); + data.append(FP8x23 { mag: 9, sign: false }); + data.append(FP8x23 { mag: 10, sign: false }); + data.append(FP8x23 { mag: 11, sign: false }); + data.append(FP8x23 { mag: 36, sign: false }); + data.append(FP8x23 { mag: 37, sign: false }); + data.append(FP8x23 { mag: 38, sign: false }); + data.append(FP8x23 { mag: 63, sign: false }); + data.append(FP8x23 { mag: 64, sign: false }); + data.append(FP8x23 { mag: 65, sign: false }); + data.append(FP8x23 { mag: 12, sign: false }); + data.append(FP8x23 { mag: 13, sign: false }); + data.append(FP8x23 { mag: 14, sign: false }); + data.append(FP8x23 { mag: 39, sign: false }); + data.append(FP8x23 { mag: 40, sign: false }); + data.append(FP8x23 { mag: 41, sign: false }); + data.append(FP8x23 { mag: 66, sign: false }); + data.append(FP8x23 { mag: 67, sign: false }); + data.append(FP8x23 { mag: 68, sign: false }); + data.append(FP8x23 { mag: 15, sign: false }); + data.append(FP8x23 { mag: 16, sign: false }); + data.append(FP8x23 { mag: 17, sign: false }); + data.append(FP8x23 { mag: 42, sign: false }); + data.append(FP8x23 { mag: 43, sign: false }); + data.append(FP8x23 { mag: 44, sign: false }); + data.append(FP8x23 { mag: 69, sign: false }); + data.append(FP8x23 { mag: 70, sign: false }); + data.append(FP8x23 { mag: 71, sign: false }); + data.append(FP8x23 { mag: 18, sign: false }); + data.append(FP8x23 { mag: 19, sign: false }); + data.append(FP8x23 { mag: 20, sign: false }); + data.append(FP8x23 { mag: 45, sign: false }); + data.append(FP8x23 { mag: 46, sign: false }); + data.append(FP8x23 { mag: 47, sign: false }); + data.append(FP8x23 { mag: 72, sign: false }); + data.append(FP8x23 { mag: 73, sign: false }); + data.append(FP8x23 { mag: 74, sign: false }); + data.append(FP8x23 { mag: 21, sign: false }); + data.append(FP8x23 { mag: 22, sign: false }); + data.append(FP8x23 { mag: 23, sign: false }); + data.append(FP8x23 { mag: 48, sign: false }); + data.append(FP8x23 { mag: 49, sign: false }); + data.append(FP8x23 { mag: 50, sign: false }); + data.append(FP8x23 { mag: 75, sign: false }); + data.append(FP8x23 { mag: 76, sign: false }); + data.append(FP8x23 { mag: 77, sign: false }); + data.append(FP8x23 { mag: 24, sign: false }); + data.append(FP8x23 { mag: 25, sign: false }); + data.append(FP8x23 { mag: 26, sign: false }); + data.append(FP8x23 { mag: 51, sign: false }); + data.append(FP8x23 { mag: 52, sign: false }); + data.append(FP8x23 { mag: 53, sign: false }); + data.append(FP8x23 { mag: 78, sign: false }); + data.append(FP8x23 { mag: 79, sign: false }); + data.append(FP8x23 { mag: 80, sign: false }); + TensorTrait::new(shape.span(), data.span()) +} \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d.cairo b/src/tests/nodes/concat_u32_1d.cairo index 3f4117c0a..700e7bd2f 100644 --- a/src/tests/nodes/concat_u32_1d.cairo +++ b/src/tests/nodes/concat_u32_1d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_1d/input_0.cairo b/src/tests/nodes/concat_u32_1d/input_0.cairo index f5f32b096..26ecd350b 100644 --- a/src/tests/nodes/concat_u32_1d/input_0.cairo +++ b/src/tests/nodes/concat_u32_1d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn input_0() -> Tensor { data.append(0); data.append(1); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/input_1.cairo b/src/tests/nodes/concat_u32_1d/input_1.cairo index 8f746063d..ee5e4ed99 100644 --- a/src/tests/nodes/concat_u32_1d/input_1.cairo +++ b/src/tests/nodes/concat_u32_1d/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn input_1() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_1d/output_0.cairo b/src/tests/nodes/concat_u32_1d/output_0.cairo index cac406506..3b6302d9f 100644 --- a/src/tests/nodes/concat_u32_1d/output_0.cairo +++ b/src/tests/nodes/concat_u32_1d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d.cairo b/src/tests/nodes/concat_u32_2d.cairo index 74a620db4..7ae4a8eed 100644 --- a/src/tests/nodes/concat_u32_2d.cairo +++ b/src/tests/nodes/concat_u32_2d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_2d/input_0.cairo b/src/tests/nodes/concat_u32_2d/input_0.cairo index a45833125..6c324ceb6 100644 --- a/src/tests/nodes/concat_u32_2d/input_0.cairo +++ b/src/tests/nodes/concat_u32_2d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(1); data.append(2); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/input_1.cairo b/src/tests/nodes/concat_u32_2d/input_1.cairo index 4bbdd1760..df41e2c70 100644 --- a/src/tests/nodes/concat_u32_2d/input_1.cairo +++ b/src/tests/nodes/concat_u32_2d/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_1() -> Tensor { data.append(5); data.append(6); data.append(7); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_2d/output_0.cairo b/src/tests/nodes/concat_u32_2d/output_0.cairo index 9f7b2dfed..d2b9b09cb 100644 --- a/src/tests/nodes/concat_u32_2d/output_0.cairo +++ b/src/tests/nodes/concat_u32_2d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,5 @@ fn output_0() -> Tensor { data.append(5); data.append(6); data.append(7); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1.cairo index 622205de6..32698c264 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo index 616831948..353984f4f 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_0() -> Tensor { data.append(24); data.append(25); data.append(26); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo index 0bca198d7..ce950d8a0 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_1() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo index 3268695e8..143fd9c91 100644 --- a/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_1/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -64,7 +63,5 @@ fn output_0() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2.cairo b/src/tests/nodes/concat_u32_3d_axis_2.cairo index 1d9a5e6aa..6788eaa38 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo index 616831948..353984f4f 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_0() -> Tensor { data.append(24); data.append(25); data.append(26); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo index 0bca198d7..ce950d8a0 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_1() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo index 85c516beb..b9bb512d9 100644 --- a/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_axis_2/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -64,7 +63,5 @@ fn output_0() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default.cairo b/src/tests/nodes/concat_u32_3d_default.cairo index 9c2d16474..5ffbd651b 100644 --- a/src/tests/nodes/concat_u32_3d_default.cairo +++ b/src/tests/nodes/concat_u32_3d_default.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_default/input_0.cairo b/src/tests/nodes/concat_u32_3d_default/input_0.cairo index 616831948..353984f4f 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_0() -> Tensor { data.append(24); data.append(25); data.append(26); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/input_1.cairo b/src/tests/nodes/concat_u32_3d_default/input_1.cairo index 0bca198d7..ce950d8a0 100644 --- a/src/tests/nodes/concat_u32_3d_default/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_default/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_1() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_default/output_0.cairo b/src/tests/nodes/concat_u32_3d_default/output_0.cairo index 327af1fd4..d4ad140b0 100644 --- a/src/tests/nodes/concat_u32_3d_default/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -64,7 +63,5 @@ fn output_0() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo index 5b613c0ee..b15cde11b 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo index 616831948..353984f4f 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_0() -> Tensor { data.append(24); data.append(25); data.append(26); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo index 0bca198d7..ce950d8a0 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_1() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo index 55ab7d447..686accc0a 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/input_2.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_2() -> Tensor { data.append(78); data.append(79); data.append(80); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo index 4171de88e..944680ca8 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_1/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -91,7 +90,5 @@ fn output_0() -> Tensor { data.append(78); data.append(79); data.append(80); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo index 5a08b4cbe..233842e37 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo index 616831948..353984f4f 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_0() -> Tensor { data.append(24); data.append(25); data.append(26); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo index 0bca198d7..ce950d8a0 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_1() -> Tensor { data.append(51); data.append(52); data.append(53); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo index 55ab7d447..686accc0a 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/input_2.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -37,7 +36,5 @@ fn input_2() -> Tensor { data.append(78); data.append(79); data.append(80); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo index 032de4f77..c2b13d310 100644 --- a/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo +++ b/src/tests/nodes/concat_u32_3d_three_tensors_axis_2/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -91,7 +90,5 @@ fn output_0() -> Tensor { data.append(78); data.append(79); data.append(80); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16.cairo b/src/tests/nodes/cos_fp16x16.cairo index 35b11efad..dbfb6b27f 100644 --- a/src/tests/nodes/cos_fp16x16.cairo +++ b/src/tests/nodes/cos_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_fp16x16/input_0.cairo b/src/tests/nodes/cos_fp16x16/input_0.cairo index 1d32f6c03..5ae705b41 100644 --- a/src/tests/nodes/cos_fp16x16/input_0.cairo +++ b/src/tests/nodes/cos_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1124701, sign: false }); - data.append(FP16x16 { mag: 8168605, sign: false }); - data.append(FP16x16 { mag: 1101252, sign: false }); - data.append(FP16x16 { mag: 3797411, sign: false }); - - + data.append(FP16x16 { mag: 1737975, sign: false }); + data.append(FP16x16 { mag: 6312706, sign: false }); + data.append(FP16x16 { mag: 5651744, sign: false }); + data.append(FP16x16 { mag: 6320564, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp16x16/output_0.cairo b/src/tests/nodes/cos_fp16x16/output_0.cairo index d2466f6e2..7d3e451d1 100644 --- a/src/tests/nodes/cos_fp16x16/output_0.cairo +++ b/src/tests/nodes/cos_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 7661, sign: true }); - data.append(FP16x16 { mag: 34261, sign: false }); - data.append(FP16x16 { mag: 29970, sign: true }); - data.append(FP16x16 { mag: 11446, sign: false }); - - + data.append(FP16x16 { mag: 11999, sign: false }); + data.append(FP16x16 { mag: 31746, sign: true }); + data.append(FP16x16 { mag: 10118, sign: true }); + data.append(FP16x16 { mag: 38375, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23.cairo b/src/tests/nodes/cos_fp8x23.cairo index 16b8ab8e1..93bd1b161 100644 --- a/src/tests/nodes/cos_fp8x23.cairo +++ b/src/tests/nodes/cos_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cos_fp8x23/input_0.cairo b/src/tests/nodes/cos_fp8x23/input_0.cairo index 09db416db..d13e263ef 100644 --- a/src/tests/nodes/cos_fp8x23/input_0.cairo +++ b/src/tests/nodes/cos_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 659237788, sign: false }); - data.append(FP8x23 { mag: 648364998, sign: false }); - data.append(FP8x23 { mag: 215345765, sign: false }); - data.append(FP8x23 { mag: 592758692, sign: false }); - - + data.append(FP8x23 { mag: 658990, sign: true }); + data.append(FP8x23 { mag: 330978878, sign: false }); + data.append(FP8x23 { mag: 820031043, sign: false }); + data.append(FP8x23 { mag: 154991942, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_fp8x23/output_0.cairo b/src/tests/nodes/cos_fp8x23/output_0.cairo index 1409351e1..810a3468c 100644 --- a/src/tests/nodes/cos_fp8x23/output_0.cairo +++ b/src/tests/nodes/cos_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8379165, sign: true }); - data.append(FP8x23 { mag: 2655577, sign: true }); - data.append(FP8x23 { mag: 7201553, sign: false }); - data.append(FP8x23 { mag: 197048, sign: false }); - - + data.append(FP8x23 { mag: 8362736, sign: false }); + data.append(FP8x23 { mag: 1550053, sign: true }); + data.append(FP8x23 { mag: 7833162, sign: true }); + data.append(FP8x23 { mag: 7811558, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16.cairo b/src/tests/nodes/cos_i32_fp16x16.cairo deleted file mode 100644 index 03d5c32d9..000000000 --- a/src/tests/nodes/cos_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cos_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo b/src/tests/nodes/cos_i32_fp16x16/input_0.cairo deleted file mode 100644 index c466d583f..000000000 --- a/src/tests/nodes/cos_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo b/src/tests/nodes/cos_i32_fp16x16/output_0.cairo deleted file mode 100644 index 0bacfec01..000000000 --- a/src/tests/nodes/cos_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 11824, sign: true }); - data.append(FP16x16 { mag: 53692, sign: true }); - data.append(FP16x16 { mag: 64880, sign: true }); - data.append(FP16x16 { mag: 49786, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23.cairo b/src/tests/nodes/cos_i32_fp8x23.cairo deleted file mode 100644 index 514f6e3e5..000000000 --- a/src/tests/nodes/cos_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo b/src/tests/nodes/cos_i32_fp8x23/input_0.cairo deleted file mode 100644 index 48e320a73..000000000 --- a/src/tests/nodes/cos_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 110, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 95, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo b/src/tests/nodes/cos_i32_fp8x23/output_0.cairo deleted file mode 100644 index 37b8f89ee..000000000 --- a/src/tests/nodes/cos_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8380393, sign: true }); - data.append(FP8x23 { mag: 2165113, sign: true }); - data.append(FP8x23 { mag: 778263, sign: true }); - data.append(FP8x23 { mag: 6125139, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16.cairo b/src/tests/nodes/cos_i8_fp16x16.cairo deleted file mode 100644 index 8a7faf5d6..000000000 --- a/src/tests/nodes/cos_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo b/src/tests/nodes/cos_i8_fp16x16/input_0.cairo deleted file mode 100644 index a41f5b68b..000000000 --- a/src/tests/nodes/cos_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 55, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo b/src/tests/nodes/cos_i8_fp16x16/output_0.cairo deleted file mode 100644 index ff86a5034..000000000 --- a/src/tests/nodes/cos_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 50900, sign: false }); - data.append(FP16x16 { mag: 37339, sign: false }); - data.append(FP16x16 { mag: 59948, sign: false }); - data.append(FP16x16 { mag: 1450, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23.cairo b/src/tests/nodes/cos_i8_fp8x23.cairo deleted file mode 100644 index 0c69e65bb..000000000 --- a/src/tests/nodes/cos_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_cos_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo b/src/tests/nodes/cos_i8_fp8x23/input_0.cairo deleted file mode 100644 index 5cc3e913a..000000000 --- a/src/tests/nodes/cos_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo b/src/tests/nodes/cos_i8_fp8x23/output_0.cairo deleted file mode 100644 index 857f19768..000000000 --- a/src/tests/nodes/cos_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8306688, sign: true }); - data.append(FP8x23 { mag: 2379776, sign: false }); - data.append(FP8x23 { mag: 5484544, sign: true }); - data.append(FP8x23 { mag: 5484544, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16.cairo b/src/tests/nodes/cos_u32_fp16x16.cairo deleted file mode 100644 index b5859750f..000000000 --- a/src/tests/nodes/cos_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cos_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo b/src/tests/nodes/cos_u32_fp16x16/input_0.cairo deleted file mode 100644 index 480b9d527..000000000 --- a/src/tests/nodes/cos_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(63); - data.append(124); - data.append(56); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo b/src/tests/nodes/cos_u32_fp16x16/output_0.cairo deleted file mode 100644 index 00cb9e8fc..000000000 --- a/src/tests/nodes/cos_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 64611, sign: false }); - data.append(FP16x16 { mag: 6080, sign: true }); - data.append(FP16x16 { mag: 55916, sign: false }); - data.append(FP16x16 { mag: 49407, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23.cairo b/src/tests/nodes/cos_u32_fp8x23.cairo deleted file mode 100644 index 0c15ccc9f..000000000 --- a/src/tests/nodes/cos_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cos_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cos(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo b/src/tests/nodes/cos_u32_fp8x23/input_0.cairo deleted file mode 100644 index 4e242ade3..000000000 --- a/src/tests/nodes/cos_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(35); - data.append(79); - data.append(61); - data.append(114); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo b/src/tests/nodes/cos_u32_fp8x23/output_0.cairo deleted file mode 100644 index 6890334dc..000000000 --- a/src/tests/nodes/cos_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7580719, sign: true }); - data.append(FP8x23 { mag: 7515949, sign: true }); - data.append(FP8x23 { mag: 2165113, sign: true }); - data.append(FP8x23 { mag: 5196915, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16.cairo b/src/tests/nodes/cosh_fp16x16.cairo index aa71896ce..772a93f25 100644 --- a/src/tests/nodes/cosh_fp16x16.cairo +++ b/src/tests/nodes/cosh_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_fp16x16/input_0.cairo b/src/tests/nodes/cosh_fp16x16/input_0.cairo index 7b6076506..1b196b149 100644 --- a/src/tests/nodes/cosh_fp16x16/input_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 174763, sign: false }); - data.append(FP16x16 { mag: 5569, sign: false }); - data.append(FP16x16 { mag: 19618, sign: true }); - data.append(FP16x16 { mag: 34591, sign: true }); - - + data.append(FP16x16 { mag: 180002, sign: false }); + data.append(FP16x16 { mag: 115071, sign: true }); + data.append(FP16x16 { mag: 111643, sign: true }); + data.append(FP16x16 { mag: 184638, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp16x16/output_0.cairo b/src/tests/nodes/cosh_fp16x16/output_0.cairo index 1e223f76c..8b4f0f741 100644 --- a/src/tests/nodes/cosh_fp16x16/output_0.cairo +++ b/src/tests/nodes/cosh_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 473877, sign: false }); - data.append(FP16x16 { mag: 65772, sign: false }); - data.append(FP16x16 { mag: 68494, sign: false }); - data.append(FP16x16 { mag: 74879, sign: false }); - - + data.append(FP16x16 { mag: 512946, sign: false }); + data.append(FP16x16 { mag: 195335, sign: false }); + data.append(FP16x16 { mag: 185972, sign: false }); + data.append(FP16x16 { mag: 550252, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23.cairo b/src/tests/nodes/cosh_fp8x23.cairo index 0e3d5e4dd..f12f6c751 100644 --- a/src/tests/nodes/cosh_fp8x23.cairo +++ b/src/tests/nodes/cosh_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cosh_fp8x23/input_0.cairo b/src/tests/nodes/cosh_fp8x23/input_0.cairo index f7da429c1..66dea31f1 100644 --- a/src/tests/nodes/cosh_fp8x23/input_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1254371, sign: false }); - data.append(FP8x23 { mag: 21304437, sign: false }); - data.append(FP8x23 { mag: 12450493, sign: true }); - data.append(FP8x23 { mag: 6511071, sign: true }); - - + data.append(FP8x23 { mag: 23096690, sign: true }); + data.append(FP8x23 { mag: 10692965, sign: false }); + data.append(FP8x23 { mag: 17437172, sign: true }); + data.append(FP8x23 { mag: 24645388, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_fp8x23/output_0.cairo b/src/tests/nodes/cosh_fp8x23/output_0.cairo index 0453f74ac..6069e6a4a 100644 --- a/src/tests/nodes/cosh_fp8x23/output_0.cairo +++ b/src/tests/nodes/cosh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8482567, sign: false }); - data.append(FP8x23 { mag: 53496638, sign: false }); - data.append(FP8x23 { mag: 19453932, sign: false }); - data.append(FP8x23 { mag: 11044927, sign: false }); - - + data.append(FP8x23 { mag: 66096700, sign: false }); + data.append(FP8x23 { mag: 16178040, sign: false }); + data.append(FP8x23 { mag: 34053341, sign: false }); + data.append(FP8x23 { mag: 79399253, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16.cairo b/src/tests/nodes/cosh_i32_fp16x16.cairo deleted file mode 100644 index c83b76317..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cosh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 4fbbfd4c1..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 7950a2d11..000000000 --- a/src/tests/nodes/cosh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 246559, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 659794, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23.cairo b/src/tests/nodes/cosh_i32_fp8x23.cairo deleted file mode 100644 index 27ef2732a..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 90b330149..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo deleted file mode 100644 index c2e2eb616..000000000 --- a/src/tests/nodes/cosh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 84453669, sign: false }); - data.append(FP8x23 { mag: 84453669, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16.cairo b/src/tests/nodes/cosh_i8_fp16x16.cairo deleted file mode 100644 index 1a0b689f5..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 473ba7e65..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo b/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 55af66e71..000000000 --- a/src/tests/nodes/cosh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 246559, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23.cairo b/src/tests/nodes/cosh_i8_fp8x23.cairo deleted file mode 100644 index cb5ac3d57..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_cosh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo deleted file mode 100644 index bea77b274..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo b/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo deleted file mode 100644 index e19ddb17a..000000000 --- a/src/tests/nodes/cosh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - data.append(FP8x23 { mag: 31555584, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16.cairo b/src/tests/nodes/cosh_u32_fp16x16.cairo deleted file mode 100644 index 868823194..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_cosh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo deleted file mode 100644 index d8184661c..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(5); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo b/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo deleted file mode 100644 index acb38e7ab..000000000 --- a/src/tests/nodes/cosh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - data.append(FP16x16 { mag: 4863423, sign: false }); - data.append(FP16x16 { mag: 101127, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23.cairo b/src/tests/nodes/cosh_u32_fp8x23.cairo deleted file mode 100644 index 3b01a5a6f..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_cosh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.cosh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo deleted file mode 100644 index 68993312c..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(4); - data.append(1); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo b/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo deleted file mode 100644 index 5e570ad94..000000000 --- a/src/tests/nodes/cosh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 229078060, sign: false }); - data.append(FP8x23 { mag: 229078060, sign: false }); - data.append(FP8x23 { mag: 12944298, sign: false }); - data.append(FP8x23 { mag: 84453669, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo index f93b1c93f..8bee503e5 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo index 3009292c2..175583ac6 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo index f7b448590..9e94ff3a3 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo index c06c4d71c..f1b19e9d6 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo index 3009292c2..175583ac6 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo index 04f5e9b62..a6a0cc910 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo index f1498160e..ec84dbad4 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo index 3009292c2..175583ac6 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo index ff141c51b..0dd64716f 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo index 724109563..a488da6fd 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo index 3009292c2..175583ac6 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo index 01c2749bb..f654a1f59 100644 --- a/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(5); @@ -16,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo index 2e8591a65..5492b5631 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo index 4369e0e11..062fb7dd6 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -18,7 +16,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo index 7e1ea29d1..3f72a9934 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -18,7 +16,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo index 767be3046..1637170e9 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo index 4369e0e11..062fb7dd6 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -18,7 +16,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo index 7abe9e587..a4aaa86cc 100644 --- a/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -18,7 +16,5 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo index 4e871eb38..64dc9537b 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo index 8441eb7e5..7c097058a 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo index 21b3ad380..0567359ee 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 83886080, sign: false }); data.append(FP8x23 { mag: 125829120, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo index 95a041190..ae75e2f77 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo index 8441eb7e5..7c097058a 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo index fec948eae..0272f6c36 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 83886080, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo index 2ae807b26..80a866b5b 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo index 8441eb7e5..7c097058a 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo index 0e624aa83..fe3108e56 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 100663296, sign: false }); data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo index 8d337b282..8ad9e5de1 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo index 8441eb7e5..7c097058a 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo index 249049c13..41aa2f72f 100644 --- a/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_1d_reverse_exclusive/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo index 705484c28..11dae065c 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo index 62272c00b..1f68e2bc8 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo index 9e25de000..15d59ba23 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_0/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 58720256, sign: false }); data.append(FP8x23 { mag: 75497472, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo index 519937370..61bc3d1c4 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo index 62272c00b..1f68e2bc8 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo index fa9b5ece3..04c5f8028 100644 --- a/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_fp8x23_2d_axis_1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,5 @@ fn output_0() -> Tensor { data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 125829120, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default.cairo b/src/tests/nodes/cumsum_i32_1d_default.cairo index 23f599828..a6cea41e5 100644 --- a/src/tests/nodes/cumsum_i32_1d_default.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo index 20a7c3317..0ac4a9f61 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo index 2bd621824..60da35a37 100644 --- a/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_default/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 10, sign: false }); data.append(i32 { mag: 15, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo index 51d2e8156..58b497bb4 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo index 20a7c3317..0ac4a9f61 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo index 3c47044cf..1299ea06c 100644 --- a/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_exclusive/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 10, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse.cairo b/src/tests/nodes/cumsum_i32_1d_reverse.cairo index cb24b0908..88a21cb5f 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo index 20a7c3317..0ac4a9f61 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo index f6283b984..2fcc00a39 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 12, sign: false }); data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo index 21b7c46dc..d3c9d8cf1 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo index 20a7c3317..0ac4a9f61 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo index 9b71025f4..60333d5cb 100644 --- a/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_1d_reverse_exclusive/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo index 5fd81dc0f..9564c8627 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo index 9d9583581..ae45ce844 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo index 57265935b..a6ac4eec4 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_0/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 7, sign: false }); data.append(i32 { mag: 9, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo index 16773fdf2..6336d5204 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo index 9d9583581..ae45ce844 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 5, sign: false }); data.append(i32 { mag: 6, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo index 84c181b29..fe9c23754 100644 --- a/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i32_2d_axis_1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn output_0() -> Tensor { data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 15, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default.cairo b/src/tests/nodes/cumsum_i8_1d_default.cairo index 2129d5af4..9b4d9a835 100644 --- a/src/tests/nodes/cumsum_i8_1d_default.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo index 78d4fffb9..96c706cdb 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo index 76f19885e..5edbc3a6e 100644 --- a/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_default/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 10, sign: false }); data.append(i8 { mag: 15, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo index 91285852c..52c366960 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo index 78d4fffb9..96c706cdb 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo index 335a5304b..80272b3c0 100644 --- a/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_exclusive/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 10, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse.cairo b/src/tests/nodes/cumsum_i8_1d_reverse.cairo index 8ba0b8f8d..83595125d 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo index 78d4fffb9..96c706cdb 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo index 82a160735..480def7de 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 12, sign: false }); data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo index d8938e077..2a344e9b8 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo index 78d4fffb9..96c706cdb 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo index 6d6dbef0d..c3980cbf3 100644 --- a/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_1d_reverse_exclusive/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo index f5ad22550..9f06d8788 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo index 9754f22b4..e1bb10267 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 6, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo index 483dfcbbc..a18fc8584 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_0/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 9, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo index 79d7117db..7d2669176 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo index 9754f22b4..e1bb10267 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn input_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 6, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo index 6998388b5..99eab414d 100644 --- a/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_i8_2d_axis_1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,7 +15,5 @@ fn output_0() -> Tensor { data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 15, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default.cairo b/src/tests/nodes/cumsum_u32_1d_default.cairo index d7b7b0f2e..5e9d98156 100644 --- a/src/tests/nodes/cumsum_u32_1d_default.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo index 3bd45b22f..622c5d695 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo index bd69e9099..c2d0bdbf6 100644 --- a/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(6); data.append(10); data.append(15); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo index 5b36016d3..2223740e6 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo index 3bd45b22f..622c5d695 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo index 4bbc3d658..f5fec21fc 100644 --- a/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_exclusive/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(3); data.append(6); data.append(10); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse.cairo b/src/tests/nodes/cumsum_u32_1d_reverse.cairo index 1f0d2d480..cab7a64f6 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo index 3bd45b22f..622c5d695 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo index a8cb0db1a..5650f5bdc 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(12); data.append(9); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo index dae1c1505..0ac724f0b 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo index 3bd45b22f..622c5d695 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(3); data.append(4); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo index f7293e101..e6f2a8444 100644 --- a/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_1d_reverse_exclusive/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(9); data.append(5); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo index 12989bc1c..c21143147 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo index 88daf2320..6e6b0b0c3 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(4); data.append(5); data.append(6); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo index d60af45c6..21198b1fe 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_0/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(5); data.append(7); data.append(9); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo index c806f3601..145a334e4 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo index 88daf2320..6e6b0b0c3 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(4); data.append(5); data.append(6); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo index eb1fbb901..322f993c8 100644 --- a/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo +++ b/src/tests/nodes/cumsum_u32_2d_axis_1/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn output_0() -> Tensor { data.append(4); data.append(9); data.append(15); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16.cairo b/src/tests/nodes/div_fp16x16.cairo index 4421155ff..1c65ce822 100644 --- a/src/tests/nodes/div_fp16x16.cairo +++ b/src/tests/nodes/div_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorDiv}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp16x16/input_0.cairo b/src/tests/nodes/div_fp16x16/input_0.cairo index a6464c245..ebec1dd71 100644 --- a/src/tests/nodes/div_fp16x16/input_0.cairo +++ b/src/tests/nodes/div_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -16,31 +14,29 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/input_1.cairo b/src/tests/nodes/div_fp16x16/input_1.cairo index 335ab82ed..5664c9473 100644 --- a/src/tests/nodes/div_fp16x16/input_1.cairo +++ b/src/tests/nodes/div_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -16,14 +14,11 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); @@ -31,16 +26,17 @@ fn input_1() -> Tensor { data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16/output_0.cairo b/src/tests/nodes/div_fp16x16/output_0.cairo index ba90c325b..a9d2fed91 100644 --- a/src/tests/nodes/div_fp16x16/output_0.cairo +++ b/src/tests/nodes/div_fp16x16/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -17,30 +15,28 @@ fn output_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 32768, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast.cairo b/src/tests/nodes/div_fp16x16_broadcast.cairo index 767641aa3..ab365df13 100644 --- a/src/tests/nodes/div_fp16x16_broadcast.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorDiv}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo index ca1bce5d4..0e7830f68 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -15,32 +13,30 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo index 1b1eaed9b..b40221126 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo index 8423b3373..bc5d6d0fa 100644 --- a/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp16x16_broadcast/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); + data.append(FP16x16 { mag: 32768, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23.cairo b/src/tests/nodes/div_fp8x23.cairo index 293f65d9e..9b3cd41b2 100644 --- a/src/tests/nodes/div_fp8x23.cairo +++ b/src/tests/nodes/div_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorDiv}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/div_fp8x23/input_0.cairo b/src/tests/nodes/div_fp8x23/input_0.cairo index cb9dc3f35..5207a2e67 100644 --- a/src/tests/nodes/div_fp8x23/input_0.cairo +++ b/src/tests/nodes/div_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,31 +14,29 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/input_1.cairo b/src/tests/nodes/div_fp8x23/input_1.cairo index f7bb7a0ea..fba559547 100644 --- a/src/tests/nodes/div_fp8x23/input_1.cairo +++ b/src/tests/nodes/div_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,14 +12,17 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); @@ -30,15 +33,10 @@ fn input_1() -> Tensor { data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23/output_0.cairo b/src/tests/nodes/div_fp8x23/output_0.cairo index f69910b00..6e05358a7 100644 --- a/src/tests/nodes/div_fp8x23/output_0.cairo +++ b/src/tests/nodes/div_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast.cairo b/src/tests/nodes/div_fp8x23_broadcast.cairo index ea6394676..98247d410 100644 --- a/src/tests/nodes/div_fp8x23_broadcast.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorDiv}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorDiv}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_fp8x23_broadcast() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo index 7d114bc30..3f8fd0134 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo index 1fc93e061..cf2ddd464 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo index 6d4db2fee..fd04e1ce4 100644 --- a/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/div_fp8x23_broadcast/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); + data.append(FP8x23 { mag: 4194304, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32.cairo b/src/tests/nodes/div_i32.cairo index 914589b08..55ea834d1 100644 --- a/src/tests/nodes/div_i32.cairo +++ b/src/tests/nodes/div_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorDiv}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_i32() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_0.cairo b/src/tests/nodes/div_i32/input_0.cairo index 8c3c1bd42..e40e76185 100644 --- a/src/tests/nodes/div_i32/input_0.cairo +++ b/src/tests/nodes/div_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32/input_1.cairo b/src/tests/nodes/div_i32/input_1.cairo index 8c77b13bb..cfc7cc5ca 100644 --- a/src/tests/nodes/div_i32/input_1.cairo +++ b/src/tests/nodes/div_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,29 +15,27 @@ fn input_1() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32/output_0.cairo b/src/tests/nodes/div_i32/output_0.cairo index b1b679cf7..358bed425 100644 --- a/src/tests/nodes/div_i32/output_0.cairo +++ b/src/tests/nodes/div_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast.cairo b/src/tests/nodes/div_i32_broadcast.cairo index 1c7616d48..0d00bb6d0 100644 --- a/src/tests/nodes/div_i32_broadcast.cairo +++ b/src/tests/nodes/div_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorDiv}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorDiv}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_i32_broadcast() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_0.cairo b/src/tests/nodes/div_i32_broadcast/input_0.cairo index d4966ec7a..6e8ea6c4b 100644 --- a/src/tests/nodes/div_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/input_1.cairo b/src/tests/nodes/div_i32_broadcast/input_1.cairo index 49b270924..efeeb68df 100644 --- a/src/tests/nodes/div_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i32_broadcast/output_0.cairo b/src/tests/nodes/div_i32_broadcast/output_0.cairo index bbfa64a39..4a93a54a2 100644 --- a/src/tests/nodes/div_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i32_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8.cairo b/src/tests/nodes/div_i8.cairo index 44ebb02c2..86ce3b8cc 100644 --- a/src/tests/nodes/div_i8.cairo +++ b/src/tests/nodes/div_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorDiv}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_i8() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_0.cairo b/src/tests/nodes/div_i8/input_0.cairo index f62a547b2..9b38ea284 100644 --- a/src/tests/nodes/div_i8/input_0.cairo +++ b/src/tests/nodes/div_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,32 +12,30 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8/input_1.cairo b/src/tests/nodes/div_i8/input_1.cairo index b7f1810ae..f708358c8 100644 --- a/src/tests/nodes/div_i8/input_1.cairo +++ b/src/tests/nodes/div_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,16 +11,11 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); @@ -29,8 +23,10 @@ fn input_1() -> Tensor { data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); @@ -38,7 +34,8 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8/output_0.cairo b/src/tests/nodes/div_i8/output_0.cairo index bdacfb241..f3984d981 100644 --- a/src/tests/nodes/div_i8/output_0.cairo +++ b/src/tests/nodes/div_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast.cairo b/src/tests/nodes/div_i8_broadcast.cairo index 8371bfc94..360b783ee 100644 --- a/src/tests/nodes/div_i8_broadcast.cairo +++ b/src/tests/nodes/div_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorDiv}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorDiv}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_i8_broadcast() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_0.cairo b/src/tests/nodes/div_i8_broadcast/input_0.cairo index 092dca5bc..3ca175b18 100644 --- a/src/tests/nodes/div_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,29 +15,27 @@ fn input_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/input_1.cairo b/src/tests/nodes/div_i8_broadcast/input_1.cairo index 2d9c5deae..ffe7f6894 100644 --- a/src/tests/nodes/div_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/div_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_1() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_i8_broadcast/output_0.cairo b/src/tests/nodes/div_i8_broadcast/output_0.cairo index 41c9c8961..e40d4d24c 100644 --- a/src/tests/nodes/div_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/div_i8_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,29 +15,27 @@ fn output_0() -> Tensor { data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32.cairo b/src/tests/nodes/div_u32.cairo index 691cf627c..1d0ff31b6 100644 --- a/src/tests/nodes/div_u32.cairo +++ b/src/tests/nodes/div_u32.cairo @@ -3,15 +3,12 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_u32_fp16x16, u32TensorDiv -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorDiv}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_div_u32() { diff --git a/src/tests/nodes/div_u32/input_0.cairo b/src/tests/nodes/div_u32/input_0.cairo index bfb873711..c2c6b44f3 100644 --- a/src/tests/nodes/div_u32/input_0.cairo +++ b/src/tests/nodes/div_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(5); data.append(4); - data.append(5); + data.append(4); data.append(3); data.append(3); + data.append(5); data.append(3); + data.append(5); + data.append(5); + data.append(4); + data.append(4); data.append(3); data.append(3); - data.append(4); data.append(5); data.append(3); - data.append(5); data.append(4); data.append(3); data.append(4); - data.append(3); data.append(4); data.append(3); - data.append(5); data.append(3); data.append(3); data.append(4); - data.append(5); data.append(3); data.append(4); - - + data.append(4); + data.append(4); + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32/input_1.cairo b/src/tests/nodes/div_u32/input_1.cairo index 16041b3a4..0283570db 100644 --- a/src/tests/nodes/div_u32/input_1.cairo +++ b/src/tests/nodes/div_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn input_1() -> Tensor { data.append(2); data.append(2); data.append(1); - data.append(1); - data.append(2); - data.append(2); - data.append(2); data.append(2); data.append(1); + data.append(1); data.append(2); data.append(2); data.append(2); data.append(2); data.append(2); + data.append(1); + data.append(1); + data.append(1); data.append(2); + data.append(1); data.append(2); - data.append(2); - data.append(2); + data.append(1); data.append(2); data.append(1); data.append(1); - data.append(2); + data.append(1); data.append(1); data.append(2); data.append(2); - data.append(1); data.append(2); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32/output_0.cairo b/src/tests/nodes/div_u32/output_0.cairo index a80f991cc..d43ae3e2b 100644 --- a/src/tests/nodes/div_u32/output_0.cairo +++ b/src/tests/nodes/div_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,32 +11,30 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); data.append(2); - data.append(5); - data.append(4); - data.append(2); - data.append(1); - data.append(1); - data.append(1); data.append(3); data.append(1); + data.append(5); + data.append(3); data.append(2); data.append(2); - data.append(1); - data.append(2); data.append(2); - data.append(1); data.append(2); data.append(1); - data.append(2); data.append(3); data.append(5); - data.append(1); data.append(3); data.append(2); + data.append(3); data.append(2); + data.append(4); + data.append(1); + data.append(3); + data.append(3); + data.append(4); data.append(3); data.append(2); - - + data.append(2); + data.append(2); + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast.cairo b/src/tests/nodes/div_u32_broadcast.cairo index 8583a9c10..e1988ad32 100644 --- a/src/tests/nodes/div_u32_broadcast.cairo +++ b/src/tests/nodes/div_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorDiv}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorDiv}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_div_u32_broadcast() { let y = input_0 / input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_0.cairo b/src/tests/nodes/div_u32_broadcast/input_0.cairo index c3b09c057..e9c930eb7 100644 --- a/src/tests/nodes/div_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(3); - data.append(3); - data.append(3); - data.append(5); - data.append(3); data.append(4); - data.append(3); data.append(4); data.append(5); - data.append(5); data.append(4); data.append(5); data.append(4); data.append(4); data.append(3); + data.append(3); + data.append(3); + data.append(3); data.append(5); - data.append(5); data.append(4); data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(4); data.append(5); data.append(5); data.append(4); + data.append(4); + data.append(3); + data.append(3); data.append(3); data.append(3); - data.append(5); data.append(4); - data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/input_1.cairo b/src/tests/nodes/div_u32_broadcast/input_1.cairo index ad72dc172..114a06d12 100644 --- a/src/tests/nodes/div_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/div_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(2); data.append(1); - data.append(2); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/div_u32_broadcast/output_0.cairo b/src/tests/nodes/div_u32_broadcast/output_0.cairo index a2245f819..7db27318f 100644 --- a/src/tests/nodes/div_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/div_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); + data.append(4); + data.append(4); data.append(5); - data.append(3); data.append(4); - data.append(1); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); + data.append(5); data.append(4); data.append(4); data.append(3); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); - data.append(2); + data.append(3); + data.append(3); + data.append(3); + data.append(5); + data.append(4); data.append(4); data.append(3); data.append(3); - data.append(2); - data.append(2); - data.append(2); - - + data.append(3); + data.append(4); + data.append(5); + data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(3); + data.append(3); + data.append(3); + data.append(4); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16.cairo b/src/tests/nodes/equal_fp16x16.cairo index d26dd6568..e5f8ba27f 100644 --- a/src/tests/nodes/equal_fp16x16.cairo +++ b/src/tests/nodes/equal_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp16x16/input_0.cairo b/src/tests/nodes/equal_fp16x16/input_0.cairo index 4781e0447..bb2d30b13 100644 --- a/src/tests/nodes/equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/input_1.cairo b/src/tests/nodes/equal_fp16x16/input_1.cairo index 431f47ac8..022b7aeff 100644 --- a/src/tests/nodes/equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16/output_0.cairo b/src/tests/nodes/equal_fp16x16/output_0.cairo index 29b80c686..4ac107912 100644 --- a/src/tests/nodes/equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -17,7 +16,9 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -26,18 +27,14 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(0); - data.append(0); - data.append(1); data.append(1); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast.cairo b/src/tests/nodes/equal_fp16x16_broadcast.cairo index 46e6f4daa..a2939736f 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo index 4425c2779..f8c2e9849 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo index b2e478356..0e549709b 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo index 43b0cb52e..386b678ef 100644 --- a/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); + data.append(1); data.append(0); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23.cairo b/src/tests/nodes/equal_fp8x23.cairo index e965e068e..bf987d766 100644 --- a/src/tests/nodes/equal_fp8x23.cairo +++ b/src/tests/nodes/equal_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp8x23/input_0.cairo b/src/tests/nodes/equal_fp8x23/input_0.cairo index eb8db3def..bad79cb47 100644 --- a/src/tests/nodes/equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/input_1.cairo b/src/tests/nodes/equal_fp8x23/input_1.cairo index e39dbe926..5ab3d78e3 100644 --- a/src/tests/nodes/equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23/output_0.cairo b/src/tests/nodes/equal_fp8x23/output_0.cairo index 5c3751443..993dfb719 100644 --- a/src/tests/nodes/equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,19 +12,20 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -36,8 +36,5 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast.cairo b/src/tests/nodes/equal_fp8x23_broadcast.cairo index 30f014cac..aef83cbfb 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo index 5bb0c90e0..d93db0659 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo index 296b06c77..64713b1ba 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo index b596f2262..0cc7de207 100644 --- a/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32.cairo b/src/tests/nodes/equal_i32.cairo index e931a63dc..8f42d32cd 100644 --- a/src/tests/nodes/equal_i32.cairo +++ b/src/tests/nodes/equal_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i32/input_0.cairo b/src/tests/nodes/equal_i32/input_0.cairo index ac17d19e8..9abf4e9b7 100644 --- a/src/tests/nodes/equal_i32/input_0.cairo +++ b/src/tests/nodes/equal_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/input_1.cairo b/src/tests/nodes/equal_i32/input_1.cairo index 4a2e8f239..a7ab8ba6d 100644 --- a/src/tests/nodes/equal_i32/input_1.cairo +++ b/src/tests/nodes/equal_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32/output_0.cairo b/src/tests/nodes/equal_i32/output_0.cairo index caa1d538a..26c1da5a9 100644 --- a/src/tests/nodes/equal_i32/output_0.cairo +++ b/src/tests/nodes/equal_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); @@ -23,21 +20,21 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast.cairo b/src/tests/nodes/equal_i32_broadcast.cairo index 8f5fd3c1a..3c0d2da8a 100644 --- a/src/tests/nodes/equal_i32_broadcast.cairo +++ b/src/tests/nodes/equal_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i32_broadcast/input_0.cairo b/src/tests/nodes/equal_i32_broadcast/input_0.cairo index b9c41cea1..93feb7d50 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/input_1.cairo b/src/tests/nodes/equal_i32_broadcast/input_1.cairo index 1e127e19f..2e88b9154 100644 --- a/src/tests/nodes/equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i32_broadcast/output_0.cairo b/src/tests/nodes/equal_i32_broadcast/output_0.cairo index 10a574f2b..2101f7fc8 100644 --- a/src/tests/nodes/equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8.cairo b/src/tests/nodes/equal_i8.cairo index 0943b2781..78eadad98 100644 --- a/src/tests/nodes/equal_i8.cairo +++ b/src/tests/nodes/equal_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i8/input_0.cairo b/src/tests/nodes/equal_i8/input_0.cairo index db2bf7b2e..865d1dbf2 100644 --- a/src/tests/nodes/equal_i8/input_0.cairo +++ b/src/tests/nodes/equal_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/input_1.cairo b/src/tests/nodes/equal_i8/input_1.cairo index da60cb9f9..bb19add34 100644 --- a/src/tests/nodes/equal_i8/input_1.cairo +++ b/src/tests/nodes/equal_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8/output_0.cairo b/src/tests/nodes/equal_i8/output_0.cairo index 9348d938e..72bdf3492 100644 --- a/src/tests/nodes/equal_i8/output_0.cairo +++ b/src/tests/nodes/equal_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,21 +11,18 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - data.append(1); - data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); @@ -37,7 +33,8 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - - + data.append(0); + data.append(0); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast.cairo b/src/tests/nodes/equal_i8_broadcast.cairo index 017470c4a..751d192e4 100644 --- a/src/tests/nodes/equal_i8_broadcast.cairo +++ b/src/tests/nodes/equal_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_i8_broadcast/input_0.cairo b/src/tests/nodes/equal_i8_broadcast/input_0.cairo index 9775e54cb..8ac6798f4 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/input_1.cairo b/src/tests/nodes/equal_i8_broadcast/input_1.cairo index 92f479de2..b16e2e8ed 100644 --- a/src/tests/nodes/equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_i8_broadcast/output_0.cairo b/src/tests/nodes/equal_i8_broadcast/output_0.cairo index 0ff4ae4f1..d9b9dedff 100644 --- a/src/tests/nodes/equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32.cairo b/src/tests/nodes/equal_u32.cairo index 3b5ec2429..6a3e0cf29 100644 --- a/src/tests/nodes/equal_u32.cairo +++ b/src/tests/nodes/equal_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_u32/input_0.cairo b/src/tests/nodes/equal_u32/input_0.cairo index 1c4b0a4f4..ae27571e9 100644 --- a/src/tests/nodes/equal_u32/input_0.cairo +++ b/src/tests/nodes/equal_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(3); data.append(5); - data.append(0); + data.append(5); + data.append(4); + data.append(5); + data.append(4); + data.append(1); + data.append(5); + data.append(1); data.append(3); data.append(3); + data.append(4); data.append(1); - data.append(5); data.append(3); - data.append(0); data.append(5); + data.append(4); + data.append(0); data.append(1); data.append(2); - data.append(3); - data.append(0); data.append(4); - data.append(5); + data.append(3); data.append(1); - data.append(2); - data.append(0); data.append(1); - data.append(4); + data.append(0); + data.append(0); data.append(0); data.append(4); - data.append(1); - data.append(5); - data.append(2); - data.append(5); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/input_1.cairo b/src/tests/nodes/equal_u32/input_1.cairo index e2e310a7a..f4b8dcf2b 100644 --- a/src/tests/nodes/equal_u32/input_1.cairo +++ b/src/tests/nodes/equal_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(2); - data.append(5); - data.append(2); - data.append(5); + data.append(4); + data.append(3); data.append(0); - data.append(2); - data.append(5); data.append(1); + data.append(5); data.append(3); data.append(2); data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); + data.append(0); data.append(4); + data.append(5); data.append(4); - data.append(0); - data.append(2); - data.append(0); - data.append(2); data.append(5); data.append(2); data.append(1); + data.append(5); + data.append(1); data.append(2); + data.append(0); + data.append(4); + data.append(1); data.append(1); + data.append(0); + data.append(5); + data.append(1); + data.append(5); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32/output_0.cairo b/src/tests/nodes/equal_u32/output_0.cairo index a355bd6a4..48ee1ad7d 100644 --- a/src/tests/nodes/equal_u32/output_0.cairo +++ b/src/tests/nodes/equal_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,12 +13,14 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -29,15 +30,11 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast.cairo b/src/tests/nodes/equal_u32_broadcast.cairo index 15b1cb76e..4ceb32a0e 100644 --- a/src/tests/nodes/equal_u32_broadcast.cairo +++ b/src/tests/nodes/equal_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/equal_u32_broadcast/input_0.cairo b/src/tests/nodes/equal_u32_broadcast/input_0.cairo index 84acaec5c..fdbf9ca33 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(2); data.append(4); - data.append(3); data.append(4); - - + data.append(5); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/input_1.cairo b/src/tests/nodes/equal_u32_broadcast/input_1.cairo index f5fa620f7..b3f2c616b 100644 --- a/src/tests/nodes/equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/equal_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(2); data.append(3); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/equal_u32_broadcast/output_0.cairo b/src/tests/nodes/equal_u32_broadcast/output_0.cairo index 43b0cb52e..df2800d42 100644 --- a/src/tests/nodes/equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/equal_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); data.append(0); data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16.cairo b/src/tests/nodes/exp_fp16x16.cairo index 97522c6d3..0d18bff68 100644 --- a/src/tests/nodes/exp_fp16x16.cairo +++ b/src/tests/nodes/exp_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_fp16x16/input_0.cairo b/src/tests/nodes/exp_fp16x16/input_0.cairo index 43dfc7796..e58d3c935 100644 --- a/src/tests/nodes/exp_fp16x16/input_0.cairo +++ b/src/tests/nodes/exp_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 68670, sign: true }); - data.append(FP16x16 { mag: 37714, sign: true }); - data.append(FP16x16 { mag: 196163, sign: true }); - data.append(FP16x16 { mag: 10079, sign: false }); - - + data.append(FP16x16 { mag: 194862, sign: false }); + data.append(FP16x16 { mag: 38141, sign: true }); + data.append(FP16x16 { mag: 110238, sign: false }); + data.append(FP16x16 { mag: 63859, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp16x16/output_0.cairo b/src/tests/nodes/exp_fp16x16/output_0.cairo index 73f606ddb..ac9ad4ec0 100644 --- a/src/tests/nodes/exp_fp16x16/output_0.cairo +++ b/src/tests/nodes/exp_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 22983, sign: false }); - data.append(FP16x16 { mag: 36859, sign: false }); - data.append(FP16x16 { mag: 3285, sign: false }); - data.append(FP16x16 { mag: 76431, sign: false }); - - + data.append(FP16x16 { mag: 1281733, sign: false }); + data.append(FP16x16 { mag: 36620, sign: false }); + data.append(FP16x16 { mag: 352377, sign: false }); + data.append(FP16x16 { mag: 24734, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23.cairo b/src/tests/nodes/exp_fp8x23.cairo index 775275f37..e7b4e9cef 100644 --- a/src/tests/nodes/exp_fp8x23.cairo +++ b/src/tests/nodes/exp_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/exp_fp8x23/input_0.cairo b/src/tests/nodes/exp_fp8x23/input_0.cairo index aa1580331..62073f39a 100644 --- a/src/tests/nodes/exp_fp8x23/input_0.cairo +++ b/src/tests/nodes/exp_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 22965160, sign: true }); - data.append(FP8x23 { mag: 15758081, sign: false }); - data.append(FP8x23 { mag: 23575455, sign: true }); - data.append(FP8x23 { mag: 2203079, sign: false }); - - + data.append(FP8x23 { mag: 11235841, sign: true }); + data.append(FP8x23 { mag: 5119248, sign: false }); + data.append(FP8x23 { mag: 735081, sign: true }); + data.append(FP8x23 { mag: 19148930, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_fp8x23/output_0.cairo b/src/tests/nodes/exp_fp8x23/output_0.cairo index cd691cfc2..a902d063b 100644 --- a/src/tests/nodes/exp_fp8x23/output_0.cairo +++ b/src/tests/nodes/exp_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 542924, sign: false }); - data.append(FP8x23 { mag: 54892916, sign: false }); - data.append(FP8x23 { mag: 504827, sign: false }); - data.append(FP8x23 { mag: 10908061, sign: false }); - - + data.append(FP8x23 { mag: 2197802, sign: false }); + data.append(FP8x23 { mag: 15442702, sign: false }); + data.append(FP8x23 { mag: 7684813, sign: false }); + data.append(FP8x23 { mag: 855682, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16.cairo b/src/tests/nodes/exp_i32_fp16x16.cairo deleted file mode 100644 index 23de3dbc7..000000000 --- a/src/tests/nodes/exp_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_exp_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo b/src/tests/nodes/exp_i32_fp16x16/input_0.cairo deleted file mode 100644 index a19d14650..000000000 --- a/src/tests/nodes/exp_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo b/src/tests/nodes/exp_i32_fp16x16/output_0.cairo deleted file mode 100644 index 35b276e20..000000000 --- a/src/tests/nodes/exp_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 484249, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23.cairo b/src/tests/nodes/exp_i32_fp8x23.cairo deleted file mode 100644 index 3bf5c54b6..000000000 --- a/src/tests/nodes/exp_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo b/src/tests/nodes/exp_i32_fp8x23/input_0.cairo deleted file mode 100644 index 85688121c..000000000 --- a/src/tests/nodes/exp_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo b/src/tests/nodes/exp_i32_fp8x23/output_0.cairo deleted file mode 100644 index 291f9707e..000000000 --- a/src/tests/nodes/exp_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 61983895, sign: false }); - data.append(FP8x23 { mag: 3085996, sign: false }); - data.append(FP8x23 { mag: 22802600, sign: false }); - data.append(FP8x23 { mag: 61983895, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16.cairo b/src/tests/nodes/exp_i8_fp16x16.cairo deleted file mode 100644 index 7eea4c096..000000000 --- a/src/tests/nodes/exp_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo b/src/tests/nodes/exp_i8_fp16x16/input_0.cairo deleted file mode 100644 index f39a4c6a9..000000000 --- a/src/tests/nodes/exp_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo b/src/tests/nodes/exp_i8_fp16x16/output_0.cairo deleted file mode 100644 index 3a23fe7e8..000000000 --- a/src/tests/nodes/exp_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3262, sign: false }); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 3262, sign: false }); - data.append(FP16x16 { mag: 8869, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23.cairo b/src/tests/nodes/exp_i8_fp8x23.cairo deleted file mode 100644 index 8b2bf9c66..000000000 --- a/src/tests/nodes/exp_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_exp_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo b/src/tests/nodes/exp_i8_fp8x23/input_0.cairo deleted file mode 100644 index b6c6dfe1d..000000000 --- a/src/tests/nodes/exp_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo b/src/tests/nodes/exp_i8_fp8x23/output_0.cairo deleted file mode 100644 index ceb3112f3..000000000 --- a/src/tests/nodes/exp_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 22806528, sign: false }); - data.append(FP8x23 { mag: 1135616, sign: false }); - data.append(FP8x23 { mag: 22806528, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16.cairo b/src/tests/nodes/exp_u32_fp16x16.cairo deleted file mode 100644 index 562b19124..000000000 --- a/src/tests/nodes/exp_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_exp_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - // assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo b/src/tests/nodes/exp_u32_fp16x16/input_0.cairo deleted file mode 100644 index 81da859b5..000000000 --- a/src/tests/nodes/exp_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo b/src/tests/nodes/exp_u32_fp16x16/output_0.cairo deleted file mode 100644 index 91e547189..000000000 --- a/src/tests/nodes/exp_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 178145, sign: false }); - data.append(FP16x16 { mag: 484249, sign: false }); - data.append(FP16x16 { mag: 3578144, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23.cairo b/src/tests/nodes/exp_u32_fp8x23.cairo deleted file mode 100644 index e73bcf308..000000000 --- a/src/tests/nodes/exp_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_exp_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.exp(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo b/src/tests/nodes/exp_u32_fp8x23/input_0.cairo deleted file mode 100644 index 82f46d49b..000000000 --- a/src/tests/nodes/exp_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(2); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo b/src/tests/nodes/exp_u32_fp8x23/output_0.cairo deleted file mode 100644 index 244b753aa..000000000 --- a/src/tests/nodes/exp_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1244979813, sign: false }); - data.append(FP8x23 { mag: 168489695, sign: false }); - data.append(FP8x23 { mag: 61983895, sign: false }); - data.append(FP8x23 { mag: 458002478, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16.cairo b/src/tests/nodes/greater_equal_fp16x16.cairo index 5d03e4377..81145c607 100644 --- a/src/tests/nodes/greater_equal_fp16x16.cairo +++ b/src/tests/nodes/greater_equal_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo index ad8e7159f..3e4cf0178 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo index cf2a4ec9b..7dca8c177 100644 --- a/src/tests/nodes/greater_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo index 25ccb257d..0563fc097 100644 --- a/src/tests/nodes/greater_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(1); @@ -20,24 +19,22 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); + data.append(1); + data.append(1); data.append(0); data.append(0); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); - data.append(0); - data.append(0); data.append(1); data.append(0); data.append(1); data.append(0); - data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo index a5f824fe8..bf4b63b6f 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo index df03abce9..e69833180 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo index 597dddf23..e662e53b4 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo index df61a6440..3798b1601 100644 --- a/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); - data.append(1); data.append(1); data.append(0); + data.append(1); data.append(0); data.append(1); data.append(1); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(1); data.append(0); data.append(1); data.append(1); + data.append(1); + data.append(0); + data.append(0); + data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(1); data.append(1); data.append(1); - data.append(1); - data.append(0); - data.append(1); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23.cairo b/src/tests/nodes/greater_equal_fp8x23.cairo index fd274bb85..13482e0ec 100644 --- a/src/tests/nodes/greater_equal_fp8x23.cairo +++ b/src/tests/nodes/greater_equal_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo index c9a6125ad..805430286 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo index 85b993ba9..517179318 100644 --- a/src/tests/nodes/greater_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo index 8ff181507..0345ba65f 100644 --- a/src/tests/nodes/greater_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,17 +9,18 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(0); - data.append(0); data.append(1); data.append(0); data.append(1); data.append(1); data.append(0); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(1); @@ -31,13 +31,10 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); + data.append(0); data.append(1); data.append(1); data.append(0); - data.append(0); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo index dfa93ac73..dd979b6fc 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo index 349d1099f..bb87b4eed 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo index e9aafdf08..65f5c6465 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo index d9a0db6c5..5856dd1da 100644 --- a/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); data.append(0); + data.append(1); + data.append(1); + data.append(1); data.append(0); + data.append(1); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(1); data.append(1); data.append(1); data.append(1); - data.append(0); - data.append(0); - data.append(0); data.append(1); - data.append(0); - data.append(0); data.append(1); data.append(1); data.append(1); - data.append(0); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32.cairo b/src/tests/nodes/greater_equal_i32.cairo index c149c8c5f..84368ba93 100644 --- a/src/tests/nodes/greater_equal_i32.cairo +++ b/src/tests/nodes/greater_equal_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i32/input_0.cairo b/src/tests/nodes/greater_equal_i32/input_0.cairo index 2497849a7..cec68dfb0 100644 --- a/src/tests/nodes/greater_equal_i32/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/input_1.cairo b/src/tests/nodes/greater_equal_i32/input_1.cairo index eb3eb55c5..5fa17db22 100644 --- a/src/tests/nodes/greater_equal_i32/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32/output_0.cairo b/src/tests/nodes/greater_equal_i32/output_0.cairo index 7513a27aa..ec54ffc3b 100644 --- a/src/tests/nodes/greater_equal_i32/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,6 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); data.append(0); data.append(1); data.append(1); @@ -22,10 +18,7 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(1); - data.append(0); - data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); @@ -33,11 +26,15 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(0); + data.append(0); + data.append(0); + data.append(1); + data.append(1); data.append(1); data.append(0); data.append(1); + data.append(0); + data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast.cairo b/src/tests/nodes/greater_equal_i32_broadcast.cairo index 6a1a7c877..bd83f9308 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo index 137296f4b..ea1897d83 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo index 569f48feb..ba1463129 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo index 5d34c92b8..105f89e17 100644 --- a/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,6 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); data.append(1); data.append(1); data.append(0); @@ -21,23 +19,22 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(0); data.append(1); data.append(1); data.append(1); data.append(0); - data.append(0); - data.append(0); data.append(1); - data.append(0); - data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); data.append(1); data.append(1); data.append(0); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8.cairo b/src/tests/nodes/greater_equal_i8.cairo index 6730923ed..cc946f038 100644 --- a/src/tests/nodes/greater_equal_i8.cairo +++ b/src/tests/nodes/greater_equal_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i8/input_0.cairo b/src/tests/nodes/greater_equal_i8/input_0.cairo index 0b8e88bdf..969578186 100644 --- a/src/tests/nodes/greater_equal_i8/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - - + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/input_1.cairo b/src/tests/nodes/greater_equal_i8/input_1.cairo index 68082c9fd..4fc9266f5 100644 --- a/src/tests/nodes/greater_equal_i8/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8/output_0.cairo b/src/tests/nodes/greater_equal_i8/output_0.cairo index da861d8c1..6d6aadf7f 100644 --- a/src/tests/nodes/greater_equal_i8/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); + data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(1); - data.append(1); - data.append(1); - data.append(1); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); + data.append(0); + data.append(0); data.append(1); data.append(1); data.append(1); data.append(0); - data.append(1); data.append(0); data.append(1); - data.append(0); data.append(1); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(0); data.append(1); - data.append(1); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast.cairo b/src/tests/nodes/greater_equal_i8_broadcast.cairo index 16b3df945..0cf3a3bbd 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo index 63b8fddf6..aa0ee407a 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo index 7d9a07861..b238febac 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo index 3787cdd6b..a1d7a1547 100644 --- a/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - data.append(1); + data.append(0); data.append(0); data.append(1); data.append(1); data.append(1); data.append(1); + data.append(0); data.append(1); - data.append(1); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); data.append(1); data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32.cairo b/src/tests/nodes/greater_equal_u32.cairo index 29423ae20..1d35a2070 100644 --- a/src/tests/nodes/greater_equal_u32.cairo +++ b/src/tests/nodes/greater_equal_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_u32/input_0.cairo b/src/tests/nodes/greater_equal_u32/input_0.cairo index 17b8e19bc..59ddf51b1 100644 --- a/src/tests/nodes/greater_equal_u32/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(2); data.append(4); data.append(1); - data.append(1); - data.append(3); + data.append(2); data.append(5); data.append(4); data.append(2); - data.append(2); - data.append(5); - data.append(5); - data.append(5); - data.append(1); + data.append(4); data.append(5); data.append(1); + data.append(0); data.append(2); - data.append(5); - data.append(4); - data.append(3); data.append(4); + data.append(2); + data.append(0); data.append(4); + data.append(1); + data.append(2); data.append(5); - data.append(3); - data.append(3); - data.append(4); data.append(1); - data.append(3); + data.append(2); + data.append(2); data.append(4); - - + data.append(4); + data.append(2); + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/input_1.cairo b/src/tests/nodes/greater_equal_u32/input_1.cairo index aa419737a..cf5cdf751 100644 --- a/src/tests/nodes/greater_equal_u32/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); - data.append(4); data.append(5); - data.append(1); - data.append(0); data.append(5); - data.append(0); + data.append(3); + data.append(5); data.append(1); + data.append(5); data.append(2); data.append(5); data.append(5); + data.append(2); + data.append(3); + data.append(2); + data.append(5); data.append(1); + data.append(4); + data.append(0); data.append(1); - data.append(1); - data.append(5); + data.append(0); data.append(3); - data.append(2); - data.append(2); data.append(0); - data.append(2); - data.append(5); - data.append(2); + data.append(1); data.append(4); - data.append(2); data.append(4); data.append(0); data.append(3); - - + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32/output_0.cairo b/src/tests/nodes/greater_equal_u32/output_0.cairo index 4fbd2de10..99310ca0d 100644 --- a/src/tests/nodes/greater_equal_u32/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,13 +12,18 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); data.append(1); + data.append(0); + data.append(0); + data.append(0); data.append(1); - data.append(1); + data.append(0); + data.append(0); data.append(1); data.append(1); data.append(1); @@ -30,14 +34,7 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(1); - data.append(1); data.append(0); - data.append(1); data.append(0); - data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast.cairo b/src/tests/nodes/greater_equal_u32_broadcast.cairo index cb85922a6..72219a061 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo index b0f52dc50..7b6c92b34 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(5); data.append(3); - data.append(2); + data.append(1); + data.append(4); data.append(0); data.append(4); - data.append(2); - data.append(3); - data.append(3); - data.append(2); data.append(0); + data.append(4); data.append(3); - data.append(2); - data.append(3); + data.append(4); + data.append(0); data.append(1); data.append(5); - data.append(1); + data.append(5); + data.append(5); + data.append(0); + data.append(5); + data.append(0); data.append(3); data.append(5); - data.append(2); - data.append(2); + data.append(5); data.append(3); + data.append(3); + data.append(3); + data.append(5); data.append(1); - data.append(0); - data.append(1); - data.append(4); - data.append(4); data.append(5); - - + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo index e436903f2..6b21f0921 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); + data.append(1); data.append(3); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo index 1d7599271..6c038a7d6 100644 --- a/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -18,11 +17,12 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(1); + data.append(1); data.append(0); data.append(1); data.append(1); data.append(1); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); @@ -31,13 +31,10 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(0); - data.append(0); - data.append(0); data.append(1); data.append(1); data.append(1); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16.cairo b/src/tests/nodes/greater_fp16x16.cairo index e91c08cb7..0cc99e81c 100644 --- a/src/tests/nodes/greater_fp16x16.cairo +++ b/src/tests/nodes/greater_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp16x16/input_0.cairo b/src/tests/nodes/greater_fp16x16/input_0.cairo index 8b2369a0f..413c5e23c 100644 --- a/src/tests/nodes/greater_fp16x16/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - - + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/input_1.cairo b/src/tests/nodes/greater_fp16x16/input_1.cairo index c63c51509..09ed30ca1 100644 --- a/src/tests/nodes/greater_fp16x16/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16/output_0.cairo b/src/tests/nodes/greater_fp16x16/output_0.cairo index 65887af29..ab7cf0d44 100644 --- a/src/tests/nodes/greater_fp16x16/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(1); - data.append(0); - data.append(0); - data.append(0); data.append(1); - data.append(0); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); + data.append(1); + data.append(0); + data.append(1); data.append(0); data.append(0); - - + data.append(0); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast.cairo b/src/tests/nodes/greater_fp16x16_broadcast.cairo index eca2056c8..260e69a26 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo index be9405c7e..29e9cf24e 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo index b25ce3265..03404f090 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,8 +11,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 196608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo index 27e8bec3b..e7b1da4b1 100644 --- a/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23.cairo b/src/tests/nodes/greater_fp8x23.cairo index 1db45bd6a..e187524d0 100644 --- a/src/tests/nodes/greater_fp8x23.cairo +++ b/src/tests/nodes/greater_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp8x23/input_0.cairo b/src/tests/nodes/greater_fp8x23/input_0.cairo index 160308e9a..9c6d968c1 100644 --- a/src/tests/nodes/greater_fp8x23/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/input_1.cairo b/src/tests/nodes/greater_fp8x23/input_1.cairo index b89e44dd8..973023ed5 100644 --- a/src/tests/nodes/greater_fp8x23/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23/output_0.cairo b/src/tests/nodes/greater_fp8x23/output_0.cairo index e79b7cdb1..275f357bf 100644 --- a/src/tests/nodes/greater_fp8x23/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,17 +9,18 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(1); + data.append(1); + data.append(1); data.append(0); - data.append(0); + data.append(1); + data.append(1); data.append(0); data.append(1); data.append(0); @@ -28,7 +28,6 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(1); data.append(1); @@ -37,7 +36,5 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast.cairo b/src/tests/nodes/greater_fp8x23_broadcast.cairo index 19e021088..4c99a88ea 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo index b5180501b..ac784d111 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo index 54bae4b76..fb94adec2 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo index 88acc4f8f..0cc7de207 100644 --- a/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32.cairo b/src/tests/nodes/greater_i32.cairo index cf8c5aa4a..c754aae9f 100644 --- a/src/tests/nodes/greater_i32.cairo +++ b/src/tests/nodes/greater_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i32/input_0.cairo b/src/tests/nodes/greater_i32/input_0.cairo index 4ad6a9e53..e13a83564 100644 --- a/src/tests/nodes/greater_i32/input_0.cairo +++ b/src/tests/nodes/greater_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/input_1.cairo b/src/tests/nodes/greater_i32/input_1.cairo index ba1790c2c..679b09655 100644 --- a/src/tests/nodes/greater_i32/input_1.cairo +++ b/src/tests/nodes/greater_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32/output_0.cairo b/src/tests/nodes/greater_i32/output_0.cairo index b09996d78..fc2a80e83 100644 --- a/src/tests/nodes/greater_i32/output_0.cairo +++ b/src/tests/nodes/greater_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); data.append(0); data.append(0); data.append(0); @@ -19,25 +16,25 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(1); - data.append(1); data.append(0); data.append(1); data.append(0); + data.append(0); + data.append(0); data.append(1); - data.append(1); data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(0); data.append(1); data.append(0); - data.append(0); data.append(1); + data.append(0); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast.cairo b/src/tests/nodes/greater_i32_broadcast.cairo index 5fca3c14f..b27b7a1d9 100644 --- a/src/tests/nodes/greater_i32_broadcast.cairo +++ b/src/tests/nodes/greater_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i32_broadcast/input_0.cairo b/src/tests/nodes/greater_i32_broadcast/input_0.cairo index 08f8d3646..a89883f85 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - - + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/input_1.cairo b/src/tests/nodes/greater_i32_broadcast/input_1.cairo index d03dc85f0..6cabdde08 100644 --- a/src/tests/nodes/greater_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i32_broadcast/output_0.cairo b/src/tests/nodes/greater_i32_broadcast/output_0.cairo index 27e8bec3b..328774a25 100644 --- a/src/tests/nodes/greater_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); + data.append(0); data.append(1); data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8.cairo b/src/tests/nodes/greater_i8.cairo index 903867b5d..cc6f1d298 100644 --- a/src/tests/nodes/greater_i8.cairo +++ b/src/tests/nodes/greater_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i8/input_0.cairo b/src/tests/nodes/greater_i8/input_0.cairo index c4f8b552b..5bf63e116 100644 --- a/src/tests/nodes/greater_i8/input_0.cairo +++ b/src/tests/nodes/greater_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/input_1.cairo b/src/tests/nodes/greater_i8/input_1.cairo index f78b8477a..cc263f1d9 100644 --- a/src/tests/nodes/greater_i8/input_1.cairo +++ b/src/tests/nodes/greater_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8/output_0.cairo b/src/tests/nodes/greater_i8/output_0.cairo index 83a9fc93c..8df4f4ebf 100644 --- a/src/tests/nodes/greater_i8/output_0.cairo +++ b/src/tests/nodes/greater_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - data.append(0); - data.append(0); data.append(1); data.append(0); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(1); - data.append(0); - data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); data.append(1); data.append(1); + data.append(1); data.append(0); data.append(1); data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(1); data.append(1); data.append(1); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast.cairo b/src/tests/nodes/greater_i8_broadcast.cairo index 7747b02f0..1fa576230 100644 --- a/src/tests/nodes/greater_i8_broadcast.cairo +++ b/src/tests/nodes/greater_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_i8_broadcast/input_0.cairo b/src/tests/nodes/greater_i8_broadcast/input_0.cairo index 099874646..d04b52ef1 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/input_1.cairo b/src/tests/nodes/greater_i8_broadcast/input_1.cairo index b27826cf0..7b08376db 100644 --- a/src/tests/nodes/greater_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_i8_broadcast/output_0.cairo b/src/tests/nodes/greater_i8_broadcast/output_0.cairo index a5e4f8529..328774a25 100644 --- a/src/tests/nodes/greater_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); data.append(1); + data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32.cairo b/src/tests/nodes/greater_u32.cairo index 3b4046086..f0357234f 100644 --- a/src/tests/nodes/greater_u32.cairo +++ b/src/tests/nodes/greater_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_u32/input_0.cairo b/src/tests/nodes/greater_u32/input_0.cairo index d87a8a860..fd617f80f 100644 --- a/src/tests/nodes/greater_u32/input_0.cairo +++ b/src/tests/nodes/greater_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); + data.append(2); data.append(5); - data.append(1); - data.append(3); + data.append(2); data.append(0); data.append(5); data.append(4); - data.append(5); - data.append(3); + data.append(2); data.append(3); data.append(2); - data.append(0); - data.append(0); - data.append(0); data.append(3); + data.append(1); data.append(0); + data.append(2); + data.append(5); + data.append(0); + data.append(5); data.append(4); - data.append(1); - data.append(1); + data.append(3); + data.append(3); + data.append(5); data.append(0); data.append(3); + data.append(5); + data.append(3); data.append(1); data.append(3); - data.append(0); - data.append(2); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/input_1.cairo b/src/tests/nodes/greater_u32/input_1.cairo index 8376bd1db..daf06d0ec 100644 --- a/src/tests/nodes/greater_u32/input_1.cairo +++ b/src/tests/nodes/greater_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(5); - data.append(5); - data.append(2); data.append(0); - data.append(1); - data.append(4); data.append(5); - data.append(2); data.append(4); - data.append(5); - data.append(3); data.append(4); + data.append(0); + data.append(0); + data.append(3); data.append(5); + data.append(0); data.append(3); - data.append(1); + data.append(2); data.append(3); data.append(0); + data.append(2); + data.append(5); data.append(5); - data.append(1); data.append(5); - data.append(3); data.append(0); + data.append(4); + data.append(2); + data.append(5); + data.append(5); data.append(1); data.append(0); - data.append(0); - data.append(0); - data.append(1); - - + data.append(2); + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32/output_0.cairo b/src/tests/nodes/greater_u32/output_0.cairo index eb506897d..6ec7401a6 100644 --- a/src/tests/nodes/greater_u32/output_0.cairo +++ b/src/tests/nodes/greater_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); - data.append(1); - data.append(1); data.append(1); data.append(0); data.append(0); data.append(1); data.append(1); + data.append(1); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(1); - data.append(0); - data.append(1); - data.append(0); data.append(1); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast.cairo b/src/tests/nodes/greater_u32_broadcast.cairo index 10ea19488..14765b7aa 100644 --- a/src/tests/nodes/greater_u32_broadcast.cairo +++ b/src/tests/nodes/greater_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/greater_u32_broadcast/input_0.cairo b/src/tests/nodes/greater_u32_broadcast/input_0.cairo index 8ca296287..e1e81a8b4 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(3); - data.append(4); - data.append(2); + data.append(5); + data.append(5); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/input_1.cairo b/src/tests/nodes/greater_u32_broadcast/input_1.cairo index 6a8045306..6dbc8d99b 100644 --- a/src/tests/nodes/greater_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/greater_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(2); - data.append(1); - - + data.append(5); + data.append(4); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/greater_u32_broadcast/output_0.cairo b/src/tests/nodes/greater_u32_broadcast/output_0.cairo index 42b65c16e..d9b9dedff 100644 --- a/src/tests/nodes/greater_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/greater_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); data.append(0); data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16.cairo b/src/tests/nodes/leaky_relu_fp16x16.cairo index 4487592f8..166df1924 100644 --- a/src/tests/nodes/leaky_relu_fp16x16.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo index 61a62e2d3..59ff9a98d 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 453171, sign: false }); - data.append(FP16x16 { mag: 73289, sign: false }); - data.append(FP16x16 { mag: 90437, sign: true }); - data.append(FP16x16 { mag: 316640, sign: false }); - - + data.append(FP16x16 { mag: 401540, sign: false }); + data.append(FP16x16 { mag: 47813, sign: true }); + data.append(FP16x16 { mag: 206992, sign: false }); + data.append(FP16x16 { mag: 323041, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo index 28955f8d9..4ee4947bc 100644 --- a/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 453171, sign: false }); - data.append(FP16x16 { mag: 73289, sign: false }); - data.append(FP16x16 { mag: 9043, sign: true }); - data.append(FP16x16 { mag: 316640, sign: false }); - - + data.append(FP16x16 { mag: 401540, sign: false }); + data.append(FP16x16 { mag: 4781, sign: true }); + data.append(FP16x16 { mag: 206992, sign: false }); + data.append(FP16x16 { mag: 32304, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23.cairo b/src/tests/nodes/leaky_relu_fp8x23.cairo index cf2334fb7..05110795c 100644 --- a/src/tests/nodes/leaky_relu_fp8x23.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo index eb1f0e91e..93effa14d 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 10631720, sign: false }); - data.append(FP8x23 { mag: 50119017, sign: false }); - data.append(FP8x23 { mag: 13888927, sign: false }); - data.append(FP8x23 { mag: 6576321, sign: true }); - - + data.append(FP8x23 { mag: 12477177, sign: false }); + data.append(FP8x23 { mag: 29017046, sign: false }); + data.append(FP8x23 { mag: 26929960, sign: true }); + data.append(FP8x23 { mag: 689284, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo index 01b06acb5..da0ea5456 100644 --- a/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/leaky_relu_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 10631721, sign: false }); - data.append(FP8x23 { mag: 50119016, sign: false }); - data.append(FP8x23 { mag: 13888927, sign: false }); - data.append(FP8x23 { mag: 657632, sign: true }); - - + data.append(FP8x23 { mag: 12477178, sign: false }); + data.append(FP8x23 { mag: 29017046, sign: false }); + data.append(FP8x23 { mag: 2692996, sign: true }); + data.append(FP8x23 { mag: 689284, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16.cairo deleted file mode 100644 index d60811b3c..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo deleted file mode 100644 index 057b3047f..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo deleted file mode 100644 index 7a184935f..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 13107, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23.cairo deleted file mode 100644 index 4d898c37b..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo deleted file mode 100644 index 845416092..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo deleted file mode 100644 index 973a1ed7f..000000000 --- a/src/tests/nodes/leaky_relu_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 58720256, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16.cairo deleted file mode 100644 index f3db0aa60..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(6554, false)); - - assert_eq(y, z); -} diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo deleted file mode 100644 index 50367146a..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::{i8, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo deleted file mode 100644 index 23ff596c7..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 19660, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 458752, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23.cairo deleted file mode 100644 index d019a20f1..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23.cairo +++ /dev/null @@ -1,22 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_leaky_relu_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::leaky_relu(@input_0, @FixedTrait::new(838861, false)); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo deleted file mode 100644 index 48d2c9017..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo b/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo deleted file mode 100644 index a67107781..000000000 --- a/src/tests/nodes/leaky_relu_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: true }); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 2516582, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16.cairo b/src/tests/nodes/less_equal_fp16x16.cairo index dd46aadd8..e5aa67a91 100644 --- a/src/tests/nodes/less_equal_fp16x16.cairo +++ b/src/tests/nodes/less_equal_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp16x16/input_0.cairo b/src/tests/nodes/less_equal_fp16x16/input_0.cairo index ed8db7d25..e45b1c3a0 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/input_1.cairo b/src/tests/nodes/less_equal_fp16x16/input_1.cairo index 88c276fc5..4a0f45254 100644 --- a/src/tests/nodes/less_equal_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16/input_1.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16/output_0.cairo b/src/tests/nodes/less_equal_fp16x16/output_0.cairo index 0606e6413..fdae52d6a 100644 --- a/src/tests/nodes/less_equal_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); data.append(1); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo index c581fa726..28e877b85 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo index 4fdf18635..cad6713ff 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo index b2e478356..378bd0a89 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo index c1fc9ff84..fdae52d6a 100644 --- a/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); data.append(1); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23.cairo b/src/tests/nodes/less_equal_fp8x23.cairo index da488ddc1..6e4cfe75d 100644 --- a/src/tests/nodes/less_equal_fp8x23.cairo +++ b/src/tests/nodes/less_equal_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp8x23/input_0.cairo b/src/tests/nodes/less_equal_fp8x23/input_0.cairo index 62fb02fd0..1e987a572 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/input_1.cairo b/src/tests/nodes/less_equal_fp8x23/input_1.cairo index 8aa8d9b02..50338a1e0 100644 --- a/src/tests/nodes/less_equal_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23/output_0.cairo b/src/tests/nodes/less_equal_fp8x23/output_0.cairo index 269e60640..328774a25 100644 --- a/src/tests/nodes/less_equal_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(1); - data.append(1); data.append(0); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo index 0059779ff..f4425ce6f 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo index 0ba99e7df..55785eaea 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo index 54bae4b76..fdcd11d36 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo index 7843f1bd6..b7f7a3c83 100644 --- a/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); data.append(1); + data.append(0); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32.cairo b/src/tests/nodes/less_equal_i32.cairo index 474820b5b..07417edc7 100644 --- a/src/tests/nodes/less_equal_i32.cairo +++ b/src/tests/nodes/less_equal_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i32/input_0.cairo b/src/tests/nodes/less_equal_i32/input_0.cairo index 7ae23200d..76d7a597a 100644 --- a/src/tests/nodes/less_equal_i32/input_0.cairo +++ b/src/tests/nodes/less_equal_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - - + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/input_1.cairo b/src/tests/nodes/less_equal_i32/input_1.cairo index f70335877..b713f9cdf 100644 --- a/src/tests/nodes/less_equal_i32/input_1.cairo +++ b/src/tests/nodes/less_equal_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32/output_0.cairo b/src/tests/nodes/less_equal_i32/output_0.cairo index 352a5ae44..d9b9dedff 100644 --- a/src/tests/nodes/less_equal_i32/output_0.cairo +++ b/src/tests/nodes/less_equal_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast.cairo b/src/tests/nodes/less_equal_i32_broadcast.cairo index 72e3667aa..30528a72d 100644 --- a/src/tests/nodes/less_equal_i32_broadcast.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo index fe7f59be6..044d66961 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo index 1272e68e6..ef4d6e029 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo index 34e792936..2a00c3c50 100644 --- a/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(1); + data.append(1); data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8.cairo b/src/tests/nodes/less_equal_i8.cairo index e8ff70de7..432c158b9 100644 --- a/src/tests/nodes/less_equal_i8.cairo +++ b/src/tests/nodes/less_equal_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i8/input_0.cairo b/src/tests/nodes/less_equal_i8/input_0.cairo index 3673e03dc..9f38b3caa 100644 --- a/src/tests/nodes/less_equal_i8/input_0.cairo +++ b/src/tests/nodes/less_equal_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/input_1.cairo b/src/tests/nodes/less_equal_i8/input_1.cairo index 03ff7cfc5..28d5cb3d4 100644 --- a/src/tests/nodes/less_equal_i8/input_1.cairo +++ b/src/tests/nodes/less_equal_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8/output_0.cairo b/src/tests/nodes/less_equal_i8/output_0.cairo index 8b96ad6d7..2094003c4 100644 --- a/src/tests/nodes/less_equal_i8/output_0.cairo +++ b/src/tests/nodes/less_equal_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); data.append(1); data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast.cairo b/src/tests/nodes/less_equal_i8_broadcast.cairo index 3c06fda77..f83a1ebbc 100644 --- a/src/tests/nodes/less_equal_i8_broadcast.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo index d7859c33d..af8ae9475 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo index b27826cf0..f2ee05092 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo index d47a2506a..386b678ef 100644 --- a/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); - data.append(0); data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32.cairo b/src/tests/nodes/less_equal_u32.cairo index 9175996d0..b9de4d683 100644 --- a/src/tests/nodes/less_equal_u32.cairo +++ b/src/tests/nodes/less_equal_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_u32/input_0.cairo b/src/tests/nodes/less_equal_u32/input_0.cairo index 76cb25b81..a1dd52918 100644 --- a/src/tests/nodes/less_equal_u32/input_0.cairo +++ b/src/tests/nodes/less_equal_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); data.append(1); data.append(0); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/input_1.cairo b/src/tests/nodes/less_equal_u32/input_1.cairo index 34981c2a5..ff87f088a 100644 --- a/src/tests/nodes/less_equal_u32/input_1.cairo +++ b/src/tests/nodes/less_equal_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(3); - data.append(5); + data.append(0); data.append(2); + data.append(5); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32/output_0.cairo b/src/tests/nodes/less_equal_u32/output_0.cairo index 0606e6413..fdae52d6a 100644 --- a/src/tests/nodes/less_equal_u32/output_0.cairo +++ b/src/tests/nodes/less_equal_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(0); data.append(1); data.append(1); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast.cairo b/src/tests/nodes/less_equal_u32_broadcast.cairo index 082f41f18..6db6cba0f 100644 --- a/src/tests/nodes/less_equal_u32_broadcast.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo index 709c45a1f..d4284899e 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); + data.append(2); + data.append(3); data.append(3); - data.append(0); - data.append(4); - data.append(4); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo index 09704395b..cd189c89d 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(1); data.append(5); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo index d47a2506a..b7f7a3c83 100644 --- a/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_equal_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); data.append(0); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16.cairo b/src/tests/nodes/less_fp16x16.cairo index c9962677f..21781b9e0 100644 --- a/src/tests/nodes/less_fp16x16.cairo +++ b/src/tests/nodes/less_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp16x16/input_0.cairo b/src/tests/nodes/less_fp16x16/input_0.cairo index a7a1eef9a..47ba0c652 100644 --- a/src/tests/nodes/less_fp16x16/input_0.cairo +++ b/src/tests/nodes/less_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/input_1.cairo b/src/tests/nodes/less_fp16x16/input_1.cairo index 5baee07ce..df51f1840 100644 --- a/src/tests/nodes/less_fp16x16/input_1.cairo +++ b/src/tests/nodes/less_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 196608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16/output_0.cairo b/src/tests/nodes/less_fp16x16/output_0.cairo index 35383d32d..57a138cc0 100644 --- a/src/tests/nodes/less_fp16x16/output_0.cairo +++ b/src/tests/nodes/less_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,8 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); data.append(1); - data.append(0); - data.append(0); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); @@ -22,22 +18,23 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(1); data.append(0); + data.append(1); + data.append(1); + data.append(1); data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(1); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast.cairo b/src/tests/nodes/less_fp16x16_broadcast.cairo index 8dfc3eedf..f12f65642 100644 --- a/src/tests/nodes/less_fp16x16_broadcast.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo index e1c3654c8..e186777e0 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo index 310195ab0..1f86b7108 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo index 0abc35cbc..718bd3ae5 100644 --- a/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); - data.append(0); + data.append(1); data.append(0); data.append(1); data.append(1); - data.append(0); data.append(1); - data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); - data.append(1); - data.append(1); data.append(0); data.append(0); + data.append(0); + data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); - data.append(0); - - + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23.cairo b/src/tests/nodes/less_fp8x23.cairo index 42a5c3991..acf56a881 100644 --- a/src/tests/nodes/less_fp8x23.cairo +++ b/src/tests/nodes/less_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp8x23/input_0.cairo b/src/tests/nodes/less_fp8x23/input_0.cairo index bb2f52e02..d25e75ea8 100644 --- a/src/tests/nodes/less_fp8x23/input_0.cairo +++ b/src/tests/nodes/less_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/input_1.cairo b/src/tests/nodes/less_fp8x23/input_1.cairo index 37db5d9a0..268729957 100644 --- a/src/tests/nodes/less_fp8x23/input_1.cairo +++ b/src/tests/nodes/less_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23/output_0.cairo b/src/tests/nodes/less_fp8x23/output_0.cairo index 560b1a86e..b8295128c 100644 --- a/src/tests/nodes/less_fp8x23/output_0.cairo +++ b/src/tests/nodes/less_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); data.append(1); data.append(0); data.append(0); @@ -21,23 +18,23 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); data.append(1); - data.append(0); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); + data.append(0); + data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(1); data.append(0); data.append(1); data.append(0); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast.cairo b/src/tests/nodes/less_fp8x23_broadcast.cairo index 78632cf96..52adce60c 100644 --- a/src/tests/nodes/less_fp8x23_broadcast.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo index 78c5f553c..dcf3b113f 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo index 544dee9db..d586a2c4b 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo index 45770ecc0..0b1d736f2 100644 --- a/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/less_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,17 +10,17 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); + data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); - data.append(1); data.append(0); data.append(1); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -29,15 +28,13 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(1); - data.append(1); - data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32.cairo b/src/tests/nodes/less_i32.cairo index 156877d35..57541a095 100644 --- a/src/tests/nodes/less_i32.cairo +++ b/src/tests/nodes/less_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i32/input_0.cairo b/src/tests/nodes/less_i32/input_0.cairo index f0c2e5f3a..dc2a71d6f 100644 --- a/src/tests/nodes/less_i32/input_0.cairo +++ b/src/tests/nodes/less_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32/input_1.cairo b/src/tests/nodes/less_i32/input_1.cairo index 2a3e754fd..f8a774df8 100644 --- a/src/tests/nodes/less_i32/input_1.cairo +++ b/src/tests/nodes/less_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32/output_0.cairo b/src/tests/nodes/less_i32/output_0.cairo index 0ba1ef43f..ea0f32c51 100644 --- a/src/tests/nodes/less_i32/output_0.cairo +++ b/src/tests/nodes/less_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); + data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(0); data.append(0); data.append(1); data.append(1); data.append(0); - data.append(1); data.append(0); data.append(1); - data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); data.append(0); data.append(1); data.append(1); - data.append(1); - data.append(1); - data.append(0); data.append(0); data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast.cairo b/src/tests/nodes/less_i32_broadcast.cairo index e7560bff6..09b42704a 100644 --- a/src/tests/nodes/less_i32_broadcast.cairo +++ b/src/tests/nodes/less_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i32_broadcast/input_0.cairo b/src/tests/nodes/less_i32_broadcast/input_0.cairo index 4ddf966f2..b5d1adb86 100644 --- a/src/tests/nodes/less_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/input_1.cairo b/src/tests/nodes/less_i32_broadcast/input_1.cairo index e9117838b..5a96f6820 100644 --- a/src/tests/nodes/less_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,9 +11,7 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i32_broadcast/output_0.cairo b/src/tests/nodes/less_i32_broadcast/output_0.cairo index 620953ab7..0b9fd5642 100644 --- a/src/tests/nodes/less_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,28 +15,26 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(1); + data.append(0); + data.append(0); data.append(0); data.append(1); data.append(1); - data.append(1); + data.append(0); + data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(1); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); - data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8.cairo b/src/tests/nodes/less_i8.cairo index 6cd37e77d..c05e8d799 100644 --- a/src/tests/nodes/less_i8.cairo +++ b/src/tests/nodes/less_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i8/input_0.cairo b/src/tests/nodes/less_i8/input_0.cairo index d065e3e09..c2184a707 100644 --- a/src/tests/nodes/less_i8/input_0.cairo +++ b/src/tests/nodes/less_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8/input_1.cairo b/src/tests/nodes/less_i8/input_1.cairo index cde5c4c3b..571aad2d3 100644 --- a/src/tests/nodes/less_i8/input_1.cairo +++ b/src/tests/nodes/less_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8/output_0.cairo b/src/tests/nodes/less_i8/output_0.cairo index 64e5f523a..deae6c067 100644 --- a/src/tests/nodes/less_i8/output_0.cairo +++ b/src/tests/nodes/less_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,14 +9,9 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(1); - data.append(0); data.append(1); data.append(1); data.append(0); - data.append(1); data.append(0); data.append(1); data.append(0); @@ -28,16 +22,19 @@ fn output_0() -> Tensor { data.append(0); data.append(1); data.append(1); - data.append(0); + data.append(1); + data.append(1); data.append(1); data.append(0); + data.append(0); data.append(1); data.append(0); + data.append(0); + data.append(1); + data.append(1); data.append(1); data.append(0); data.append(0); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast.cairo b/src/tests/nodes/less_i8_broadcast.cairo index 3cceec019..5d5671acb 100644 --- a/src/tests/nodes/less_i8_broadcast.cairo +++ b/src/tests/nodes/less_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_i8_broadcast/input_0.cairo b/src/tests/nodes/less_i8_broadcast/input_0.cairo index 399841593..bc6e75c58 100644 --- a/src/tests/nodes/less_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/input_1.cairo b/src/tests/nodes/less_i8_broadcast/input_1.cairo index 6d46a96d7..6c082b2d3 100644 --- a/src/tests/nodes/less_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/less_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,8 +12,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_i8_broadcast/output_0.cairo b/src/tests/nodes/less_i8_broadcast/output_0.cairo index 08c091389..48ad45772 100644 --- a/src/tests/nodes/less_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/less_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,14 +14,10 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - data.append(1); data.append(1); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -30,14 +25,16 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32.cairo b/src/tests/nodes/less_u32.cairo index ddcbd9061..e3043c8cc 100644 --- a/src/tests/nodes/less_u32.cairo +++ b/src/tests/nodes/less_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_u32/input_0.cairo b/src/tests/nodes/less_u32/input_0.cairo index 247f83da5..6289bb4f0 100644 --- a/src/tests/nodes/less_u32/input_0.cairo +++ b/src/tests/nodes/less_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(5); - data.append(4); + data.append(2); + data.append(1); + data.append(2); data.append(3); data.append(3); data.append(5); - data.append(3); - data.append(4); data.append(5); data.append(5); - data.append(4); + data.append(1); data.append(5); + data.append(3); + data.append(3); + data.append(3); data.append(5); - data.append(4); - data.append(2); data.append(2); - data.append(5); data.append(3); data.append(0); data.append(1); - data.append(4); - data.append(2); - data.append(0); data.append(2); data.append(5); - data.append(2); + data.append(5); + data.append(1); + data.append(5); + data.append(3); data.append(2); data.append(5); - - + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32/input_1.cairo b/src/tests/nodes/less_u32/input_1.cairo index 79fd95c92..1d3cc89f6 100644 --- a/src/tests/nodes/less_u32/input_1.cairo +++ b/src/tests/nodes/less_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(0); + data.append(4); data.append(5); + data.append(5); + data.append(4); data.append(0); data.append(4); data.append(3); data.append(5); - data.append(2); - data.append(4); + data.append(0); data.append(2); data.append(5); data.append(1); - data.append(5); - data.append(2); - data.append(3); data.append(3); - data.append(2); - data.append(5); - data.append(5); data.append(5); data.append(0); data.append(1); + data.append(4); + data.append(4); data.append(0); data.append(4); + data.append(5); data.append(3); - data.append(1); - data.append(2); data.append(0); - data.append(5); - - + data.append(2); + data.append(4); + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32/output_0.cairo b/src/tests/nodes/less_u32/output_0.cairo index 307ab7582..df422974f 100644 --- a/src/tests/nodes/less_u32/output_0.cairo +++ b/src/tests/nodes/less_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(0); + data.append(1); + data.append(1); + data.append(1); data.append(1); data.append(0); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); - data.append(0); - data.append(0); - data.append(0); + data.append(1); data.append(0); data.append(0); data.append(1); data.append(0); - data.append(0); + data.append(1); data.append(1); data.append(1); data.append(0); data.append(0); - data.append(0); - data.append(1); data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast.cairo b/src/tests/nodes/less_u32_broadcast.cairo index e152fc996..f6f451556 100644 --- a/src/tests/nodes/less_u32_broadcast.cairo +++ b/src/tests/nodes/less_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/less_u32_broadcast/input_0.cairo b/src/tests/nodes/less_u32_broadcast/input_0.cairo index 84ec9d8fd..d484854b7 100644 --- a/src/tests/nodes/less_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(3); - data.append(1); - data.append(0); - data.append(2); - data.append(1); - data.append(3); - data.append(3); - data.append(3); - data.append(3); + data.append(5); + data.append(5); data.append(0); + data.append(4); data.append(1); data.append(3); - data.append(1); - data.append(1); - data.append(0); data.append(0); - data.append(0); - data.append(5); data.append(4); + data.append(5); data.append(2); data.append(2); data.append(0); data.append(3); - data.append(2); data.append(0); + data.append(5); + data.append(4); + data.append(0); + data.append(5); + data.append(3); + data.append(1); + data.append(3); + data.append(1); data.append(0); + data.append(1); data.append(0); - - + data.append(3); + data.append(2); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/input_1.cairo b/src/tests/nodes/less_u32_broadcast/input_1.cairo index 5af96453a..26f1f9845 100644 --- a/src/tests/nodes/less_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/less_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(0); data.append(3); data.append(5); - - + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/less_u32_broadcast/output_0.cairo b/src/tests/nodes/less_u32_broadcast/output_0.cairo index ef89940d1..e092a6421 100644 --- a/src/tests/nodes/less_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/less_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,16 +11,13 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - data.append(0); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); data.append(0); data.append(0); - data.append(0); data.append(1); data.append(1); data.append(1); @@ -29,6 +25,7 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(1); @@ -37,7 +34,7 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - + data.append(0); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16.cairo b/src/tests/nodes/linear_fp16x16.cairo index 0726b2015..6814a5879 100644 --- a/src/tests/nodes/linear_fp16x16.cairo +++ b/src/tests/nodes/linear_fp16x16.cairo @@ -4,11 +4,10 @@ mod input_2; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_fp16x16/input_0.cairo b/src/tests/nodes/linear_fp16x16/input_0.cairo index 41ae699ce..deb804047 100644 --- a/src/tests/nodes/linear_fp16x16/input_0.cairo +++ b/src/tests/nodes/linear_fp16x16/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 243480, sign: false }); - data.append(FP16x16 { mag: 81530, sign: false }); - data.append(FP16x16 { mag: 33568, sign: true }); - - + data.append(FP16x16 { mag: 57550, sign: false }); + data.append(FP16x16 { mag: 313427, sign: true }); + data.append(FP16x16 { mag: 31559, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_1.cairo b/src/tests/nodes/linear_fp16x16/input_1.cairo index 6b37bd16b..139b1e374 100644 --- a/src/tests/nodes/linear_fp16x16/input_1.cairo +++ b/src/tests/nodes/linear_fp16x16/input_1.cairo @@ -1,24 +1,20 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 406504, sign: false }); - data.append(FP16x16 { mag: 169826, sign: true }); - data.append(FP16x16 { mag: 286936, sign: false }); - data.append(FP16x16 { mag: 216587, sign: true }); - data.append(FP16x16 { mag: 320888, sign: true }); - data.append(FP16x16 { mag: 186065, sign: false }); - - + data.append(FP16x16 { mag: 316249, sign: true }); + data.append(FP16x16 { mag: 223592, sign: true }); + data.append(FP16x16 { mag: 238282, sign: true }); + data.append(FP16x16 { mag: 452809, sign: false }); + data.append(FP16x16 { mag: 234567, sign: false }); + data.append(FP16x16 { mag: 135020, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/input_2.cairo b/src/tests/nodes/linear_fp16x16/input_2.cairo index 1d39acf99..5b0cd4ce2 100644 --- a/src/tests/nodes/linear_fp16x16/input_2.cairo +++ b/src/tests/nodes/linear_fp16x16/input_2.cairo @@ -1,19 +1,15 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 17100, sign: true }); - data.append(FP16x16 { mag: 360167, sign: false }); - - + data.append(FP16x16 { mag: 362925, sign: false }); + data.append(FP16x16 { mag: 184207, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp16x16/output_0.cairo b/src/tests/nodes/linear_fp16x16/output_0.cairo index 70959dbae..3563bee17 100644 --- a/src/tests/nodes/linear_fp16x16/output_0.cairo +++ b/src/tests/nodes/linear_fp16x16/output_0.cairo @@ -1,19 +1,15 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1134904, sign: false }); - data.append(FP16x16 { mag: 939012, sign: true }); - - + data.append(FP16x16 { mag: 1039798, sign: false }); + data.append(FP16x16 { mag: 843374, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23.cairo b/src/tests/nodes/linear_fp8x23.cairo index 903828561..10914205a 100644 --- a/src/tests/nodes/linear_fp8x23.cairo +++ b/src/tests/nodes/linear_fp8x23.cairo @@ -4,11 +4,10 @@ mod input_2; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_fp8x23/input_0.cairo b/src/tests/nodes/linear_fp8x23/input_0.cairo index 777eb9f09..76f1d5631 100644 --- a/src/tests/nodes/linear_fp8x23/input_0.cairo +++ b/src/tests/nodes/linear_fp8x23/input_0.cairo @@ -1,18 +1,16 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16576692, sign: false }); - data.append(FP8x23 { mag: 41797636, sign: false }); - data.append(FP8x23 { mag: 10487655, sign: true }); - - + data.append(FP8x23 { mag: 11919257, sign: false }); + data.append(FP8x23 { mag: 4840922, sign: false }); + data.append(FP8x23 { mag: 47921258, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_1.cairo b/src/tests/nodes/linear_fp8x23/input_1.cairo index dcb16d515..e7c115b6e 100644 --- a/src/tests/nodes/linear_fp8x23/input_1.cairo +++ b/src/tests/nodes/linear_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,13 +10,11 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1236715, sign: false }); - data.append(FP8x23 { mag: 4771319, sign: false }); - data.append(FP8x23 { mag: 8392691, sign: false }); - data.append(FP8x23 { mag: 36629024, sign: true }); - data.append(FP8x23 { mag: 34768195, sign: false }); - data.append(FP8x23 { mag: 2858178, sign: false }); - - + data.append(FP8x23 { mag: 52315818, sign: false }); + data.append(FP8x23 { mag: 2320148, sign: false }); + data.append(FP8x23 { mag: 22884193, sign: true }); + data.append(FP8x23 { mag: 21749272, sign: false }); + data.append(FP8x23 { mag: 29980322, sign: true }); + data.append(FP8x23 { mag: 34817611, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/input_2.cairo b/src/tests/nodes/linear_fp8x23/input_2.cairo index 37a11a04b..df5d5093a 100644 --- a/src/tests/nodes/linear_fp8x23/input_2.cairo +++ b/src/tests/nodes/linear_fp8x23/input_2.cairo @@ -1,17 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 34671437, sign: true }); - data.append(FP8x23 { mag: 27817938, sign: false }); - - + data.append(FP8x23 { mag: 8723741, sign: false }); + data.append(FP8x23 { mag: 54398803, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_fp8x23/output_0.cairo b/src/tests/nodes/linear_fp8x23/output_0.cairo index a8d973435..6075c78e7 100644 --- a/src/tests/nodes/linear_fp8x23/output_0.cairo +++ b/src/tests/nodes/linear_fp8x23/output_0.cairo @@ -1,17 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 18946433, sign: true }); - data.append(FP8x23 { mag: 125100432, sign: false }); - - + data.append(FP8x23 { mag: 46332113, sign: true }); + data.append(FP8x23 { mag: 130900238, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32.cairo b/src/tests/nodes/linear_i32.cairo index d32135be7..47644ee5a 100644 --- a/src/tests/nodes/linear_i32.cairo +++ b/src/tests/nodes/linear_i32.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I32NN; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_i32/input_0.cairo b/src/tests/nodes/linear_i32/input_0.cairo index 4c0ffaec1..ceac57bb9 100644 --- a/src/tests/nodes/linear_i32/input_0.cairo +++ b/src/tests/nodes/linear_i32/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 5, sign: true }); - - + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_1.cairo b/src/tests/nodes/linear_i32/input_1.cairo index 566971bd0..cd9b1a41a 100644 --- a/src/tests/nodes/linear_i32/input_1.cairo +++ b/src/tests/nodes/linear_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,13 +9,11 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - - + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/input_2.cairo b/src/tests/nodes/linear_i32/input_2.cairo index 86937a12a..b51f38563 100644 --- a/src/tests/nodes/linear_i32/input_2.cairo +++ b/src/tests/nodes/linear_i32/input_2.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 4, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i32/output_0.cairo b/src/tests/nodes/linear_i32/output_0.cairo index 1d367affa..d22ac08d8 100644 --- a/src/tests/nodes/linear_i32/output_0.cairo +++ b/src/tests/nodes/linear_i32/output_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 36, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8.cairo b/src/tests/nodes/linear_i8.cairo index 832141470..906f4ede1 100644 --- a/src/tests/nodes/linear_i8.cairo +++ b/src/tests/nodes/linear_i8.cairo @@ -4,10 +4,10 @@ mod input_2; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I8NN; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_i8/input_0.cairo b/src/tests/nodes/linear_i8/input_0.cairo index 1778478d8..71ad2ee24 100644 --- a/src/tests/nodes/linear_i8/input_0.cairo +++ b/src/tests/nodes/linear_i8/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_1.cairo b/src/tests/nodes/linear_i8/input_1.cairo index 3e919ffad..1af283f23 100644 --- a/src/tests/nodes/linear_i8/input_1.cairo +++ b/src/tests/nodes/linear_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,12 +10,10 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/input_2.cairo b/src/tests/nodes/linear_i8/input_2.cairo index fac27ceaf..a64f62901 100644 --- a/src/tests/nodes/linear_i8/input_2.cairo +++ b/src/tests/nodes/linear_i8/input_2.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_i8/output_0.cairo b/src/tests/nodes/linear_i8/output_0.cairo index 702ed6ba6..a274958e0 100644 --- a/src/tests/nodes/linear_i8/output_0.cairo +++ b/src/tests/nodes/linear_i8/output_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 7, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32.cairo b/src/tests/nodes/linear_u32.cairo index a5ada4f83..d0f695299 100644 --- a/src/tests/nodes/linear_u32.cairo +++ b/src/tests/nodes/linear_u32.cairo @@ -3,10 +3,11 @@ mod input_1; mod input_2; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; + +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::U32NN; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/linear_u32/input_0.cairo b/src/tests/nodes/linear_u32/input_0.cairo index ff0cb4baf..1155cc0bc 100644 --- a/src/tests/nodes/linear_u32/input_0.cairo +++ b/src/tests/nodes/linear_u32/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(3); - data.append(3); + data.append(0); data.append(4); - - + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_1.cairo b/src/tests/nodes/linear_u32/input_1.cairo index a75ff38bd..4ed09b8c4 100644 --- a/src/tests/nodes/linear_u32/input_1.cairo +++ b/src/tests/nodes/linear_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,13 +8,11 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(0); - data.append(3); + data.append(1); + data.append(4); + data.append(4); + data.append(4); + data.append(2); data.append(0); - data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/input_2.cairo b/src/tests/nodes/linear_u32/input_2.cairo index 2b0b51c1f..cb612d623 100644 --- a/src/tests/nodes/linear_u32/input_2.cairo +++ b/src/tests/nodes/linear_u32/input_2.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_2() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - - + data.append(5); + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/linear_u32/output_0.cairo b/src/tests/nodes/linear_u32/output_0.cairo index 9f6a8d887..7c2e0d428 100644 --- a/src/tests/nodes/linear_u32/output_0.cairo +++ b/src/tests/nodes/linear_u32/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(24); - data.append(21); - - + data.append(41); + data.append(11); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16.cairo b/src/tests/nodes/log_fp16x16.cairo index 0eeabc712..798670a05 100644 --- a/src/tests/nodes/log_fp16x16.cairo +++ b/src/tests/nodes/log_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_fp16x16/input_0.cairo b/src/tests/nodes/log_fp16x16/input_0.cairo index ad8331684..559a20755 100644 --- a/src/tests/nodes/log_fp16x16/input_0.cairo +++ b/src/tests/nodes/log_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1128814, sign: false }); - data.append(FP16x16 { mag: 6863846, sign: false }); - data.append(FP16x16 { mag: 920075, sign: false }); - data.append(FP16x16 { mag: 7713567, sign: false }); - - + data.append(FP16x16 { mag: 2469811, sign: false }); + data.append(FP16x16 { mag: 841664, sign: false }); + data.append(FP16x16 { mag: 6861780, sign: false }); + data.append(FP16x16 { mag: 3475757, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp16x16/output_0.cairo b/src/tests/nodes/log_fp16x16/output_0.cairo index d9c7772ce..3674d50ee 100644 --- a/src/tests/nodes/log_fp16x16/output_0.cairo +++ b/src/tests/nodes/log_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 186536, sign: false }); - data.append(FP16x16 { mag: 304835, sign: false }); - data.append(FP16x16 { mag: 173136, sign: false }); - data.append(FP16x16 { mag: 312484, sign: false }); - - + data.append(FP16x16 { mag: 237849, sign: false }); + data.append(FP16x16 { mag: 167299, sign: false }); + data.append(FP16x16 { mag: 304815, sign: false }); + data.append(FP16x16 { mag: 260241, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23.cairo b/src/tests/nodes/log_fp8x23.cairo index b42265b04..65a79077e 100644 --- a/src/tests/nodes/log_fp8x23.cairo +++ b/src/tests/nodes/log_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/log_fp8x23/input_0.cairo b/src/tests/nodes/log_fp8x23/input_0.cairo index 0b8b833ff..2be00adcd 100644 --- a/src/tests/nodes/log_fp8x23/input_0.cairo +++ b/src/tests/nodes/log_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 529321914, sign: false }); - data.append(FP8x23 { mag: 645273413, sign: false }); - data.append(FP8x23 { mag: 920206991, sign: false }); - data.append(FP8x23 { mag: 949171945, sign: false }); - - + data.append(FP8x23 { mag: 193551844, sign: false }); + data.append(FP8x23 { mag: 202689108, sign: false }); + data.append(FP8x23 { mag: 535508695, sign: false }); + data.append(FP8x23 { mag: 235726980, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_fp8x23/output_0.cairo b/src/tests/nodes/log_fp8x23/output_0.cairo index b77950618..0c8318b27 100644 --- a/src/tests/nodes/log_fp8x23/output_0.cairo +++ b/src/tests/nodes/log_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 34768449, sign: false }); - data.append(FP8x23 { mag: 36430042, sign: false }); - data.append(FP8x23 { mag: 39407365, sign: false }); - data.append(FP8x23 { mag: 39667339, sign: false }); - - + data.append(FP8x23 { mag: 26329079, sign: false }); + data.append(FP8x23 { mag: 26716028, sign: false }); + data.append(FP8x23 { mag: 34865928, sign: false }); + data.append(FP8x23 { mag: 27982715, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16.cairo b/src/tests/nodes/log_i32_fp16x16.cairo deleted file mode 100644 index 9e3ca72df..000000000 --- a/src/tests/nodes/log_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_log_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/input_0.cairo b/src/tests/nodes/log_i32_fp16x16/input_0.cairo deleted file mode 100644 index 0e5e22245..000000000 --- a/src/tests/nodes/log_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 85, sign: false }); - data.append(i32 { mag: 94, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp16x16/output_0.cairo b/src/tests/nodes/log_i32_fp16x16/output_0.cairo deleted file mode 100644 index 63f8c4561..000000000 --- a/src/tests/nodes/log_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 311531, sign: false }); - data.append(FP16x16 { mag: 293426, sign: false }); - data.append(FP16x16 { mag: 291153, sign: false }); - data.append(FP16x16 { mag: 297749, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23.cairo b/src/tests/nodes/log_i32_fp8x23.cairo deleted file mode 100644 index 9975862e8..000000000 --- a/src/tests/nodes/log_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/input_0.cairo b/src/tests/nodes/log_i32_fp8x23/input_0.cairo deleted file mode 100644 index 9695faf4d..000000000 --- a/src/tests/nodes/log_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 85, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i32_fp8x23/output_0.cairo b/src/tests/nodes/log_i32_fp8x23/output_0.cairo deleted file mode 100644 index b16b930e7..000000000 --- a/src/tests/nodes/log_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25130023, sign: false }); - data.append(FP8x23 { mag: 30944563, sign: false }); - data.append(FP8x23 { mag: 34204863, sign: false }); - data.append(FP8x23 { mag: 37267659, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16.cairo b/src/tests/nodes/log_i8_fp16x16.cairo deleted file mode 100644 index fda4b859b..000000000 --- a/src/tests/nodes/log_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/input_0.cairo b/src/tests/nodes/log_i8_fp16x16/input_0.cairo deleted file mode 100644 index 6ca968ddc..000000000 --- a/src/tests/nodes/log_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 37, sign: false }); - data.append(i8 { mag: 68, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp16x16/output_0.cairo b/src/tests/nodes/log_i8_fp16x16/output_0.cairo deleted file mode 100644 index 6478dd7c2..000000000 --- a/src/tests/nodes/log_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 275558, sign: false }); - data.append(FP16x16 { mag: 303741, sign: false }); - data.append(FP16x16 { mag: 236645, sign: false }); - data.append(FP16x16 { mag: 276529, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23.cairo b/src/tests/nodes/log_i8_fp8x23.cairo deleted file mode 100644 index fa9e21fa1..000000000 --- a/src/tests/nodes/log_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_log_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/input_0.cairo b/src/tests/nodes/log_i8_fp8x23/input_0.cairo deleted file mode 100644 index 3b3477959..000000000 --- a/src/tests/nodes/log_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_i8_fp8x23/output_0.cairo b/src/tests/nodes/log_i8_fp8x23/output_0.cairo deleted file mode 100644 index fb069c2f9..000000000 --- a/src/tests/nodes/log_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9216000, sign: false }); - data.append(FP8x23 { mag: 5816320, sign: false }); - data.append(FP8x23 { mag: 9216000, sign: false }); - data.append(FP8x23 { mag: 11632640, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16.cairo b/src/tests/nodes/log_u32_fp16x16.cairo deleted file mode 100644 index 45a07345b..000000000 --- a/src/tests/nodes/log_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_log_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/input_0.cairo b/src/tests/nodes/log_u32_fp16x16/input_0.cairo deleted file mode 100644 index 4b672b683..000000000 --- a/src/tests/nodes/log_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(18); - data.append(112); - data.append(41); - data.append(31); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp16x16/output_0.cairo b/src/tests/nodes/log_u32_fp16x16/output_0.cairo deleted file mode 100644 index 85880be30..000000000 --- a/src/tests/nodes/log_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 189423, sign: false }); - data.append(FP16x16 { mag: 309231, sign: false }); - data.append(FP16x16 { mag: 243372, sign: false }); - data.append(FP16x16 { mag: 225049, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23.cairo b/src/tests/nodes/log_u32_fp8x23.cairo deleted file mode 100644 index ea20a550a..000000000 --- a/src/tests/nodes/log_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_log_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.log(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/input_0.cairo b/src/tests/nodes/log_u32_fp8x23/input_0.cairo deleted file mode 100644 index 70dff11d8..000000000 --- a/src/tests/nodes/log_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(12); - data.append(111); - data.append(35); - data.append(111); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/log_u32_fp8x23/output_0.cairo b/src/tests/nodes/log_u32_fp8x23/output_0.cairo deleted file mode 100644 index f694761a1..000000000 --- a/src/tests/nodes/log_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 20844907, sign: false }); - data.append(FP8x23 { mag: 39506402, sign: false }); - data.append(FP8x23 { mag: 29824421, sign: false }); - data.append(FP8x23 { mag: 39506402, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo index b6b7493f3..e0bb07e4d 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo index d64727cba..74c447c63 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 116037, sign: false }); - data.append(FP16x16 { mag: 94428, sign: false }); - data.append(FP16x16 { mag: 182052, sign: false }); - data.append(FP16x16 { mag: 91686, sign: true }); - - + data.append(FP16x16 { mag: 174259, sign: false }); + data.append(FP16x16 { mag: 162527, sign: false }); + data.append(FP16x16 { mag: 121375, sign: false }); + data.append(FP16x16 { mag: 140007, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo index fe4dee981..ee95f26c8 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_0/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86416, sign: true }); - data.append(FP16x16 { mag: 3721, sign: true }); - data.append(FP16x16 { mag: 20401, sign: true }); - data.append(FP16x16 { mag: 189836, sign: true }); - - + data.append(FP16x16 { mag: 24179, sign: true }); + data.append(FP16x16 { mag: 644, sign: true }); + data.append(FP16x16 { mag: 77063, sign: true }); + data.append(FP16x16 { mag: 303179, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo index 6568d26fc..2c5076d76 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo index d80451237..4b561ef8c 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 37143, sign: true }); - data.append(FP16x16 { mag: 194436, sign: true }); - data.append(FP16x16 { mag: 74078, sign: true }); - data.append(FP16x16 { mag: 43388, sign: false }); - - + data.append(FP16x16 { mag: 131507, sign: true }); + data.append(FP16x16 { mag: 114767, sign: true }); + data.append(FP16x16 { mag: 44400, sign: true }); + data.append(FP16x16 { mag: 107661, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo index 88584f65e..b5890e4de 100644 --- a/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp16x16_axis_1/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 5690, sign: true }); - data.append(FP16x16 { mag: 162983, sign: true }); - data.append(FP16x16 { mag: 127562, sign: true }); - data.append(FP16x16 { mag: 10096, sign: true }); - - + data.append(FP16x16 { mag: 54329, sign: true }); + data.append(FP16x16 { mag: 37588, sign: true }); + data.append(FP16x16 { mag: 158203, sign: true }); + data.append(FP16x16 { mag: 6141, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo index 3a6d301f8..d17151ee0 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo index 5679a22d4..09a55d417 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 9437097, sign: false }); - data.append(FP8x23 { mag: 439107, sign: true }); - data.append(FP8x23 { mag: 8701053, sign: false }); - data.append(FP8x23 { mag: 11846800, sign: false }); - - + data.append(FP8x23 { mag: 13176366, sign: false }); + data.append(FP8x23 { mag: 22787205, sign: true }); + data.append(FP8x23 { mag: 3037628, sign: false }); + data.append(FP8x23 { mag: 15135492, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo index 979d89612..a2f21ecad 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_0/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5454588, sign: true }); - data.append(FP8x23 { mag: 14030456, sign: true }); - data.append(FP8x23 { mag: 6190632, sign: true }); - data.append(FP8x23 { mag: 1744548, sign: true }); - - + data.append(FP8x23 { mag: 2191868, sign: true }); + data.append(FP8x23 { mag: 10484172, sign: true }); + data.append(FP8x23 { mag: 12330606, sign: true }); + data.append(FP8x23 { mag: 2832460, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo index b68a9a0ea..170e93bbd 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo index c9a98f76d..025a7cd96 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6023735, sign: true }); - data.append(FP8x23 { mag: 7861841, sign: false }); - data.append(FP8x23 { mag: 20034366, sign: true }); - data.append(FP8x23 { mag: 4664398, sign: false }); - - + data.append(FP8x23 { mag: 14864085, sign: false }); + data.append(FP8x23 { mag: 748527, sign: false }); + data.append(FP8x23 { mag: 13216170, sign: false }); + data.append(FP8x23 { mag: 10738967, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo index 431cbef7a..c6e156022 100644 --- a/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo +++ b/src/tests/nodes/logsoftmax_fp8x23_axis_1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15352108, sign: true }); - data.append(FP8x23 { mag: 1466530, sign: true }); - data.append(FP8x23 { mag: 25129093, sign: true }); - data.append(FP8x23 { mag: 430328, sign: true }); - - + data.append(FP8x23 { mag: 1430064, sign: true }); + data.append(FP8x23 { mag: 15545622, sign: true }); + data.append(FP8x23 { mag: 469121, sign: true }); + data.append(FP8x23 { mag: 24424260, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo deleted file mode 100644 index 06627d01f..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index 6796c6ff3..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index 47c6038a2..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo deleted file mode 100644 index 228e76326..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index c44ef7976..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index 8c8141bd6..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo deleted file mode 100644 index 8959640df..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index ada1f98d4..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index 2573b0103..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo deleted file mode 100644 index 3b2abfa33..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i32_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index 103394aa0..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index c0d35d60b..000000000 --- a/src/tests/nodes/logsoftmax_i32_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo deleted file mode 100644 index f3b20da9c..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index bbe626e9a..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index 52e5d50ca..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 3184, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 199792, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo deleted file mode 100644 index b2e77797b..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index f30b47e16..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index 80997966d..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3184, sign: true }); - data.append(FP16x16 { mag: 199792, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo deleted file mode 100644 index ce7d4da01..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index 27757ec9d..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index 399779e5a..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo deleted file mode 100644 index a5a53f329..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_i8_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index ec2bcaa17..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index 1c5b631ab..000000000 --- a/src/tests/nodes/logsoftmax_i8_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 33706684, sign: true }); - data.append(FP8x23 { mag: 152252, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo deleted file mode 100644 index b4d650ba9..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp16x16_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo deleted file mode 100644 index e3cc04b8b..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(2); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo deleted file mode 100644 index 28441a9ab..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_0/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo deleted file mode 100644 index 3ce6c3d95..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp16x16_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo deleted file mode 100644 index bdde8723a..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(0); - data.append(1); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo deleted file mode 100644 index 7747097a7..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp16x16_axis_1/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 8318, sign: true }); - data.append(FP16x16 { mag: 139390, sign: true }); - data.append(FP16x16 { mag: 86065, sign: true }); - data.append(FP16x16 { mag: 20529, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo deleted file mode 100644 index 9462d37e6..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp8x23_axis_0() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo deleted file mode 100644 index b8b640838..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo deleted file mode 100644 index b75d7144f..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_0/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 11016437, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 2627829, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo deleted file mode 100644 index 40099d6b9..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_logsoftmax_u32_fp8x23_axis_1() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::logsoftmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo deleted file mode 100644 index 496e5236a..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo b/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo deleted file mode 100644 index a848c657d..000000000 --- a/src/tests/nodes/logsoftmax_u32_fp8x23_axis_1/output_0.cairo +++ /dev/null @@ -1,21 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 5814539, sign: true }); - data.append(FP8x23 { mag: 1064749, sign: true }); - data.append(FP8x23 { mag: 17841965, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d.cairo b/src/tests/nodes/matmul_fp16x16_1d.cairo index e1e1768f0..8556790f4 100644 --- a/src/tests/nodes/matmul_fp16x16_1d.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo index e457f2400..a0c78663c 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo index ce3be0260..1419b7daa 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - - + data.append(FP16x16 { mag: 131072, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo index e0d232829..3ce41e725 100644 --- a/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1d/output_0.cairo @@ -1,18 +1,14 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2.cairo b/src/tests/nodes/matmul_fp16x16_1x2.cairo index e8bfd380f..339b9b8ae 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo index 83ebb437e..b98069ece 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo index b00823fe0..4c0f897cb 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 196608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo index 50c08ef45..83656aa97 100644 --- a/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_1x2/output_0.cairo @@ -1,19 +1,15 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - - + data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1.cairo b/src/tests/nodes/matmul_fp16x16_2x1.cairo index 36f782867..c1c383260 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo index 40a99440c..7d22f7d54 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_0.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo index d7358673f..d75464bd3 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo index 5379ce7e7..426f51bc1 100644 --- a/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x1/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2.cairo b/src/tests/nodes/matmul_fp16x16_2x2.cairo index 8d1a03f6a..2d4985e5a 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo index f15b988e5..c6205f8dd 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo index b5a08db5d..02910be0e 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/input_1.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo index cbeea8289..c72087538 100644 --- a/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp16x16_2x2/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 655360, sign: true }); - data.append(FP16x16 { mag: 720896, sign: true }); - - + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d.cairo b/src/tests/nodes/matmul_fp8x23_1d.cairo index 3b70dcd0f..ba112de69 100644 --- a/src/tests/nodes/matmul_fp8x23_1d.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo index 356cebe63..3f614c0af 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - - + data.append(FP8x23 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo index 8b87951e5..15375e10e 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/input_1.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo index c8c026db1..e5f232990 100644 --- a/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1d/output_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 100663296, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2.cairo b/src/tests/nodes/matmul_fp8x23_1x2.cairo index 79afdca5e..c2ff4a6b1 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo index 9638a9b28..d971c4d64 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo index 076a1e8d9..650ca9d78 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo index 1f808122c..b9c97f2fe 100644 --- a/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_1x2/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 75497472, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1.cairo b/src/tests/nodes/matmul_fp8x23_2x1.cairo index 91a5d6614..1d675ede9 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo index f338b9e61..d7410502c 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo index 596fa477b..cc394e291 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo index 482847fbd..ced97c1f4 100644 --- a/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2.cairo b/src/tests/nodes/matmul_fp8x23_2x2.cairo index c68378d0c..d990a05e5 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo index aec8407c3..fa1873060 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo index 8903cb66d..d9c90cdad 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo index ff42753be..b7896ce63 100644 --- a/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_fp8x23_2x2/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - - + data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d.cairo b/src/tests/nodes/matmul_i32_1d.cairo index c06d06f18..954e022b4 100644 --- a/src/tests/nodes/matmul_i32_1d.cairo +++ b/src/tests/nodes/matmul_i32_1d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_1d/input_0.cairo b/src/tests/nodes/matmul_i32_1d/input_0.cairo index edda7ffa1..550f589d1 100644 --- a/src/tests/nodes/matmul_i32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 61, sign: true }); - data.append(i32 { mag: 113, sign: true }); - - + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 37, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/input_1.cairo b/src/tests/nodes/matmul_i32_1d/input_1.cairo index 4ab755f55..29dbdaed4 100644 --- a/src/tests/nodes/matmul_i32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1d/input_1.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 97, sign: true }); - - + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 59, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1d/output_0.cairo b/src/tests/nodes/matmul_i32_1d/output_0.cairo index 45b6a348d..def32662a 100644 --- a/src/tests/nodes/matmul_i32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1d/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 774, sign: false }); - - + data.append(i32 { mag: 681, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2.cairo b/src/tests/nodes/matmul_i32_1x2.cairo index a523d326f..4be4880f0 100644 --- a/src/tests/nodes/matmul_i32_1x2.cairo +++ b/src/tests/nodes/matmul_i32_1x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_1x2/input_0.cairo b/src/tests/nodes/matmul_i32_1x2/input_0.cairo index e8080c314..a734c416d 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 116, sign: false }); - - + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 36, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/input_1.cairo b/src/tests/nodes/matmul_i32_1x2/input_1.cairo index ba83c444a..65bc44676 100644 --- a/src/tests/nodes/matmul_i32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_1x2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 49, sign: true }); - - + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 84, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_1x2/output_0.cairo b/src/tests/nodes/matmul_i32_1x2/output_0.cairo index 89a9ef013..37731af6b 100644 --- a/src/tests/nodes/matmul_i32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_1x2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 14837, sign: true }); - - + data.append(i32 { mag: 1524, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1.cairo b/src/tests/nodes/matmul_i32_2x1.cairo index 2d9339ef8..acc587c1c 100644 --- a/src/tests/nodes/matmul_i32_2x1.cairo +++ b/src/tests/nodes/matmul_i32_2x1.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_2x1/input_0.cairo b/src/tests/nodes/matmul_i32_2x1/input_0.cairo index c12a05491..3b07896d4 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 126, sign: true }); - data.append(i32 { mag: 29, sign: false }); - - + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 37, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/input_1.cairo b/src/tests/nodes/matmul_i32_2x1/input_1.cairo index 0646139d6..bc5c5431e 100644 --- a/src/tests/nodes/matmul_i32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x1/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 18, sign: true }); - data.append(i32 { mag: 22, sign: false }); - - + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 106, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x1/output_0.cairo b/src/tests/nodes/matmul_i32_2x1/output_0.cairo index e6c52c5d6..f932c0e37 100644 --- a/src/tests/nodes/matmul_i32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2268, sign: false }); - data.append(i32 { mag: 2772, sign: true }); - data.append(i32 { mag: 522, sign: true }); - data.append(i32 { mag: 638, sign: false }); - - + data.append(i32 { mag: 5876, sign: true }); + data.append(i32 { mag: 5512, sign: false }); + data.append(i32 { mag: 4181, sign: true }); + data.append(i32 { mag: 3922, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2.cairo b/src/tests/nodes/matmul_i32_2x2.cairo index 31ab7f222..19aa4c19b 100644 --- a/src/tests/nodes/matmul_i32_2x2.cairo +++ b/src/tests/nodes/matmul_i32_2x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i32_2x2/input_0.cairo b/src/tests/nodes/matmul_i32_2x2/input_0.cairo index dfff10927..3159fa0d6 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 8, sign: true }); - - + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 53, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/input_1.cairo b/src/tests/nodes/matmul_i32_2x2/input_1.cairo index f51acded1..133eb9025 100644 --- a/src/tests/nodes/matmul_i32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i32_2x2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 105, sign: false }); - data.append(i32 { mag: 15, sign: false }); - - + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 22, sign: true }); + data.append(i32 { mag: 71, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i32_2x2/output_0.cairo b/src/tests/nodes/matmul_i32_2x2/output_0.cairo index dc2f0862d..03ebfea85 100644 --- a/src/tests/nodes/matmul_i32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i32_2x2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 8106, sign: true }); - data.append(i32 { mag: 2776, sign: false }); - data.append(i32 { mag: 1236, sign: true }); - data.append(i32 { mag: 3356, sign: false }); - - + data.append(i32 { mag: 5136, sign: true }); + data.append(i32 { mag: 15456, sign: false }); + data.append(i32 { mag: 3518, sign: true }); + data.append(i32 { mag: 10483, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d.cairo b/src/tests/nodes/matmul_i8_1d.cairo index 2cd44dc1c..1ff75eba2 100644 --- a/src/tests/nodes/matmul_i8_1d.cairo +++ b/src/tests/nodes/matmul_i8_1d.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_1d/input_0.cairo b/src/tests/nodes/matmul_i8_1d/input_0.cairo index 6d5bc94cd..9a84e6554 100644 --- a/src/tests/nodes/matmul_i8_1d/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_0.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/input_1.cairo b/src/tests/nodes/matmul_i8_1d/input_1.cairo index 600081ca3..4a8d022fd 100644 --- a/src/tests/nodes/matmul_i8_1d/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1d/input_1.cairo @@ -1,18 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1d/output_0.cairo b/src/tests/nodes/matmul_i8_1d/output_0.cairo index 79c16c618..4f87aadd1 100644 --- a/src/tests/nodes/matmul_i8_1d/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1d/output_0.cairo @@ -1,16 +1,13 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 9, sign: true }); - - + data.append(i8 { mag: 14, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2.cairo b/src/tests/nodes/matmul_i8_1x2.cairo index a09072f47..644709321 100644 --- a/src/tests/nodes/matmul_i8_1x2.cairo +++ b/src/tests/nodes/matmul_i8_1x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_1x2/input_0.cairo b/src/tests/nodes/matmul_i8_1x2/input_0.cairo index bcf19b13e..c31d9d71c 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/input_1.cairo b/src/tests/nodes/matmul_i8_1x2/input_1.cairo index 180041466..5a58f617e 100644 --- a/src/tests/nodes/matmul_i8_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_1x2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,8 +10,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_1x2/output_0.cairo b/src/tests/nodes/matmul_i8_1x2/output_0.cairo index 35bfed041..93c06ad93 100644 --- a/src/tests/nodes/matmul_i8_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_1x2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,8 +9,6 @@ fn output_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - - + data.append(i8 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1.cairo b/src/tests/nodes/matmul_i8_2x1.cairo index b8267f98d..9bc6aa743 100644 --- a/src/tests/nodes/matmul_i8_2x1.cairo +++ b/src/tests/nodes/matmul_i8_2x1.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_2x1/input_0.cairo b/src/tests/nodes/matmul_i8_2x1/input_0.cairo index ad35318e8..909aa526b 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/input_1.cairo b/src/tests/nodes/matmul_i8_2x1/input_1.cairo index e3a372fd7..669f471e6 100644 --- a/src/tests/nodes/matmul_i8_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x1/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,8 +10,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - + data.append(i8 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x1/output_0.cairo b/src/tests/nodes/matmul_i8_2x1/output_0.cairo index 8dc1b2214..efb300e6a 100644 --- a/src/tests/nodes/matmul_i8_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: true }); - - + data.append(i8 { mag: 9, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2.cairo b/src/tests/nodes/matmul_i8_2x2.cairo index c030e373e..5b2a18259 100644 --- a/src/tests/nodes/matmul_i8_2x2.cairo +++ b/src/tests/nodes/matmul_i8_2x2.cairo @@ -3,11 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_i8_2x2/input_0.cairo b/src/tests/nodes/matmul_i8_2x2/input_0.cairo index d45ba7592..84f324f02 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 4, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/input_1.cairo b/src/tests/nodes/matmul_i8_2x2/input_1.cairo index 67c925552..6282b84be 100644 --- a/src/tests/nodes/matmul_i8_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_i8_2x2/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 4, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_i8_2x2/output_0.cairo b/src/tests/nodes/matmul_i8_2x2/output_0.cairo index a93ee6dc0..761ce0efe 100644 --- a/src/tests/nodes/matmul_i8_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_i8_2x2/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 18, sign: false }); - data.append(i8 { mag: 14, sign: true }); - data.append(i8 { mag: 20, sign: true }); - - + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d.cairo b/src/tests/nodes/matmul_u32_1d.cairo index f01d7114e..4da598379 100644 --- a/src/tests/nodes/matmul_u32_1d.cairo +++ b/src/tests/nodes/matmul_u32_1d.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_1d/input_0.cairo b/src/tests/nodes/matmul_u32_1d/input_0.cairo index fe0751134..603829563 100644 --- a/src/tests/nodes/matmul_u32_1d/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_0.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(78); - data.append(41); - data.append(143); - - + data.append(160); + data.append(50); + data.append(195); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/input_1.cairo b/src/tests/nodes/matmul_u32_1d/input_1.cairo index bc70c2261..001202e79 100644 --- a/src/tests/nodes/matmul_u32_1d/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1d/input_1.cairo @@ -1,17 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(177); - data.append(153); - data.append(86); - - + data.append(15); + data.append(90); + data.append(53); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1d/output_0.cairo b/src/tests/nodes/matmul_u32_1d/output_0.cairo index 9d4279854..c835ea3ec 100644 --- a/src/tests/nodes/matmul_u32_1d/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1d/output_0.cairo @@ -1,15 +1,12 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(32377); - - + data.append(17235); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2.cairo b/src/tests/nodes/matmul_u32_1x2.cairo index fc58345ce..7dd094095 100644 --- a/src/tests/nodes/matmul_u32_1x2.cairo +++ b/src/tests/nodes/matmul_u32_1x2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_1x2/input_0.cairo b/src/tests/nodes/matmul_u32_1x2/input_0.cairo index 3c5d74d63..ddc6791d4 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(8); - data.append(229); - - + data.append(38); + data.append(186); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/input_1.cairo b/src/tests/nodes/matmul_u32_1x2/input_1.cairo index 31a497675..ddff242e0 100644 --- a/src/tests/nodes/matmul_u32_1x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_1x2/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(230); - data.append(197); - - + data.append(192); + data.append(48); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_1x2/output_0.cairo b/src/tests/nodes/matmul_u32_1x2/output_0.cairo index f777727f8..fae32e724 100644 --- a/src/tests/nodes/matmul_u32_1x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_1x2/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,8 +8,6 @@ fn output_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(46953); - - + data.append(16224); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1.cairo b/src/tests/nodes/matmul_u32_2x1.cairo index 4c9084cf6..b2d62cf9e 100644 --- a/src/tests/nodes/matmul_u32_2x1.cairo +++ b/src/tests/nodes/matmul_u32_2x1.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_2x1/input_0.cairo b/src/tests/nodes/matmul_u32_2x1/input_0.cairo index f375cf383..27ee8eff4 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_0() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(238); - data.append(25); - - + data.append(36); + data.append(127); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/input_1.cairo b/src/tests/nodes/matmul_u32_2x1/input_1.cairo index 48db9f3c9..596735161 100644 --- a/src/tests/nodes/matmul_u32_2x1/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x1/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(50); - data.append(113); - - + data.append(184); + data.append(114); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x1/output_0.cairo b/src/tests/nodes/matmul_u32_2x1/output_0.cairo index 8287e8b57..d560be99c 100644 --- a/src/tests/nodes/matmul_u32_2x1/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x1/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(11900); - data.append(26894); - data.append(1250); - data.append(2825); - - + data.append(6624); + data.append(4104); + data.append(23368); + data.append(14478); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2.cairo b/src/tests/nodes/matmul_u32_2x2.cairo index d707ef683..7844925c9 100644 --- a/src/tests/nodes/matmul_u32_2x2.cairo +++ b/src/tests/nodes/matmul_u32_2x2.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/matmul_u32_2x2/input_0.cairo b/src/tests/nodes/matmul_u32_2x2/input_0.cairo index 275c99dc1..c111fcee5 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(244); - data.append(99); - data.append(109); - data.append(162); - - + data.append(66); + data.append(225); + data.append(132); + data.append(40); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/input_1.cairo b/src/tests/nodes/matmul_u32_2x2/input_1.cairo index 1ae8c0cf8..e5f03537d 100644 --- a/src/tests/nodes/matmul_u32_2x2/input_1.cairo +++ b/src/tests/nodes/matmul_u32_2x2/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(151); - data.append(68); - data.append(121); - data.append(170); - - + data.append(153); + data.append(79); + data.append(80); + data.append(131); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/matmul_u32_2x2/output_0.cairo b/src/tests/nodes/matmul_u32_2x2/output_0.cairo index c3e31c352..22387ec0e 100644 --- a/src/tests/nodes/matmul_u32_2x2/output_0.cairo +++ b/src/tests/nodes/matmul_u32_2x2/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(48823); - data.append(33422); - data.append(36061); - data.append(34952); - - + data.append(28098); + data.append(34689); + data.append(23396); + data.append(15668); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16.cairo b/src/tests/nodes/mul_fp16x16.cairo index a5af760e3..e26469d88 100644 --- a/src/tests/nodes/mul_fp16x16.cairo +++ b/src/tests/nodes/mul_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorMul}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp16x16/input_0.cairo b/src/tests/nodes/mul_fp16x16/input_0.cairo index f2761da22..29b710982 100644 --- a/src/tests/nodes/mul_fp16x16/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/input_1.cairo b/src/tests/nodes/mul_fp16x16/input_1.cairo index 3888b1ef8..3acdc42ef 100644 --- a/src/tests/nodes/mul_fp16x16/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16/output_0.cairo b/src/tests/nodes/mul_fp16x16/output_0.cairo index 00fc300c7..2ec6ffe99 100644 --- a/src/tests/nodes/mul_fp16x16/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 262144, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast.cairo b/src/tests/nodes/mul_fp16x16_broadcast.cairo index f02393f63..d9f38748a 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorMul}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorMul}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo index cf95219b7..93dbbd041 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo index cbcf7a5c2..5b763c577 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - - + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo index 139a145d8..b9342b356 100644 --- a/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp16x16_broadcast/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 262144, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 393216, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 589824, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 393216, sign: true }); - data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 393216, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23.cairo b/src/tests/nodes/mul_fp8x23.cairo index 3c5f8bdd4..6ecda8831 100644 --- a/src/tests/nodes/mul_fp8x23.cairo +++ b/src/tests/nodes/mul_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp8x23/input_0.cairo b/src/tests/nodes/mul_fp8x23/input_0.cairo index 49129df26..d16f9ae2e 100644 --- a/src/tests/nodes/mul_fp8x23/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/input_1.cairo b/src/tests/nodes/mul_fp8x23/input_1.cairo index 33f3f3658..71a2d5dc8 100644 --- a/src/tests/nodes/mul_fp8x23/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23/output_0.cairo b/src/tests/nodes/mul_fp8x23/output_0.cairo index 8be8f074c..ef187d640 100644 --- a/src/tests/nodes/mul_fp8x23/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 75497472, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast.cairo b/src/tests/nodes/mul_fp8x23_broadcast.cairo index 95b2db23b..3563976f8 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorMul}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorMul}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo index 31700f184..dfeaae98c 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo index 1e94f288f..4036513c3 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo index 60aac83eb..4fa551de1 100644 --- a/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_fp8x23_broadcast/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 50331648, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 75497472, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - - + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32.cairo b/src/tests/nodes/mul_i32.cairo index ae1c81d32..828c656bf 100644 --- a/src/tests/nodes/mul_i32.cairo +++ b/src/tests/nodes/mul_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorMul}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_i32/input_0.cairo b/src/tests/nodes/mul_i32/input_0.cairo index 83f22160e..d82e4567f 100644 --- a/src/tests/nodes/mul_i32/input_0.cairo +++ b/src/tests/nodes/mul_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/input_1.cairo b/src/tests/nodes/mul_i32/input_1.cairo index b3d06c8b0..97b3e3793 100644 --- a/src/tests/nodes/mul_i32/input_1.cairo +++ b/src/tests/nodes/mul_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32/output_0.cairo b/src/tests/nodes/mul_i32/output_0.cairo index 2f755ebf5..a04e7dcce 100644 --- a/src/tests/nodes/mul_i32/output_0.cairo +++ b/src/tests/nodes/mul_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 6, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 6, sign: true }); data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast.cairo b/src/tests/nodes/mul_i32_broadcast.cairo index fc928cd3d..35117cdaa 100644 --- a/src/tests/nodes/mul_i32_broadcast.cairo +++ b/src/tests/nodes/mul_i32_broadcast.cairo @@ -3,13 +3,12 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorMul}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorMul}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_mul_i32_broadcast() { diff --git a/src/tests/nodes/mul_i32_broadcast/input_0.cairo b/src/tests/nodes/mul_i32_broadcast/input_0.cairo index a79a32c78..1cce6509d 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/input_1.cairo b/src/tests/nodes/mul_i32_broadcast/input_1.cairo index b982bc597..e7738c230 100644 --- a/src/tests/nodes/mul_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i32_broadcast/output_0.cairo b/src/tests/nodes/mul_i32_broadcast/output_0.cairo index 165772efc..7138bb7db 100644 --- a/src/tests/nodes/mul_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i32_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8.cairo b/src/tests/nodes/mul_i8.cairo index cfc4cc58e..fcb1a7ffc 100644 --- a/src/tests/nodes/mul_i8.cairo +++ b/src/tests/nodes/mul_i8.cairo @@ -3,13 +3,12 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorMul}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; - #[test] #[available_gas(2000000000)] fn test_mul_i8() { diff --git a/src/tests/nodes/mul_i8/input_0.cairo b/src/tests/nodes/mul_i8/input_0.cairo index bdcfe6842..a1f2950b1 100644 --- a/src/tests/nodes/mul_i8/input_0.cairo +++ b/src/tests/nodes/mul_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/input_1.cairo b/src/tests/nodes/mul_i8/input_1.cairo index 52fbbef13..a4e345464 100644 --- a/src/tests/nodes/mul_i8/input_1.cairo +++ b/src/tests/nodes/mul_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8/output_0.cairo b/src/tests/nodes/mul_i8/output_0.cairo index ce231aa7c..1149304bd 100644 --- a/src/tests/nodes/mul_i8/output_0.cairo +++ b/src/tests/nodes/mul_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 9, sign: false }); data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 6, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast.cairo b/src/tests/nodes/mul_i8_broadcast.cairo index 713a9ec0b..e5ef399f7 100644 --- a/src/tests/nodes/mul_i8_broadcast.cairo +++ b/src/tests/nodes/mul_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorMul}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorMul}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_i8_broadcast/input_0.cairo b/src/tests/nodes/mul_i8_broadcast/input_0.cairo index e2eaef2cd..17e506970 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - - + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/input_1.cairo b/src/tests/nodes/mul_i8_broadcast/input_1.cairo index 5f33477b6..b74cceb18 100644 --- a/src/tests/nodes/mul_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_i8_broadcast/output_0.cairo b/src/tests/nodes/mul_i8_broadcast/output_0.cairo index 5bbabf463..e37f31db4 100644 --- a/src/tests/nodes/mul_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_i8_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32.cairo b/src/tests/nodes/mul_u32.cairo index a61137a71..49e04c6f8 100644 --- a/src/tests/nodes/mul_u32.cairo +++ b/src/tests/nodes/mul_u32.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorMul}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_mul_u32() { let y = input_0 * input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_0.cairo b/src/tests/nodes/mul_u32/input_0.cairo index 8b52be464..096393361 100644 --- a/src/tests/nodes/mul_u32/input_0.cairo +++ b/src/tests/nodes/mul_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(3); data.append(5); data.append(4); data.append(3); - data.append(5); - data.append(3); data.append(4); data.append(4); data.append(5); - data.append(5); - data.append(3); - data.append(5); - data.append(3); - data.append(5); + data.append(4); data.append(4); data.append(4); data.append(4); data.append(4); data.append(5); + data.append(4); data.append(5); + data.append(4); + data.append(4); + data.append(3); + data.append(4); data.append(5); - data.append(5); + data.append(4); + data.append(3); + data.append(3); data.append(3); data.append(3); - data.append(4); data.append(3); data.append(4); - - + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/input_1.cairo b/src/tests/nodes/mul_u32/input_1.cairo index 902b12de2..96ec7e32c 100644 --- a/src/tests/nodes/mul_u32/input_1.cairo +++ b/src/tests/nodes/mul_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); data.append(0); data.append(1); data.append(1); - data.append(0); + data.append(1); data.append(1); data.append(2); + data.append(1); data.append(2); data.append(0); - data.append(1); - data.append(1); + data.append(2); data.append(0); data.append(0); - data.append(2); data.append(0); - data.append(1); + data.append(2); data.append(1); data.append(0); - data.append(1); - data.append(2); data.append(0); data.append(1); - data.append(1); - data.append(2); data.append(2); data.append(2); data.append(0); data.append(0); - - + data.append(1); + data.append(0); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32/output_0.cairo b/src/tests/nodes/mul_u32/output_0.cairo index 1bc016684..f7dda0e5c 100644 --- a/src/tests/nodes/mul_u32/output_0.cairo +++ b/src/tests/nodes/mul_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); data.append(5); - data.append(4); data.append(0); + data.append(0); + data.append(4); + data.append(4); data.append(5); - data.append(6); + data.append(4); + data.append(8); + data.append(4); data.append(8); data.append(0); - data.append(5); - data.append(5); + data.append(10); data.append(0); data.append(0); - data.append(6); data.append(0); - data.append(4); - data.append(4); + data.append(8); + data.append(3); data.append(0); - data.append(4); - data.append(10); data.append(0); - data.append(5); - data.append(5); + data.append(4); data.append(6); data.append(6); - data.append(8); data.append(0); data.append(0); - - + data.append(3); + data.append(0); + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast.cairo b/src/tests/nodes/mul_u32_broadcast.cairo index 470ca1566..6dc5876ef 100644 --- a/src/tests/nodes/mul_u32_broadcast.cairo +++ b/src/tests/nodes/mul_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{Tensor_u32_fp16x16, u32TensorMul}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorMul}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/mul_u32_broadcast/input_0.cairo b/src/tests/nodes/mul_u32_broadcast/input_0.cairo index 030c12aa6..9adb47531 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - data.append(4); - data.append(5); data.append(3); data.append(4); data.append(3); - data.append(4); data.append(5); - data.append(3); data.append(5); data.append(3); + data.append(3); data.append(5); - data.append(5); + data.append(4); data.append(3); data.append(5); + data.append(4); data.append(5); + data.append(4); data.append(5); + data.append(3); data.append(5); data.append(3); data.append(4); - data.append(3); - data.append(3); + data.append(4); + data.append(5); + data.append(4); + data.append(5); data.append(3); data.append(3); data.append(4); - data.append(3); - - + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/input_1.cairo b/src/tests/nodes/mul_u32_broadcast/input_1.cairo index 7328c5086..79e305aa6 100644 --- a/src/tests/nodes/mul_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/mul_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(2); + data.append(1); data.append(0); - data.append(2); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/mul_u32_broadcast/output_0.cairo b/src/tests/nodes/mul_u32_broadcast/output_0.cairo index c468c14e2..18abad1e2 100644 --- a/src/tests/nodes/mul_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/mul_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(10); - data.append(10); - data.append(8); + data.append(3); + data.append(4); + data.append(3); data.append(0); data.append(0); data.append(0); - data.append(6); - data.append(8); - data.append(10); - data.append(6); - data.append(10); - data.append(6); + data.append(3); + data.append(5); + data.append(4); + data.append(3); + data.append(5); + data.append(4); data.append(0); data.append(0); data.append(0); - data.append(10); - data.append(10); - data.append(10); - data.append(10); - data.append(6); - data.append(8); + data.append(3); + data.append(5); + data.append(3); + data.append(4); + data.append(4); + data.append(5); data.append(0); data.append(0); data.append(0); - data.append(6); - data.append(8); - data.append(6); - - + data.append(3); + data.append(4); + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16.cairo b/src/tests/nodes/or_fp16x16.cairo index 24079efd6..1ef45573f 100644 --- a/src/tests/nodes/or_fp16x16.cairo +++ b/src/tests/nodes/or_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp16x16/input_0.cairo b/src/tests/nodes/or_fp16x16/input_0.cairo index 5fbe47970..82efc46fe 100644 --- a/src/tests/nodes/or_fp16x16/input_0.cairo +++ b/src/tests/nodes/or_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/input_1.cairo b/src/tests/nodes/or_fp16x16/input_1.cairo index f3cdb3adc..5306fa505 100644 --- a/src/tests/nodes/or_fp16x16/input_1.cairo +++ b/src/tests/nodes/or_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 196608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16/output_0.cairo b/src/tests/nodes/or_fp16x16/output_0.cairo index f900f0c86..9488b9f2c 100644 --- a/src/tests/nodes/or_fp16x16/output_0.cairo +++ b/src/tests/nodes/or_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); @@ -34,10 +32,9 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast.cairo b/src/tests/nodes/or_fp16x16_broadcast.cairo index eec0b4489..5b4a8fa08 100644 --- a/src/tests/nodes/or_fp16x16_broadcast.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo index 21395111c..d01c26c92 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo index 229688c01..de7a027d1 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo index 0606e6413..e7b1da4b1 100644 --- a/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23.cairo b/src/tests/nodes/or_fp8x23.cairo index 5e8f096e9..72c52ab7c 100644 --- a/src/tests/nodes/or_fp8x23.cairo +++ b/src/tests/nodes/or_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp8x23/input_0.cairo b/src/tests/nodes/or_fp8x23/input_0.cairo index 379c8ec0f..62574451b 100644 --- a/src/tests/nodes/or_fp8x23/input_0.cairo +++ b/src/tests/nodes/or_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/input_1.cairo b/src/tests/nodes/or_fp8x23/input_1.cairo index 0b329c9a1..d19cd31ed 100644 --- a/src/tests/nodes/or_fp8x23/input_1.cairo +++ b/src/tests/nodes/or_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +12,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23/output_0.cairo b/src/tests/nodes/or_fp8x23/output_0.cairo index 279670f33..b7502f775 100644 --- a/src/tests/nodes/or_fp8x23/output_0.cairo +++ b/src/tests/nodes/or_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -16,6 +15,7 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(1); @@ -36,8 +36,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast.cairo b/src/tests/nodes/or_fp8x23_broadcast.cairo index f23f115a4..daac2dc16 100644 --- a/src/tests/nodes/or_fp8x23_broadcast.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo index 072e92225..1e59e0e2a 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - - + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo index 408bdeebe..de3f273e4 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,8 +11,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo index 1c49a2028..e7b1da4b1 100644 --- a/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/or_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32.cairo b/src/tests/nodes/or_i32.cairo index 9d57493ea..41df5095b 100644 --- a/src/tests/nodes/or_i32.cairo +++ b/src/tests/nodes/or_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i32/input_0.cairo b/src/tests/nodes/or_i32/input_0.cairo index a527933d9..e96fc7237 100644 --- a/src/tests/nodes/or_i32/input_0.cairo +++ b/src/tests/nodes/or_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32/input_1.cairo b/src/tests/nodes/or_i32/input_1.cairo index 00872f8c5..5e59ae979 100644 --- a/src/tests/nodes/or_i32/input_1.cairo +++ b/src/tests/nodes/or_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32/output_0.cairo b/src/tests/nodes/or_i32/output_0.cairo index ac6fe54ab..9d23207fe 100644 --- a/src/tests/nodes/or_i32/output_0.cairo +++ b/src/tests/nodes/or_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -26,7 +25,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); @@ -37,7 +35,6 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast.cairo b/src/tests/nodes/or_i32_broadcast.cairo index b2a5488a3..ca81beb48 100644 --- a/src/tests/nodes/or_i32_broadcast.cairo +++ b/src/tests/nodes/or_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i32_broadcast/input_0.cairo b/src/tests/nodes/or_i32_broadcast/input_0.cairo index e0abc538c..d5e991eb5 100644 --- a/src/tests/nodes/or_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/input_1.cairo b/src/tests/nodes/or_i32_broadcast/input_1.cairo index 88a30bf1b..6cabdde08 100644 --- a/src/tests/nodes/or_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i32_broadcast/output_0.cairo b/src/tests/nodes/or_i32_broadcast/output_0.cairo index 536420238..e7b1da4b1 100644 --- a/src/tests/nodes/or_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(0); data.append(1); data.append(1); - - + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8.cairo b/src/tests/nodes/or_i8.cairo index 19464afe1..3356d32bd 100644 --- a/src/tests/nodes/or_i8.cairo +++ b/src/tests/nodes/or_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i8/input_0.cairo b/src/tests/nodes/or_i8/input_0.cairo index e8a5f2bf1..54b63018a 100644 --- a/src/tests/nodes/or_i8/input_0.cairo +++ b/src/tests/nodes/or_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8/input_1.cairo b/src/tests/nodes/or_i8/input_1.cairo index 5927a61ab..cc9e3dcbd 100644 --- a/src/tests/nodes/or_i8/input_1.cairo +++ b/src/tests/nodes/or_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8/output_0.cairo b/src/tests/nodes/or_i8/output_0.cairo index aa3ff0688..34fdfc282 100644 --- a/src/tests/nodes/or_i8/output_0.cairo +++ b/src/tests/nodes/or_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,11 +12,11 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(1); data.append(1); - data.append(0); data.append(1); data.append(1); data.append(1); @@ -37,7 +36,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast.cairo b/src/tests/nodes/or_i8_broadcast.cairo index 6c8ec4215..601195f02 100644 --- a/src/tests/nodes/or_i8_broadcast.cairo +++ b/src/tests/nodes/or_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_i8_broadcast/input_0.cairo b/src/tests/nodes/or_i8_broadcast/input_0.cairo index b09781cf9..cfe284cbc 100644 --- a/src/tests/nodes/or_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/input_1.cairo b/src/tests/nodes/or_i8_broadcast/input_1.cairo index 1cb2ca5fd..5ee26bf38 100644 --- a/src/tests/nodes/or_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/or_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_i8_broadcast/output_0.cairo b/src/tests/nodes/or_i8_broadcast/output_0.cairo index 0606e6413..e7b1da4b1 100644 --- a/src/tests/nodes/or_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/or_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32.cairo b/src/tests/nodes/or_u32.cairo index ef607d1a7..b0a917866 100644 --- a/src/tests/nodes/or_u32.cairo +++ b/src/tests/nodes/or_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_u32/input_0.cairo b/src/tests/nodes/or_u32/input_0.cairo index ff2c70f78..3b8265911 100644 --- a/src/tests/nodes/or_u32/input_0.cairo +++ b/src/tests/nodes/or_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); data.append(0); - data.append(5); data.append(0); data.append(2); + data.append(3); + data.append(0); + data.append(4); data.append(1); + data.append(4); data.append(2); + data.append(3); data.append(2); - data.append(0); data.append(1); data.append(3); + data.append(3); data.append(5); - data.append(2); + data.append(3); + data.append(0); data.append(4); data.append(1); + data.append(1); data.append(4); - data.append(0); data.append(1); - data.append(5); + data.append(1); data.append(4); - data.append(3); - data.append(2); - data.append(2); data.append(4); + data.append(2); data.append(3); - data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32/input_1.cairo b/src/tests/nodes/or_u32/input_1.cairo index c74ce9ed6..186273e14 100644 --- a/src/tests/nodes/or_u32/input_1.cairo +++ b/src/tests/nodes/or_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); - data.append(4); data.append(3); data.append(5); - data.append(3); - data.append(2); + data.append(1); + data.append(0); data.append(5); - data.append(4); data.append(2); data.append(2); - data.append(5); - data.append(0); - data.append(5); + data.append(3); data.append(3); data.append(4); - data.append(4); + data.append(3); data.append(0); data.append(1); data.append(3); + data.append(1); data.append(3); data.append(2); data.append(0); - data.append(5); + data.append(4); + data.append(2); data.append(0); data.append(1); + data.append(1); data.append(2); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32/output_0.cairo b/src/tests/nodes/or_u32/output_0.cairo index 1bc0eb6b0..7be1706b0 100644 --- a/src/tests/nodes/or_u32/output_0.cairo +++ b/src/tests/nodes/or_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,6 +10,7 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); + data.append(0); data.append(1); data.append(1); data.append(1); @@ -36,8 +36,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast.cairo b/src/tests/nodes/or_u32_broadcast.cairo index a3976c8f7..3071c3b0a 100644 --- a/src/tests/nodes/or_u32_broadcast.cairo +++ b/src/tests/nodes/or_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/or_u32_broadcast/input_0.cairo b/src/tests/nodes/or_u32_broadcast/input_0.cairo index 130926076..603917619 100644 --- a/src/tests/nodes/or_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(2); - data.append(3); - data.append(2); - - + data.append(4); + data.append(4); + data.append(4); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/input_1.cairo b/src/tests/nodes/or_u32_broadcast/input_1.cairo index b6728b30d..08160469e 100644 --- a/src/tests/nodes/or_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/or_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(5); - data.append(5); - - + data.append(2); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/or_u32_broadcast/output_0.cairo b/src/tests/nodes/or_u32_broadcast/output_0.cairo index 0606e6413..e7b1da4b1 100644 --- a/src/tests/nodes/or_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/or_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(1); data.append(1); data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo index 34d942289..8b9cf049b 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo index fe673e49f..3bb7db502 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,7 +12,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo index ac46d462a..aca4697cb 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_1D/output_0.cairo @@ -1,18 +1,14 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo index c0e70aab1..b490a20cd 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo index ab66a57c5..8009dcc45 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo index 4ccc0cafa..5c1594543 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_axis_1/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo index 2c33ad9db..9a56b683d 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo index ab66a57c5..8009dcc45 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo index 4c892df31..e7881ed14 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_default/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo index 7e3aea2ff..aea890952 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo index ab66a57c5..8009dcc45 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -16,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo index 5e34e8228..9dc98276a 100644 --- a/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp16x16_2D_keepdims/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -14,7 +12,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo index 35f65a3f3..9a712a803 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo index 70f856b7b..617c82eee 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo index 55a4baaf3..532039c9d 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_1D/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo index cd381015c..4074254a8 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo index a864bb8cd..738ae80d4 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo index 3efde36fd..c2d2a02d5 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_axis_1/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo index be6e79304..553a37ec7 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo index a864bb8cd..738ae80d4 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo index c84576a4a..d8909e9e6 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_default/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo index fa6be356d..e1d6688eb 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo index a864bb8cd..738ae80d4 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,7 +14,5 @@ fn input_0() -> Tensor { data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo index cf168a51d..aed0ca34e 100644 --- a/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_fp8x23_2D_keepdims/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D.cairo b/src/tests/nodes/reduce_sum_i32_1D.cairo index a4bd2cf69..90aa448df 100644 --- a/src/tests/nodes/reduce_sum_i32_1D.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo index c00a2d702..e9ce9f192 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo index 9f423af2f..b2096bc0f 100644 --- a/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_1D/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo index c45951735..b7d3cbc9d 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo index b98f20165..fb4bacc7b 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo index 00dfde57c..2513d7cce 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_axis_1/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 5, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default.cairo b/src/tests/nodes/reduce_sum_i32_2D_default.cairo index 0463a5316..f8d325b2d 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo index b98f20165..fb4bacc7b 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo index c114c8e8d..28240397c 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_default/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo index 7cc27dbe5..a87a7f0ab 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo index b98f20165..fb4bacc7b 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -14,7 +13,5 @@ fn input_0() -> Tensor { data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo index ea6bb49b3..bf29f7645 100644 --- a/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i32_2D_keepdims/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,7 +11,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 4, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D.cairo b/src/tests/nodes/reduce_sum_i8_1D.cairo index 0b26257dd..78c0f5fc6 100644 --- a/src/tests/nodes/reduce_sum_i8_1D.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo index 84690570b..345f34d8c 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/input_0.cairo @@ -1,19 +1,16 @@ -use array::ArrayTrait; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo index db7c35cbf..b7d792408 100644 --- a/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_1D/output_0.cairo @@ -1,16 +1,14 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3, sign: false }); - - + data.append(FP8x23 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo index 4d149962c..090fcffdd 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo index bff6f9ba5..06f8f1737 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/input_0.cairo @@ -1,20 +1,18 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo index fddad70f8..dce7aed06 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_axis_1/output_0.cairo @@ -1,17 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 5, sign: false }); - - + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 5, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default.cairo b/src/tests/nodes/reduce_sum_i8_2D_default.cairo index 5149fd51c..6fbdb3c2b 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo index bff6f9ba5..06f8f1737 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/input_0.cairo @@ -1,20 +1,18 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo index c902e8d36..116d100c4 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_default/output_0.cairo @@ -1,17 +1,15 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - - + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo index 24d0d34d3..2f1af81bf 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo index bff6f9ba5..06f8f1737 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/input_0.cairo @@ -1,20 +1,18 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 1, sign: false }); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 3, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 1, sign: false }); + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 3, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo index 1be0ea24e..a40e69624 100644 --- a/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_i8_2D_keepdims/output_0.cairo @@ -1,18 +1,16 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2, sign: false }); - data.append(FP16x16 { mag: 4, sign: false }); - - + data.append(FP8x23 { mag: 2, sign: false }); + data.append(FP8x23 { mag: 4, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D.cairo b/src/tests/nodes/reduce_sum_u32_1D.cairo index 813d3f17a..0db242af5 100644 --- a/src/tests/nodes/reduce_sum_u32_1D.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo index f5f32b096..26ecd350b 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn input_0() -> Tensor { data.append(0); data.append(1); data.append(2); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo index a6f2d5b2c..cf29a4530 100644 --- a/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_1D/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,7 +8,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo index 206d2b9a1..99848df59 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo index a45833125..6c324ceb6 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(1); data.append(2); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo index 528c34455..b15f624cd 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_axis_1/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default.cairo b/src/tests/nodes/reduce_sum_u32_2D_default.cairo index 3f8cb2fef..f949deea3 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo index a45833125..6c324ceb6 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(1); data.append(2); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo index 250ff6bdd..f10eb07f1 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_default/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,7 +9,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); data.append(4); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo index 330564708..cfd7da1bb 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo index a45833125..6c324ceb6 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn input_0() -> Tensor { data.append(1); data.append(2); data.append(3); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo index 557258418..7d63eb45a 100644 --- a/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo +++ b/src/tests/nodes/reduce_sum_u32_2D_keepdims/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,7 +10,5 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(2); data.append(4); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16.cairo b/src/tests/nodes/relu_fp16x16.cairo index 2ffcb34d5..d8e439cae 100644 --- a/src/tests/nodes/relu_fp16x16.cairo +++ b/src/tests/nodes/relu_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_fp16x16/input_0.cairo b/src/tests/nodes/relu_fp16x16/input_0.cairo index 954a9866e..e196cc8c1 100644 --- a/src/tests/nodes/relu_fp16x16/input_0.cairo +++ b/src/tests/nodes/relu_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 241623, sign: false }); - data.append(FP16x16 { mag: 135784, sign: false }); - data.append(FP16x16 { mag: 91618, sign: true }); - data.append(FP16x16 { mag: 52199, sign: false }); - - + data.append(FP16x16 { mag: 6065, sign: false }); + data.append(FP16x16 { mag: 134983, sign: true }); + data.append(FP16x16 { mag: 30217, sign: false }); + data.append(FP16x16 { mag: 88950, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp16x16/output_0.cairo b/src/tests/nodes/relu_fp16x16/output_0.cairo index be3b200c5..be4ea0189 100644 --- a/src/tests/nodes/relu_fp16x16/output_0.cairo +++ b/src/tests/nodes/relu_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 241623, sign: false }); - data.append(FP16x16 { mag: 135784, sign: false }); + data.append(FP16x16 { mag: 6065, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 30217, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 52199, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23.cairo b/src/tests/nodes/relu_fp8x23.cairo index 217ce23c8..9ceec0072 100644 --- a/src/tests/nodes/relu_fp8x23.cairo +++ b/src/tests/nodes/relu_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_fp8x23/input_0.cairo b/src/tests/nodes/relu_fp8x23/input_0.cairo index 2fa238075..4d1122f47 100644 --- a/src/tests/nodes/relu_fp8x23/input_0.cairo +++ b/src/tests/nodes/relu_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 23718869, sign: false }); - data.append(FP8x23 { mag: 34552664, sign: true }); - data.append(FP8x23 { mag: 34211188, sign: true }); - data.append(FP8x23 { mag: 16610226, sign: true }); - - + data.append(FP8x23 { mag: 35370496, sign: false }); + data.append(FP8x23 { mag: 51831526, sign: false }); + data.append(FP8x23 { mag: 26129513, sign: true }); + data.append(FP8x23 { mag: 10508621, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_fp8x23/output_0.cairo b/src/tests/nodes/relu_fp8x23/output_0.cairo index d280171a3..cc0423858 100644 --- a/src/tests/nodes/relu_fp8x23/output_0.cairo +++ b/src/tests/nodes/relu_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 23718870, sign: false }); + data.append(FP8x23 { mag: 35370496, sign: false }); + data.append(FP8x23 { mag: 51831528, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i32.cairo b/src/tests/nodes/relu_i32.cairo index a8e941f40..0608a6fdd 100644 --- a/src/tests/nodes/relu_i32.cairo +++ b/src/tests/nodes/relu_i32.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I32NN; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_i32/input_0.cairo b/src/tests/nodes/relu_i32/input_0.cairo index 0e949dc63..a9af2d9a5 100644 --- a/src/tests/nodes/relu_i32/input_0.cairo +++ b/src/tests/nodes/relu_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 6, sign: false }); - - + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i32/output_0.cairo b/src/tests/nodes/relu_i32/output_0.cairo index 46f6f9b7c..903239942 100644 --- a/src/tests/nodes/relu_i32/output_0.cairo +++ b/src/tests/nodes/relu_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 6, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i8.cairo b/src/tests/nodes/relu_i8.cairo index 087b6bac1..85674ecd0 100644 --- a/src/tests/nodes/relu_i8.cairo +++ b/src/tests/nodes/relu_i8.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::I8NN; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/relu_i8/input_0.cairo b/src/tests/nodes/relu_i8/input_0.cairo index 6b3b4b416..13d6f8f5d 100644 --- a/src/tests/nodes/relu_i8/input_0.cairo +++ b/src/tests/nodes/relu_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 1, sign: true }); - - + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 8, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/relu_i8/output_0.cairo b/src/tests/nodes/relu_i8/output_0.cairo index c0001110e..432b19071 100644 --- a/src/tests/nodes/relu_i8/output_0.cairo +++ b/src/tests/nodes/relu_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 8, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16.cairo b/src/tests/nodes/sigmoid_fp16x16.cairo index 12835e44f..d58d99c92 100644 --- a/src/tests/nodes/sigmoid_fp16x16.cairo +++ b/src/tests/nodes/sigmoid_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo index dc3c21c90..56c4e748f 100644 --- a/src/tests/nodes/sigmoid_fp16x16/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 40935, sign: true }); - data.append(FP16x16 { mag: 33897, sign: false }); - data.append(FP16x16 { mag: 97672, sign: true }); - data.append(FP16x16 { mag: 73532, sign: false }); - - + data.append(FP16x16 { mag: 42997, sign: true }); + data.append(FP16x16 { mag: 108408, sign: true }); + data.append(FP16x16 { mag: 87345, sign: false }); + data.append(FP16x16 { mag: 169098, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo index cda29c4e2..f085cd671 100644 --- a/src/tests/nodes/sigmoid_fp16x16/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 22854, sign: false }); - data.append(FP16x16 { mag: 41058, sign: false }); - data.append(FP16x16 { mag: 12049, sign: false }); - data.append(FP16x16 { mag: 49437, sign: false }); - - + data.append(FP16x16 { mag: 22388, sign: false }); + data.append(FP16x16 { mag: 10521, sign: false }); + data.append(FP16x16 { mag: 51858, sign: false }); + data.append(FP16x16 { mag: 60920, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23.cairo b/src/tests/nodes/sigmoid_fp8x23.cairo index 25cf33e3f..77797b92a 100644 --- a/src/tests/nodes/sigmoid_fp8x23.cairo +++ b/src/tests/nodes/sigmoid_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo index eaa32b3c3..7ae3ed063 100644 --- a/src/tests/nodes/sigmoid_fp8x23/input_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13876472, sign: true }); - data.append(FP8x23 { mag: 18112152, sign: false }); - data.append(FP8x23 { mag: 21105010, sign: true }); - data.append(FP8x23 { mag: 17882688, sign: true }); - - + data.append(FP8x23 { mag: 20907772, sign: true }); + data.append(FP8x23 { mag: 24683986, sign: true }); + data.append(FP8x23 { mag: 21494604, sign: true }); + data.append(FP8x23 { mag: 1609367, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo index 00bff969a..370da14ef 100644 --- a/src/tests/nodes/sigmoid_fp8x23/output_0.cairo +++ b/src/tests/nodes/sigmoid_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 1346720, sign: false }); - data.append(FP8x23 { mag: 7520550, sign: false }); - data.append(FP8x23 { mag: 627049, sign: false }); - data.append(FP8x23 { mag: 889577, sign: false }); - - + data.append(FP8x23 { mag: 640827, sign: false }); + data.append(FP8x23 { mag: 420179, sign: false }); + data.append(FP8x23 { mag: 600630, sign: false }); + data.append(FP8x23 { mag: 4595416, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16.cairo b/src/tests/nodes/sigmoid_i32_fp16x16.cairo deleted file mode 100644 index 5db6c853d..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo deleted file mode 100644 index 28375dcb8..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo deleted file mode 100644 index 034a85cc0..000000000 --- a/src/tests/nodes/sigmoid_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 57723, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 17625, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23.cairo b/src/tests/nodes/sigmoid_i32_fp8x23.cairo deleted file mode 100644 index b99620ea5..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo deleted file mode 100644 index d5b451252..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo deleted file mode 100644 index 2e90dbfea..000000000 --- a/src/tests/nodes/sigmoid_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 397837, sign: false }); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 397837, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16.cairo b/src/tests/nodes/sigmoid_i8_fp16x16.cairo deleted file mode 100644 index 38629388a..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo deleted file mode 100644 index e5d32a7e6..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo deleted file mode 100644 index 9fc9a2c45..000000000 --- a/src/tests/nodes/sigmoid_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 3108, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23.cairo b/src/tests/nodes/sigmoid_i8_fp8x23.cairo deleted file mode 100644 index 7f46e589d..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo deleted file mode 100644 index e725132ad..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo deleted file mode 100644 index df5f9fcc9..000000000 --- a/src/tests/nodes/sigmoid_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 2256044, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16.cairo b/src/tests/nodes/sigmoid_u32_fp16x16.cairo deleted file mode 100644 index e3baabf94..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo deleted file mode 100644 index d5256abb0..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo deleted file mode 100644 index 63b440ede..000000000 --- a/src/tests/nodes/sigmoid_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23.cairo b/src/tests/nodes/sigmoid_u32_fp8x23.cairo deleted file mode 100644 index 34db8bad6..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sigmoid_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::sigmoid(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo deleted file mode 100644 index 272bebf66..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(2); - data.append(2); - data.append(0); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo b/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo deleted file mode 100644 index cdd194ff5..000000000 --- a/src/tests/nodes/sigmoid_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 6132564, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16.cairo b/src/tests/nodes/sin_fp16x16.cairo index 91e8c59fc..ab1c5df2f 100644 --- a/src/tests/nodes/sin_fp16x16.cairo +++ b/src/tests/nodes/sin_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_fp16x16/input_0.cairo b/src/tests/nodes/sin_fp16x16/input_0.cairo index bb21fc2ec..8067cff1d 100644 --- a/src/tests/nodes/sin_fp16x16/input_0.cairo +++ b/src/tests/nodes/sin_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 187441, sign: true }); - data.append(FP16x16 { mag: 123153, sign: false }); - data.append(FP16x16 { mag: 59844, sign: true }); - data.append(FP16x16 { mag: 76013, sign: false }); - - + data.append(FP16x16 { mag: 167356, sign: false }); + data.append(FP16x16 { mag: 369339, sign: false }); + data.append(FP16x16 { mag: 308834, sign: false }); + data.append(FP16x16 { mag: 3145, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp16x16/output_0.cairo b/src/tests/nodes/sin_fp16x16/output_0.cairo index 837c8627c..6513f7d26 100644 --- a/src/tests/nodes/sin_fp16x16/output_0.cairo +++ b/src/tests/nodes/sin_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 18203, sign: true }); - data.append(FP16x16 { mag: 62444, sign: false }); - data.append(FP16x16 { mag: 51867, sign: true }); - data.append(FP16x16 { mag: 60080, sign: false }); - - + data.append(FP16x16 { mag: 36348, sign: false }); + data.append(FP16x16 { mag: 39531, sign: true }); + data.append(FP16x16 { mag: 65535, sign: true }); + data.append(FP16x16 { mag: 3144, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23.cairo b/src/tests/nodes/sin_fp8x23.cairo index c019679a3..d9aab62d4 100644 --- a/src/tests/nodes/sin_fp8x23.cairo +++ b/src/tests/nodes/sin_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sin_fp8x23/input_0.cairo b/src/tests/nodes/sin_fp8x23/input_0.cairo index 7abb7b273..4ea3887b6 100644 --- a/src/tests/nodes/sin_fp8x23/input_0.cairo +++ b/src/tests/nodes/sin_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 15411983, sign: false }); - data.append(FP8x23 { mag: 1403069, sign: false }); - data.append(FP8x23 { mag: 11223653, sign: true }); - data.append(FP8x23 { mag: 30290440, sign: false }); - - + data.append(FP8x23 { mag: 6647816, sign: true }); + data.append(FP8x23 { mag: 58073960, sign: false }); + data.append(FP8x23 { mag: 41721546, sign: false }); + data.append(FP8x23 { mag: 410451, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_fp8x23/output_0.cairo b/src/tests/nodes/sin_fp8x23/output_0.cairo index 451c5ad91..f0d006c61 100644 --- a/src/tests/nodes/sin_fp8x23/output_0.cairo +++ b/src/tests/nodes/sin_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8092576, sign: false }); - data.append(FP8x23 { mag: 1396536, sign: false }); - data.append(FP8x23 { mag: 8162255, sign: true }); - data.append(FP8x23 { mag: 3793918, sign: true }); - - + data.append(FP8x23 { mag: 5973508, sign: true }); + data.append(FP8x23 { mag: 5008092, sign: false }); + data.append(FP8x23 { mag: 8104057, sign: true }); + data.append(FP8x23 { mag: 410287, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16.cairo b/src/tests/nodes/sin_i32_fp16x16.cairo deleted file mode 100644 index c8d969996..000000000 --- a/src/tests/nodes/sin_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sin_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo b/src/tests/nodes/sin_i32_fp16x16/input_0.cairo deleted file mode 100644 index 1d8d2b6d4..000000000 --- a/src/tests/nodes/sin_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 105, sign: false }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 109, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo b/src/tests/nodes/sin_i32_fp16x16/output_0.cairo deleted file mode 100644 index e1ecc6bf0..000000000 --- a/src/tests/nodes/sin_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 15509, sign: false }); - data.append(FP16x16 { mag: 63605, sign: true }); - data.append(FP16x16 { mag: 58588, sign: false }); - data.append(FP16x16 { mag: 53526, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23.cairo b/src/tests/nodes/sin_i32_fp8x23.cairo deleted file mode 100644 index 3f5a8a641..000000000 --- a/src/tests/nodes/sin_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo b/src/tests/nodes/sin_i32_fp8x23/input_0.cairo deleted file mode 100644 index 9e643a7f7..000000000 --- a/src/tests/nodes/sin_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 111, sign: false }); - data.append(i32 { mag: 96, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo b/src/tests/nodes/sin_i32_fp8x23/output_0.cairo deleted file mode 100644 index 2251b359a..000000000 --- a/src/tests/nodes/sin_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 222727, sign: true }); - data.append(FP8x23 { mag: 4563579, sign: true }); - data.append(FP8x23 { mag: 7252383, sign: true }); - data.append(FP8x23 { mag: 8250932, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16.cairo b/src/tests/nodes/sin_i8_fp16x16.cairo deleted file mode 100644 index 2c2a45f27..000000000 --- a/src/tests/nodes/sin_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo b/src/tests/nodes/sin_i8_fp16x16/input_0.cairo deleted file mode 100644 index 2d8dc3d6f..000000000 --- a/src/tests/nodes/sin_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 75, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo b/src/tests/nodes/sin_i8_fp16x16/output_0.cairo deleted file mode 100644 index 6944beed7..000000000 --- a/src/tests/nodes/sin_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 55764, sign: false }); - data.append(FP16x16 { mag: 64920, sign: false }); - data.append(FP16x16 { mag: 60294, sign: false }); - data.append(FP16x16 { mag: 25413, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23.cairo b/src/tests/nodes/sin_i8_fp8x23.cairo deleted file mode 100644 index a93b999a0..000000000 --- a/src/tests/nodes/sin_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sin_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo b/src/tests/nodes/sin_i8_fp8x23/input_0.cairo deleted file mode 100644 index e23a3e87c..000000000 --- a/src/tests/nodes/sin_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo b/src/tests/nodes/sin_i8_fp8x23/output_0.cairo deleted file mode 100644 index 861f4a5ad..000000000 --- a/src/tests/nodes/sin_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6348800, sign: false }); - data.append(FP8x23 { mag: 2342912, sign: false }); - data.append(FP8x23 { mag: 7626752, sign: false }); - data.append(FP8x23 { mag: 1183744, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16.cairo b/src/tests/nodes/sin_u32_fp16x16.cairo deleted file mode 100644 index 4fa544094..000000000 --- a/src/tests/nodes/sin_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sin_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo b/src/tests/nodes/sin_u32_fp16x16/input_0.cairo deleted file mode 100644 index 2b246d306..000000000 --- a/src/tests/nodes/sin_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(84); - data.append(64); - data.append(55); - data.append(91); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo b/src/tests/nodes/sin_u32_fp16x16/output_0.cairo deleted file mode 100644 index fb4290c09..000000000 --- a/src/tests/nodes/sin_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 48050, sign: false }); - data.append(FP16x16 { mag: 60294, sign: false }); - data.append(FP16x16 { mag: 65519, sign: true }); - data.append(FP16x16 { mag: 6945, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23.cairo b/src/tests/nodes/sin_u32_fp8x23.cairo deleted file mode 100644 index 56a077154..000000000 --- a/src/tests/nodes/sin_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sin_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sin(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo b/src/tests/nodes/sin_u32_fp8x23/input_0.cairo deleted file mode 100644 index 6c6286bce..000000000 --- a/src/tests/nodes/sin_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(103); - data.append(98); - data.append(86); - data.append(80); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo b/src/tests/nodes/sin_u32_fp8x23/output_0.cairo deleted file mode 100644 index 098e758e8..000000000 --- a/src/tests/nodes/sin_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5226007, sign: false }); - data.append(FP8x23 { mag: 4809875, sign: true }); - data.append(FP8x23 { mag: 7746530, sign: true }); - data.append(FP8x23 { mag: 8337342, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16.cairo b/src/tests/nodes/sinh_fp16x16.cairo index 48b4ad374..704362bfc 100644 --- a/src/tests/nodes/sinh_fp16x16.cairo +++ b/src/tests/nodes/sinh_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_fp16x16/input_0.cairo b/src/tests/nodes/sinh_fp16x16/input_0.cairo index 9d68def2a..e6749f4f7 100644 --- a/src/tests/nodes/sinh_fp16x16/input_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 191221, sign: true }); - data.append(FP16x16 { mag: 176805, sign: true }); - data.append(FP16x16 { mag: 179634, sign: false }); - data.append(FP16x16 { mag: 177006, sign: true }); - - + data.append(FP16x16 { mag: 181084, sign: false }); + data.append(FP16x16 { mag: 85235, sign: true }); + data.append(FP16x16 { mag: 59303, sign: true }); + data.append(FP16x16 { mag: 130937, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp16x16/output_0.cairo b/src/tests/nodes/sinh_fp16x16/output_0.cairo index 0d1281edd..2f7e763c3 100644 --- a/src/tests/nodes/sinh_fp16x16/output_0.cairo +++ b/src/tests/nodes/sinh_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 604463, sign: true }); - data.append(FP16x16 { mag: 484320, sign: true }); - data.append(FP16x16 { mag: 505875, sign: false }); - data.append(FP16x16 { mag: 485818, sign: true }); - - + data.append(FP16x16 { mag: 517281, sign: false }); + data.append(FP16x16 { mag: 111381, sign: true }); + data.append(FP16x16 { mag: 67734, sign: true }); + data.append(FP16x16 { mag: 237186, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23.cairo b/src/tests/nodes/sinh_fp8x23.cairo index a35a2caba..beef97a64 100644 --- a/src/tests/nodes/sinh_fp8x23.cairo +++ b/src/tests/nodes/sinh_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sinh_fp8x23/input_0.cairo b/src/tests/nodes/sinh_fp8x23/input_0.cairo index e3205cce0..4945e8dba 100644 --- a/src/tests/nodes/sinh_fp8x23/input_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2356323, sign: true }); - data.append(FP8x23 { mag: 4204899, sign: false }); - data.append(FP8x23 { mag: 21037695, sign: false }); - data.append(FP8x23 { mag: 20483758, sign: true }); - - + data.append(FP8x23 { mag: 20711629, sign: true }); + data.append(FP8x23 { mag: 18228194, sign: false }); + data.append(FP8x23 { mag: 15655651, sign: true }); + data.append(FP8x23 { mag: 13406669, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_fp8x23/output_0.cairo b/src/tests/nodes/sinh_fp8x23/output_0.cairo index 8417ffb0c..15f43bfac 100644 --- a/src/tests/nodes/sinh_fp8x23/output_0.cairo +++ b/src/tests/nodes/sinh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2387433, sign: true }); - data.append(FP8x23 { mag: 4383215, sign: false }); - data.append(FP8x23 { mag: 51160183, sign: false }); - data.append(FP8x23 { mag: 47845830, sign: true }); - - + data.append(FP8x23 { mag: 49183175, sign: true }); + data.append(FP8x23 { mag: 36366700, sign: false }); + data.append(FP8x23 { mag: 26464518, sign: true }); + data.append(FP8x23 { mag: 19888811, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16.cairo b/src/tests/nodes/sinh_i32_fp16x16.cairo deleted file mode 100644 index ef8da9a76..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sinh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 6c2240a90..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo deleted file mode 100644 index 7ebb9b63a..000000000 --- a/src/tests/nodes/sinh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: true }); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 237689, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23.cairo b/src/tests/nodes/sinh_i32_fp8x23.cairo deleted file mode 100644 index 3a42818c3..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 20e864acb..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo deleted file mode 100644 index be70c4855..000000000 --- a/src/tests/nodes/sinh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 30424310, sign: false }); - data.append(FP8x23 { mag: 30424310, sign: false }); - data.append(FP8x23 { mag: 84036025, sign: true }); - data.append(FP8x23 { mag: 9858302, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16.cairo b/src/tests/nodes/sinh_i8_fp16x16.cairo deleted file mode 100644 index 10fd349df..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 80bc98e82..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo b/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 0f76bda00..000000000 --- a/src/tests/nodes/sinh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - data.append(FP16x16 { mag: 656531, sign: true }); - data.append(FP16x16 { mag: 77017, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23.cairo b/src/tests/nodes/sinh_i8_fp8x23.cairo deleted file mode 100644 index 1b320741c..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sinh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo deleted file mode 100644 index 04b050e31..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo b/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo deleted file mode 100644 index e455e8802..000000000 --- a/src/tests/nodes/sinh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 84017152, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 30425088, sign: false }); - data.append(FP8x23 { mag: 9854976, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16.cairo b/src/tests/nodes/sinh_u32_fp16x16.cairo deleted file mode 100644 index dbe4651d6..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sinh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 883bb6a93..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(1); - data.append(5); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo b/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo deleted file mode 100644 index d0d134a33..000000000 --- a/src/tests/nodes/sinh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 77017, sign: false }); - data.append(FP16x16 { mag: 4862981, sign: false }); - data.append(FP16x16 { mag: 237689, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23.cairo b/src/tests/nodes/sinh_u32_fp8x23.cairo deleted file mode 100644 index e6d7775b5..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sinh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sinh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo deleted file mode 100644 index d80e4683d..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(0); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo b/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo deleted file mode 100644 index 728706456..000000000 --- a/src/tests/nodes/sinh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 622461645, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 9858302, sign: false }); - data.append(FP8x23 { mag: 9858302, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16.cairo b/src/tests/nodes/softmax_fp16x16.cairo index 75d37d47a..ea3f7f578 100644 --- a/src/tests/nodes/softmax_fp16x16.cairo +++ b/src/tests/nodes/softmax_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_fp16x16/input_0.cairo b/src/tests/nodes/softmax_fp16x16/input_0.cairo index 558a0f6e5..749b61dda 100644 --- a/src/tests/nodes/softmax_fp16x16/input_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 11810, sign: true }); - data.append(FP16x16 { mag: 193132, sign: false }); - data.append(FP16x16 { mag: 147644, sign: false }); - data.append(FP16x16 { mag: 123955, sign: true }); - - + data.append(FP16x16 { mag: 3889, sign: false }); + data.append(FP16x16 { mag: 89405, sign: false }); + data.append(FP16x16 { mag: 78312, sign: false }); + data.append(FP16x16 { mag: 139730, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp16x16/output_0.cairo b/src/tests/nodes/softmax_fp16x16/output_0.cairo index 85f7d502d..b7f7bf7c5 100644 --- a/src/tests/nodes/softmax_fp16x16/output_0.cairo +++ b/src/tests/nodes/softmax_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2752, sign: false }); - data.append(FP16x16 { mag: 62783, sign: false }); - data.append(FP16x16 { mag: 64513, sign: false }); - data.append(FP16x16 { mag: 1022, sign: false }); - - + data.append(FP16x16 { mag: 13981, sign: false }); + data.append(FP16x16 { mag: 51554, sign: false }); + data.append(FP16x16 { mag: 18446, sign: false }); + data.append(FP16x16 { mag: 47089, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23.cairo b/src/tests/nodes/softmax_fp8x23.cairo index 43fcd5451..a658b8594 100644 --- a/src/tests/nodes/softmax_fp8x23.cairo +++ b/src/tests/nodes/softmax_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softmax_fp8x23/input_0.cairo b/src/tests/nodes/softmax_fp8x23/input_0.cairo index 6324ce49a..741a9d820 100644 --- a/src/tests/nodes/softmax_fp8x23/input_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 18916324, sign: false }); - data.append(FP8x23 { mag: 24318116, sign: false }); - data.append(FP8x23 { mag: 4760436, sign: true }); - data.append(FP8x23 { mag: 15132412, sign: true }); - - + data.append(FP8x23 { mag: 9804113, sign: true }); + data.append(FP8x23 { mag: 8638782, sign: true }); + data.append(FP8x23 { mag: 20159749, sign: true }); + data.append(FP8x23 { mag: 2673667, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_fp8x23/output_0.cairo b/src/tests/nodes/softmax_fp8x23/output_0.cairo index 098bd78be..ee2fbefed 100644 --- a/src/tests/nodes/softmax_fp8x23/output_0.cairo +++ b/src/tests/nodes/softmax_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 7917831, sign: false }); - data.append(FP8x23 { mag: 8313213, sign: false }); - data.append(FP8x23 { mag: 470776, sign: false }); - data.append(FP8x23 { mag: 75394, sign: false }); - - + data.append(FP8x23 { mag: 6497841, sign: false }); + data.append(FP8x23 { mag: 2762842, sign: false }); + data.append(FP8x23 { mag: 1890766, sign: false }); + data.append(FP8x23 { mag: 5625765, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16.cairo b/src/tests/nodes/softmax_i32_fp16x16.cairo deleted file mode 100644 index 562aa7184..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softmax_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo deleted file mode 100644 index 5bbe6f705..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo deleted file mode 100644 index b70151038..000000000 --- a/src/tests/nodes/softmax_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 62427, sign: false }); - data.append(FP16x16 { mag: 3108, sign: false }); - data.append(FP16x16 { mag: 57723, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23.cairo b/src/tests/nodes/softmax_i32_fp8x23.cairo deleted file mode 100644 index 1cebfac1f..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo deleted file mode 100644 index 22880cbd8..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo deleted file mode 100644 index 146ecab7c..000000000 --- a/src/tests/nodes/softmax_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - data.append(FP8x23 { mag: 4194304, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16.cairo b/src/tests/nodes/softmax_i8_fp16x16.cairo deleted file mode 100644 index 65e01f9ee..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo deleted file mode 100644 index e28064280..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo b/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo deleted file mode 100644 index 79db189c8..000000000 --- a/src/tests/nodes/softmax_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 7812, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 57696, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23.cairo b/src/tests/nodes/softmax_i8_fp8x23.cairo deleted file mode 100644 index 8d959ab33..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo deleted file mode 100644 index 5d4607c74..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo b/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo deleted file mode 100644 index 49347042a..000000000 --- a/src/tests/nodes/softmax_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 150784, sign: false }); - data.append(FP8x23 { mag: 8237056, sign: false }); - data.append(FP8x23 { mag: 150784, sign: false }); - data.append(FP8x23 { mag: 8237056, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16.cairo b/src/tests/nodes/softmax_u32_fp16x16.cairo deleted file mode 100644 index 83089c6a5..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo deleted file mode 100644 index a104b89a0..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(2); - data.append(0); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo b/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo deleted file mode 100644 index a41a5e1f1..000000000 --- a/src/tests/nodes/softmax_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 17625, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - data.append(FP16x16 { mag: 47910, sign: false }); - data.append(FP16x16 { mag: 32768, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23.cairo b/src/tests/nodes/softmax_u32_fp8x23.cairo deleted file mode 100644 index 0ea4e4595..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softmax_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softmax(@input_0, 1); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo deleted file mode 100644 index 074554b20..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(2); - data.append(0); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo b/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo deleted file mode 100644 index eb2b75f6f..000000000 --- a/src/tests/nodes/softmax_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - data.append(FP8x23 { mag: 999946, sign: false }); - data.append(FP8x23 { mag: 7388661, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16.cairo b/src/tests/nodes/softplus_fp16x16.cairo index 08f247238..916e1ed21 100644 --- a/src/tests/nodes/softplus_fp16x16.cairo +++ b/src/tests/nodes/softplus_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_fp16x16/input_0.cairo b/src/tests/nodes/softplus_fp16x16/input_0.cairo index 0576a6f28..d07486662 100644 --- a/src/tests/nodes/softplus_fp16x16/input_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 38394, sign: false }); - data.append(FP16x16 { mag: 18964, sign: false }); - data.append(FP16x16 { mag: 98498, sign: false }); - data.append(FP16x16 { mag: 52313, sign: false }); - - + data.append(FP16x16 { mag: 109682, sign: true }); + data.append(FP16x16 { mag: 76425, sign: false }); + data.append(FP16x16 { mag: 182796, sign: false }); + data.append(FP16x16 { mag: 7375, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp16x16/output_0.cairo b/src/tests/nodes/softplus_fp16x16/output_0.cairo index 603010455..ad5a4e5a4 100644 --- a/src/tests/nodes/softplus_fp16x16/output_0.cairo +++ b/src/tests/nodes/softplus_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 67396, sign: false }); - data.append(FP16x16 { mag: 55591, sign: false }); - data.append(FP16x16 { mag: 111662, sign: false }); - data.append(FP16x16 { mag: 76669, sign: false }); - - + data.append(FP16x16 { mag: 11266, sign: false }); + data.append(FP16x16 { mag: 94200, sign: false }); + data.append(FP16x16 { mag: 186705, sign: false }); + data.append(FP16x16 { mag: 49217, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23.cairo b/src/tests/nodes/softplus_fp8x23.cairo index 14f8c7cfd..e75490bd1 100644 --- a/src/tests/nodes/softplus_fp8x23.cairo +++ b/src/tests/nodes/softplus_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softplus_fp8x23/input_0.cairo b/src/tests/nodes/softplus_fp8x23/input_0.cairo index 8195309c8..ebd78352d 100644 --- a/src/tests/nodes/softplus_fp8x23/input_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 12544105, sign: false }); - data.append(FP8x23 { mag: 14326838, sign: true }); - data.append(FP8x23 { mag: 20577317, sign: false }); - data.append(FP8x23 { mag: 12791075, sign: true }); - - + data.append(FP8x23 { mag: 3471357, sign: true }); + data.append(FP8x23 { mag: 13111113, sign: true }); + data.append(FP8x23 { mag: 21113375, sign: true }); + data.append(FP8x23 { mag: 7707092, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_fp8x23/output_0.cairo b/src/tests/nodes/softplus_fp8x23/output_0.cairo index 9239c5c29..30337af60 100644 --- a/src/tests/nodes/softplus_fp8x23/output_0.cairo +++ b/src/tests/nodes/softplus_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 14240775, sign: false }); - data.append(FP8x23 { mag: 1397299, sign: false }); - data.append(FP8x23 { mag: 21269654, sign: false }); - data.append(FP8x23 { mag: 1651985, sign: false }); - - + data.append(FP8x23 { mag: 4257158, sign: false }); + data.append(FP8x23 { mag: 1595666, sign: false }); + data.append(FP8x23 { mag: 651097, sign: false }); + data.append(FP8x23 { mag: 10523719, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16.cairo b/src/tests/nodes/softplus_i32_fp16x16.cairo deleted file mode 100644 index f6a6e6d8a..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softplus_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo deleted file mode 100644 index 0855cfdcc..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo deleted file mode 100644 index 570da7532..000000000 --- a/src/tests/nodes/softplus_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - data.append(FP16x16 { mag: 8318, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23.cairo b/src/tests/nodes/softplus_i32_fp8x23.cairo deleted file mode 100644 index c8bd283ce..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo deleted file mode 100644 index 45e73ad92..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo deleted file mode 100644 index 422ca58ca..000000000 --- a/src/tests/nodes/softplus_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 2627829, sign: false }); - data.append(FP8x23 { mag: 2627829, sign: false }); - data.append(FP8x23 { mag: 407580, sign: false }); - data.append(FP8x23 { mag: 11016437, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16.cairo b/src/tests/nodes/softplus_i8_fp16x16.cairo deleted file mode 100644 index a6dd6fa03..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo deleted file mode 100644 index e486e4786..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo b/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo deleted file mode 100644 index 98294135a..000000000 --- a/src/tests/nodes/softplus_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 86080, sign: false }); - data.append(FP16x16 { mag: 45440, sign: false }); - data.append(FP16x16 { mag: 45440, sign: false }); - data.append(FP16x16 { mag: 8344, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23.cairo b/src/tests/nodes/softplus_i8_fp8x23.cairo deleted file mode 100644 index 1e120a98c..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo deleted file mode 100644 index 0d44cb8f0..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo b/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo deleted file mode 100644 index 773ca19f3..000000000 --- a/src/tests/nodes/softplus_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5816320, sign: false }); - data.append(FP8x23 { mag: 17842176, sign: false }); - data.append(FP8x23 { mag: 407808, sign: false }); - data.append(FP8x23 { mag: 2629632, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16.cairo b/src/tests/nodes/softplus_u32_fp16x16.cairo deleted file mode 100644 index 280fb82bc..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo deleted file mode 100644 index 841f732bd..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(1); - data.append(1); - data.append(1); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo b/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo deleted file mode 100644 index e3ebe8eeb..000000000 --- a/src/tests/nodes/softplus_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 263333, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - data.append(FP16x16 { mag: 86065, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23.cairo b/src/tests/nodes/softplus_u32_fp8x23.cairo deleted file mode 100644 index 792bcb222..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softplus_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softplus(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo deleted file mode 100644 index 030c5137b..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(1); - data.append(2); - data.append(5); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo b/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo deleted file mode 100644 index a733efcc1..000000000 --- a/src/tests/nodes/softplus_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 25573404, sign: false }); - data.append(FP8x23 { mag: 11016437, sign: false }); - data.append(FP8x23 { mag: 17841965, sign: false }); - data.append(FP8x23 { mag: 41999372, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16.cairo b/src/tests/nodes/softsign_fp16x16.cairo index 73955b5d7..622ed5d59 100644 --- a/src/tests/nodes/softsign_fp16x16.cairo +++ b/src/tests/nodes/softsign_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp16x16::NN_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP16x16NN; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_fp16x16/input_0.cairo b/src/tests/nodes/softsign_fp16x16/input_0.cairo index 23161c684..cb67eccad 100644 --- a/src/tests/nodes/softsign_fp16x16/input_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 422146, sign: false }); - data.append(FP16x16 { mag: 240652, sign: false }); - data.append(FP16x16 { mag: 153455, sign: false }); - data.append(FP16x16 { mag: 269993, sign: true }); - - + data.append(FP16x16 { mag: 139604, sign: true }); + data.append(FP16x16 { mag: 91968, sign: true }); + data.append(FP16x16 { mag: 455699, sign: false }); + data.append(FP16x16 { mag: 243346, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp16x16/output_0.cairo b/src/tests/nodes/softsign_fp16x16/output_0.cairo index 2fa140cf6..c42e60807 100644 --- a/src/tests/nodes/softsign_fp16x16/output_0.cairo +++ b/src/tests/nodes/softsign_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 56729, sign: false }); - data.append(FP16x16 { mag: 51508, sign: false }); - data.append(FP16x16 { mag: 45923, sign: false }); - data.append(FP16x16 { mag: 52735, sign: true }); - - + data.append(FP16x16 { mag: 44599, sign: true }); + data.append(FP16x16 { mag: 38267, sign: true }); + data.append(FP16x16 { mag: 57296, sign: false }); + data.append(FP16x16 { mag: 51631, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23.cairo b/src/tests/nodes/softsign_fp8x23.cairo index 2b39f1bd2..54288f4a3 100644 --- a/src/tests/nodes/softsign_fp8x23.cairo +++ b/src/tests/nodes/softsign_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_fp8x23::NN_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use orion::operators::nn::NNTrait; +use orion::numbers::FixedTrait; +use orion::operators::nn::FP8x23NN; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/softsign_fp8x23/input_0.cairo b/src/tests/nodes/softsign_fp8x23/input_0.cairo index 2cba2580b..92b80d489 100644 --- a/src/tests/nodes/softsign_fp8x23/input_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 13239928, sign: false }); - data.append(FP8x23 { mag: 30467697, sign: true }); - data.append(FP8x23 { mag: 7575559, sign: false }); - data.append(FP8x23 { mag: 22798419, sign: false }); - - + data.append(FP8x23 { mag: 47253221, sign: false }); + data.append(FP8x23 { mag: 50936689, sign: false }); + data.append(FP8x23 { mag: 5714756, sign: true }); + data.append(FP8x23 { mag: 15620718, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_fp8x23/output_0.cairo b/src/tests/nodes/softsign_fp8x23/output_0.cairo index 7d7ab76b3..45c3cbbf3 100644 --- a/src/tests/nodes/softsign_fp8x23/output_0.cairo +++ b/src/tests/nodes/softsign_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5135094, sign: false }); - data.append(FP8x23 { mag: 6577608, sign: true }); - data.append(FP8x23 { mag: 3980689, sign: false }); - data.append(FP8x23 { mag: 6132261, sign: false }); - - + data.append(FP8x23 { mag: 7123934, sign: false }); + data.append(FP8x23 { mag: 7202457, sign: false }); + data.append(FP8x23 { mag: 3399107, sign: true }); + data.append(FP8x23 { mag: 5457715, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16.cairo b/src/tests/nodes/softsign_i32_fp16x16.cairo deleted file mode 100644 index 11f1d313c..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp16x16::NN_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_softsign_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo deleted file mode 100644 index c6d36ec05..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 5, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo deleted file mode 100644 index 015f4f896..000000000 --- a/src/tests/nodes/softsign_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 52428, sign: false }); - data.append(FP16x16 { mag: 54613, sign: true }); - data.append(FP16x16 { mag: 54613, sign: true }); - data.append(FP16x16 { mag: 54613, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23.cairo b/src/tests/nodes/softsign_i32_fp8x23.cairo deleted file mode 100644 index ffbd7a83b..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i32_fp8x23::NN_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo deleted file mode 100644 index c32016fda..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo deleted file mode 100644 index de4499dde..000000000 --- a/src/tests/nodes/softsign_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 6291456, sign: true }); - data.append(FP8x23 { mag: 6291456, sign: false }); - data.append(FP8x23 { mag: 6710886, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16.cairo b/src/tests/nodes/softsign_i8_fp16x16.cairo deleted file mode 100644 index cd228c1bc..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp16x16::NN_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo deleted file mode 100644 index 7fb7c23f9..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo b/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo deleted file mode 100644 index 76c6b6be7..000000000 --- a/src/tests/nodes/softsign_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 52428, sign: false }); - data.append(FP16x16 { mag: 32768, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 43690, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23.cairo b/src/tests/nodes/softsign_i8_fp8x23.cairo deleted file mode 100644 index 57b76899b..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::numbers::fixed_point::core::FixedTrait; -use orion::operators::nn::implementations::nn_i8_fp8x23::NN_i8_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo deleted file mode 100644 index d93386027..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 4, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo b/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo deleted file mode 100644 index aabc4beb0..000000000 --- a/src/tests/nodes/softsign_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 5592405, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 6710886, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16.cairo b/src/tests/nodes/softsign_u32_fp16x16.cairo deleted file mode 100644 index fd84ba502..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp16x16::NN_u32_fp16x16; -use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo deleted file mode 100644 index b41c79bb9..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(6); - data.append(6); - data.append(6); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo b/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo deleted file mode 100644 index 4d9f52d15..000000000 --- a/src/tests/nodes/softsign_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 56173, sign: false }); - data.append(FP16x16 { mag: 49152, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23.cairo b/src/tests/nodes/softsign_u32_fp8x23.cairo deleted file mode 100644 index 7aa28881d..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use orion::operators::nn::core::NNTrait; -use orion::operators::nn::implementations::nn_u32_fp8x23::NN_u32_fp8x23; -use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_softsign_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = NNTrait::softsign(@input_0); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo deleted file mode 100644 index f5a92dfdb..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(3); - data.append(5); - data.append(0); - data.append(7); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo b/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo deleted file mode 100644 index ba4d6a2ff..000000000 --- a/src/tests/nodes/softsign_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6291456, sign: false }); - data.append(FP8x23 { mag: 6990506, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 7340032, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16.cairo b/src/tests/nodes/sqrt_fp16x16.cairo index dd49653b2..39424710b 100644 --- a/src/tests/nodes/sqrt_fp16x16.cairo +++ b/src/tests/nodes/sqrt_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_fp16x16/input_0.cairo index 283473ea6..bc65b62d2 100644 --- a/src/tests/nodes/sqrt_fp16x16/input_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 372701, sign: false }); - data.append(FP16x16 { mag: 96937, sign: false }); - data.append(FP16x16 { mag: 172145, sign: false }); - data.append(FP16x16 { mag: 5219, sign: false }); - - + data.append(FP16x16 { mag: 317628, sign: false }); + data.append(FP16x16 { mag: 241773, sign: false }); + data.append(FP16x16 { mag: 229884, sign: false }); + data.append(FP16x16 { mag: 311367, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_fp16x16/output_0.cairo index f9d2ce19a..468899f72 100644 --- a/src/tests/nodes/sqrt_fp16x16/output_0.cairo +++ b/src/tests/nodes/sqrt_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 156286, sign: false }); - data.append(FP16x16 { mag: 79704, sign: false }); - data.append(FP16x16 { mag: 106215, sign: false }); - data.append(FP16x16 { mag: 18494, sign: false }); - - + data.append(FP16x16 { mag: 144277, sign: false }); + data.append(FP16x16 { mag: 125876, sign: false }); + data.append(FP16x16 { mag: 122742, sign: false }); + data.append(FP16x16 { mag: 142848, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23.cairo b/src/tests/nodes/sqrt_fp8x23.cairo index 9b3077d2b..28aac23e9 100644 --- a/src/tests/nodes/sqrt_fp8x23.cairo +++ b/src/tests/nodes/sqrt_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sqrt_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_fp8x23/input_0.cairo index 075f80d1c..b46fc3377 100644 --- a/src/tests/nodes/sqrt_fp8x23/input_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 38292032, sign: false }); - data.append(FP8x23 { mag: 45839538, sign: false }); - data.append(FP8x23 { mag: 48823512, sign: false }); - data.append(FP8x23 { mag: 48128484, sign: false }); - - + data.append(FP8x23 { mag: 15040676, sign: false }); + data.append(FP8x23 { mag: 25362172, sign: false }); + data.append(FP8x23 { mag: 25487151, sign: false }); + data.append(FP8x23 { mag: 747202, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_fp8x23/output_0.cairo index 6f4eea042..553dc52b3 100644 --- a/src/tests/nodes/sqrt_fp8x23/output_0.cairo +++ b/src/tests/nodes/sqrt_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17922523, sign: false }); - data.append(FP8x23 { mag: 19609434, sign: false }); - data.append(FP8x23 { mag: 20237621, sign: false }); - data.append(FP8x23 { mag: 20093058, sign: false }); - - + data.append(FP8x23 { mag: 11232557, sign: false }); + data.append(FP8x23 { mag: 14586066, sign: false }); + data.append(FP8x23 { mag: 14621960, sign: false }); + data.append(FP8x23 { mag: 2503594, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16.cairo b/src/tests/nodes/sqrt_i32_fp16x16.cairo deleted file mode 100644 index e21b1f464..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo deleted file mode 100644 index 0bb7f7e0d..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo deleted file mode 100644 index ee9a45a04..000000000 --- a/src/tests/nodes/sqrt_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 92681, sign: false }); - data.append(FP16x16 { mag: 146542, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23.cairo b/src/tests/nodes/sqrt_i32_fp8x23.cairo deleted file mode 100644 index 488c4f52f..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo deleted file mode 100644 index 61ccf69f2..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo deleted file mode 100644 index afbd74e79..000000000 --- a/src/tests/nodes/sqrt_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 14529495, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16.cairo b/src/tests/nodes/sqrt_i8_fp16x16.cairo deleted file mode 100644 index 92d59a07c..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo deleted file mode 100644 index 8cf5067b5..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 5, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo deleted file mode 100644 index 4c8851444..000000000 --- a/src/tests/nodes/sqrt_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 113511, sign: false }); - data.append(FP16x16 { mag: 146542, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23.cairo b/src/tests/nodes/sqrt_i8_fp8x23.cairo deleted file mode 100644 index 96e4f5679..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo deleted file mode 100644 index 93812389b..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo deleted file mode 100644 index 148f71d24..000000000 --- a/src/tests/nodes/sqrt_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 18759680, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16.cairo b/src/tests/nodes/sqrt_u32_fp16x16.cairo deleted file mode 100644 index 8e2604522..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_sqrt_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo deleted file mode 100644 index 5d1b496a9..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(4); - data.append(4); - data.append(3); - data.append(4); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo b/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo deleted file mode 100644 index c8db481bb..000000000 --- a/src/tests/nodes/sqrt_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 113511, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23.cairo b/src/tests/nodes/sqrt_u32_fp8x23.cairo deleted file mode 100644 index af42a5339..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_sqrt_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.sqrt(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo deleted file mode 100644 index 69f4bdbaf..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(1); - data.append(0); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo b/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo deleted file mode 100644 index 9320b1c07..000000000 --- a/src/tests/nodes/sqrt_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 14529495, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16.cairo b/src/tests/nodes/sub_fp16x16.cairo index 701be515a..ee3ccc2f2 100644 --- a/src/tests/nodes/sub_fp16x16.cairo +++ b/src/tests/nodes/sub_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_fp16x16() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_0.cairo b/src/tests/nodes/sub_fp16x16/input_0.cairo index d4b9d9e8c..f3afb08b1 100644 --- a/src/tests/nodes/sub_fp16x16/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -14,33 +12,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/input_1.cairo b/src/tests/nodes/sub_fp16x16/input_1.cairo index 87742d9ef..8676d06a6 100644 --- a/src/tests/nodes/sub_fp16x16/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16/output_0.cairo b/src/tests/nodes/sub_fp16x16/output_0.cairo index a1cf2b5a7..32b2d20a0 100644 --- a/src/tests/nodes/sub_fp16x16/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 262144, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 196608, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast.cairo b/src/tests/nodes/sub_fp16x16_broadcast.cairo index 9b45175e1..031b58802 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{Tensor_fp16x16, FP16x16TensorSub}; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_fp16x16_broadcast() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo index 9df55dd26..4b7babc68 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo index 43aa6c5d2..5afeabf4d 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/input_1.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); @@ -13,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - - + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo index 0b7991ac0..08ef27d96 100644 --- a/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp16x16_broadcast/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); @@ -13,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 196608, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 65536, sign: true }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 327680, sign: false }); - data.append(FP16x16 { mag: 262144, sign: false }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 196608, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23.cairo b/src/tests/nodes/sub_fp8x23.cairo index 31ec74fa7..3d2e1e402 100644 --- a/src/tests/nodes/sub_fp8x23.cairo +++ b/src/tests/nodes/sub_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_fp8x23() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_0.cairo b/src/tests/nodes/sub_fp8x23/input_0.cairo index 37e7b15e2..f4ba5bb90 100644 --- a/src/tests/nodes/sub_fp8x23/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/input_1.cairo b/src/tests/nodes/sub_fp8x23/input_1.cairo index d27d2ef4b..c252cdbfa 100644 --- a/src/tests/nodes/sub_fp8x23/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23/output_0.cairo b/src/tests/nodes/sub_fp8x23/output_0.cairo index 192194bf8..f826bfd59 100644 --- a/src/tests/nodes/sub_fp8x23/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 41943040, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); - data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast.cairo b/src/tests/nodes/sub_fp8x23_broadcast.cairo index 2eb5027c8..0b43eb433 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{Tensor_fp8x23, FP8x23TensorSub}; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_fp8x23_broadcast() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo index a0ddecc2c..4394feacb 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo index bea4fe381..01519e485 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,10 +11,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo index 61ed91a14..51f872d37 100644 --- a/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_fp8x23_broadcast/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,34 +11,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 33554432, sign: true }); - data.append(FP8x23 { mag: 41943040, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); - - + data.append(FP8x23 { mag: 25165824, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32.cairo b/src/tests/nodes/sub_i32.cairo index 214a5b9c5..a52c80cd6 100644 --- a/src/tests/nodes/sub_i32.cairo +++ b/src/tests/nodes/sub_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorSub}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_i32() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_0.cairo b/src/tests/nodes/sub_i32/input_0.cairo index 6065c319f..285b5135a 100644 --- a/src/tests/nodes/sub_i32/input_0.cairo +++ b/src/tests/nodes/sub_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/input_1.cairo b/src/tests/nodes/sub_i32/input_1.cairo index 6bc170c44..b634c93dc 100644 --- a/src/tests/nodes/sub_i32/input_1.cairo +++ b/src/tests/nodes/sub_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,32 +12,30 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32/output_0.cairo b/src/tests/nodes/sub_i32/output_0.cairo index a7ddc02f2..1b3de7ea6 100644 --- a/src/tests/nodes/sub_i32/output_0.cairo +++ b/src/tests/nodes/sub_i32/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 5, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: false }); data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast.cairo b/src/tests/nodes/sub_i32_broadcast.cairo index c3b2e0826..2c33e07d4 100644 --- a/src/tests/nodes/sub_i32_broadcast.cairo +++ b/src/tests/nodes/sub_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{Tensor_i32_fp16x16, i32TensorSub}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I32Tensor, I32TensorSub}; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_i32_broadcast() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_0.cairo b/src/tests/nodes/sub_i32_broadcast/input_0.cairo index 99c9e7e3b..08a229d45 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/input_1.cairo b/src/tests/nodes/sub_i32_broadcast/input_1.cairo index b5a40313b..2567db422 100644 --- a/src/tests/nodes/sub_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - - + data.append(i32 { mag: 1, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i32_broadcast/output_0.cairo b/src/tests/nodes/sub_i32_broadcast/output_0.cairo index bc31e9f74..deac3558b 100644 --- a/src/tests/nodes/sub_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i32_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8.cairo b/src/tests/nodes/sub_i8.cairo index 4077c0c94..67ce0f788 100644 --- a/src/tests/nodes/sub_i8.cairo +++ b/src/tests/nodes/sub_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorSub}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_i8() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_0.cairo b/src/tests/nodes/sub_i8/input_0.cairo index 5ba41119e..e3d610aeb 100644 --- a/src/tests/nodes/sub_i8/input_0.cairo +++ b/src/tests/nodes/sub_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); - - + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/input_1.cairo b/src/tests/nodes/sub_i8/input_1.cairo index facd54cc3..796a86580 100644 --- a/src/tests/nodes/sub_i8/input_1.cairo +++ b/src/tests/nodes/sub_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - - + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8/output_0.cairo b/src/tests/nodes/sub_i8/output_0.cairo index bb99a41cf..62debaeae 100644 --- a/src/tests/nodes/sub_i8/output_0.cairo +++ b/src/tests/nodes/sub_i8/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 4, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast.cairo b/src/tests/nodes/sub_i8_broadcast.cairo index 94d70cb85..38b995ce1 100644 --- a/src/tests/nodes/sub_i8_broadcast.cairo +++ b/src/tests/nodes/sub_i8_broadcast.cairo @@ -1,12 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{Tensor_i8_fp16x16, i8TensorSub}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{I8Tensor, I8TensorSub}; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -19,4 +19,4 @@ fn test_sub_i8_broadcast() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_0.cairo b/src/tests/nodes/sub_i8_broadcast/input_0.cairo index f557477fc..b6941121d 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/input_1.cairo b/src/tests/nodes/sub_i8_broadcast/input_1.cairo index c822a8c92..f7f01b833 100644 --- a/src/tests/nodes/sub_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,10 +10,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - - + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_i8_broadcast/output_0.cairo b/src/tests/nodes/sub_i8_broadcast/output_0.cairo index e4cfd4133..99ba0b678 100644 --- a/src/tests/nodes/sub_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_i8_broadcast/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 4, sign: false }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: false }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32.cairo b/src/tests/nodes/sub_u32.cairo index 4e4dfeda2..d26c7449c 100644 --- a/src/tests/nodes/sub_u32.cairo +++ b/src/tests/nodes/sub_u32.cairo @@ -3,12 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_i32_fp16x16, u32TensorSub -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorSub}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/sub_u32/input_0.cairo b/src/tests/nodes/sub_u32/input_0.cairo index bd4360457..457bc9d0c 100644 --- a/src/tests/nodes/sub_u32/input_0.cairo +++ b/src/tests/nodes/sub_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(4); data.append(5); data.append(3); data.append(3); + data.append(3); data.append(5); - data.append(5); + data.append(3); data.append(4); + data.append(3); data.append(4); - data.append(5); + data.append(3); data.append(3); data.append(4); - data.append(5); + data.append(3); + data.append(3); data.append(4); data.append(3); data.append(5); data.append(3); - data.append(4); data.append(5); data.append(5); data.append(4); - data.append(5); data.append(3); data.append(3); - data.append(5); data.append(4); data.append(4); - data.append(4); - - + data.append(5); + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/input_1.cairo b/src/tests/nodes/sub_u32/input_1.cairo index 5649516b9..e963c919d 100644 --- a/src/tests/nodes/sub_u32/input_1.cairo +++ b/src/tests/nodes/sub_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(2); - data.append(1); data.append(2); data.append(1); - data.append(0); data.append(2); data.append(2); data.append(1); - data.append(1); data.append(0); data.append(1); - data.append(1); data.append(0); data.append(0); + data.append(2); + data.append(2); data.append(1); + data.append(0); data.append(1); data.append(2); - data.append(2); + data.append(0); data.append(0); data.append(2); data.append(1); data.append(1); data.append(0); + data.append(2); + data.append(0); data.append(0); + data.append(2); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32/output_0.cairo b/src/tests/nodes/sub_u32/output_0.cairo index 2a769133a..2c57cd25d 100644 --- a/src/tests/nodes/sub_u32/output_0.cairo +++ b/src/tests/nodes/sub_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(4); data.append(3); data.append(2); data.append(1); + data.append(1); data.append(4); - data.append(5); - data.append(2); - data.append(2); - data.append(4); - data.append(2); - data.append(4); - data.append(4); - data.append(3); - data.append(3); - data.append(5); - data.append(2); data.append(3); data.append(3); data.append(3); data.append(4); + data.append(1); + data.append(1); + data.append(3); data.append(3); data.append(2); data.append(2); + data.append(3); data.append(5); + data.append(1); data.append(4); data.append(4); data.append(4); - - + data.append(1); + data.append(3); + data.append(4); + data.append(2); + data.append(5); + data.append(5); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast.cairo b/src/tests/nodes/sub_u32_broadcast.cairo index a5ce30873..74bebbf12 100644 --- a/src/tests/nodes/sub_u32_broadcast.cairo +++ b/src/tests/nodes/sub_u32_broadcast.cairo @@ -1,14 +1,12 @@ -mod input_0; -mod input_1; -mod output_0; +mod input_0; +mod input_1; +mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{ - Tensor_i32_fp16x16, u32TensorSub -}; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::{U32Tensor, U32TensorSub}; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] @@ -21,4 +19,4 @@ fn test_sub_u32_broadcast() { let y = input_0 - input_1; assert_eq(y, z); -} +} \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_0.cairo b/src/tests/nodes/sub_u32_broadcast/input_0.cairo index 6b25dfce3..e90e880fc 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,33 +10,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(5); - data.append(4); - data.append(3); - data.append(4); - data.append(4); - data.append(5); - data.append(5); - data.append(4); - data.append(5); data.append(5); data.append(4); data.append(4); - data.append(4); - data.append(5); - data.append(5); data.append(3); data.append(5); + data.append(3); data.append(5); + data.append(3); data.append(5); data.append(4); + data.append(3); + data.append(3); data.append(5); + data.append(4); data.append(5); + data.append(4); + data.append(3); + data.append(3); data.append(5); data.append(3); data.append(3); + data.append(5); + data.append(4); data.append(3); data.append(5); - - + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/input_1.cairo b/src/tests/nodes/sub_u32_broadcast/input_1.cairo index 5a223f6bd..b1fdd26bd 100644 --- a/src/tests/nodes/sub_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/sub_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn input_1() -> Tensor { shape.append(1); let mut data = ArrayTrait::new(); - data.append(1); data.append(0); data.append(1); - - + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/sub_u32_broadcast/output_0.cairo b/src/tests/nodes/sub_u32_broadcast/output_0.cairo index b8e4302a2..192af5be9 100644 --- a/src/tests/nodes/sub_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/sub_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn output_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(5); + data.append(5); data.append(4); data.append(3); data.append(2); data.append(4); - data.append(4); + data.append(3); + data.append(5); + data.append(3); data.append(5); data.append(4); data.append(3); + data.append(2); data.append(4); + data.append(3); + data.append(5); data.append(4); data.append(3); data.append(3); - data.append(4); - data.append(5); data.append(5); + data.append(3); data.append(2); data.append(4); - data.append(4); - data.append(4); data.append(3); - data.append(4); - data.append(5); + data.append(3); data.append(5); data.append(3); - data.append(2); - data.append(2); - data.append(4); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16.cairo b/src/tests/nodes/tanh_fp16x16.cairo index c7488ebba..28dc8bead 100644 --- a/src/tests/nodes/tanh_fp16x16.cairo +++ b/src/tests/nodes/tanh_fp16x16.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_fp16x16/input_0.cairo b/src/tests/nodes/tanh_fp16x16/input_0.cairo index a1ad0a3fa..deaf0ba70 100644 --- a/src/tests/nodes/tanh_fp16x16/input_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 30249, sign: true }); - data.append(FP16x16 { mag: 165174, sign: true }); - data.append(FP16x16 { mag: 145036, sign: false }); - data.append(FP16x16 { mag: 81100, sign: false }); - - + data.append(FP16x16 { mag: 60947, sign: true }); + data.append(FP16x16 { mag: 18316, sign: true }); + data.append(FP16x16 { mag: 60057, sign: false }); + data.append(FP16x16 { mag: 56869, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp16x16/output_0.cairo b/src/tests/nodes/tanh_fp16x16/output_0.cairo index aba3df85e..c1712bf05 100644 --- a/src/tests/nodes/tanh_fp16x16/output_0.cairo +++ b/src/tests/nodes/tanh_fp16x16/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 28269, sign: true }); - data.append(FP16x16 { mag: 64693, sign: true }); - data.append(FP16x16 { mag: 63986, sign: false }); - data.append(FP16x16 { mag: 55360, sign: false }); - - + data.append(FP16x16 { mag: 47879, sign: true }); + data.append(FP16x16 { mag: 17853, sign: true }); + data.append(FP16x16 { mag: 47460, sign: false }); + data.append(FP16x16 { mag: 45890, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23.cairo b/src/tests/nodes/tanh_fp8x23.cairo index 1536ab369..049171f04 100644 --- a/src/tests/nodes/tanh_fp8x23.cairo +++ b/src/tests/nodes/tanh_fp8x23.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::{ - Tensor_fp8x23, FP8x23TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/tanh_fp8x23/input_0.cairo b/src/tests/nodes/tanh_fp8x23/input_0.cairo index e4520d387..d575e6042 100644 --- a/src/tests/nodes/tanh_fp8x23/input_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 17641894, sign: true }); - data.append(FP8x23 { mag: 8395817, sign: true }); - data.append(FP8x23 { mag: 24711252, sign: true }); - data.append(FP8x23 { mag: 1922655, sign: false }); - - + data.append(FP8x23 { mag: 7865643, sign: false }); + data.append(FP8x23 { mag: 14710904, sign: true }); + data.append(FP8x23 { mag: 8475156, sign: true }); + data.append(FP8x23 { mag: 8392465, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_fp8x23/output_0.cairo b/src/tests/nodes/tanh_fp8x23/output_0.cairo index f902c3081..e638eddbe 100644 --- a/src/tests/nodes/tanh_fp8x23/output_0.cairo +++ b/src/tests/nodes/tanh_fp8x23/output_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8142239, sign: true }); - data.append(FP8x23 { mag: 6391740, sign: true }); - data.append(FP8x23 { mag: 8342388, sign: true }); - data.append(FP8x23 { mag: 1889681, sign: false }); - - + data.append(FP8x23 { mag: 6158448, sign: false }); + data.append(FP8x23 { mag: 7900328, sign: true }); + data.append(FP8x23 { mag: 6424778, sign: true }); + data.append(FP8x23 { mag: 6390334, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16.cairo b/src/tests/nodes/tanh_i32_fp16x16.cairo deleted file mode 100644 index 9953c0949..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_tanh_i32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo deleted file mode 100644 index 351f3ec63..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo deleted file mode 100644 index b745c3913..000000000 --- a/src/tests/nodes/tanh_i32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 63178, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 63178, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23.cairo b/src/tests/nodes/tanh_i32_fp8x23.cairo deleted file mode 100644 index 06a1debe2..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo deleted file mode 100644 index 8e01c6ea3..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; -use orion::numbers::{i32, FP8x23}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo deleted file mode 100644 index ca9a4210e..000000000 --- a/src/tests/nodes/tanh_i32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6388714, sign: true }); - data.append(FP8x23 { mag: 8086849, sign: false }); - data.append(FP8x23 { mag: 8086849, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16.cairo b/src/tests/nodes/tanh_i8_fp16x16.cairo deleted file mode 100644 index 22fde3884..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i8_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo deleted file mode 100644 index 1f7b6aca2..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo b/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo deleted file mode 100644 index 0c780358f..000000000 --- a/src/tests/nodes/tanh_i8_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 49911, sign: true }); - data.append(FP16x16 { mag: 49911, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23.cairo b/src/tests/nodes/tanh_i8_fp8x23.cairo deleted file mode 100644 index e238884ab..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23.cairo +++ /dev/null @@ -1,21 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; - - -#[test] -#[available_gas(2000000000)] -fn test_tanh_i8_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo deleted file mode 100644 index fe5d442e0..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23/input_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo b/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo deleted file mode 100644 index 9338458ae..000000000 --- a/src/tests/nodes/tanh_i8_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 6389760, sign: true }); - data.append(FP8x23 { mag: 6389760, sign: true }); - data.append(FP8x23 { mag: 6389760, sign: false }); - data.append(FP8x23 { mag: 6389760, sign: true }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16.cairo b/src/tests/nodes/tanh_u32_fp16x16.cairo deleted file mode 100644 index 6015c3827..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16.cairo +++ /dev/null @@ -1,20 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16TensorPartialEq; -use orion::utils::assert_eq; - -#[test] -#[available_gas(2000000000)] -fn test_tanh_u32_fp16x16() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo deleted file mode 100644 index 9d0f08d73..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(4); - data.append(4); - data.append(2); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo b/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo deleted file mode 100644 index 3c1f4a4c3..000000000 --- a/src/tests/nodes/tanh_u32_fp16x16/output_0.cairo +++ /dev/null @@ -1,22 +0,0 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::numbers::FP16x16; - - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 65492, sign: false }); - data.append(FP16x16 { mag: 65492, sign: false }); - data.append(FP16x16 { mag: 63178, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23.cairo b/src/tests/nodes/tanh_u32_fp8x23.cairo deleted file mode 100644 index 104a56b84..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23.cairo +++ /dev/null @@ -1,19 +0,0 @@ -mod input_0; -mod output_0; - - -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; -use orion::utils::assert_eq; -#[test] -#[available_gas(2000000000)] -fn test_tanh_u32_fp8x23() { - let input_0 = input_0::input_0(); - let z = output_0::output_0(); - - let y = input_0.tanh(); - - assert_eq(y, z); -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo deleted file mode 100644 index cc05e1538..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23/input_0.cairo +++ /dev/null @@ -1,19 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; - -fn input_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(5); - data.append(3); - data.append(4); - data.append(3); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo b/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo deleted file mode 100644 index dfaf4ae2c..000000000 --- a/src/tests/nodes/tanh_u32_fp8x23/output_0.cairo +++ /dev/null @@ -1,20 +0,0 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - -fn output_0() -> Tensor { - let mut shape = ArrayTrait::::new(); - shape.append(2); - shape.append(2); - - let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 8387846, sign: false }); - data.append(FP8x23 { mag: 8347124, sign: false }); - data.append(FP8x23 { mag: 8382981, sign: false }); - data.append(FP8x23 { mag: 8347124, sign: false }); - - - TensorTrait::new(shape.span(), data.span()) -} \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d.cairo b/src/tests/nodes/transpose_fp16x16_2d.cairo index d587bcdaf..8518391c3 100644 --- a/src/tests/nodes/transpose_fp16x16_2d.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo index fe3c461ae..44fdf69f3 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 4325376, sign: true }); - data.append(FP16x16 { mag: 7864320, sign: true }); - data.append(FP16x16 { mag: 4587520, sign: true }); - - + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo index 33139bf13..5dfd272d6 100644 --- a/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_2d/output_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 7864320, sign: true }); - data.append(FP16x16 { mag: 4325376, sign: true }); - data.append(FP16x16 { mag: 4587520, sign: true }); - - + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 458752, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d.cairo b/src/tests/nodes/transpose_fp16x16_3d.cairo index 661842bed..45333106b 100644 --- a/src/tests/nodes/transpose_fp16x16_3d.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::{ - Tensor_fp16x16, FP16x16TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo index eaac156cd..aaa8ef6de 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/input_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 7012352, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 3866624, sign: true }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo index 6fdaeb53c..291e5ff22 100644 --- a/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp16x16_3d/output_0.cairo @@ -1,11 +1,9 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); @@ -13,15 +11,13 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 2621440, sign: false }); - data.append(FP16x16 { mag: 6553600, sign: true }); - data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); data.append(FP16x16 { mag: 3866624, sign: true }); - data.append(FP16x16 { mag: 3080192, sign: false }); - data.append(FP16x16 { mag: 1900544, sign: false }); - data.append(FP16x16 { mag: 5111808, sign: true }); - data.append(FP16x16 { mag: 2686976, sign: false }); - - + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d.cairo b/src/tests/nodes/transpose_fp8x23_2d.cairo index 4adef9b80..93de8b029 100644 --- a/src/tests/nodes/transpose_fp8x23_2d.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo index a8ade95c4..0d03b1ea9 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo index 64a9f2e69..01800798c 100644 --- a/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_2d/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 889192448, sign: false }); - data.append(FP8x23 { mag: 117440512, sign: false }); - data.append(FP8x23 { mag: 402653184, sign: true }); - - + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d.cairo b/src/tests/nodes/transpose_fp8x23_3d.cairo index a5858c37a..7a9975363 100644 --- a/src/tests/nodes/transpose_fp8x23_3d.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo index 97ec416c1..b9fc54101 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); data.append(FP8x23 { mag: 838860800, sign: true }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: true }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo index 37c16b6e0..df49a1863 100644 --- a/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo +++ b/src/tests/nodes/transpose_fp8x23_3d/output_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,15 +11,13 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 905969664, sign: false }); - data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); data.append(FP8x23 { mag: 838860800, sign: true }); - data.append(FP8x23 { mag: 276824064, sign: false }); - data.append(FP8x23 { mag: 142606336, sign: false }); - data.append(FP8x23 { mag: 226492416, sign: false }); - data.append(FP8x23 { mag: 159383552, sign: false }); - data.append(FP8x23 { mag: 629145600, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d.cairo b/src/tests/nodes/transpose_i32_2d.cairo index 7fba5bfda..6c3a62908 100644 --- a/src/tests/nodes/transpose_i32_2d.cairo +++ b/src/tests/nodes/transpose_i32_2d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i32_2d/input_0.cairo b/src/tests/nodes/transpose_i32_2d/input_0.cairo index bccc13819..89cf660d2 100644 --- a/src/tests/nodes/transpose_i32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 104, sign: true }); - data.append(i32 { mag: 99, sign: true }); - - + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 76, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_2d/output_0.cairo b/src/tests/nodes/transpose_i32_2d/output_0.cairo index 95d9d474f..b944c98ba 100644 --- a/src/tests/nodes/transpose_i32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_2d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 104, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 99, sign: true }); - - + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 76, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d.cairo b/src/tests/nodes/transpose_i32_3d.cairo index 34e32772d..91dd82bf9 100644 --- a/src/tests/nodes/transpose_i32_3d.cairo +++ b/src/tests/nodes/transpose_i32_3d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::{ - Tensor_i32_fp16x16, i32TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i32_3d/input_0.cairo b/src/tests/nodes/transpose_i32_3d/input_0.cairo index 76b614373..1db626fe7 100644 --- a/src/tests/nodes/transpose_i32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 22, sign: false }); data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 70, sign: false }); - - + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 54, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i32_3d/output_0.cairo b/src/tests/nodes/transpose_i32_3d/output_0.cairo index 64b474367..ac0efdce2 100644 --- a/src/tests/nodes/transpose_i32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i32_3d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 28, sign: true }); data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 70, sign: false }); - - + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 54, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d.cairo b/src/tests/nodes/transpose_i8_2d.cairo index ffda08d78..f0018ffc7 100644 --- a/src/tests/nodes/transpose_i8_2d.cairo +++ b/src/tests/nodes/transpose_i8_2d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i8_2d/input_0.cairo b/src/tests/nodes/transpose_i8_2d/input_0.cairo index 02347830e..43baf095b 100644 --- a/src/tests/nodes/transpose_i8_2d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 41, sign: true }); - - + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 17, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_2d/output_0.cairo b/src/tests/nodes/transpose_i8_2d/output_0.cairo index a91937334..0ce510017 100644 --- a/src/tests/nodes/transpose_i8_2d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_2d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 41, sign: true }); - - + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 17, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d.cairo b/src/tests/nodes/transpose_i8_3d.cairo index 9cb8c0a1e..e2275f9e8 100644 --- a/src/tests/nodes/transpose_i8_3d.cairo +++ b/src/tests/nodes/transpose_i8_3d.cairo @@ -2,11 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::{ - Tensor_i8_fp16x16, i8TensorPartialEq -}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_i8_3d/input_0.cairo b/src/tests/nodes/transpose_i8_3d/input_0.cairo index 36e20af83..6bc3c421f 100644 --- a/src/tests/nodes/transpose_i8_3d/input_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 30, sign: true }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 28, sign: true }); - - + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 84, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_i8_3d/output_0.cairo b/src/tests/nodes/transpose_i8_3d/output_0.cairo index bfd18dd5f..0561ce16f 100644 --- a/src/tests/nodes/transpose_i8_3d/output_0.cairo +++ b/src/tests/nodes/transpose_i8_3d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,15 +10,13 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 8, sign: false }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 30, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 28, sign: true }); - - + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 14, sign: false }); + data.append(i8 { mag: 84, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d.cairo b/src/tests/nodes/transpose_u32_2d.cairo index a99971cdf..cf85578ed 100644 --- a/src/tests/nodes/transpose_u32_2d.cairo +++ b/src/tests/nodes/transpose_u32_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_u32_2d/input_0.cairo b/src/tests/nodes/transpose_u32_2d/input_0.cairo index 7af200cb9..223599a73 100644 --- a/src/tests/nodes/transpose_u32_2d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(201); - data.append(13); - data.append(203); - data.append(125); - - + data.append(128); + data.append(228); + data.append(50); + data.append(212); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_2d/output_0.cairo b/src/tests/nodes/transpose_u32_2d/output_0.cairo index 26e4cc71d..d7bdc47d7 100644 --- a/src/tests/nodes/transpose_u32_2d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_2d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(201); - data.append(203); - data.append(13); - data.append(125); - - + data.append(128); + data.append(50); + data.append(228); + data.append(212); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d.cairo b/src/tests/nodes/transpose_u32_3d.cairo index 185e74244..e315043d7 100644 --- a/src/tests/nodes/transpose_u32_3d.cairo +++ b/src/tests/nodes/transpose_u32_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/transpose_u32_3d/input_0.cairo b/src/tests/nodes/transpose_u32_3d/input_0.cairo index 521e242be..02fba471b 100644 --- a/src/tests/nodes/transpose_u32_3d/input_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(180); - data.append(20); - data.append(198); - data.append(208); - data.append(61); - data.append(240); - data.append(165); - data.append(75); - - + data.append(6); + data.append(44); + data.append(94); + data.append(97); + data.append(104); + data.append(24); + data.append(21); + data.append(83); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/transpose_u32_3d/output_0.cairo b/src/tests/nodes/transpose_u32_3d/output_0.cairo index aedc1e8b5..12694d086 100644 --- a/src/tests/nodes/transpose_u32_3d/output_0.cairo +++ b/src/tests/nodes/transpose_u32_3d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(180); - data.append(61); - data.append(20); - data.append(240); - data.append(198); - data.append(165); - data.append(208); - data.append(75); - - + data.append(6); + data.append(104); + data.append(44); + data.append(24); + data.append(94); + data.append(21); + data.append(97); + data.append(83); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16.cairo b/src/tests/nodes/xor_fp16x16.cairo index e68270ac7..08b6c36ae 100644 --- a/src/tests/nodes/xor_fp16x16.cairo +++ b/src/tests/nodes/xor_fp16x16.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp16x16/input_0.cairo b/src/tests/nodes/xor_fp16x16/input_0.cairo index fc920912c..fff479495 100644 --- a/src/tests/nodes/xor_fp16x16/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 196608, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/input_1.cairo b/src/tests/nodes/xor_fp16x16/input_1.cairo index c4b2c6891..35b36e995 100644 --- a/src/tests/nodes/xor_fp16x16/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 196608, sign: true }); - data.append(FP16x16 { mag: 196608, sign: true }); - - + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16/output_0.cairo b/src/tests/nodes/xor_fp16x16/output_0.cairo index 54020fa6e..e7b1da4b1 100644 --- a/src/tests/nodes/xor_fp16x16/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); - data.append(0); - data.append(0); - - + data.append(1); + data.append(1); + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast.cairo b/src/tests/nodes/xor_fp16x16_broadcast.cairo index 243d8747e..b82315df3 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo index 5553168da..7f8ad7c16 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_0.cairo @@ -1,22 +1,18 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 131072, sign: true }); data.append(FP16x16 { mag: 131072, sign: true }); - data.append(FP16x16 { mag: 65536, sign: false }); - data.append(FP16x16 { mag: 65536, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo index 9b21e0dac..4e47e4f2c 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/input_1.cairo @@ -1,20 +1,16 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP16x16; - fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(1); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP16x16 { mag: 0, sign: false }); - data.append(FP16x16 { mag: 0, sign: false }); - - + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo index 0606e6413..0cc7de207 100644 --- a/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp16x16_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(1); - data.append(1); - data.append(1); - data.append(1); - - + data.append(0); + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23.cairo b/src/tests/nodes/xor_fp8x23.cairo index 812eca2d1..4be36252e 100644 --- a/src/tests/nodes/xor_fp8x23.cairo +++ b/src/tests/nodes/xor_fp8x23.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp8x23/input_0.cairo b/src/tests/nodes/xor_fp8x23/input_0.cairo index 7dee15971..2b77e8b23 100644 --- a/src/tests/nodes/xor_fp8x23/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23/input_0.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/input_1.cairo b/src/tests/nodes/xor_fp8x23/input_1.cairo index b0aa5fe8c..e68e28e05 100644 --- a/src/tests/nodes/xor_fp8x23/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23/input_1.cairo @@ -1,8 +1,8 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; use orion::numbers::FP8x23; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +11,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: true }); - data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 16777216, sign: true }); - data.append(FP8x23 { mag: 8388608, sign: true }); - data.append(FP8x23 { mag: 16777216, sign: false }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23/output_0.cairo b/src/tests/nodes/xor_fp8x23/output_0.cairo index bfe4ee4ac..70f2eb1c0 100644 --- a/src/tests/nodes/xor_fp8x23/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,31 +12,29 @@ fn output_0() -> Tensor { data.append(1); data.append(0); data.append(0); - data.append(0); - data.append(1); data.append(1); data.append(0); - data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); + data.append(1); data.append(0); data.append(1); data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); + data.append(0); data.append(1); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast.cairo b/src/tests/nodes/xor_fp8x23_broadcast.cairo index 30b99c40a..ab911da0f 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; -use orion::operators::tensor::implementations::tensor_u32_fp8x23::{u32TensorPartialEq}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo index df287636b..4f2014dfa 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_0.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,11 +10,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: false }); - data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo index ba5d490de..4ce45e8c2 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/input_1.cairo @@ -1,9 +1,8 @@ -use array::ArrayTrait; - -use orion::operators::tensor::core::{TensorTrait, Tensor}; -use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23;use orion::numbers::FP8x23; - +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,9 +10,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(FP8x23 { mag: 16777216, sign: true }); data.append(FP8x23 { mag: 8388608, sign: false }); - - + data.append(FP8x23 { mag: 25165824, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo index 1046ea885..2101f7fc8 100644 --- a/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_fp8x23_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp8x23::Tensor_u32_fp8x23; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32.cairo b/src/tests/nodes/xor_i32.cairo index 259943c51..137ecc9f7 100644 --- a/src/tests/nodes/xor_i32.cairo +++ b/src/tests/nodes/xor_i32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i32/input_0.cairo b/src/tests/nodes/xor_i32/input_0.cairo index fec3113a1..c55b2e7fd 100644 --- a/src/tests/nodes/xor_i32/input_0.cairo +++ b/src/tests/nodes/xor_i32/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: false }); data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 2, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/input_1.cairo b/src/tests/nodes/xor_i32/input_1.cairo index fa846a694..29e595bcf 100644 --- a/src/tests/nodes/xor_i32/input_1.cairo +++ b/src/tests/nodes/xor_i32/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 1, sign: true }); data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 2, sign: false }); data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 1, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32/output_0.cairo b/src/tests/nodes/xor_i32/output_0.cairo index 9217e1d12..496a737b9 100644 --- a/src/tests/nodes/xor_i32/output_0.cairo +++ b/src/tests/nodes/xor_i32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -15,29 +14,27 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - data.append(0); data.append(1); data.append(0); - data.append(1); - data.append(0); - data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); data.append(0); data.append(1); + data.append(1); + data.append(0); data.append(0); data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(1); + data.append(1); + data.append(0); data.append(0); data.append(0); - data.append(1); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast.cairo b/src/tests/nodes/xor_i32_broadcast.cairo index 78faa30e7..9b65f7f9a 100644 --- a/src/tests/nodes/xor_i32_broadcast.cairo +++ b/src/tests/nodes/xor_i32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i32_broadcast/input_0.cairo b/src/tests/nodes/xor_i32_broadcast/input_0.cairo index 23ab56b38..dd650e28e 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 3, sign: true }); data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/input_1.cairo b/src/tests/nodes/xor_i32_broadcast/input_1.cairo index 0b7673a46..d955a58f8 100644 --- a/src/tests/nodes/xor_i32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i32_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::numbers::{i32, FP16x16}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,9 +9,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 0, sign: false }); - - + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i32_broadcast/output_0.cairo b/src/tests/nodes/xor_i32_broadcast/output_0.cairo index 54020fa6e..2101f7fc8 100644 --- a/src/tests/nodes/xor_i32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -13,7 +12,5 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8.cairo b/src/tests/nodes/xor_i8.cairo index 3f95ecefc..818f8ec6e 100644 --- a/src/tests/nodes/xor_i8.cairo +++ b/src/tests/nodes/xor_i8.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i8/input_0.cairo b/src/tests/nodes/xor_i8/input_0.cairo index 6c5b2e301..f0a5d8f05 100644 --- a/src/tests/nodes/xor_i8/input_0.cairo +++ b/src/tests/nodes/xor_i8/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,33 +11,31 @@ fn input_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: true }); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/input_1.cairo b/src/tests/nodes/xor_i8/input_1.cairo index bd76c437b..736dbe136 100644 --- a/src/tests/nodes/xor_i8/input_1.cairo +++ b/src/tests/nodes/xor_i8/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,34 +10,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 3, sign: true }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 3, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8/output_0.cairo b/src/tests/nodes/xor_i8/output_0.cairo index ca73ef6fc..3dfa40551 100644 --- a/src/tests/nodes/xor_i8/output_0.cairo +++ b/src/tests/nodes/xor_i8/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -12,32 +11,30 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); data.append(0); - data.append(0); data.append(1); - data.append(0); + data.append(1); data.append(0); data.append(0); data.append(1); - data.append(0); + data.append(1); + data.append(1); + data.append(1); data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(1); - data.append(0); data.append(1); data.append(0); data.append(0); data.append(0); data.append(0); - data.append(1); - - + data.append(0); + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast.cairo b/src/tests/nodes/xor_i8_broadcast.cairo index a7e153abe..88ecb155e 100644 --- a/src/tests/nodes/xor_i8_broadcast.cairo +++ b/src/tests/nodes/xor_i8_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_i8_broadcast/input_0.cairo b/src/tests/nodes/xor_i8_broadcast/input_0.cairo index 11de9ced1..e621a9516 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 2, sign: false }); data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/input_1.cairo b/src/tests/nodes/xor_i8_broadcast/input_1.cairo index 676db0ca8..ed4f1bac9 100644 --- a/src/tests/nodes/xor_i8_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_i8_broadcast/input_1.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,8 +10,6 @@ fn input_1() -> Tensor { let mut data = ArrayTrait::new(); data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 0, sign: false }); - - + data.append(i8 { mag: 1, sign: true }); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_i8_broadcast/output_0.cairo b/src/tests/nodes/xor_i8_broadcast/output_0.cairo index 54020fa6e..2094003c4 100644 --- a/src/tests/nodes/xor_i8_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_i8_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); data.append(0); - data.append(0); - data.append(0); - data.append(0); - - + data.append(1); + data.append(1); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32.cairo b/src/tests/nodes/xor_u32.cairo index 329041ae2..bf08a5353 100644 --- a/src/tests/nodes/xor_u32.cairo +++ b/src/tests/nodes/xor_u32.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_u32/input_0.cairo b/src/tests/nodes/xor_u32/input_0.cairo index 6dcfd699e..0ff938795 100644 --- a/src/tests/nodes/xor_u32/input_0.cairo +++ b/src/tests/nodes/xor_u32/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_0() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(0); data.append(2); - data.append(1); - data.append(2); - data.append(3); + data.append(4); + data.append(4); data.append(0); - data.append(5); + data.append(1); data.append(4); + data.append(1); + data.append(3); data.append(0); data.append(4); + data.append(3); data.append(4); data.append(2); data.append(5); - data.append(3); + data.append(1); + data.append(1); data.append(5); - data.append(0); - data.append(3); data.append(1); - data.append(3); + data.append(1); + data.append(1); data.append(2); data.append(5); + data.append(5); data.append(0); - data.append(1); - data.append(0); - data.append(4); data.append(0); - - + data.append(5); + data.append(3); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/input_1.cairo b/src/tests/nodes/xor_u32/input_1.cairo index 9416ab8e8..bd273bcdf 100644 --- a/src/tests/nodes/xor_u32/input_1.cairo +++ b/src/tests/nodes/xor_u32/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,34 +9,32 @@ fn input_1() -> Tensor { shape.append(3); let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(0); - data.append(5); + data.append(2); + data.append(4); data.append(0); data.append(2); - data.append(3); data.append(4); data.append(4); - data.append(3); - data.append(5); data.append(2); + data.append(2); + data.append(3); data.append(1); data.append(1); - data.append(1); - data.append(3); - data.append(3); - data.append(3); + data.append(2); + data.append(5); + data.append(0); data.append(3); + data.append(5); + data.append(2); + data.append(0); + data.append(0); + data.append(1); data.append(4); - data.append(3); + data.append(0); data.append(1); - data.append(3); - data.append(5); + data.append(2); + data.append(2); data.append(1); data.append(2); - data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32/output_0.cairo b/src/tests/nodes/xor_u32/output_0.cairo index 85a04b2b6..ba056af8f 100644 --- a/src/tests/nodes/xor_u32/output_0.cairo +++ b/src/tests/nodes/xor_u32/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,17 +10,14 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); - data.append(1); - data.append(1); data.append(0); data.append(1); - data.append(0); data.append(1); data.append(0); data.append(0); - data.append(1); data.append(0); data.append(0); + data.append(1); data.append(0); data.append(0); data.append(0); @@ -30,14 +26,15 @@ fn output_0() -> Tensor { data.append(0); data.append(0); data.append(0); + data.append(1); + data.append(1); data.append(0); data.append(0); data.append(1); data.append(0); data.append(1); - data.append(0); data.append(1); - - + data.append(0); + data.append(0); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast.cairo b/src/tests/nodes/xor_u32_broadcast.cairo index d1e4018d1..350165580 100644 --- a/src/tests/nodes/xor_u32_broadcast.cairo +++ b/src/tests/nodes/xor_u32_broadcast.cairo @@ -3,10 +3,10 @@ mod input_1; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; -use orion::operators::tensor::implementations::tensor_u32_fp16x16::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/xor_u32_broadcast/input_0.cairo b/src/tests/nodes/xor_u32_broadcast/input_0.cairo index 00a9967f1..ce1b965e8 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn input_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); + data.append(1); + data.append(0); + data.append(0); data.append(5); - data.append(5); - data.append(3); - data.append(5); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/input_1.cairo b/src/tests/nodes/xor_u32_broadcast/input_1.cairo index 41db35e5b..7860a60be 100644 --- a/src/tests/nodes/xor_u32_broadcast/input_1.cairo +++ b/src/tests/nodes/xor_u32_broadcast/input_1.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_1() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,9 +8,7 @@ fn input_1() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(5); data.append(3); - - + data.append(4); TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/xor_u32_broadcast/output_0.cairo b/src/tests/nodes/xor_u32_broadcast/output_0.cairo index 54020fa6e..8304bcded 100644 --- a/src/tests/nodes/xor_u32_broadcast/output_0.cairo +++ b/src/tests/nodes/xor_u32_broadcast/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor}; - -use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,10 +9,8 @@ fn output_0() -> Tensor { let mut data = ArrayTrait::new(); data.append(0); + data.append(1); + data.append(1); data.append(0); - data.append(0); - data.append(0); - - TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo index 38303ee30..8bc1060bf 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_fp_test/fp_i8_test.cairo @@ -8,9 +8,9 @@ mod fp8x23 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23Impl, FP8x23PartialEq}; - use orion::operators::tensor::implementations::tensor_i8_fp8x23::Tensor_i8_fp8x23; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I8Tensor; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -156,9 +156,9 @@ mod fp16x16 { use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16Impl, FP16x16PartialEq }; - use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I8Tensor; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] diff --git a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo index 7592c06b1..84efc45e7 100644 --- a/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo +++ b/src/tests/performance/dequantize_linear_test/dequantize_linear_i32_test.cairo @@ -5,9 +5,9 @@ use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo index afe12a4e8..c586b1bcc 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_fp_test/fp_i8_test.cairo @@ -8,9 +8,9 @@ mod fp8x23 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; - use orion::operators::tensor::implementations::tensor_i32_fp8x23::Tensor_i32_fp8x23; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I32Tensor; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP8x23; #[test] @@ -146,9 +146,9 @@ mod fp16x16 { use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; + use orion::operators::tensor::I32Tensor; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; + use orion::operators::tensor::{TensorTrait, Tensor}; use orion::numbers::FP16x16; #[test] diff --git a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo index 26109222d..089cb2a91 100644 --- a/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo +++ b/src/tests/performance/quantize_linear_test/quantize_linear_i32_test.cairo @@ -5,8 +5,8 @@ use traits::Into; use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32, i8::i8}; use orion::numbers::fixed_point::core::{FixedTrait}; -use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; -use orion::operators::tensor::core::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::{TensorTrait, Tensor}; #[test] #[available_gas(2000000)] diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo index 8f286cf77..3765583e1 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo index 27651820e..36c226c01 100644 --- a/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo +++ b/src/tests/tensor_core/at/at_fp_test/at_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -27,7 +27,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; @@ -54,7 +54,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::core::FixedTrait; diff --git a/src/tests/tensor_core/at/at_i32_test.cairo b/src/tests/tensor_core/at/at_i32_test.cairo index a5f841670..9fb716b30 100644 --- a/src/tests/tensor_core/at/at_i32_test.cairo +++ b/src/tests/tensor_core/at/at_i32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/at/at_u32_test.cairo b/src/tests/tensor_core/at/at_u32_test.cairo index c7461c674..22f4a804d 100644 --- a/src/tests/tensor_core/at/at_u32_test.cairo +++ b/src/tests/tensor_core/at/at_u32_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -26,7 +26,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -51,7 +51,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use array::ArrayTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo index a5530bd25..e8a7e5762 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp16x16_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo index 531d524b5..be2d843fe 100644 --- a/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_fp_test/flatten_fp8x23_test.cairo @@ -3,7 +3,7 @@ #[cfg(test)] mod tensor_1D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::operators::tensor::core::TensorTrait; @@ -23,7 +23,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::operators::tensor::core::TensorTrait; @@ -52,7 +52,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { use core::traits::Into; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::operators::tensor::core::TensorTrait; diff --git a/src/tests/tensor_core/flatten/flatten_i32_test.cairo b/src/tests/tensor_core/flatten/flatten_i32_test.cairo index a9c7ec2b5..e1d67fc80 100644 --- a/src/tests/tensor_core/flatten/flatten_i32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/flatten/flatten_u32_test.cairo b/src/tests/tensor_core/flatten/flatten_u32_test.cairo index ab2114e61..6e763ceee 100644 --- a/src/tests/tensor_core/flatten/flatten_u32_test.cairo +++ b/src/tests/tensor_core/flatten/flatten_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -58,7 +58,7 @@ mod tensor_3D { use array::{ArrayTrait, SpanTrait}; use core::traits::Into; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo index 8337556d1..b90805c06 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp16x16_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16; diff --git a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo index c4e8d5923..26f5e043b 100644 --- a/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo +++ b/src/tests/tensor_core/max/max_fp_test/max_fp8x23_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23; diff --git a/src/tests/tensor_core/max/max_i32_test.cairo b/src/tests/tensor_core/max/max_i32_test.cairo index a35fb3b11..450b20ac1 100644 --- a/src/tests/tensor_core/max/max_i32_test.cairo +++ b/src/tests/tensor_core/max/max_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/max/max_u32_test.cairo b/src/tests/tensor_core/max/max_u32_test.cairo index 7b2fc41f1..f53e455f4 100644 --- a/src/tests/tensor_core/max/max_u32_test.cairo +++ b/src/tests/tensor_core/max/max_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo index da4e50b83..9a88d635a 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp16x16_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; diff --git a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo index bdb408d83..d4f94818c 100644 --- a/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo +++ b/src/tests/tensor_core/min/min_fp_test/min_fp8x23_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -22,7 +22,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; @@ -43,7 +43,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; use orion::numbers::fixed_point::implementations::fp8x23::core::FP8x23Impl; diff --git a/src/tests/tensor_core/min/min_i32_test.cairo b/src/tests/tensor_core/min/min_i32_test.cairo index a6c3a6b5d..b7b8a1825 100644 --- a/src/tests/tensor_core/min/min_i32_test.cairo +++ b/src/tests/tensor_core/min/min_i32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/min/min_u32_test.cairo b/src/tests/tensor_core/min/min_u32_test.cairo index 93cd2b904..8fe474204 100644 --- a/src/tests/tensor_core/min/min_u32_test.cairo +++ b/src/tests/tensor_core/min/min_u32_test.cairo @@ -2,7 +2,7 @@ #[cfg(test)] mod tensor_1D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -20,7 +20,7 @@ mod tensor_1D { #[cfg(test)] mod tensor_2D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -38,7 +38,7 @@ mod tensor_2D { #[cfg(test)] mod tensor_3D { - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/onehot.cairo b/src/tests/tensor_core/onehot.cairo index f2de1c516..c9df02f7c 100644 --- a/src/tests/tensor_core/onehot.cairo +++ b/src/tests/tensor_core/onehot.cairo @@ -1,4 +1 @@ -mod onehot_u32_test; -mod onehot_i32_test; -mod onehot_i8_test; mod onehot_fp_test; diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo index 0997b2e53..070143ffd 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp16x16_test.cairo @@ -12,7 +12,7 @@ mod tensor_1D { use orion::numbers::fixed_point::implementations::fp16x16::core::{ FP16x16, FP16x16PartialEq }; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::tests::helpers::tensor::fixed_point::fp16x16::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper diff --git a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo index 37b6d05e4..3ccd57b90 100644 --- a/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo +++ b/src/tests/tensor_core/onehot/onehot_fp_test/onehot_fp8x23_test.cairo @@ -10,7 +10,7 @@ mod tensor_1D { use core::traits::Into; use orion::numbers::fixed_point::core::{FixedTrait}; use orion::numbers::fixed_point::implementations::fp8x23::core::{FP8x23, FP8x23PartialEq}; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::TensorTrait; use orion::tests::helpers::tensor::fixed_point::fp8x23::{ fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, diff --git a/src/tests/tensor_core/onehot/onehot_i32_test.cairo b/src/tests/tensor_core/onehot/onehot_i32_test.cairo deleted file mode 100644 index 1b5e2cef9..000000000 --- a/src/tests/tensor_core/onehot/onehot_i32_test.cairo +++ /dev/null @@ -1,494 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use core::option::OptionTrait; - use serde::Serde; - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; - - use orion::tests::helpers::tensor::i32::{ - i32_tensor_1x3_helper, i32_tensor_1x3_neg_helper, i32_tensor_2x2_helper, - i32_tensor_3x2x2_helper - }; - - - fn i32_tensor_3x2x2_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 3, sign: false }); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - fn i32_tensor_2x2_pos_neg_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 1, sign: true }); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_neg_last_axis() { - let tensor = i32_tensor_1x3_neg_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 1, 'result[7] = 1'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = i32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_2x2_post_neg_last_axis() { - let tensor = i32_tensor_2x2_pos_neg_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 1, 'result[4] = 1'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 1, 'result[7] = 1'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 0, 'result[10] = 0'); - assert((*result.data.at(11)).into() == 1, 'result[11] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_last_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_fail() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_first_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_second_axis() { - let tensor = i32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 1, 'result[3] = 1'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 0, 'result[10] = 0'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 1, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_last_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(21)).into() == 1, 'result[21] = 1'); - assert((*result.data.at(26)).into() == 1, 'result[26] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(37)).into() == 1, 'result[37] = 1'); - assert((*result.data.at(42)).into() == 1, 'result[42] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 2'); - assert((*result.shape.at(3)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_fail() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(4); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_first_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(2); - values.append(5); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 5, 'result[0] = 5'); - assert((*result.data.at(1)).into() == 2, 'result[1] = 2'); - assert((*result.data.at(2)).into() == 2, 'result[2] = 2'); - assert((*result.data.at(3)).into() == 2, 'result[3] = 2'); - assert((*result.data.at(4)).into() == 5, 'result[4] = 5'); - assert((*result.data.at(5)).into() == 2, 'result[5] = 2'); - assert((*result.data.at(6)).into() == 2, 'result[6] = 2'); - assert((*result.data.at(7)).into() == 2, 'result[7] = 2'); - assert((*result.data.at(8)).into() == 5, 'result[8] = 5'); - assert((*result.data.at(9)).into() == 2, 'result[9] = 2'); - assert((*result.data.at(10)).into() == 2, 'result[10] = 2'); - assert((*result.data.at(11)).into() == 2, 'result[11] = 2'); - assert((*result.data.at(12)).into() == 2, 'result[12] = 2'); - assert((*result.data.at(13)).into() == 5, 'result[13] = 5'); - assert((*result.data.at(14)).into() == 2, 'result[14] = 2'); - assert((*result.data.at(17)).into() == 5, 'result[17] = 5'); - assert((*result.data.at(21)).into() == 5, 'result[21] = 5'); - assert((*result.data.at(26)).into() == 5, 'result[26] = 5'); - assert((*result.data.at(30)).into() == 5, 'result[30] = 5'); - assert((*result.data.at(34)).into() == 5, 'result[34] = 5'); - assert((*result.data.at(39)).into() == 5, 'result[39] = 5'); - assert((*result.data.at(43)).into() == 5, 'result[43] = 5'); - assert((*result.data.at(46)).into() == 2, 'result[46] = 2'); - assert((*result.data.at(47)).into() == 5, 'result[47] = 5'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_second_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 0, 'result[3] = 0'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 1, 'result[5] = 1'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(7)).into() == 0, 'result[7] = 0'); - assert((*result.data.at(8)).into() == 0, 'result[8] = 0'); - assert((*result.data.at(9)).into() == 0, 'result[9] = 0'); - assert((*result.data.at(10)).into() == 1, 'result[10] = 1'); - assert((*result.data.at(11)).into() == 0, 'result[11] = 0'); - assert((*result.data.at(12)).into() == 0, 'result[12] = 0'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(21)).into() == 1, 'result[21] = 1'); - assert((*result.data.at(26)).into() == 1, 'result[26] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(37)).into() == 1, 'result[37] = 1'); - assert((*result.data.at(42)).into() == 1, 'result[42] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_third_axis() { - let tensor = i32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(2); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)).into() == 1, 'result[0] = 1'); - assert((*result.data.at(1)).into() == 0, 'result[1] = 0'); - assert((*result.data.at(2)).into() == 0, 'result[2] = 0'); - assert((*result.data.at(3)).into() == 1, 'result[3] = 1'); - assert((*result.data.at(4)).into() == 0, 'result[4] = 0'); - assert((*result.data.at(5)).into() == 0, 'result[5] = 0'); - assert((*result.data.at(6)).into() == 0, 'result[6] = 0'); - assert((*result.data.at(12)).into() == 1, 'result[12] = 1'); - assert((*result.data.at(13)).into() == 0, 'result[13] = 0'); - assert((*result.data.at(14)).into() == 0, 'result[14] = 0'); - assert((*result.data.at(15)).into() == 1, 'result[15] = 1'); - assert((*result.data.at(16)).into() == 1, 'result[16] = 1'); - assert((*result.data.at(19)).into() == 1, 'result[19] = 1'); - assert((*result.data.at(21)).into() == 0, 'result[21] = 0'); - assert((*result.data.at(26)).into() == 0, 'result[26] = 0'); - assert((*result.data.at(28)).into() == 1, 'result[28] = 1'); - assert((*result.data.at(31)).into() == 1, 'result[31] = 1'); - assert((*result.data.at(32)).into() == 1, 'result[32] = 1'); - assert((*result.data.at(35)).into() == 1, 'result[35] = 1'); - assert((*result.data.at(37)).into() == 0, 'result[37] = 0'); - assert((*result.data.at(44)).into() == 1, 'result[44] = 1'); - assert((*result.data.at(46)).into() == 0, 'result[46] = 0'); - assert((*result.data.at(47)).into() == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[2] = 4'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } -} diff --git a/src/tests/tensor_core/onehot/onehot_i8_test.cairo b/src/tests/tensor_core/onehot/onehot_i8_test.cairo deleted file mode 100644 index 30ab6600d..000000000 --- a/src/tests/tensor_core/onehot/onehot_i8_test.cairo +++ /dev/null @@ -1,148 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // -use orion::numbers::fixed_point::core::FixedTrait; - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - use orion::numbers::fixed_point::core::{FixedTrait}; - use orion::numbers::fixed_point::implementations::fp16x16::core::{ - FP16x16Impl, FP16x16PartialEq - }; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; - use orion::tests::helpers::tensor::fixed_point::fp16x16::{ - fp_tensor_1x3_helper, fp_tensor_2x2_helper, fp_tensor_3x2x2_neg_helper, - fp_tensor_1x3_neg_helper, fp_tensor_2x2x2_helper - }; - use orion::operators::tensor::core::TensorTrait; - use debug::PrintTrait; - use core::clone::Clone; - use core::option::OptionTrait; - use serde::Serde; - - - use orion::operators::tensor::implementations::tensor_i8_fp16x16::Tensor_i8_fp16x16; - - // use orion::numbers::fixed_point::implementations::fp16x16::core::FP16x16Impl; - // use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; - use orion::operators::tensor::core::{Tensor}; - - - use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; - - - // 1D - fn i8_tensor_1x3_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 2, sign: false }); - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - return tensor; - } - - fn i8_tensor_1x3_neg_helper() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - let mut data = ArrayTrait::new(); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 2, sign: true }); - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - return tensor; - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(1, false), 'result[4] = 1'); - assert((*result.data.at(5)) == IntegerTrait::new(0, false), 'result[5] = 0'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(0, false), 'result[7] = 0'); - assert((*result.data.at(8)) == IntegerTrait::new(1, false), 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_neg_last_axis() { - let tensor = i8_tensor_1x3_neg_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(0, false), 'result[4] = 0'); - assert((*result.data.at(5)) == IntegerTrait::new(1, false), 'result[5] = 1'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(1, false), 'result[7] = 1'); - assert((*result.data.at(8)) == IntegerTrait::new(0, false), 'result[8] = 0'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = i8_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data.at(0)) == IntegerTrait::new(1, false), 'result[0] = 1'); - assert((*result.data.at(1)) == IntegerTrait::new(0, false), 'result[1] = 0'); - assert((*result.data.at(2)) == IntegerTrait::new(0, false), 'result[2] = 0'); - assert((*result.data.at(3)) == IntegerTrait::new(0, false), 'result[3] = 0'); - assert((*result.data.at(4)) == IntegerTrait::new(1, false), 'result[4] = 1'); - assert((*result.data.at(5)) == IntegerTrait::new(0, false), 'result[5] = 0'); - assert((*result.data.at(6)) == IntegerTrait::new(0, false), 'result[6] = 0'); - assert((*result.data.at(7)) == IntegerTrait::new(0, false), 'result[7] = 0'); - assert((*result.data.at(8)) == IntegerTrait::new(1, false), 'result[8] = 1'); - } -} diff --git a/src/tests/tensor_core/onehot/onehot_u32_test.cairo b/src/tests/tensor_core/onehot/onehot_u32_test.cairo deleted file mode 100644 index 5d412a6bb..000000000 --- a/src/tests/tensor_core/onehot/onehot_u32_test.cairo +++ /dev/null @@ -1,444 +0,0 @@ -use core::serde::Serde; -use core::option::OptionTrait; -use core::clone::Clone; -// ===== 1D ===== // - -#[cfg(test)] -mod tensor_1D { - use array::{ArrayTrait, SpanTrait}; - use core::traits::Into; - - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; - use orion::operators::tensor::core::{TensorTrait, Tensor}; - use orion::tests::helpers::tensor::u32::{u32_tensor_1x3_helper, u32_tensor_2x2_helper}; - - - fn u32_tensor_3x2x2_new() -> Tensor { - let mut sizes = ArrayTrait::new(); - sizes.append(3); - sizes.append(2); - sizes.append(2); - - let mut data = ArrayTrait::new(); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - data.append(0); - data.append(1); - data.append(2); - data.append(3); - - - - let tensor = TensorTrait::::new(sizes.span(), data.span()); - - return tensor; - } - - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_last_axis() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_1x3_fail() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_Zero_axis() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn tensor_onehot_1x3_axis_one() { - let tensor = u32_tensor_1x3_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 3; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 1, 'result[4] = 1'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 1, 'result[8] = 1'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_last_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_2x2_fail() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_first_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_2x2_helper_second_axis() { - let tensor = u32_tensor_2x2_helper(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 1, 'result[3] = 1'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 0, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 1, 'result[12] = 1'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - - assert((*result.shape.at(0)) == 2, 'shape[0] = 2'); - assert((*result.shape.at(1)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_last_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::None(()); - // let axis: Option = Option::Some(3); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[21]) == 1, 'result[21] = 1'); - assert((*result.data[26]) == 1, 'result[26] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[37]) == 1, 'result[37] = 1'); - assert((*result.data[42]) == 1, 'result[42] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 2'); - assert((*result.shape.at(3)) == 4, 'shape[0] = 4'); - } - - #[test] - #[should_panic] - #[available_gas(20000000)] - fn tensor_onehot_tensor_3x2x2_fail() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(4); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_first_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(2); - values.append(5); - let depth = 4; - let axis: Option = Option::Some(0); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 5, 'result[0] = 5'); - assert((*result.data[1]) == 2, 'result[1] = 2'); - assert((*result.data[2]) == 2, 'result[2] = 2'); - assert((*result.data[3]) == 2, 'result[3] = 2'); - assert((*result.data[4]) == 5, 'result[4] = 5'); - assert((*result.data[5]) == 2, 'result[5] = 2'); - assert((*result.data[6]) == 2, 'result[6] = 2'); - assert((*result.data[7]) == 2, 'result[7] = 2'); - assert((*result.data[8]) == 5, 'result[8] = 5'); - assert((*result.data[9]) == 2, 'result[9] = 2'); - assert((*result.data[10]) == 2, 'result[10] = 2'); - assert((*result.data[11]) == 2, 'result[11] = 2'); - assert((*result.data[12]) == 2, 'result[12] = 2'); - assert((*result.data[13]) == 5, 'result[13] = 5'); - assert((*result.data[14]) == 2, 'result[14] = 2'); - assert((*result.data[17]) == 5, 'result[17] = 5'); - assert((*result.data[21]) == 5, 'result[21] = 5'); - assert((*result.data[26]) == 5, 'result[26] = 5'); - assert((*result.data[30]) == 5, 'result[30] = 5'); - assert((*result.data[34]) == 5, 'result[34] = 5'); - assert((*result.data[39]) == 5, 'result[39] = 5'); - assert((*result.data[43]) == 5, 'result[43] = 5'); - assert((*result.data[46]) == 2, 'result[46] = 2'); - assert((*result.data[47]) == 5, 'result[47] = 5'); - - assert((*result.shape.at(0)) == 4, 'shape[0] = 4'); - assert((*result.shape.at(1)) == 3, 'shape[1] = 3'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_second_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(1); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 0, 'result[3] = 0'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 1, 'result[5] = 1'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[7]) == 0, 'result[7] = 0'); - assert((*result.data[8]) == 0, 'result[8] = 0'); - assert((*result.data[9]) == 0, 'result[9] = 0'); - assert((*result.data[10]) == 1, 'result[10] = 1'); - assert((*result.data[11]) == 0, 'result[11] = 0'); - assert((*result.data[12]) == 0, 'result[12] = 0'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[21]) == 1, 'result[21] = 1'); - assert((*result.data[26]) == 1, 'result[26] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[37]) == 1, 'result[37] = 1'); - assert((*result.data[42]) == 1, 'result[42] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 4, 'shape[1] = 4'); - assert((*result.shape.at(2)) == 2, 'shape[2] = 3'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } - - #[test] - #[available_gas(20000000)] - fn fp_tensor_onehot_3x2x2_new_third_axis() { - let tensor = u32_tensor_3x2x2_new(); - - let mut values = ArrayTrait::new(); - values.append(0); - values.append(1); - let depth = 4; - let axis: Option = Option::Some(2); - - let result = tensor.onehot(depth: depth, axis: axis, values: values.span()); - - assert((*result.data[0]) == 1, 'result[0] = 1'); - assert((*result.data[1]) == 0, 'result[1] = 0'); - assert((*result.data[2]) == 0, 'result[2] = 0'); - assert((*result.data[3]) == 1, 'result[3] = 1'); - assert((*result.data[4]) == 0, 'result[4] = 0'); - assert((*result.data[5]) == 0, 'result[5] = 0'); - assert((*result.data[6]) == 0, 'result[6] = 0'); - assert((*result.data[12]) == 1, 'result[12] = 1'); - assert((*result.data[13]) == 0, 'result[13] = 0'); - assert((*result.data[14]) == 0, 'result[14] = 0'); - assert((*result.data[15]) == 1, 'result[15] = 1'); - assert((*result.data[16]) == 1, 'result[16] = 1'); - assert((*result.data[19]) == 1, 'result[19] = 1'); - assert((*result.data[21]) == 0, 'result[21] = 0'); - assert((*result.data[26]) == 0, 'result[26] = 0'); - assert((*result.data[28]) == 1, 'result[28] = 1'); - assert((*result.data[31]) == 1, 'result[31] = 1'); - assert((*result.data[32]) == 1, 'result[32] = 1'); - assert((*result.data[35]) == 1, 'result[35] = 1'); - assert((*result.data[37]) == 0, 'result[37] = 0'); - assert((*result.data[44]) == 1, 'result[44] = 1'); - assert((*result.data[46]) == 0, 'result[46] = 0'); - assert((*result.data[47]) == 1, 'result[47] = 1'); - - assert((*result.shape.at(0)) == 3, 'shape[0] = 3'); - assert((*result.shape.at(1)) == 2, 'shape[1] = 2'); - assert((*result.shape.at(2)) == 4, 'shape[2] = 4'); - assert((*result.shape.at(3)) == 2, 'shape[0] = 2'); - } -} diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo index e17084489..bc6883d98 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp16x16_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp16x16::Tensor_fp16x16; + use orion::operators::tensor::implementations::tensor_fp16x16::FP16x16Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp16x16::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo index 3f3d6cd84..627644122 100644 --- a/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo +++ b/src/tests/tensor_core/stride/stride_fp_test/stride_fp8x23_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_fp8x23::Tensor_fp8x23; + use orion::operators::tensor::implementations::tensor_fp8x23::FP8x23Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::fixed_point::fp8x23::fp_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_i32_test.cairo b/src/tests/tensor_core/stride/stride_i32_test.cairo index ff59feddc..280dad79e 100644 --- a/src/tests/tensor_core/stride/stride_i32_test.cairo +++ b/src/tests/tensor_core/stride/stride_i32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_i32_fp16x16::Tensor_i32_fp16x16; + use orion::operators::tensor::I32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::i32::i32_tensor_2x2x2_helper; diff --git a/src/tests/tensor_core/stride/stride_u32_test.cairo b/src/tests/tensor_core/stride/stride_u32_test.cairo index 0d3cf39e8..01a4d1ada 100644 --- a/src/tests/tensor_core/stride/stride_u32_test.cairo +++ b/src/tests/tensor_core/stride/stride_u32_test.cairo @@ -5,7 +5,7 @@ mod tensor_1D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_1x3_helper; @@ -27,7 +27,7 @@ mod tensor_2D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2_helper; @@ -50,7 +50,7 @@ mod tensor_3D { use array::ArrayTrait; use array::SpanTrait; - use orion::operators::tensor::implementations::tensor_u32_fp16x16::Tensor_u32_fp16x16; + use orion::operators::tensor::U32Tensor; use orion::operators::tensor::core::{TensorTrait}; use orion::tests::helpers::tensor::u32::u32_tensor_2x2x2_helper; From 38fc16a6ff154da30d997fe23f78c27fbb18b8a3 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:00:39 +0300 Subject: [PATCH 161/179] implement tensor fp64x64 --- src/numbers.cairo | 96 +++++ src/numbers/signed_integer/i8.cairo | 12 + src/operators/tensor/implementations.cairo | 1 + .../implementations/tensor_fp64x64.cairo | 344 ++++++++++++++++++ 4 files changed, 453 insertions(+) create mode 100644 src/operators/tensor/implementations/tensor_fp64x64.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index b52fd57ef..cb47fcb63 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -379,6 +379,102 @@ impl FP64x64Number of NumberTrait { FP64x64Impl::new(mag, sign) } + fn new_unscaled(mag: u128, sign: bool) -> FP64x64 { + FP64x64Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP64x64 { + FP64x64Impl::from_felt(val) + } + + fn ceil(self: FP64x64) -> FP64x64 { + FP64x64Impl::ceil(self) + } + + fn exp(self: FP64x64) -> FP64x64 { + FP64x64Impl::exp(self) + } + + fn exp2(self: FP64x64) -> FP64x64 { + FP64x64Impl::exp2(self) + } + + fn floor(self: FP64x64) -> FP64x64 { + FP64x64Impl::floor(self) + } + + fn ln(self: FP64x64) -> FP64x64 { + FP64x64Impl::ln(self) + } + + fn log2(self: FP64x64) -> FP64x64 { + FP64x64Impl::log2(self) + } + + fn log10(self: FP64x64) -> FP64x64 { + FP64x64Impl::log10(self) + } + + fn pow(self: FP64x64, b: FP64x64) -> FP64x64 { + FP64x64Impl::pow(self, b) + } + + fn round(self: FP64x64) -> FP64x64 { + FP64x64Impl::round(self) + } + + fn sqrt(self: FP64x64) -> FP64x64 { + FP64x64Impl::sqrt(self) + } + + fn acos(self: FP64x64) -> FP64x64 { + FP64x64Impl::acos(self) + } + + fn asin(self: FP64x64) -> FP64x64 { + FP64x64Impl::asin(self) + } + + fn atan(self: FP64x64) -> FP64x64 { + FP64x64Impl::atan(self) + } + + fn cos(self: FP64x64) -> FP64x64 { + FP64x64Impl::cos(self) + } + + fn sin(self: FP64x64) -> FP64x64 { + FP64x64Impl::sin(self) + } + + fn tan(self: FP64x64) -> FP64x64 { + FP64x64Impl::tan(self) + } + + fn acosh(self: FP64x64) -> FP64x64 { + FP64x64Impl::acosh(self) + } + + fn asinh(self: FP64x64) -> FP64x64 { + FP64x64Impl::asinh(self) + } + + fn atanh(self: FP64x64) -> FP64x64 { + FP64x64Impl::atanh(self) + } + + fn cosh(self: FP64x64) -> FP64x64 { + FP64x64Impl::cosh(self) + } + + fn sinh(self: FP64x64) -> FP64x64 { + FP64x64Impl::sinh(self) + } + + fn tanh(self: FP64x64) -> FP64x64 { + FP64x64Impl::tanh(self) + } + fn zero() -> FP64x64 { FP64x64Impl::ZERO() } diff --git a/src/numbers/signed_integer/i8.cairo b/src/numbers/signed_integer/i8.cairo index 3c5fc83e4..38315045d 100644 --- a/src/numbers/signed_integer/i8.cairo +++ b/src/numbers/signed_integer/i8.cairo @@ -4,6 +4,7 @@ use orion::numbers::signed_integer::integer_trait::IntegerTrait; use orion::numbers::signed_integer::i32::i32; use orion::numbers::fixed_point::implementations::fp8x23::core::{ONE as ONE_fp8x23, FP8x23}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ONE as ONE_fp16x16, FP16x16}; +use orion::numbers::fixed_point::implementations::fp64x64::core::{ONE as ONE_fp64x64, FP64x64}; use orion::numbers::fixed_point::core::FixedTrait; // ====================== INT 8 ====================== @@ -183,6 +184,13 @@ impl I8IntoFP16x16 of Into { } } +// Implements the Into trait for i8 to fp_64x64. +impl I8IntoFP64x64 of Into { + fn into(self: i8) -> FP64x64 { + i8_to_fp64x64(self) + } +} + // Checks if the given i8 integer is zero and has the correct sign. // # Arguments // * `x` - The i8 integer to check. @@ -503,6 +511,10 @@ fn i8_to_fp16x16(x: i8) -> FP16x16 { FP16x16 { mag: x.mag.into() * ONE_fp16x16, sign: x.sign } } +fn i8_to_fp64x64(x: i8) -> FP64x64 { + FP64x64 { mag: x.mag.into() * ONE_fp64x64, sign: x.sign } +} + fn ensure_non_negative_zero(mag: u8, sign: bool) -> i8 { if mag == 0 { IntegerTrait::::new(mag, false) diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index cee4bc7ac..535961523 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -3,3 +3,4 @@ mod tensor_i8; mod tensor_i32; mod tensor_fp8x23; mod tensor_fp16x16; +mod tensor_fp64x64; \ No newline at end of file diff --git a/src/operators/tensor/implementations/tensor_fp64x64.cairo b/src/operators/tensor/implementations/tensor_fp64x64.cairo new file mode 100644 index 000000000..52cadb502 --- /dev/null +++ b/src/operators/tensor/implementations/tensor_fp64x64.cairo @@ -0,0 +1,344 @@ +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::{TryInto, Into}; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, +}; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait, FP64x64, FP64x64Impl}; +use orion::numbers::fixed_point::implementations::fp64x64::core::ONE; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; + +impl FP64x64Tensor of TensorTrait { + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) + } + + fn at(self: @Tensor, indices: Span) -> FP64x64 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> FP64x64 { + math::min::min_in_tensor::(*self.data) + } + + fn max(self: @Tensor) -> FP64x64 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + math::ceil::ceil(*self) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos(*self) + } + + fn asin(self: @Tensor) -> Tensor { + math::asin::asin(*self) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sinh::sinh(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + + fn acos(self: @Tensor) -> Tensor { + math::acos::acos(*self) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) + ) + } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl FP64x64TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl FP64x64TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl FP64x64TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl FP64x64TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl FP64x64TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + +impl U32TryIntoU128 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self.into()) + } +} + +impl FP64x64TryIntoI8 of TryInto { + fn try_into(self: FP64x64) -> Option { + Option::Some(i8 { mag: (self.mag / ONE).try_into().unwrap(), sign: self.sign }) + } +} + +impl TensorI8IntoTensorFP64x64 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp64x64(@self) + } +} + + +// Internals + +const PRECISION: u128 = 75497; // 0.009 + +fn relative_eq(lhs: @FP64x64, rhs: @FP64x64) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + }; + + return is_eq; +} + +fn tensor_i8_to_tensor_fp64x64(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} From 79f8766536f0a25fea50294c6a0a9744338270cf Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:11:07 +0300 Subject: [PATCH 162/179] impl fp32x32 --- src/numbers.cairo | 162 ++++++++ src/numbers/fixed_point/implementations.cairo | 3 +- .../fixed_point/implementations/fp32x32.cairo | 2 + .../implementations/fp32x32/comp.cairo | 19 + .../implementations/fp32x32/core.cairo | 354 ++++++++++++++++++ 5 files changed, 539 insertions(+), 1 deletion(-) create mode 100644 src/numbers/fixed_point/implementations/fp32x32.cairo create mode 100644 src/numbers/fixed_point/implementations/fp32x32/comp.cairo create mode 100644 src/numbers/fixed_point/implementations/fp32x32/core.cairo diff --git a/src/numbers.cairo b/src/numbers.cairo index cb47fcb63..b8fc69cb8 100644 --- a/src/numbers.cairo +++ b/src/numbers.cairo @@ -531,6 +531,168 @@ impl FP64x64Number of NumberTrait { } } +use orion::numbers::fixed_point::implementations::fp32x32::core::{FP32x32Impl, FP32x32}; +use orion::numbers::fixed_point::implementations::fp32x32::core as core_fp32x32; +use orion::numbers::fixed_point::implementations::fp32x32::comp as comp_fp32x32; +use cubit::f64 as fp32x32; + +impl FP32x32Number of NumberTrait { + fn new(mag: u64, sign: bool) -> FP32x32 { + FP32x32Impl::new(mag, sign) + } + + fn new_unscaled(mag: u64, sign: bool) -> FP32x32 { + FP32x32Impl::new_unscaled(mag, sign) + } + + fn from_felt(val: felt252) -> FP32x32 { + FP32x32Impl::from_felt(val) + } + + fn ceil(self: FP32x32) -> FP32x32 { + FP32x32Impl::ceil(self) + } + + fn exp(self: FP32x32) -> FP32x32 { + FP32x32Impl::exp(self) + } + + fn exp2(self: FP32x32) -> FP32x32 { + FP32x32Impl::exp2(self) + } + + fn floor(self: FP32x32) -> FP32x32 { + FP32x32Impl::floor(self) + } + + fn ln(self: FP32x32) -> FP32x32 { + FP32x32Impl::ln(self) + } + + fn log2(self: FP32x32) -> FP32x32 { + FP32x32Impl::log2(self) + } + + fn log10(self: FP32x32) -> FP32x32 { + FP32x32Impl::log10(self) + } + + fn pow(self: FP32x32, b: FP32x32) -> FP32x32 { + FP32x32Impl::pow(self, b) + } + + fn round(self: FP32x32) -> FP32x32 { + FP32x32Impl::round(self) + } + + fn sqrt(self: FP32x32) -> FP32x32 { + FP32x32Impl::sqrt(self) + } + + fn acos(self: FP32x32) -> FP32x32 { + FP32x32Impl::acos(self) + } + + fn asin(self: FP32x32) -> FP32x32 { + FP32x32Impl::asin(self) + } + + fn atan(self: FP32x32) -> FP32x32 { + FP32x32Impl::atan(self) + } + + fn cos(self: FP32x32) -> FP32x32 { + FP32x32Impl::cos(self) + } + + fn sin(self: FP32x32) -> FP32x32 { + FP32x32Impl::sin(self) + } + + fn tan(self: FP32x32) -> FP32x32 { + FP32x32Impl::tan(self) + } + + fn acosh(self: FP32x32) -> FP32x32 { + FP32x32Impl::acosh(self) + } + + fn asinh(self: FP32x32) -> FP32x32 { + FP32x32Impl::asinh(self) + } + + fn atanh(self: FP32x32) -> FP32x32 { + FP32x32Impl::atanh(self) + } + + fn cosh(self: FP32x32) -> FP32x32 { + FP32x32Impl::cosh(self) + } + + fn sinh(self: FP32x32) -> FP32x32 { + FP32x32Impl::sinh(self) + } + + fn tanh(self: FP32x32) -> FP32x32 { + FP32x32Impl::tanh(self) + } + + fn zero() -> FP32x32 { + FP32x32Impl::ZERO() + } + fn is_zero(self: FP32x32) -> bool { + fp32x32::core::eq(@self, @FP32x32Impl::ZERO()) + } + + fn one() -> FP32x32 { + FP32x32Impl::ONE() + } + + fn neg_one() -> FP32x32 { + FP32x32 { mag: core_fp32x32::ONE, sign: true } + } + + fn is_one(self: FP32x32) -> bool { + core_fp32x32::eq(@self, @FP32x32Impl::ONE()) + } + + fn abs(self: FP32x32) -> FP32x32 { + fp32x32::core::abs(self) + } + + fn min_value() -> FP32x32 { + FP32x32 { mag: core_fp32x32::MAX, sign: true } + } + + fn max_value() -> FP32x32 { + FP32x32 { mag: core_fp32x32::MAX, sign: false } + } + + fn min(self: FP32x32, other: FP32x32) -> FP32x32 { + fp32x32::comp::min(self, other) + } + + fn max(self: FP32x32, other: FP32x32) -> FP32x32 { + fp32x32::comp::max(self, other) + } + + fn mag(self: FP32x32) -> u64 { + self.mag + } + + fn is_neg(self: FP32x32) -> bool { + self.sign + } + + fn xor(lhs: FP32x32, rhs: FP32x32) -> bool { + comp_fp32x32::xor(lhs, rhs) + } + + fn or(lhs: FP32x32, rhs: FP32x32) -> bool { + comp_fp32x32::or(lhs, rhs) + } +} + use orion::numbers::signed_integer::i8 as i8_core; use orion::numbers::signed_integer::i8::i8; diff --git a/src/numbers/fixed_point/implementations.cairo b/src/numbers/fixed_point/implementations.cairo index b4ab5140c..033abaa1d 100644 --- a/src/numbers/fixed_point/implementations.cairo +++ b/src/numbers/fixed_point/implementations.cairo @@ -1,3 +1,4 @@ mod fp8x23; mod fp16x16; -mod fp64x64; \ No newline at end of file +mod fp64x64; +mod fp32x32; \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp32x32.cairo b/src/numbers/fixed_point/implementations/fp32x32.cairo new file mode 100644 index 000000000..6e1271f5b --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp32x32.cairo @@ -0,0 +1,2 @@ +mod core; +mod comp; \ No newline at end of file diff --git a/src/numbers/fixed_point/implementations/fp32x32/comp.cairo b/src/numbers/fixed_point/implementations/fp32x32/comp.cairo new file mode 100644 index 000000000..60cae2ab3 --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp32x32/comp.cairo @@ -0,0 +1,19 @@ +use orion::numbers::{FP32x32, FixedTrait}; +use orion::numbers::FP32x32Impl; + +fn xor(a: FP32x32, b: FP32x32) -> bool { + if (a == FixedTrait::new(0, false) || b == FixedTrait::new(0, false)) && (a != b) { + return true; + } else { + return false; + } +} + +fn or(a: FP32x32, b: FP32x32) -> bool { + let zero = FixedTrait::new(0, false); + if a == zero && b == zero { + return false; + } else { + return true; + } +} diff --git a/src/numbers/fixed_point/implementations/fp32x32/core.cairo b/src/numbers/fixed_point/implementations/fp32x32/core.cairo new file mode 100644 index 000000000..7225bc498 --- /dev/null +++ b/src/numbers/fixed_point/implementations/fp32x32/core.cairo @@ -0,0 +1,354 @@ +use debug::PrintTrait; + +use option::OptionTrait; +use result::{ResultTrait, ResultTraitImpl}; +use traits::{TryInto, Into}; + +use cubit::f64 as fp32x32; +use cubit::f64::Fixed as FP32x32; +use cubit::f64::ONE; +use cubit::f64::types::fixed; + +use orion::numbers::fixed_point::core::{FixedTrait}; +use orion::numbers::fixed_point::utils; +use orion::numbers::{i32, i8}; + +const MAX: u64 = 9223372036854775808; + +impl FP32x32Impl of FixedTrait { + fn ZERO() -> FP32x32 { + return FP32x32 { mag: 0, sign: false }; + } + + fn ONE() -> FP32x32 { + return FP32x32 { mag: ONE, sign: false }; + } + + fn new(mag: u64, sign: bool) -> FP32x32 { + return FP32x32 { mag: mag, sign: sign }; + } + + fn new_unscaled(mag: u64, sign: bool) -> FP32x32 { + return FP32x32 { mag: mag * ONE, sign: sign }; + } + + fn from_felt(val: felt252) -> FP32x32 { + let mag = integer::u64_try_from_felt252(utils::felt_abs(val)).unwrap(); + return FixedTrait::new(mag, utils::felt_sign(val)); + } + + fn abs(self: FP32x32) -> FP32x32 { + return fp32x32::core::abs(self); + } + + fn acos(self: FP32x32) -> FP32x32 { + return fp32x32::trig::acos_fast(self); + } + + fn acos_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::acos_fast(self); + } + + fn acosh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::acosh(self); + } + + fn asin(self: FP32x32) -> FP32x32 { + return fp32x32::trig::asin_fast(self); + } + + fn asin_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::asin_fast(self); + } + + fn asinh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::asinh(self); + } + + fn atan(self: FP32x32) -> FP32x32 { + return fp32x32::trig::atan_fast(self); + } + + fn atan_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::atan_fast(self); + } + + fn atanh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::atanh(self); + } + + fn ceil(self: FP32x32) -> FP32x32 { + return fp32x32::core::ceil(self); + } + + fn cos(self: FP32x32) -> FP32x32 { + return fp32x32::trig::cos_fast(self); + } + + fn cos_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::cos_fast(self); + } + + fn cosh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::cosh(self); + } + + fn floor(self: FP32x32) -> FP32x32 { + return fp32x32::core::floor(self); + } + + // Calculates the natural exponent of x: e^x + fn exp(self: FP32x32) -> FP32x32 { + return fp32x32::core::exp(self); + } + + // Calculates the binary exponent of x: 2^x + fn exp2(self: FP32x32) -> FP32x32 { + return fp32x32::core::exp2(self); + } + + // Calculates the natural logarithm of x: ln(x) + // self must be greater than zero + fn ln(self: FP32x32) -> FP32x32 { + return fp32x32::core::ln(self); + } + + // Calculates the binary logarithm of x: log2(x) + // self must be greather than zero + fn log2(self: FP32x32) -> FP32x32 { + return fp32x32::core::log2(self); + } + + // Calculates the base 10 log of x: log10(x) + // self must be greater than zero + fn log10(self: FP32x32) -> FP32x32 { + return fp32x32::core::log10(self); + } + + // Calclates the value of x^y and checks for overflow before returning + // self is a fixed point value + // b is a fixed point value + fn pow(self: FP32x32, b: FP32x32) -> FP32x32 { + return fp32x32::core::pow(self, b); + } + + fn round(self: FP32x32) -> FP32x32 { + return fp32x32::core::round(self); + } + + fn sin(self: FP32x32) -> FP32x32 { + return fp32x32::trig::sin_fast(self); + } + + fn sin_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::sin_fast(self); + } + + fn sinh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::sinh(self); + } + + // Calculates the square root of a fixed point value + // x must be positive + fn sqrt(self: FP32x32) -> FP32x32 { + return fp32x32::core::sqrt(self); + } + + fn tan(self: FP32x32) -> FP32x32 { + return fp32x32::trig::tan_fast(self); + } + + fn tan_fast(self: FP32x32) -> FP32x32 { + return fp32x32::trig::tan_fast(self); + } + + fn tanh(self: FP32x32) -> FP32x32 { + return fp32x32::hyp::tanh(self); + } +} + + +impl FP32x32Print of PrintTrait { + fn print(self: FP32x32) { + self.sign.print(); + self.mag.print(); + } +} + +// Into a raw felt without unscaling +impl FP32x32IntoFelt252 of Into { + fn into(self: FP32x32) -> felt252 { + let mag_felt = self.mag.into(); + + if self.sign { + return mag_felt * -1; + } else { + return mag_felt * 1; + } + } +} + +impl FP32x32TryIntoU64 of TryInto { + fn try_into(self: FP32x32) -> Option { + if self.sign { + return Option::None(()); + } else { + // Unscale the magnitude and round down + return Option::Some((self.mag / ONE).into()); + } + } +} + +impl FP32x32TryIntoU16 of TryInto { + fn try_into(self: FP32x32) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP32x32TryIntoU32 of TryInto { + fn try_into(self: FP32x32) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP32x32TryIntoU8 of TryInto { + fn try_into(self: FP32x32) -> Option { + if self.sign { + Option::None(()) + } else { + // Unscale the magnitude and round down + return (self.mag / ONE).try_into(); + } + } +} + +impl FP32x32TryIntoI8 of TryInto { + fn try_into(self: FP32x32) -> Option { + _i8_try_from_fp(self) + } +} + +impl FP32x32PartialEq of PartialEq { + #[inline(always)] + fn eq(lhs: @FP32x32, rhs: @FP32x32) -> bool { + return fp32x32::core::eq(lhs, rhs); + } + + #[inline(always)] + fn ne(lhs: @FP32x32, rhs: @FP32x32) -> bool { + return fp32x32::core::ne(lhs, rhs); + } +} + +impl FP32x32Add of Add { + fn add(lhs: FP32x32, rhs: FP32x32) -> FP32x32 { + return fp32x32::core::add(lhs, rhs); + } +} + +impl FP32x32AddEq of AddEq { + #[inline(always)] + fn add_eq(ref self: FP32x32, other: FP32x32) { + self = fp32x32::core::add(self, other); + } +} + +impl FP32x32Sub of Sub { + fn sub(lhs: FP32x32, rhs: FP32x32) -> FP32x32 { + return fp32x32::core::sub(lhs, rhs); + } +} + +impl FP32x32SubEq of SubEq { + #[inline(always)] + fn sub_eq(ref self: FP32x32, other: FP32x32) { + self = fp32x32::core::sub(self, other); + } +} + +impl FP32x32Mul of Mul { + fn mul(lhs: FP32x32, rhs: FP32x32) -> FP32x32 { + return fp32x32::core::mul(lhs, rhs); + } +} + +impl FP32x32MulEq of MulEq { + #[inline(always)] + fn mul_eq(ref self: FP32x32, other: FP32x32) { + self = fp32x32::core::mul(self, other); + } +} + +impl FP32x32Div of Div { + fn div(lhs: FP32x32, rhs: FP32x32) -> FP32x32 { + return fp32x32::core::div(lhs, rhs); + } +} + +impl FP32x32DivEq of DivEq { + #[inline(always)] + fn div_eq(ref self: FP32x32, other: FP32x32) { + self = fp32x32::core::div(self, other); + } +} + +impl FP32x32PartialOrd of PartialOrd { + #[inline(always)] + fn ge(lhs: FP32x32, rhs: FP32x32) -> bool { + return fp32x32::core::ge(lhs, rhs); + } + + #[inline(always)] + fn gt(lhs: FP32x32, rhs: FP32x32) -> bool { + return fp32x32::core::gt(lhs, rhs); + } + + #[inline(always)] + fn le(lhs: FP32x32, rhs: FP32x32) -> bool { + return fp32x32::core::le(lhs, rhs); + } + + #[inline(always)] + fn lt(lhs: FP32x32, rhs: FP32x32) -> bool { + return fp32x32::core::lt(lhs, rhs); + } +} + +impl FP32x32Neg of Neg { + #[inline(always)] + fn neg(a: FP32x32) -> FP32x32 { + return fp32x32::core::neg(a); + } +} + +impl FP32x32Rem of Rem { + #[inline(always)] + fn rem(lhs: FP32x32, rhs: FP32x32) -> FP32x32 { + return fp32x32::core::rem(lhs, rhs); + } +} + +fn eq(a: @FP32x32, b: @FP32x32) -> bool { + return (*a.mag == *b.mag) && (*a.sign == *b.sign); +} + +/// INTERNAL + +fn _i8_try_from_fp(x: FP32x32) -> Option { + let unscaled_mag: Option = (x.mag / ONE).try_into(); + + match unscaled_mag { + Option::Some(val) => Option::Some(i8 { mag: unscaled_mag.unwrap(), sign: x.sign }), + Option::None(_) => Option::None(()) + } +} From a2d2c5f62fb8c0802c8cafd55f5d5b9010d8e767 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:14:36 +0300 Subject: [PATCH 163/179] impl fp32x32 tensor --- src/numbers/signed_integer/i8.cairo | 12 + src/operators/tensor/implementations.cairo | 3 +- .../implementations/tensor_fp32x32.cairo | 344 ++++++++++++++++++ 3 files changed, 358 insertions(+), 1 deletion(-) create mode 100644 src/operators/tensor/implementations/tensor_fp32x32.cairo diff --git a/src/numbers/signed_integer/i8.cairo b/src/numbers/signed_integer/i8.cairo index 38315045d..21ff97219 100644 --- a/src/numbers/signed_integer/i8.cairo +++ b/src/numbers/signed_integer/i8.cairo @@ -5,6 +5,7 @@ use orion::numbers::signed_integer::i32::i32; use orion::numbers::fixed_point::implementations::fp8x23::core::{ONE as ONE_fp8x23, FP8x23}; use orion::numbers::fixed_point::implementations::fp16x16::core::{ONE as ONE_fp16x16, FP16x16}; use orion::numbers::fixed_point::implementations::fp64x64::core::{ONE as ONE_fp64x64, FP64x64}; +use orion::numbers::fixed_point::implementations::fp32x32::core::{ONE as ONE_fp32x32, FP32x32}; use orion::numbers::fixed_point::core::FixedTrait; // ====================== INT 8 ====================== @@ -191,6 +192,13 @@ impl I8IntoFP64x64 of Into { } } +// Implements the Into trait for i8 to fp_32x32. +impl I8IntoFP32x32 of Into { + fn into(self: i8) -> FP32x32 { + i8_to_fp32x32(self) + } +} + // Checks if the given i8 integer is zero and has the correct sign. // # Arguments // * `x` - The i8 integer to check. @@ -515,6 +523,10 @@ fn i8_to_fp64x64(x: i8) -> FP64x64 { FP64x64 { mag: x.mag.into() * ONE_fp64x64, sign: x.sign } } +fn i8_to_fp32x32(x: i8) -> FP32x32 { + FP32x32 { mag: x.mag.into() * ONE_fp32x32, sign: x.sign } +} + fn ensure_non_negative_zero(mag: u8, sign: bool) -> i8 { if mag == 0 { IntegerTrait::::new(mag, false) diff --git a/src/operators/tensor/implementations.cairo b/src/operators/tensor/implementations.cairo index 535961523..16b4be916 100644 --- a/src/operators/tensor/implementations.cairo +++ b/src/operators/tensor/implementations.cairo @@ -3,4 +3,5 @@ mod tensor_i8; mod tensor_i32; mod tensor_fp8x23; mod tensor_fp16x16; -mod tensor_fp64x64; \ No newline at end of file +mod tensor_fp64x64; +mod tensor_fp32x32; \ No newline at end of file diff --git a/src/operators/tensor/implementations/tensor_fp32x32.cairo b/src/operators/tensor/implementations/tensor_fp32x32.cairo new file mode 100644 index 000000000..8ccd6ebd7 --- /dev/null +++ b/src/operators/tensor/implementations/tensor_fp32x32.cairo @@ -0,0 +1,344 @@ +use array::ArrayTrait; +use array::SpanTrait; +use option::OptionTrait; +use traits::{TryInto, Into}; + +use orion::numbers::fixed_point::core::FixedTrait; +use orion::operators::tensor::core::{ + new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, +}; +use orion::operators::tensor::{math, linalg, quantization}; +use orion::numbers::{i8, NumberTrait, FP32x32, FP32x32Impl}; +use orion::numbers::fixed_point::implementations::fp32x32::core::ONE; +use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; + +impl FP32x32Tensor of TensorTrait { + fn new(shape: Span, data: Span) -> Tensor { + new_tensor(shape, data) + } + + fn at(self: @Tensor, indices: Span) -> FP32x32 { + *at_tensor(self, indices) + } + + fn min(self: @Tensor) -> FP32x32 { + math::min::min_in_tensor::(*self.data) + } + + fn max(self: @Tensor) -> FP32x32 { + math::max::max_in_tensor(*self.data) + } + + fn stride(self: @Tensor) -> Span { + stride(*self.shape) + } + + fn ravel_index(self: @Tensor, indices: Span) -> usize { + ravel_index(*self.shape, indices) + } + + fn unravel_index(self: @Tensor, index: usize) -> Span { + unravel_index(index, *self.shape) + } + + fn reshape(self: @Tensor, target_shape: Span) -> Tensor { + reshape(self, target_shape) + } + + fn reduce_sum(self: @Tensor, axis: usize, keepdims: bool) -> Tensor { + math::reduce_sum::reduce_sum(self, axis, keepdims) + } + + fn argmax( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmax::argmax(self, axis, keepdims, select_last_index) + } + + fn argmin( + self: @Tensor, axis: usize, keepdims: Option, select_last_index: Option + ) -> Tensor { + math::argmin::argmin(self, axis, keepdims, select_last_index) + } + + fn transpose(self: @Tensor, axes: Span) -> Tensor { + linalg::transpose::transpose(self, axes) + } + + fn matmul(self: @Tensor, other: @Tensor) -> Tensor { + linalg::matmul::matmul(self, other) + } + + fn exp(self: @Tensor) -> Tensor { + math::exp::exp(*self) + } + + fn log(self: @Tensor) -> Tensor { + math::log::log(*self) + } + + fn equal(self: @Tensor, other: @Tensor) -> Tensor { + math::equal::equal(self, other) + } + + fn greater(self: @Tensor, other: @Tensor) -> Tensor { + math::greater::greater(self, other) + } + + fn greater_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::greater_equal::greater_equal(self, other) + } + + fn less(self: @Tensor, other: @Tensor) -> Tensor { + math::less::less(self, other) + } + + fn less_equal(self: @Tensor, other: @Tensor) -> Tensor { + math::less_equal::less_equal(self, other) + } + + fn abs(self: @Tensor) -> Tensor { + math::abs::abs(*self) + } + + fn ceil(self: @Tensor) -> Tensor { + math::ceil::ceil(*self) + } + + fn sin(self: @Tensor) -> Tensor { + math::sin::sin(*self) + } + + fn cos(self: @Tensor) -> Tensor { + math::cos::cos(*self) + } + + fn asin(self: @Tensor) -> Tensor { + math::asin::asin(*self) + } + + fn cumsum( + self: @Tensor, axis: usize, exclusive: Option, reverse: Option + ) -> Tensor { + math::cumsum::cumsum(self, axis, exclusive, reverse) + } + + fn flatten(self: @Tensor, axis: usize) -> Tensor { + math::flatten::flatten(self, axis) + } + + fn sinh(self: @Tensor) -> Tensor { + math::sinh::sinh(*self) + } + + fn tanh(self: @Tensor) -> Tensor { + math::tanh::tanh(*self) + } + + fn cosh(self: @Tensor) -> Tensor { + math::cosh::cosh(*self) + } + + fn acosh(self: @Tensor) -> Tensor { + math::acosh::acosh(*self) + } + + fn asinh(self: @Tensor) -> Tensor { + math::asinh::asinh(*self) + } + + fn atan(self: @Tensor) -> Tensor { + math::atan::atan(*self) + } + + fn xor(self: @Tensor, other: @Tensor) -> Tensor { + math::xor::xor(self, other) + } + + fn or(self: @Tensor, other: @Tensor) -> Tensor { + math::or::or(self, other) + } + + fn acos(self: @Tensor) -> Tensor { + math::acos::acos(*self) + } + + fn onehot( + self: @Tensor, depth: usize, axis: Option, values: Span + ) -> Tensor { + math::onehot::onehot(self, depth, axis, values) + } + + fn sqrt(self: @Tensor) -> Tensor { + math::sqrt::sqrt(*self) + } + + fn concat(tensors: Span>, axis: usize,) -> Tensor { + math::concat::concat(tensors, axis) + } + + fn quantize_linear( + self: @Tensor, y_scale: @Tensor, y_zero_point: @Tensor + ) -> Tensor:: { + quantization::quantize_linear::quantize_linear( + self, + y_scale, + y_zero_point, + NumberTrait::new_unscaled(128, true), + NumberTrait::new_unscaled(127, false) + ) + } + + fn dequantize_linear( + self: @Tensor, x_scale: @Tensor, x_zero_point: @Tensor + ) -> Tensor:: { + quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) + } +} + +/// Implements addition for `Tensor` using the `Add` trait. +impl FP32x32TensorAdd of Add> { + /// Adds two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise addition. + fn add(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::add(@lhs, @rhs) + } +} + +/// Implements subtraction for `Tensor` using the `Sub` trait. +impl FP32x32TensorSub of Sub> { + /// Subtracts two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise subtraction. + fn sub(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::sub(@lhs, @rhs) + } +} + +/// Implements multiplication for `Tensor` using the `Mul` trait. +impl FP32x32TensorMul of Mul> { + /// Multiplies two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise multiplication. + fn mul(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::mul(@lhs, @rhs) + } +} + +/// Implements division for `Tensor` using the `Div` trait. +impl FP32x32TensorDiv of Div> { + /// Divides two `Tensor` instances element-wise. + /// + /// # Arguments + /// * `lhs` - The first tensor. + /// * `rhs` - The second tensor. + /// + /// # Returns + /// * A `Tensor` instance representing the result of the element-wise division. + fn div(lhs: Tensor, rhs: Tensor) -> Tensor { + math::arithmetic::div(@lhs, @rhs) + } +} + +/// Implements partial equal for two `Tensor` using the `PartialEq` trait. +impl FP32x32TensorPartialEq of PartialEq> { + fn eq(lhs: @Tensor, rhs: @Tensor) -> bool { + tensor_eq(*lhs, *rhs) + } + + fn ne(lhs: @Tensor, rhs: @Tensor) -> bool { + !tensor_eq(*lhs, *rhs) + } +} + +impl U32TryIntoU64 of TryInto { + fn try_into(self: u32) -> Option { + Option::Some(self.into()) + } +} + +impl FP32x32TryIntoI8 of TryInto { + fn try_into(self: FP32x32) -> Option { + Option::Some(i8 { mag: (self.mag / ONE).try_into().unwrap(), sign: self.sign }) + } +} + +impl TensorI8IntoTensorFP32x32 of Into, Tensor> { + fn into(self: Tensor) -> Tensor { + tensor_i8_to_tensor_fp32x32(@self) + } +} + + +// Internals + +const PRECISION: u64 = 75497; // 0.009 + +fn relative_eq(lhs: @FP32x32, rhs: @FP32x32) -> bool { + let diff = *lhs - *rhs; + + let rel_diff = if *lhs.mag != 0 { + (diff / *lhs).mag + } else { + diff.mag + }; + + rel_diff <= PRECISION +} + +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { + let mut is_eq = true; + + loop { + if lhs.shape.len() == 0 || !is_eq { + break; + } + + is_eq = lhs.shape.pop_front().unwrap() == rhs.shape.pop_front().unwrap(); + }; + + if !is_eq { + return false; + } + + loop { + if lhs.data.len() == 0 || !is_eq { + break; + } + + is_eq = relative_eq(lhs.data.pop_front().unwrap(), rhs.data.pop_front().unwrap()); + }; + + return is_eq; +} + +fn tensor_i8_to_tensor_fp32x32(x: @Tensor) -> Tensor { + let mut result_data = ArrayTrait::::new(); + let mut data = *x.data; + + loop { + result_data.append((*data.pop_front().unwrap()).into()); + + if data.len() == 0 { + break (); + }; + }; + + return TensorTrait::new(*x.shape, result_data.span()); +} From f17daef2054051cbadf9291d2b62d702982ee1ee Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:16:37 +0300 Subject: [PATCH 164/179] Update CHANGELOG.md --- docs/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3d74d00ea..114efa076 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] - 2023-09-03 + +## Changed +- Add FP64x64 and FP32x32 fixed points (from cubit library). +- Implement Tensor FP64x64 and FP3x32. +- Implement NN FP64x64 and FP3x32. + ## [Unreleased] - 2023-09-01 ## Changed From 977e41361518553c6e6283c957bd1487d5dbaf06 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:19:51 +0300 Subject: [PATCH 165/179] impl FP32x32NN and FP64x64NN --- src/operators/nn/implementations.cairo | 3 +- .../nn/implementations/nn_fp32x32.cairo | 45 +++++++++++++++++++ .../nn/implementations/nn_fp64x64.cairo | 45 +++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 src/operators/nn/implementations/nn_fp32x32.cairo create mode 100644 src/operators/nn/implementations/nn_fp64x64.cairo diff --git a/src/operators/nn/implementations.cairo b/src/operators/nn/implementations.cairo index 4f0b9f719..465f4e596 100644 --- a/src/operators/nn/implementations.cairo +++ b/src/operators/nn/implementations.cairo @@ -3,4 +3,5 @@ mod nn_i32; mod nn_u32; mod nn_fp8x23; mod nn_fp16x16; - +mod nn_fp64x64; +mod nn_fp32x32; \ No newline at end of file diff --git a/src/operators/nn/implementations/nn_fp32x32.cairo b/src/operators/nn/implementations/nn_fp32x32.cairo new file mode 100644 index 000000000..a550caa31 --- /dev/null +++ b/src/operators/nn/implementations/nn_fp32x32.cairo @@ -0,0 +1,45 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp32x32::core::{FP32x32, FP32x32Impl}; +use orion::operators::tensor::implementations::tensor_fp32x32::{ + FP32x32Tensor, FP32x32TensorDiv, FP32x32TensorAdd +}; + +impl FP32x32NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus(*tensor) + } + + fn linear( + inputs: Tensor, weights: Tensor, bias: Tensor + ) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP32x32) -> Tensor { + functional::leaky_relu::leaky_relu(*inputs, alpha) + } +} diff --git a/src/operators/nn/implementations/nn_fp64x64.cairo b/src/operators/nn/implementations/nn_fp64x64.cairo new file mode 100644 index 000000000..bcd4be5db --- /dev/null +++ b/src/operators/nn/implementations/nn_fp64x64.cairo @@ -0,0 +1,45 @@ +use core::option::OptionTrait; + +use orion::operators::tensor::core::Tensor; +use orion::operators::nn::core::NNTrait; +use orion::operators::nn::functional; +use orion::numbers::fixed_point::implementations::fp64x64::core::{FP64x64, FP64x64Impl}; +use orion::operators::tensor::implementations::tensor_fp64x64::{ + FP64x64Tensor, FP64x64TensorDiv, FP64x64TensorAdd +}; + +impl FP64x64NN of NNTrait { + fn relu(tensor: @Tensor) -> Tensor { + functional::relu::relu(*tensor) + } + + fn sigmoid(tensor: @Tensor) -> Tensor { + functional::sigmoid::sigmoid(*tensor) + } + + fn softmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::softmax::softmax(tensor, axis) + } + + fn logsoftmax(tensor: @Tensor, axis: usize) -> Tensor { + functional::logsoftmax::logsoftmax(tensor, axis) + } + + fn softsign(tensor: @Tensor) -> Tensor { + functional::softsign::softsign(*tensor) + } + + fn softplus(tensor: @Tensor) -> Tensor { + functional::softplus::softplus(*tensor) + } + + fn linear( + inputs: Tensor, weights: Tensor, bias: Tensor + ) -> Tensor { + functional::linear::linear(inputs, weights, bias) + } + + fn leaky_relu(inputs: @Tensor, alpha: @FP64x64) -> Tensor { + functional::leaky_relu::leaky_relu(*inputs, alpha) + } +} From e08149aee84fd13aca262c79106057ccae387656 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Sun, 3 Sep 2023 16:23:16 +0300 Subject: [PATCH 166/179] update doc --- .../operators/neural-network/README.md | 32 +++--- docs/framework/operators/tensor/README.md | 98 +++++++++---------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/docs/framework/operators/neural-network/README.md b/docs/framework/operators/neural-network/README.md index 4e87d71cb..34d5a954c 100644 --- a/docs/framework/operators/neural-network/README.md +++ b/docs/framework/operators/neural-network/README.md @@ -10,25 +10,25 @@ use orion::operators::nn; Orion supports currently these `NN` types. -| Data type | dtype | -| ------------------------- | -------- | -| 32-bit integer (signed) | `nn_i32` | -| 8-bit integer (signed) | `nn_i8` | -| 32-bit integer (unsigned) | `nn_u32` | -| Fixed point (signed) | `nn_fp` | +| Data type | dtype | +| ------------------------- | -------------- | +| 32-bit integer (signed) | `Tensor` | +| 8-bit integer (signed) | `Tensor` | +| 32-bit integer (unsigned) | `Tensor` | +| Fixed point (signed) | `Tensor` | -| 8-bit integer (signed) | `Tensor` | -| 32-bit integer (unsigned) | `Tensor` | -| Fixed point (signed) | `Tensor` | +| Data type | dtype | +| ------------------------- | -------------- | +| 32-bit integer (signed) | `Tensor` | +| 8-bit integer (signed) | `Tensor` | +| 32-bit integer (unsigned) | `Tensor` | +| Fixed point (signed) | `Tensor Date: Mon, 4 Sep 2023 10:17:57 +0300 Subject: [PATCH 167/179] add implementations --- src/operators/tensor/core.cairo | 4 ++-- .../tensor/implementations/tensor_fp16x16.cairo | 12 +++++++++++- .../tensor/implementations/tensor_fp8x23.cairo | 12 +++++++++++- .../tensor/implementations/tensor_i32.cairo | 16 ++++++++++++---- .../tensor/implementations/tensor_i8.cairo | 13 ++++++++++++- .../tensor/implementations/tensor_u32.cairo | 16 ++++++++++++---- 6 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/operators/tensor/core.cairo b/src/operators/tensor/core.cairo index 8367b96b9..b6806616e 100644 --- a/src/operators/tensor/core.cairo +++ b/src/operators/tensor/core.cairo @@ -2634,7 +2634,7 @@ fn slice, impl TDrop: Drop>( let mut output_data: Array = ArrayTrait::new(); if is_empty { - return Tensor:: {shape: output_shape.span(), data: output_data.span(), extra: *self.extra}; + return Tensor:: {shape: output_shape.span(), data: output_data.span()}; } let stop_j = (*self.data).len() - 1; @@ -2683,5 +2683,5 @@ fn slice, impl TDrop: Drop>( j += 1; }; - return Tensor:: {shape: output_shape.span(), data: output_data.span(), extra: *self.extra}; + return Tensor:: {shape: output_shape.span(), data: output_data.span()}; } diff --git a/src/operators/tensor/implementations/tensor_fp16x16.cairo b/src/operators/tensor/implementations/tensor_fp16x16.cairo index af44eb78e..5ea6494cc 100644 --- a/src/operators/tensor/implementations/tensor_fp16x16.cairo +++ b/src/operators/tensor/implementations/tensor_fp16x16.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait, FP16x16}; use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; @@ -193,6 +193,16 @@ impl FP16x16Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_fp8x23.cairo b/src/operators/tensor/implementations/tensor_fp8x23.cairo index 9ddc0f6a5..6208a3355 100644 --- a/src/operators/tensor/implementations/tensor_fp8x23.cairo +++ b/src/operators/tensor/implementations/tensor_fp8x23.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait, FP8x23}; use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; @@ -193,6 +193,16 @@ impl FP8x23Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_i32.cairo b/src/operators/tensor/implementations/tensor_i32.cairo index 9e6cf7ca7..07e18051f 100644 --- a/src/operators/tensor/implementations/tensor_i32.cairo +++ b/src/operators/tensor/implementations/tensor_i32.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i32, i8, NumberTrait}; use orion::operators::tensor::implementations::{tensor_u32::U32Tensor, tensor_i8::I8Tensor}; @@ -194,6 +194,16 @@ impl I32Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. @@ -282,9 +292,7 @@ impl TensorI8IntoTensorI32 of Into, Tensor> { // Internals -fn tensor_eq( - mut lhs: Tensor, mut rhs: Tensor, -) -> bool { +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { let mut is_eq = true; loop { diff --git a/src/operators/tensor/implementations/tensor_i8.cairo b/src/operators/tensor/implementations/tensor_i8.cairo index a4c5efe82..b83a7221e 100644 --- a/src/operators/tensor/implementations/tensor_i8.cairo +++ b/src/operators/tensor/implementations/tensor_i8.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait}; use orion::operators::tensor::implementations::tensor_u32::U32Tensor; @@ -193,6 +193,17 @@ impl I8Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } + } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_u32.cairo b/src/operators/tensor/implementations/tensor_u32.cairo index 7ac0f0a7b..2773d561a 100644 --- a/src/operators/tensor/implementations/tensor_u32.cairo +++ b/src/operators/tensor/implementations/tensor_u32.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait}; use orion::operators::tensor::implementations::tensor_i8::I8Tensor; @@ -187,6 +187,16 @@ impl U32Tensor of TensorTrait { ) -> Tensor:: { panic(array!['not supported!']) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. @@ -269,9 +279,7 @@ impl U32TryIntoI8 of TryInto { // Internals -fn tensor_eq( - mut lhs: Tensor, mut rhs: Tensor, -) -> bool { +fn tensor_eq(mut lhs: Tensor, mut rhs: Tensor,) -> bool { let mut is_eq = true; loop { From 954029c22f414def7d7687c0fceaa9f7bf02d37f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 10:37:58 +0300 Subject: [PATCH 168/179] update tests --- nodegen/node/slice.py | 8 +- src/tests/nodes.cairo | 10 + src/tests/nodes/slice_fp16x16_2d.cairo | 8 +- .../nodes/slice_fp16x16_2d/input_0.cairo | 31 +- .../nodes/slice_fp16x16_2d/output_0.cairo | 23 +- src/tests/nodes/slice_fp16x16_3d.cairo | 8 +- .../nodes/slice_fp16x16_3d/input_0.cairo | 2015 ++++++++--------- .../nodes/slice_fp16x16_3d/output_0.cairo | 135 +- src/tests/nodes/slice_fp8x23_2d.cairo | 8 +- src/tests/nodes/slice_fp8x23_2d/input_0.cairo | 31 +- .../nodes/slice_fp8x23_2d/output_0.cairo | 23 +- src/tests/nodes/slice_fp8x23_3d.cairo | 8 +- src/tests/nodes/slice_fp8x23_3d/input_0.cairo | 2015 ++++++++--------- .../nodes/slice_fp8x23_3d/output_0.cairo | 135 +- src/tests/nodes/slice_i32_2d.cairo | 8 +- src/tests/nodes/slice_i32_2d/input_0.cairo | 27 +- src/tests/nodes/slice_i32_2d/output_0.cairo | 21 +- src/tests/nodes/slice_i32_3d.cairo | 8 +- src/tests/nodes/slice_i32_3d/input_0.cairo | 1797 ++++++++------- src/tests/nodes/slice_i32_3d/output_0.cairo | 125 +- src/tests/nodes/slice_i8_2d.cairo | 8 +- src/tests/nodes/slice_i8_2d/input_0.cairo | 29 +- src/tests/nodes/slice_i8_2d/output_0.cairo | 21 +- src/tests/nodes/slice_i8_3d.cairo | 8 +- src/tests/nodes/slice_i8_3d/input_0.cairo | 1799 ++++++++------- src/tests/nodes/slice_i8_3d/output_0.cairo | 123 +- src/tests/nodes/slice_u32_2d.cairo | 8 +- src/tests/nodes/slice_u32_2d/input_0.cairo | 27 +- src/tests/nodes/slice_u32_2d/output_0.cairo | 19 +- src/tests/nodes/slice_u32_3d.cairo | 8 +- src/tests/nodes/slice_u32_3d/input_0.cairo | 1823 ++++++++------- src/tests/nodes/slice_u32_3d/output_0.cairo | 123 +- 32 files changed, 5203 insertions(+), 5237 deletions(-) diff --git a/nodegen/node/slice.py b/nodegen/node/slice.py index 1867de266..b87ec3bc9 100644 --- a/nodegen/node/slice.py +++ b/nodegen/node/slice.py @@ -99,8 +99,8 @@ def slice_2D(): ).astype(np.int64), FixedImpl.FP8x23) y = x[0:2, 2:4] - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "slice_fp8x23_2d" make_node([x], [y], name) @@ -112,8 +112,8 @@ def slice_3D(): ).astype(np.int64), FixedImpl.FP8x23) y = x[0:3, 0:10:3] - x = Tensor(Dtype.FP8x23, x.shape, x.flatten(), FixedImpl.FP8x23) - y = Tensor(Dtype.FP8x23, y.shape, y.flatten(), FixedImpl.FP8x23) + x = Tensor(Dtype.FP8x23, x.shape, x.flatten()) + y = Tensor(Dtype.FP8x23, y.shape, y.flatten()) name = "slice_fp8x23_3d" make_node([x], [y], name) diff --git a/src/tests/nodes.cairo b/src/tests/nodes.cairo index 61da084a1..0c8f6f114 100644 --- a/src/tests/nodes.cairo +++ b/src/tests/nodes.cairo @@ -368,3 +368,13 @@ mod greater_equal_i8; mod greater_equal_i8_broadcast; mod greater_equal_u32; mod greater_equal_u32_broadcast; +mod slice_fp16x16_2d; +mod slice_fp16x16_3d; +mod slice_fp8x23_2d; +mod slice_fp8x23_3d; +mod slice_i32_2d; +mod slice_i32_3d; +mod slice_i8_2d; +mod slice_i8_3d; +mod slice_u32_2d; +mod slice_u32_3d; diff --git a/src/tests/nodes/slice_fp16x16_2d.cairo b/src/tests/nodes/slice_fp16x16_2d.cairo index 1d86693c8..9eb2e22ef 100644 --- a/src/tests/nodes/slice_fp16x16_2d.cairo +++ b/src/tests/nodes/slice_fp16x16_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_fp16x16_2d/input_0.cairo b/src/tests/nodes/slice_fp16x16_2d/input_0.cairo index 40cd181e9..f4b923063 100644 --- a/src/tests/nodes/slice_fp16x16_2d/input_0.cairo +++ b/src/tests/nodes/slice_fp16x16_2d/input_0.cairo @@ -1,23 +1,22 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(4); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 6488064, sign: true }); - data.append(FixedType { mag: 6750208, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 5439488, sign: true }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 5505024, sign: false }); + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 720896, sign: true }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_2d/output_0.cairo b/src/tests/nodes/slice_fp16x16_2d/output_0.cairo index e36306278..6aa02018b 100644 --- a/src/tests/nodes/slice_fp16x16_2d/output_0.cairo +++ b/src/tests/nodes/slice_fp16x16_2d/output_0.cairo @@ -1,19 +1,18 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 6750208, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 720896, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_3d.cairo b/src/tests/nodes/slice_fp16x16_3d.cairo index 3cb17c621..df9d57614 100644 --- a/src/tests/nodes/slice_fp16x16_3d.cairo +++ b/src/tests/nodes/slice_fp16x16_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP16x16Tensor::FPTensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP16x16Tensor; +use orion::operators::tensor::FP16x16TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_fp16x16_3d/input_0.cairo b/src/tests/nodes/slice_fp16x16_3d/input_0.cairo index de3ed45eb..0eacc5191 100644 --- a/src/tests/nodes/slice_fp16x16_3d/input_0.cairo +++ b/src/tests/nodes/slice_fp16x16_3d/input_0.cairo @@ -1,1016 +1,1015 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(20); shape.append(10); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 6291456, sign: true }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 6619136, sign: true }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 5373952, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 1441792, sign: true }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 1835008, sign: true }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 5308416, sign: false }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 1835008, sign: true }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 5373952, sign: true }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 5701632, sign: false }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 5832704, sign: false }); - data.append(FixedType { mag: 5439488, sign: true }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 5308416, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 3211264, sign: true }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 4259840, sign: true }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 983040, sign: true }); - data.append(FixedType { mag: 6750208, sign: true }); - data.append(FixedType { mag: 6488064, sign: false }); - data.append(FixedType { mag: 7536640, sign: true }); - data.append(FixedType { mag: 5439488, sign: false }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 7143424, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 7536640, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 2031616, sign: true }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 7536640, sign: false }); - data.append(FixedType { mag: 5963776, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 1900544, sign: true }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: true }); - data.append(FixedType { mag: 7798784, sign: true }); - data.append(FixedType { mag: 5505024, sign: false }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 2228224, sign: true }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 5308416, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 6094848, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 6815744, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 3473408, sign: true }); - data.append(FixedType { mag: 720896, sign: true }); - data.append(FixedType { mag: 1441792, sign: true }); - data.append(FixedType { mag: 2490368, sign: true }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 7340032, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 4849664, sign: true }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 2621440, sign: true }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 6488064, sign: true }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 6225920, sign: false }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 5439488, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 1769472, sign: true }); - data.append(FixedType { mag: 8192000, sign: false }); - data.append(FixedType { mag: 4259840, sign: true }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 4849664, sign: true }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 5636096, sign: true }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 3932160, sign: true }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 6029312, sign: true }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 3735552, sign: true }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 1572864, sign: true }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 5177344, sign: true }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 7733248, sign: true }); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 2949120, sign: true }); - data.append(FixedType { mag: 7208960, sign: true }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 7536640, sign: true }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 6619136, sign: true }); - data.append(FixedType { mag: 1835008, sign: true }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 3473408, sign: true }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 2359296, sign: true }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 6356992, sign: false }); - data.append(FixedType { mag: 1966080, sign: true }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 4390912, sign: true }); - data.append(FixedType { mag: 5177344, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 851968, sign: true }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 4653056, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 917504, sign: true }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 1835008, sign: true }); - data.append(FixedType { mag: 6488064, sign: true }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 2621440, sign: true }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 5177344, sign: true }); - data.append(FixedType { mag: 7798784, sign: false }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 8126464, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 8192000, sign: true }); - data.append(FixedType { mag: 4194304, sign: true }); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 4587520, sign: true }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 6094848, sign: false }); - data.append(FixedType { mag: 3670016, sign: true }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 1966080, sign: true }); - data.append(FixedType { mag: 7798784, sign: true }); - data.append(FixedType { mag: 458752, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 2621440, sign: true }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 2490368, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 1114112, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 3735552, sign: true }); - data.append(FixedType { mag: 4718592, sign: true }); - data.append(FixedType { mag: 7667712, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 4718592, sign: true }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 5701632, sign: true }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 8257536, sign: true }); - data.append(FixedType { mag: 7208960, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 5570560, sign: true }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 6488064, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 3735552, sign: true }); - data.append(FixedType { mag: 3801088, sign: true }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 2359296, sign: true }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 6094848, sign: true }); - data.append(FixedType { mag: 7143424, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 7995392, sign: true }); - data.append(FixedType { mag: 6815744, sign: false }); - data.append(FixedType { mag: 7929856, sign: true }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 7340032, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 655360, sign: true }); - data.append(FixedType { mag: 7340032, sign: false }); - data.append(FixedType { mag: 8192000, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 5767168, sign: false }); - data.append(FixedType { mag: 5439488, sign: true }); - data.append(FixedType { mag: 7012352, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 7667712, sign: false }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 1441792, sign: true }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 7077888, sign: true }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 2752512, sign: true }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 7536640, sign: false }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 6160384, sign: true }); - data.append(FixedType { mag: 7995392, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2686976, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 4653056, sign: true }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 7798784, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 2621440, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 5242880, sign: false }); - data.append(FixedType { mag: 2686976, sign: true }); - data.append(FixedType { mag: 4128768, sign: true }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 6225920, sign: true }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 1572864, sign: true }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 4325376, sign: true }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 1572864, sign: true }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 6946816, sign: true }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 589824, sign: false }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 6946816, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 2359296, sign: true }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 8257536, sign: false }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 7995392, sign: false }); - data.append(FixedType { mag: 6488064, sign: true }); - data.append(FixedType { mag: 2031616, sign: true }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 6225920, sign: false }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 6684672, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 1900544, sign: true }); - data.append(FixedType { mag: 5701632, sign: true }); - data.append(FixedType { mag: 4915200, sign: true }); - data.append(FixedType { mag: 8192000, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 4653056, sign: false }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 6356992, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 4128768, sign: true }); - data.append(FixedType { mag: 6225920, sign: false }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 655360, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 2949120, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 655360, sign: true }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 1507328, sign: true }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 786432, sign: true }); - data.append(FixedType { mag: 5177344, sign: false }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 1900544, sign: true }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 1572864, sign: true }); - data.append(FixedType { mag: 6881280, sign: true }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 3801088, sign: true }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 7602176, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 3145728, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 6684672, sign: false }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 4915200, sign: true }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 6160384, sign: true }); - data.append(FixedType { mag: 3473408, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 6750208, sign: true }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 6225920, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 5767168, sign: true }); - data.append(FixedType { mag: 3670016, sign: true }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 2752512, sign: true }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 6881280, sign: true }); - data.append(FixedType { mag: 3735552, sign: true }); - data.append(FixedType { mag: 7995392, sign: false }); - data.append(FixedType { mag: 6225920, sign: true }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 4521984, sign: true }); - data.append(FixedType { mag: 2752512, sign: true }); - data.append(FixedType { mag: 4587520, sign: true }); - data.append(FixedType { mag: 6225920, sign: false }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 1507328, sign: true }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 3342336, sign: true }); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 8126464, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 7012352, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 2686976, sign: true }); - data.append(FixedType { mag: 7929856, sign: true }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 4259840, sign: false }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 1703936, sign: true }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 6356992, sign: false }); - data.append(FixedType { mag: 720896, sign: true }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 4325376, sign: false }); - data.append(FixedType { mag: 1703936, sign: true }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 2686976, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 7995392, sign: true }); - data.append(FixedType { mag: 6488064, sign: false }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 655360, sign: true }); - data.append(FixedType { mag: 7864320, sign: false }); - data.append(FixedType { mag: 3276800, sign: false }); - data.append(FixedType { mag: 4194304, sign: true }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 3604480, sign: true }); - data.append(FixedType { mag: 3932160, sign: true }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 4325376, sign: true }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 6684672, sign: false }); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 851968, sign: true }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 7864320, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 3538944, sign: false }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 2949120, sign: true }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 2555904, sign: true }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 6029312, sign: true }); - data.append(FixedType { mag: 7929856, sign: true }); - data.append(FixedType { mag: 917504, sign: true }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 5636096, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 7798784, sign: true }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 8192000, sign: false }); - data.append(FixedType { mag: 3866624, sign: true }); - data.append(FixedType { mag: 7143424, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 2621440, sign: true }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 983040, sign: true }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 3473408, sign: true }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 5832704, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 7864320, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 5373952, sign: true }); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 1507328, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 458752, sign: true }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 4521984, sign: true }); - data.append(FixedType { mag: 65536, sign: true }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 3342336, sign: false }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 7667712, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 1572864, sign: true }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 3407872, sign: true }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 393216, sign: false }); - data.append(FixedType { mag: 6160384, sign: true }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 5701632, sign: false }); - data.append(FixedType { mag: 1179648, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 5767168, sign: true }); - data.append(FixedType { mag: 3801088, sign: true }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 8257536, sign: false }); - data.append(FixedType { mag: 1179648, sign: true }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 3866624, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 1769472, sign: true }); - data.append(FixedType { mag: 5767168, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 6422528, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 6815744, sign: true }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 1048576, sign: true }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 8192000, sign: true }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 1900544, sign: false }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 6094848, sign: false }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 5963776, sign: false }); - data.append(FixedType { mag: 3211264, sign: true }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 720896, sign: false }); - data.append(FixedType { mag: 131072, sign: false }); - data.append(FixedType { mag: 3407872, sign: true }); - data.append(FixedType { mag: 6881280, sign: true }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 7208960, sign: false }); - data.append(FixedType { mag: 851968, sign: false }); - data.append(FixedType { mag: 7667712, sign: false }); - data.append(FixedType { mag: 6422528, sign: false }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 4128768, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 1376256, sign: true }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 3735552, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 7208960, sign: true }); - data.append(FixedType { mag: 7864320, sign: false }); - data.append(FixedType { mag: 7471104, sign: false }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 2949120, sign: true }); - data.append(FixedType { mag: 7798784, sign: false }); - data.append(FixedType { mag: 3080192, sign: true }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 5111808, sign: false }); - data.append(FixedType { mag: 6291456, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 8192000, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 2686976, sign: true }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 2818048, sign: false }); - data.append(FixedType { mag: 2424832, sign: false }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 1114112, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 7274496, sign: true }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 5439488, sign: false }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 1245184, sign: false }); - data.append(FixedType { mag: 5701632, sign: false }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 4653056, sign: true }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 8257536, sign: true }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 524288, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 7798784, sign: false }); - data.append(FixedType { mag: 196608, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 2359296, sign: true }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 6815744, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 2555904, sign: false }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 1703936, sign: true }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 2031616, sign: true }); - data.append(FixedType { mag: 3735552, sign: true }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 1900544, sign: true }); - data.append(FixedType { mag: 3670016, sign: false }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 5308416, sign: true }); - data.append(FixedType { mag: 6356992, sign: true }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 3014656, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 7405568, sign: false }); - data.append(FixedType { mag: 6946816, sign: false }); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 5701632, sign: false }); - data.append(FixedType { mag: 1769472, sign: false }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 4653056, sign: true }); - data.append(FixedType { mag: 786432, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 3801088, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 1769472, sign: true }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 4915200, sign: false }); - data.append(FixedType { mag: 983040, sign: true }); - data.append(FixedType { mag: 1114112, sign: true }); - data.append(FixedType { mag: 7012352, sign: false }); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 7012352, sign: true }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 524288, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 7667712, sign: false }); - data.append(FixedType { mag: 4784128, sign: false }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 7208960, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 3145728, sign: true }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 6619136, sign: false }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 7929856, sign: true }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 3604480, sign: true }); - data.append(FixedType { mag: 3473408, sign: false }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 655360, sign: false }); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 6422528, sign: true }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 2555904, sign: true }); - data.append(FixedType { mag: 5439488, sign: true }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 2883584, sign: false }); - data.append(FixedType { mag: 1638400, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 2228224, sign: true }); - data.append(FixedType { mag: 7995392, sign: false }); - data.append(FixedType { mag: 1114112, sign: true }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 2555904, sign: true }); - data.append(FixedType { mag: 2359296, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 3801088, sign: true }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 6225920, sign: true }); - data.append(FixedType { mag: 4128768, sign: true }); - data.append(FixedType { mag: 7012352, sign: false }); - data.append(FixedType { mag: 3407872, sign: true }); - data.append(FixedType { mag: 7733248, sign: false }); - data.append(FixedType { mag: 6684672, sign: true }); - data.append(FixedType { mag: 5898240, sign: true }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 5373952, sign: true }); - data.append(FixedType { mag: 5767168, sign: false }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 4653056, sign: true }); - data.append(FixedType { mag: 1835008, sign: false }); - data.append(FixedType { mag: 3932160, sign: true }); - data.append(FixedType { mag: 4063232, sign: false }); - data.append(FixedType { mag: 5701632, sign: true }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 1048576, sign: false }); - data.append(FixedType { mag: 3080192, sign: false }); - data.append(FixedType { mag: 2752512, sign: true }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 5111808, sign: true }); - data.append(FixedType { mag: 7012352, sign: false }); - data.append(FixedType { mag: 4194304, sign: false }); - data.append(FixedType { mag: 3407872, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 7012352, sign: true }); - data.append(FixedType { mag: 1966080, sign: false }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2228224, sign: true }); - data.append(FixedType { mag: 1835008, sign: true }); - data.append(FixedType { mag: 3407872, sign: false }); - data.append(FixedType { mag: 65536, sign: false }); - data.append(FixedType { mag: 6553600, sign: true }); - data.append(FixedType { mag: 4915200, sign: true }); - data.append(FixedType { mag: 6881280, sign: true }); - data.append(FixedType { mag: 6029312, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 4063232, sign: true }); - data.append(FixedType { mag: 2555904, sign: true }); - data.append(FixedType { mag: 4390912, sign: false }); - data.append(FixedType { mag: 5373952, sign: false }); - data.append(FixedType { mag: 6553600, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 8060928, sign: true }); - data.append(FixedType { mag: 7667712, sign: true }); - data.append(FixedType { mag: 2818048, sign: true }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 2228224, sign: true }); - data.append(FixedType { mag: 5439488, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 6881280, sign: false }); - data.append(FixedType { mag: 8192000, sign: true }); - data.append(FixedType { mag: 327680, sign: true }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 2883584, sign: true }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 3276800, sign: true }); - data.append(FixedType { mag: 6684672, sign: false }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 3080192, sign: true }); - data.append(FixedType { mag: 1048576, sign: true }); - data.append(FixedType { mag: 6291456, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 2621440, sign: false }); - data.append(FixedType { mag: 458752, sign: false }); - data.append(FixedType { mag: 2424832, sign: true }); - data.append(FixedType { mag: 393216, sign: true }); - data.append(FixedType { mag: 5570560, sign: false }); - data.append(FixedType { mag: 3538944, sign: true }); - data.append(FixedType { mag: 917504, sign: false }); - data.append(FixedType { mag: 2752512, sign: false }); - data.append(FixedType { mag: 2490368, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 8257536, sign: false }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 262144, sign: true }); - data.append(FixedType { mag: 7602176, sign: false }); - data.append(FixedType { mag: 5046272, sign: false }); - data.append(FixedType { mag: 4849664, sign: false }); - data.append(FixedType { mag: 6750208, sign: true }); - data.append(FixedType { mag: 196608, sign: true }); - data.append(FixedType { mag: 4980736, sign: false }); - data.append(FixedType { mag: 720896, sign: true }); - data.append(FixedType { mag: 6422528, sign: true }); - data.append(FixedType { mag: 5636096, sign: false }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 3604480, sign: true }); - data.append(FixedType { mag: 5832704, sign: true }); - data.append(FixedType { mag: 5242880, sign: true }); - data.append(FixedType { mag: 983040, sign: false }); - data.append(FixedType { mag: 3801088, sign: false }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 8126464, sign: false }); - data.append(FixedType { mag: 8323072, sign: true }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 3997696, sign: false }); - data.append(FixedType { mag: 8192000, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 327680, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 7798784, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 2031616, sign: false }); - data.append(FixedType { mag: 2097152, sign: true }); - data.append(FixedType { mag: 7929856, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 1310720, sign: true }); - data.append(FixedType { mag: 2555904, sign: true }); - data.append(FixedType { mag: 6291456, sign: true }); - data.append(FixedType { mag: 4718592, sign: true }); - data.append(FixedType { mag: 5767168, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 720896, sign: true }); + data.append(FP16x16 { mag: 2621440, sign: true }); + data.append(FP16x16 { mag: 3342336, sign: true }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 7733248, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: true }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 786432, sign: true }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 5308416, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: false }); + data.append(FP16x16 { mag: 5308416, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: true }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2293760, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5505024, sign: true }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 3211264, sign: true }); + data.append(FP16x16 { mag: 1179648, sign: true }); + data.append(FP16x16 { mag: 2949120, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: true }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 3932160, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 7733248, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 8257536, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 7733248, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 6225920, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 5832704, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 5832704, sign: true }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2883584, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 8060928, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: true }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: true }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 3276800, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: true }); + data.append(FP16x16 { mag: 786432, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 8126464, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: true }); + data.append(FP16x16 { mag: 8192000, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: true }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 983040, sign: true }); + data.append(FP16x16 { mag: 5046272, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2883584, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 5439488, sign: true }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 6422528, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 589824, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 5636096, sign: false }); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 6225920, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: true }); + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: true }); + data.append(FP16x16 { mag: 5177344, sign: true }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 5832704, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 5308416, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 8060928, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 851968, sign: true }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: true }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 3014656, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 7733248, sign: false }); + data.append(FP16x16 { mag: 5505024, sign: false }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 786432, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 5636096, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 851968, sign: true }); + data.append(FP16x16 { mag: 524288, sign: true }); + data.append(FP16x16 { mag: 7143424, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: true }); + data.append(FP16x16 { mag: 589824, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 4325376, sign: true }); + data.append(FP16x16 { mag: 5046272, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 3211264, sign: true }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 5373952, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 6029312, sign: true }); + data.append(FP16x16 { mag: 2949120, sign: true }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 524288, sign: true }); + data.append(FP16x16 { mag: 3276800, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: true }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: false }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 4521984, sign: true }); + data.append(FP16x16 { mag: 589824, sign: true }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 8257536, sign: true }); + data.append(FP16x16 { mag: 3276800, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: true }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 458752, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 6029312, sign: true }); + data.append(FP16x16 { mag: 1179648, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: true }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 917504, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 5439488, sign: true }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 6881280, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 6225920, sign: true }); + data.append(FP16x16 { mag: 589824, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 917504, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: true }); + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 8192000, sign: true }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 8060928, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 4521984, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 2621440, sign: true }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 1769472, sign: true }); + data.append(FP16x16 { mag: 1179648, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 8323072, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: true }); + data.append(FP16x16 { mag: 1769472, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 5308416, sign: true }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: true }); + data.append(FP16x16 { mag: 1769472, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 1507328, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: true }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 6881280, sign: true }); + data.append(FP16x16 { mag: 524288, sign: true }); + data.append(FP16x16 { mag: 5767168, sign: true }); + data.append(FP16x16 { mag: 6422528, sign: true }); + data.append(FP16x16 { mag: 2883584, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: true }); + data.append(FP16x16 { mag: 5636096, sign: false }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 2752512, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 589824, sign: true }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 8323072, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 1179648, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 6356992, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: true }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: true }); + data.append(FP16x16 { mag: 3276800, sign: true }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 8257536, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 3276800, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: true }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 1376256, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 917504, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 2621440, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 655360, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 2031616, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 6225920, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 5832704, sign: true }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 2949120, sign: true }); + data.append(FP16x16 { mag: 327680, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 3211264, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: true }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 851968, sign: true }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 3997696, sign: true }); + data.append(FP16x16 { mag: 2031616, sign: false }); + data.append(FP16x16 { mag: 655360, sign: true }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: true }); + data.append(FP16x16 { mag: 6422528, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: true }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: true }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 7864320, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 8126464, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 5505024, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 6881280, sign: true }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 7733248, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 589824, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: true }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 8126464, sign: true }); + data.append(FP16x16 { mag: 6094848, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 7929856, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 5373952, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2686976, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: true }); + data.append(FP16x16 { mag: 6619136, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 917504, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 6356992, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 5505024, sign: true }); + data.append(FP16x16 { mag: 5505024, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 3473408, sign: true }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 983040, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: false }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 6029312, sign: true }); + data.append(FP16x16 { mag: 196608, sign: false }); + data.append(FP16x16 { mag: 8126464, sign: false }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 7733248, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: true }); + data.append(FP16x16 { mag: 2949120, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 5046272, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 262144, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 7602176, sign: true }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 7602176, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 6553600, sign: true }); + data.append(FP16x16 { mag: 6553600, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: true }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 8126464, sign: false }); + data.append(FP16x16 { mag: 8192000, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 5439488, sign: true }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: true }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 3342336, sign: false }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: true }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 6225920, sign: true }); + data.append(FP16x16 { mag: 1310720, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 6225920, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 5832704, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 7995392, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 2752512, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 655360, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 7995392, sign: true }); + data.append(FP16x16 { mag: 8257536, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 6881280, sign: true }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: true }); + data.append(FP16x16 { mag: 4456448, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 1048576, sign: true }); + data.append(FP16x16 { mag: 5832704, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: true }); + data.append(FP16x16 { mag: 1835008, sign: false }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 8060928, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 7143424, sign: false }); + data.append(FP16x16 { mag: 8060928, sign: true }); + data.append(FP16x16 { mag: 1966080, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: false }); + data.append(FP16x16 { mag: 5373952, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: false }); + data.append(FP16x16 { mag: 5308416, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: true }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 6356992, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 2293760, sign: false }); + data.append(FP16x16 { mag: 4718592, sign: true }); + data.append(FP16x16 { mag: 8257536, sign: false }); + data.append(FP16x16 { mag: 2949120, sign: true }); + data.append(FP16x16 { mag: 4128768, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: true }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: true }); + data.append(FP16x16 { mag: 3014656, sign: false }); + data.append(FP16x16 { mag: 7274496, sign: false }); + data.append(FP16x16 { mag: 7405568, sign: true }); + data.append(FP16x16 { mag: 4915200, sign: true }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 5636096, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 6881280, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 3932160, sign: true }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: false }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 6422528, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 5636096, sign: true }); + data.append(FP16x16 { mag: 2097152, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: false }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 786432, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 262144, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 851968, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 7667712, sign: true }); + data.append(FP16x16 { mag: 983040, sign: false }); + data.append(FP16x16 { mag: 2883584, sign: true }); + data.append(FP16x16 { mag: 2228224, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 7012352, sign: false }); + data.append(FP16x16 { mag: 4390912, sign: true }); + data.append(FP16x16 { mag: 6946816, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: true }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 4784128, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 6160384, sign: true }); + data.append(FP16x16 { mag: 3801088, sign: true }); + data.append(FP16x16 { mag: 7798784, sign: false }); + data.append(FP16x16 { mag: 983040, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: true }); + data.append(FP16x16 { mag: 2818048, sign: true }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 1703936, sign: true }); + data.append(FP16x16 { mag: 4325376, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: true }); + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 4063232, sign: true }); + data.append(FP16x16 { mag: 1507328, sign: true }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 3735552, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: false }); + data.append(FP16x16 { mag: 6356992, sign: true }); + data.append(FP16x16 { mag: 5308416, sign: true }); + data.append(FP16x16 { mag: 5373952, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: false }); + data.append(FP16x16 { mag: 6881280, sign: true }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 4521984, sign: false }); + data.append(FP16x16 { mag: 2490368, sign: true }); + data.append(FP16x16 { mag: 6160384, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 1572864, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 3997696, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: false }); + data.append(FP16x16 { mag: 1769472, sign: false }); + data.append(FP16x16 { mag: 393216, sign: true }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 2162688, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 1572864, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: false }); + data.append(FP16x16 { mag: 0, sign: false }); + data.append(FP16x16 { mag: 3538944, sign: true }); + data.append(FP16x16 { mag: 8192000, sign: false }); + data.append(FP16x16 { mag: 327680, sign: false }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 4390912, sign: false }); + data.append(FP16x16 { mag: 3670016, sign: false }); + data.append(FP16x16 { mag: 1245184, sign: false }); + data.append(FP16x16 { mag: 5701632, sign: false }); + data.append(FP16x16 { mag: 2359296, sign: true }); + data.append(FP16x16 { mag: 2752512, sign: true }); + data.append(FP16x16 { mag: 7208960, sign: false }); + data.append(FP16x16 { mag: 65536, sign: true }); + data.append(FP16x16 { mag: 4653056, sign: true }); + data.append(FP16x16 { mag: 7405568, sign: false }); + data.append(FP16x16 { mag: 3080192, sign: true }); + data.append(FP16x16 { mag: 4456448, sign: true }); + data.append(FP16x16 { mag: 7077888, sign: true }); + data.append(FP16x16 { mag: 1638400, sign: false }); + data.append(FP16x16 { mag: 720896, sign: false }); + data.append(FP16x16 { mag: 6619136, sign: false }); + data.append(FP16x16 { mag: 1900544, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 1835008, sign: true }); + data.append(FP16x16 { mag: 4587520, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: true }); + data.append(FP16x16 { mag: 5767168, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: true }); + data.append(FP16x16 { mag: 6356992, sign: true }); + data.append(FP16x16 { mag: 4194304, sign: false }); + data.append(FP16x16 { mag: 6750208, sign: true }); + data.append(FP16x16 { mag: 7929856, sign: false }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 1966080, sign: false }); + data.append(FP16x16 { mag: 7340032, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: true }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 7471104, sign: true }); + data.append(FP16x16 { mag: 4980736, sign: true }); + data.append(FP16x16 { mag: 6815744, sign: true }); + data.append(FP16x16 { mag: 3604480, sign: true }); + data.append(FP16x16 { mag: 7667712, sign: false }); + data.append(FP16x16 { mag: 6553600, sign: false }); + data.append(FP16x16 { mag: 1310720, sign: false }); + data.append(FP16x16 { mag: 4849664, sign: false }); + data.append(FP16x16 { mag: 6815744, sign: false }); + data.append(FP16x16 { mag: 524288, sign: true }); + data.append(FP16x16 { mag: 6881280, sign: false }); + data.append(FP16x16 { mag: 2621440, sign: false }); + data.append(FP16x16 { mag: 655360, sign: false }); + data.append(FP16x16 { mag: 4259840, sign: false }); + data.append(FP16x16 { mag: 851968, sign: false }); + data.append(FP16x16 { mag: 6094848, sign: false }); + data.append(FP16x16 { mag: 5111808, sign: false }); + data.append(FP16x16 { mag: 3932160, sign: false }); + data.append(FP16x16 { mag: 3604480, sign: true }); + data.append(FP16x16 { mag: 2293760, sign: true }); + data.append(FP16x16 { mag: 4980736, sign: true }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp16x16_3d/output_0.cairo b/src/tests/nodes/slice_fp16x16_3d/output_0.cairo index 46beb81c7..44a771ce3 100644 --- a/src/tests/nodes/slice_fp16x16_3d/output_0.cairo +++ b/src/tests/nodes/slice_fp16x16_3d/output_0.cairo @@ -1,76 +1,75 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP16x16Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP16x16; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(4); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 4980736, sign: true }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 6291456, sign: true }); - data.append(FixedType { mag: 4587520, sign: false }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 6160384, sign: false }); - data.append(FixedType { mag: 2293760, sign: true }); - data.append(FixedType { mag: 5308416, sign: false }); - data.append(FixedType { mag: 5963776, sign: true }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 3932160, sign: false }); - data.append(FixedType { mag: 1703936, sign: false }); - data.append(FixedType { mag: 5832704, sign: false }); - data.append(FixedType { mag: 5439488, sign: true }); - data.append(FixedType { mag: 7471104, sign: true }); - data.append(FixedType { mag: 5505024, sign: true }); - data.append(FixedType { mag: 8060928, sign: false }); - data.append(FixedType { mag: 4259840, sign: true }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 4718592, sign: false }); - data.append(FixedType { mag: 3604480, sign: false }); - data.append(FixedType { mag: 1572864, sign: false }); - data.append(FixedType { mag: 3014656, sign: false }); - data.append(FixedType { mag: 983040, sign: true }); - data.append(FixedType { mag: 6750208, sign: true }); - data.append(FixedType { mag: 7143424, sign: true }); - data.append(FixedType { mag: 7340032, sign: true }); - data.append(FixedType { mag: 2097152, sign: false }); - data.append(FixedType { mag: 7405568, sign: true }); - data.append(FixedType { mag: 7536640, sign: true }); - data.append(FixedType { mag: 2293760, sign: false }); - data.append(FixedType { mag: 1310720, sign: false }); - data.append(FixedType { mag: 131072, sign: true }); - data.append(FixedType { mag: 1441792, sign: false }); - data.append(FixedType { mag: 1507328, sign: true }); - data.append(FixedType { mag: 7274496, sign: false }); - data.append(FixedType { mag: 7077888, sign: false }); - data.append(FixedType { mag: 4521984, sign: false }); - data.append(FixedType { mag: 6094848, sign: true }); - data.append(FixedType { mag: 2162688, sign: true }); - data.append(FixedType { mag: 2228224, sign: false }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 5898240, sign: false }); - data.append(FixedType { mag: 8126464, sign: true }); - data.append(FixedType { mag: 3211264, sign: false }); - data.append(FixedType { mag: 1376256, sign: false }); - data.append(FixedType { mag: 4128768, sign: false }); - data.append(FixedType { mag: 2686976, sign: false }); - data.append(FixedType { mag: 7340032, sign: false }); - data.append(FixedType { mag: 5046272, sign: true }); - data.append(FixedType { mag: 589824, sign: true }); - data.append(FixedType { mag: 5439488, sign: false }); - data.append(FixedType { mag: 2949120, sign: false }); - data.append(FixedType { mag: 1245184, sign: true }); - data.append(FixedType { mag: 2162688, sign: false }); - data.append(FixedType { mag: 4456448, sign: false }); - data.append(FixedType { mag: 4456448, sign: true }); - data.append(FixedType { mag: 262144, sign: false }); - data.append(FixedType { mag: 3932160, sign: true }); - data.append(FixedType { mag: 3538944, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP16x16 { mag: 1245184, sign: true }); + data.append(FP16x16 { mag: 6029312, sign: false }); + data.append(FP16x16 { mag: 720896, sign: true }); + data.append(FP16x16 { mag: 2621440, sign: true }); + data.append(FP16x16 { mag: 3342336, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 3145728, sign: true }); + data.append(FP16x16 { mag: 6750208, sign: false }); + data.append(FP16x16 { mag: 6946816, sign: false }); + data.append(FP16x16 { mag: 7864320, sign: true }); + data.append(FP16x16 { mag: 4259840, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: true }); + data.append(FP16x16 { mag: 786432, sign: true }); + data.append(FP16x16 { mag: 1048576, sign: false }); + data.append(FP16x16 { mag: 524288, sign: false }); + data.append(FP16x16 { mag: 1114112, sign: true }); + data.append(FP16x16 { mag: 2424832, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 7012352, sign: true }); + data.append(FP16x16 { mag: 3407872, sign: false }); + data.append(FP16x16 { mag: 4194304, sign: true }); + data.append(FP16x16 { mag: 2293760, sign: true }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: true }); + data.append(FP16x16 { mag: 393216, sign: false }); + data.append(FP16x16 { mag: 1441792, sign: true }); + data.append(FP16x16 { mag: 65536, sign: false }); + data.append(FP16x16 { mag: 2555904, sign: true }); + data.append(FP16x16 { mag: 1114112, sign: false }); + data.append(FP16x16 { mag: 131072, sign: false }); + data.append(FP16x16 { mag: 6291456, sign: true }); + data.append(FP16x16 { mag: 131072, sign: true }); + data.append(FP16x16 { mag: 458752, sign: true }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 4653056, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 5570560, sign: false }); + data.append(FP16x16 { mag: 8257536, sign: true }); + data.append(FP16x16 { mag: 3866624, sign: false }); + data.append(FP16x16 { mag: 6488064, sign: false }); + data.append(FP16x16 { mag: 5963776, sign: false }); + data.append(FP16x16 { mag: 786432, sign: false }); + data.append(FP16x16 { mag: 5242880, sign: true }); + data.append(FP16x16 { mag: 1441792, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2490368, sign: false }); + data.append(FP16x16 { mag: 5177344, sign: false }); + data.append(FP16x16 { mag: 6684672, sign: false }); + data.append(FP16x16 { mag: 3801088, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 5898240, sign: true }); + data.append(FP16x16 { mag: 2883584, sign: true }); + data.append(FP16x16 { mag: 5242880, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: false }); + data.append(FP16x16 { mag: 2097152, sign: false }); + data.append(FP16x16 { mag: 2686976, sign: true }); + data.append(FP16x16 { mag: 3473408, sign: false }); + data.append(FP16x16 { mag: 7536640, sign: true }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_2d.cairo b/src/tests/nodes/slice_fp8x23_2d.cairo index 6ba207994..cd24eb21e 100644 --- a/src/tests/nodes/slice_fp8x23_2d.cairo +++ b/src/tests/nodes/slice_fp8x23_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_fp8x23_2d/input_0.cairo b/src/tests/nodes/slice_fp8x23_2d/input_0.cairo index 2cbd34e3d..c9e2ae785 100644 --- a/src/tests/nodes/slice_fp8x23_2d/input_0.cairo +++ b/src/tests/nodes/slice_fp8x23_2d/input_0.cairo @@ -1,23 +1,22 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(4); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 897581056, sign: true }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 394264576, sign: true }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 746586112, sign: false }); - data.append(FixedType { mag: 855638016, sign: true }); - data.append(FixedType { mag: 226492416, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP8x23 { mag: 83886080, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_2d/output_0.cairo b/src/tests/nodes/slice_fp8x23_2d/output_0.cairo index 1c0ec2e49..a886aebd9 100644 --- a/src/tests/nodes/slice_fp8x23_2d/output_0.cairo +++ b/src/tests/nodes/slice_fp8x23_2d/output_0.cairo @@ -1,19 +1,18 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 394264576, sign: true }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 855638016, sign: true }); - data.append(FixedType { mag: 226492416, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_3d.cairo b/src/tests/nodes/slice_fp8x23_3d.cairo index 111b6c9c8..0d1dc6f49 100644 --- a/src/tests/nodes/slice_fp8x23_3d.cairo +++ b/src/tests/nodes/slice_fp8x23_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; -use orion::operators::tensor::implementations::impl_tensor_fp::FP8x23Tensor::FPTensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::FP8x23Tensor; +use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_fp8x23_3d/input_0.cairo b/src/tests/nodes/slice_fp8x23_3d/input_0.cairo index 8164ffbae..3ae4fc538 100644 --- a/src/tests/nodes/slice_fp8x23_3d/input_0.cairo +++ b/src/tests/nodes/slice_fp8x23_3d/input_0.cairo @@ -1,1016 +1,1015 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn input_0() -> Tensor { +fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(20); shape.append(10); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 830472192, sign: true }); - data.append(FixedType { mag: 444596224, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 864026624, sign: true }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 880803840, sign: false }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 830472192, sign: true }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 822083584, sign: false }); - data.append(FixedType { mag: 1006632960, sign: false }); - data.append(FixedType { mag: 687865856, sign: false }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 713031680, sign: true }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 796917760, sign: true }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 796917760, sign: true }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 847249408, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 209715200, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 486539264, sign: true }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 830472192, sign: false }); - data.append(FixedType { mag: 847249408, sign: true }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 587202560, sign: true }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 134217728, sign: true }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 922746880, sign: true }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 377487360, sign: true }); - data.append(FixedType { mag: 973078528, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 209715200, sign: true }); - data.append(FixedType { mag: 452984832, sign: true }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 704643072, sign: false }); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 788529152, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 956301312, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 922746880, sign: true }); - data.append(FixedType { mag: 578813952, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 58720256, sign: true }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 452984832, sign: true }); - data.append(FixedType { mag: 771751936, sign: false }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 494927872, sign: true }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 989855744, sign: true }); - data.append(FixedType { mag: 184549376, sign: true }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 117440512, sign: true }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 251658240, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 343932928, sign: true }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 562036736, sign: true }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 738197504, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 729808896, sign: true }); - data.append(FixedType { mag: 570425344, sign: true }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 637534208, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 738197504, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 369098752, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 620756992, sign: true }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 729808896, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 570425344, sign: true }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 67108864, sign: true }); - data.append(FixedType { mag: 964689920, sign: true }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 897581056, sign: false }); - data.append(FixedType { mag: 427819008, sign: true }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 746586112, sign: false }); - data.append(FixedType { mag: 989855744, sign: false }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 964689920, sign: true }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 989855744, sign: true }); - data.append(FixedType { mag: 243269632, sign: true }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 671088640, sign: true }); - data.append(FixedType { mag: 830472192, sign: true }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 1006632960, sign: false }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 411041792, sign: true }); - data.append(FixedType { mag: 1006632960, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 855638016, sign: false }); - data.append(FixedType { mag: 973078528, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 276824064, sign: true }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 562036736, sign: true }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 838860800, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 520093696, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 343932928, sign: true }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 830472192, sign: true }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 1023410176, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 243269632, sign: true }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 117440512, sign: true }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 796917760, sign: true }); - data.append(FixedType { mag: 830472192, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 939524096, sign: true }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 578813952, sign: true }); - data.append(FixedType { mag: 864026624, sign: false }); - data.append(FixedType { mag: 50331648, sign: false }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 285212672, sign: true }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 553648128, sign: true }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 796917760, sign: true }); - data.append(FixedType { mag: 83886080, sign: true }); - data.append(FixedType { mag: 75497472, sign: true }); - data.append(FixedType { mag: 251658240, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 897581056, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 729808896, sign: false }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 452984832, sign: true }); - data.append(FixedType { mag: 654311424, sign: true }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 260046848, sign: true }); - data.append(FixedType { mag: 1015021568, sign: false }); - data.append(FixedType { mag: 41943040, sign: false }); - data.append(FixedType { mag: 687865856, sign: false }); - data.append(FixedType { mag: 788529152, sign: false }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 973078528, sign: true }); - data.append(FixedType { mag: 444596224, sign: true }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 847249408, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 1048576000, sign: true }); - data.append(FixedType { mag: 402653184, sign: true }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 713031680, sign: true }); - data.append(FixedType { mag: 1031798784, sign: false }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 729808896, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 327155712, sign: true }); - data.append(FixedType { mag: 872415232, sign: false }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 704643072, sign: false }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 838860800, sign: false }); - data.append(FixedType { mag: 436207616, sign: true }); - data.append(FixedType { mag: 1023410176, sign: true }); - data.append(FixedType { mag: 436207616, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 478150656, sign: true }); - data.append(FixedType { mag: 411041792, sign: true }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 419430400, sign: true }); - data.append(FixedType { mag: 578813952, sign: true }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 998244352, sign: false }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 553648128, sign: false }); - data.append(FixedType { mag: 226492416, sign: true }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 738197504, sign: true }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 1048576000, sign: false }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 721420288, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 184549376, sign: true }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 1056964608, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 562036736, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 411041792, sign: true }); - data.append(FixedType { mag: 989855744, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 620756992, sign: false }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 981467136, sign: true }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 570425344, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 75497472, sign: true }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 973078528, sign: true }); - data.append(FixedType { mag: 595591168, sign: true }); - data.append(FixedType { mag: 939524096, sign: false }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 58720256, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 285212672, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 587202560, sign: false }); - data.append(FixedType { mag: 184549376, sign: true }); - data.append(FixedType { mag: 553648128, sign: true }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 855638016, sign: false }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 671088640, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 226492416, sign: true }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 838860800, sign: true }); - data.append(FixedType { mag: 8388608, sign: true }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 1040187392, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 998244352, sign: false }); - data.append(FixedType { mag: 1056964608, sign: false }); - data.append(FixedType { mag: 478150656, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 243269632, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 335544320, sign: false }); - data.append(FixedType { mag: 260046848, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 1040187392, sign: false }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 109051904, sign: true }); - data.append(FixedType { mag: 864026624, sign: true }); - data.append(FixedType { mag: 704643072, sign: false }); - data.append(FixedType { mag: 805306368, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 830472192, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 864026624, sign: true }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 67108864, sign: true }); - data.append(FixedType { mag: 864026624, sign: true }); - data.append(FixedType { mag: 729808896, sign: false }); - data.append(FixedType { mag: 662700032, sign: true }); - data.append(FixedType { mag: 813694976, sign: true }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 377487360, sign: true }); - data.append(FixedType { mag: 520093696, sign: true }); - data.append(FixedType { mag: 1015021568, sign: true }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 159383552, sign: false }); - data.append(FixedType { mag: 562036736, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 402653184, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 1006632960, sign: false }); - data.append(FixedType { mag: 360710144, sign: false }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 83886080, sign: true }); - data.append(FixedType { mag: 369098752, sign: true }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 603979776, sign: true }); - data.append(FixedType { mag: 360710144, sign: true }); - data.append(FixedType { mag: 452984832, sign: true }); - data.append(FixedType { mag: 260046848, sign: true }); - data.append(FixedType { mag: 511705088, sign: false }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 486539264, sign: true }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 973078528, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 369098752, sign: true }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 956301312, sign: true }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 578813952, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 973078528, sign: false }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 209715200, sign: true }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 637534208, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 838860800, sign: true }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 444596224, sign: true }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 578813952, sign: true }); - data.append(FixedType { mag: 847249408, sign: false }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 880803840, sign: false }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 520093696, sign: true }); - data.append(FixedType { mag: 167772160, sign: false }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 729808896, sign: true }); - data.append(FixedType { mag: 889192448, sign: true }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 562036736, sign: true }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 125829120, sign: true }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 125829120, sign: true }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 662700032, sign: true }); - data.append(FixedType { mag: 251658240, sign: true }); - data.append(FixedType { mag: 897581056, sign: true }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 830472192, sign: true }); - data.append(FixedType { mag: 478150656, sign: true }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 243269632, sign: true }); - data.append(FixedType { mag: 973078528, sign: true }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 0, sign: false }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 385875968, sign: false }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 813694976, sign: false }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 754974720, sign: false }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 838860800, sign: false }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 268435456, sign: true }); - data.append(FixedType { mag: 75497472, sign: true }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 713031680, sign: true }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 25165824, sign: false }); - data.append(FixedType { mag: 327155712, sign: false }); - data.append(FixedType { mag: 788529152, sign: true }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 855638016, sign: true }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 905969664, sign: true }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 889192448, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 67108864, sign: true }); - data.append(FixedType { mag: 385875968, sign: true }); - data.append(FixedType { mag: 989855744, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 58720256, sign: true }); - data.append(FixedType { mag: 184549376, sign: true }); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 612368384, sign: true }); - data.append(FixedType { mag: 889192448, sign: true }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 444596224, sign: true }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 654311424, sign: true }); - data.append(FixedType { mag: 520093696, sign: true }); - data.append(FixedType { mag: 125829120, sign: true }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 872415232, sign: false }); - data.append(FixedType { mag: 83886080, sign: true }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 754974720, sign: true }); - data.append(FixedType { mag: 981467136, sign: true }); - data.append(FixedType { mag: 83886080, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 989855744, sign: true }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 855638016, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 813694976, sign: true }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 973078528, sign: true }); - data.append(FixedType { mag: 444596224, sign: false }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 662700032, sign: true }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 260046848, sign: true }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 1040187392, sign: false }); - data.append(FixedType { mag: 75497472, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 704643072, sign: false }); - data.append(FixedType { mag: 536870912, sign: false }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 92274688, sign: true }); - data.append(FixedType { mag: 637534208, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 411041792, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 788529152, sign: true }); - data.append(FixedType { mag: 486539264, sign: true }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 813694976, sign: false }); - data.append(FixedType { mag: 343932928, sign: true }); - data.append(FixedType { mag: 335544320, sign: true }); - data.append(FixedType { mag: 1023410176, sign: true }); - data.append(FixedType { mag: 310378496, sign: true }); - data.append(FixedType { mag: 402653184, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 125829120, sign: true }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 285212672, sign: false }); - data.append(FixedType { mag: 436207616, sign: true }); - data.append(FixedType { mag: 192937984, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 150994944, sign: false }); - data.append(FixedType { mag: 452984832, sign: false }); - data.append(FixedType { mag: 520093696, sign: false }); - data.append(FixedType { mag: 343932928, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 327155712, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 385875968, sign: true }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 419430400, sign: true }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 494927872, sign: true }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 1056964608, sign: false }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 570425344, sign: true }); - data.append(FixedType { mag: 16777216, sign: true }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 687865856, sign: false }); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 914358272, sign: true }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 234881024, sign: true }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 1048576000, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 620756992, sign: true }); - data.append(FixedType { mag: 327155712, sign: true }); - data.append(FixedType { mag: 822083584, sign: false }); - data.append(FixedType { mag: 343932928, sign: true }); - data.append(FixedType { mag: 545259520, sign: true }); - data.append(FixedType { mag: 494927872, sign: false }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 729808896, sign: false }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 654311424, sign: true }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 738197504, sign: true }); - data.append(FixedType { mag: 973078528, sign: false }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 746586112, sign: true }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 788529152, sign: true }); - data.append(FixedType { mag: 251658240, sign: true }); - data.append(FixedType { mag: 83886080, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 956301312, sign: true }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 1015021568, sign: false }); - data.append(FixedType { mag: 629145600, sign: true }); - data.append(FixedType { mag: 931135488, sign: false }); - data.append(FixedType { mag: 713031680, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 880803840, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 301989888, sign: false }); - data.append(FixedType { mag: 226492416, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 486539264, sign: false }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 905969664, sign: true }); - data.append(FixedType { mag: 260046848, sign: false }); - data.append(FixedType { mag: 511705088, sign: true }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 796917760, sign: false }); - data.append(FixedType { mag: 385875968, sign: true }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 343932928, sign: true }); - data.append(FixedType { mag: 394264576, sign: true }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 1040187392, sign: false }); - data.append(FixedType { mag: 637534208, sign: true }); - data.append(FixedType { mag: 662700032, sign: false }); - data.append(FixedType { mag: 402653184, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 838860800, sign: true }); - data.append(FixedType { mag: 50331648, sign: true }); - data.append(FixedType { mag: 620756992, sign: true }); - data.append(FixedType { mag: 939524096, sign: true }); - data.append(FixedType { mag: 763363328, sign: true }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 117440512, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 310378496, sign: false }); - data.append(FixedType { mag: 989855744, sign: false }); - data.append(FixedType { mag: 645922816, sign: false }); - data.append(FixedType { mag: 1006632960, sign: false }); - data.append(FixedType { mag: 721420288, sign: false }); - data.append(FixedType { mag: 947912704, sign: false }); - data.append(FixedType { mag: 964689920, sign: false }); - data.append(FixedType { mag: 394264576, sign: false }); - data.append(FixedType { mag: 201326592, sign: false }); - data.append(FixedType { mag: 603979776, sign: false }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 444596224, sign: true }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 662700032, sign: true }); - data.append(FixedType { mag: 92274688, sign: false }); - data.append(FixedType { mag: 41943040, sign: true }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 117440512, sign: true }); - data.append(FixedType { mag: 595591168, sign: true }); - data.append(FixedType { mag: 327155712, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 973078528, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 494927872, sign: true }); - data.append(FixedType { mag: 83886080, sign: false }); - data.append(FixedType { mag: 964689920, sign: true }); - data.append(FixedType { mag: 503316480, sign: false }); - data.append(FixedType { mag: 100663296, sign: false }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 947912704, sign: true }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 889192448, sign: false }); - data.append(FixedType { mag: 587202560, sign: true }); - data.append(FixedType { mag: 1023410176, sign: false }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 478150656, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 729808896, sign: false }); - data.append(FixedType { mag: 654311424, sign: false }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 813694976, sign: false }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 226492416, sign: false }); - data.append(FixedType { mag: 385875968, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 754974720, sign: false }); - data.append(FixedType { mag: 880803840, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 1023410176, sign: true }); - data.append(FixedType { mag: 1031798784, sign: false }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 603979776, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 134217728, sign: false }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 1040187392, sign: true }); - data.append(FixedType { mag: 486539264, sign: true }); - data.append(FixedType { mag: 662700032, sign: true }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 880803840, sign: true }); - data.append(FixedType { mag: 134217728, sign: true }); - data.append(FixedType { mag: 142606336, sign: false }); - data.append(FixedType { mag: 1015021568, sign: false }); - data.append(FixedType { mag: 939524096, sign: false }); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 687865856, sign: true }); - data.append(FixedType { mag: 570425344, sign: true }); - data.append(FixedType { mag: 276824064, sign: false }); - data.append(FixedType { mag: 981467136, sign: true }); - data.append(FixedType { mag: 243269632, sign: false }); - data.append(FixedType { mag: 276824064, sign: true }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 469762048, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 872415232, sign: false }); - data.append(FixedType { mag: 562036736, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 880803840, sign: true }); - data.append(FixedType { mag: 234881024, sign: true }); - data.append(FixedType { mag: 771751936, sign: false }); - data.append(FixedType { mag: 444596224, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 58720256, sign: true }); - data.append(FixedType { mag: 461373440, sign: true }); - data.append(FixedType { mag: 209715200, sign: false }); - data.append(FixedType { mag: 469762048, sign: true }); - data.append(FixedType { mag: 612368384, sign: false }); - data.append(FixedType { mag: 780140544, sign: false }); - data.append(FixedType { mag: 721420288, sign: false }); - data.append(FixedType { mag: 335544320, sign: true }); - data.append(FixedType { mag: 989855744, sign: false }); - data.append(FixedType { mag: 788529152, sign: false }); - data.append(FixedType { mag: 671088640, sign: true }); - data.append(FixedType { mag: 260046848, sign: true }); - data.append(FixedType { mag: 704643072, sign: true }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 1056964608, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 780140544, sign: true }); - data.append(FixedType { mag: 75497472, sign: true }); - data.append(FixedType { mag: 763363328, sign: false }); - data.append(FixedType { mag: 201326592, sign: true }); - data.append(FixedType { mag: 293601280, sign: false }); - data.append(FixedType { mag: 637534208, sign: true }); - data.append(FixedType { mag: 58720256, sign: false }); - data.append(FixedType { mag: 570425344, sign: true }); - data.append(FixedType { mag: 805306368, sign: true }); - data.append(FixedType { mag: 478150656, sign: true }); - data.append(FixedType { mag: 696254464, sign: false }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 679477248, sign: false }); - data.append(FixedType { mag: 33554432, sign: true }); - data.append(FixedType { mag: 528482304, sign: false }); - data.append(FixedType { mag: 713031680, sign: false }); - data.append(FixedType { mag: 419430400, sign: false }); - data.append(FixedType { mag: 377487360, sign: false }); - data.append(FixedType { mag: 981467136, sign: true }); - data.append(FixedType { mag: 713031680, sign: true }); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 159383552, sign: true }); - data.append(FixedType { mag: 226492416, sign: true }); - data.append(FixedType { mag: 738197504, sign: false }); - data.append(FixedType { mag: 771751936, sign: true }); - data.append(FixedType { mag: 25165824, sign: true }); - data.append(FixedType { mag: 318767104, sign: true }); - data.append(FixedType { mag: 369098752, sign: false }); - data.append(FixedType { mag: 167772160, sign: true }); - data.append(FixedType { mag: 536870912, sign: true }); - data.append(FixedType { mag: 721420288, sign: true }); - data.append(FixedType { mag: 922746880, sign: false }); - data.append(FixedType { mag: 1031798784, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: true }); + data.append(FP8x23 { mag: 293601280, sign: true }); + data.append(FP8x23 { mag: 662700032, sign: true }); + data.append(FP8x23 { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: true }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: false }); + data.append(FP8x23 { mag: 973078528, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 260046848, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: true }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 880803840, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: true }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 872415232, sign: true }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 855638016, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 872415232, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 1040187392, sign: false }); + data.append(FP8x23 { mag: 679477248, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 738197504, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 780140544, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 855638016, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 721420288, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 998244352, sign: true }); + data.append(FP8x23 { mag: 352321536, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 880803840, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 864026624, sign: true }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 713031680, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 1048576000, sign: false }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 855638016, sign: false }); + data.append(FP8x23 { mag: 1065353216, sign: true }); + data.append(FP8x23 { mag: 662700032, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 729808896, sign: true }); + data.append(FP8x23 { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 704643072, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 1006632960, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 696254464, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: false }); + data.append(FP8x23 { mag: 830472192, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 603979776, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 855638016, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 780140544, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 998244352, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 729808896, sign: true }); + data.append(FP8x23 { mag: 1065353216, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 713031680, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 696254464, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 377487360, sign: true }); + data.append(FP8x23 { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: true }); + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: true }); + data.append(FP8x23 { mag: 780140544, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 713031680, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: true }); + data.append(FP8x23 { mag: 973078528, sign: false }); + data.append(FP8x23 { mag: 729808896, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 872415232, sign: true }); + data.append(FP8x23 { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 771751936, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 268435456, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 864026624, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 494927872, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 780140544, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: true }); + data.append(FP8x23 { mag: 864026624, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: false }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: true }); + data.append(FP8x23 { mag: 713031680, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: true }); + data.append(FP8x23 { mag: 1065353216, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: true }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: true }); + data.append(FP8x23 { mag: 494927872, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 872415232, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 721420288, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: true }); + data.append(FP8x23 { mag: 805306368, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 973078528, sign: false }); + data.append(FP8x23 { mag: 318767104, sign: true }); + data.append(FP8x23 { mag: 889192448, sign: true }); + data.append(FP8x23 { mag: 914358272, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: true }); + data.append(FP8x23 { mag: 234881024, sign: true }); + data.append(FP8x23 { mag: 444596224, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: true }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 578813952, sign: false }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 729808896, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 503316480, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 234881024, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 939524096, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 327155712, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 713031680, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 360710144, sign: true }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: true }); + data.append(FP8x23 { mag: 981467136, sign: false }); + data.append(FP8x23 { mag: 671088640, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: true }); + data.append(FP8x23 { mag: 872415232, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: true }); + data.append(FP8x23 { mag: 981467136, sign: false }); + data.append(FP8x23 { mag: 369098752, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 142606336, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: true }); + data.append(FP8x23 { mag: 1065353216, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: true }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 696254464, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 830472192, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: false }); + data.append(FP8x23 { mag: 855638016, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 905969664, sign: true }); + data.append(FP8x23 { mag: 385875968, sign: true }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: true }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 796917760, sign: true }); + data.append(FP8x23 { mag: 494927872, sign: true }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 998244352, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 780140544, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 553648128, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: true }); + data.append(FP8x23 { mag: 83886080, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 872415232, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: true }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 880803840, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 872415232, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: true }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 1006632960, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 696254464, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 369098752, sign: false }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 813694976, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 956301312, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 679477248, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 872415232, sign: true }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 998244352, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 234881024, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 142606336, sign: false }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 301989888, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: true }); + data.append(FP8x23 { mag: 352321536, sign: true }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: false }); + data.append(FP8x23 { mag: 352321536, sign: true }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: true }); + data.append(FP8x23 { mag: 998244352, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 889192448, sign: false }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 553648128, sign: true }); + data.append(FP8x23 { mag: 100663296, sign: false }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 444596224, sign: true }); + data.append(FP8x23 { mag: 520093696, sign: true }); + data.append(FP8x23 { mag: 989855744, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 855638016, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: true }); + data.append(FP8x23 { mag: 520093696, sign: true }); + data.append(FP8x23 { mag: 822083584, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 989855744, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: true }); + data.append(FP8x23 { mag: 905969664, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: true }); + data.append(FP8x23 { mag: 805306368, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 520093696, sign: true }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 713031680, sign: false }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 1040187392, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 989855744, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 503316480, sign: false }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 864026624, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 864026624, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 603979776, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 973078528, sign: true }); + data.append(FP8x23 { mag: 788529152, sign: true }); + data.append(FP8x23 { mag: 25165824, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 75497472, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 637534208, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 939524096, sign: true }); + data.append(FP8x23 { mag: 268435456, sign: true }); + data.append(FP8x23 { mag: 595591168, sign: true }); + data.append(FP8x23 { mag: 637534208, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: true }); + data.append(FP8x23 { mag: 964689920, sign: true }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: true }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 209715200, sign: true }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: true }); + data.append(FP8x23 { mag: 679477248, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 100663296, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 8388608, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 864026624, sign: true }); + data.append(FP8x23 { mag: 167772160, sign: true }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 780140544, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 587202560, sign: false }); + data.append(FP8x23 { mag: 478150656, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: true }); + data.append(FP8x23 { mag: 469762048, sign: false }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 847249408, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 159383552, sign: true }); + data.append(FP8x23 { mag: 201326592, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 377487360, sign: false }); + data.append(FP8x23 { mag: 293601280, sign: false }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 25165824, sign: false }); + data.append(FP8x23 { mag: 570425344, sign: false }); + data.append(FP8x23 { mag: 192937984, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: true }); + data.append(FP8x23 { mag: 150994944, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: true }); + data.append(FP8x23 { mag: 721420288, sign: true }); + data.append(FP8x23 { mag: 243269632, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: true }); + data.append(FP8x23 { mag: 33554432, sign: true }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 989855744, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 503316480, sign: true }); + data.append(FP8x23 { mag: 192937984, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: false }); + data.append(FP8x23 { mag: 452984832, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: false }); + data.append(FP8x23 { mag: 738197504, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 612368384, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: true }); + data.append(FP8x23 { mag: 562036736, sign: false }); + data.append(FP8x23 { mag: 1006632960, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: false }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: true }); + data.append(FP8x23 { mag: 662700032, sign: true }); + data.append(FP8x23 { mag: 788529152, sign: false }); + data.append(FP8x23 { mag: 58720256, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: true }); + data.append(FP8x23 { mag: 746586112, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 780140544, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 763363328, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: false }); + data.append(FP8x23 { mag: 469762048, sign: true }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 545259520, sign: true }); + data.append(FP8x23 { mag: 981467136, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 503316480, sign: true }); + data.append(FP8x23 { mag: 184549376, sign: false }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 411041792, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 327155712, sign: true }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 889192448, sign: true }); + data.append(FP8x23 { mag: 352321536, sign: false }); + data.append(FP8x23 { mag: 998244352, sign: true }); + data.append(FP8x23 { mag: 838860800, sign: true }); + data.append(FP8x23 { mag: 318767104, sign: true }); + data.append(FP8x23 { mag: 318767104, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 8388608, sign: true }); + data.append(FP8x23 { mag: 419430400, sign: true }); + data.append(FP8x23 { mag: 394264576, sign: true }); + data.append(FP8x23 { mag: 75497472, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: true }); + data.append(FP8x23 { mag: 931135488, sign: false }); + data.append(FP8x23 { mag: 134217728, sign: true }); + data.append(FP8x23 { mag: 301989888, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: false }); + data.append(FP8x23 { mag: 83886080, sign: true }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 310378496, sign: true }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 754974720, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 880803840, sign: false }); + data.append(FP8x23 { mag: 780140544, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: false }); + data.append(FP8x23 { mag: 922746880, sign: true }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 511705088, sign: true }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 260046848, sign: true }); + data.append(FP8x23 { mag: 536870912, sign: true }); + data.append(FP8x23 { mag: 645922816, sign: true }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 813694976, sign: false }); + data.append(FP8x23 { mag: 771751936, sign: true }); + data.append(FP8x23 { mag: 478150656, sign: true }); + data.append(FP8x23 { mag: 956301312, sign: true }); + data.append(FP8x23 { mag: 830472192, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 444596224, sign: true }); + data.append(FP8x23 { mag: 335544320, sign: true }); + data.append(FP8x23 { mag: 654311424, sign: false }); + data.append(FP8x23 { mag: 536870912, sign: false }); + data.append(FP8x23 { mag: 704643072, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 16777216, sign: false }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 973078528, sign: true }); + data.append(FP8x23 { mag: 486539264, sign: false }); + data.append(FP8x23 { mag: 822083584, sign: false }); + data.append(FP8x23 { mag: 436207616, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 150994944, sign: false }); + data.append(FP8x23 { mag: 738197504, sign: false }); + data.append(FP8x23 { mag: 964689920, sign: false }); + data.append(FP8x23 { mag: 285212672, sign: true }); + data.append(FP8x23 { mag: 511705088, sign: false }); + data.append(FP8x23 { mag: 385875968, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: true }); + data.append(FP8x23 { mag: 494927872, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_fp8x23_3d/output_0.cairo b/src/tests/nodes/slice_fp8x23_3d/output_0.cairo index 171aaedcc..89e4051c3 100644 --- a/src/tests/nodes/slice_fp8x23_3d/output_0.cairo +++ b/src/tests/nodes/slice_fp8x23_3d/output_0.cairo @@ -1,76 +1,75 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::{FixedTrait, FixedType, FixedImpl}; -use orion::operators::tensor::implementations::impl_tensor_fp::Tensor_fp; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::FP8x23Tensor; +use orion::numbers::FixedTrait; +use orion::numbers::FP8x23; -fn output_0() -> Tensor { +fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); shape.append(3); shape.append(4); shape.append(5); let mut data = ArrayTrait::new(); - data.append(FixedType { mag: 461373440, sign: false }); - data.append(FixedType { mag: 352321536, sign: false }); - data.append(FixedType { mag: 679477248, sign: true }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 905969664, sign: false }); - data.append(FixedType { mag: 931135488, sign: true }); - data.append(FixedType { mag: 67108864, sign: false }); - data.append(FixedType { mag: 880803840, sign: false }); - data.append(FixedType { mag: 192937984, sign: false }); - data.append(FixedType { mag: 125829120, sign: false }); - data.append(FixedType { mag: 822083584, sign: true }); - data.append(FixedType { mag: 142606336, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 1031798784, sign: true }); - data.append(FixedType { mag: 847249408, sign: true }); - data.append(FixedType { mag: 998244352, sign: true }); - data.append(FixedType { mag: 293601280, sign: true }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 209715200, sign: true }); - data.append(FixedType { mag: 645922816, sign: true }); - data.append(FixedType { mag: 318767104, sign: false }); - data.append(FixedType { mag: 486539264, sign: true }); - data.append(FixedType { mag: 184549376, sign: false }); - data.append(FixedType { mag: 587202560, sign: true }); - data.append(FixedType { mag: 595591168, sign: false }); - data.append(FixedType { mag: 981467136, sign: false }); - data.append(FixedType { mag: 134217728, sign: true }); - data.append(FixedType { mag: 176160768, sign: false }); - data.append(FixedType { mag: 452984832, sign: true }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 33554432, sign: false }); - data.append(FixedType { mag: 8388608, sign: false }); - data.append(FixedType { mag: 704643072, sign: false }); - data.append(FixedType { mag: 956301312, sign: false }); - data.append(FixedType { mag: 109051904, sign: false }); - data.append(FixedType { mag: 629145600, sign: false }); - data.append(FixedType { mag: 503316480, sign: true }); - data.append(FixedType { mag: 922746880, sign: true }); - data.append(FixedType { mag: 578813952, sign: true }); - data.append(FixedType { mag: 218103808, sign: true }); - data.append(FixedType { mag: 251658240, sign: false }); - data.append(FixedType { mag: 268435456, sign: false }); - data.append(FixedType { mag: 58720256, sign: true }); - data.append(FixedType { mag: 234881024, sign: false }); - data.append(FixedType { mag: 494927872, sign: true }); - data.append(FixedType { mag: 301989888, sign: true }); - data.append(FixedType { mag: 528482304, sign: true }); - data.append(FixedType { mag: 218103808, sign: false }); - data.append(FixedType { mag: 16777216, sign: false }); - data.append(FixedType { mag: 100663296, sign: true }); - data.append(FixedType { mag: 696254464, sign: true }); - data.append(FixedType { mag: 117440512, sign: true }); - data.append(FixedType { mag: 176160768, sign: true }); - data.append(FixedType { mag: 352321536, sign: true }); - data.append(FixedType { mag: 872415232, sign: true }); - data.append(FixedType { mag: 1006632960, sign: true }); - data.append(FixedType { mag: 427819008, sign: false }); - data.append(FixedType { mag: 50331648, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP8x23) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(FP8x23 { mag: 754974720, sign: true }); + data.append(FP8x23 { mag: 176160768, sign: false }); + data.append(FP8x23 { mag: 553648128, sign: true }); + data.append(FP8x23 { mag: 67108864, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: true }); + data.append(FP8x23 { mag: 461373440, sign: false }); + data.append(FP8x23 { mag: 528482304, sign: false }); + data.append(FP8x23 { mag: 805306368, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 310378496, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: false }); + data.append(FP8x23 { mag: 947912704, sign: false }); + data.append(FP8x23 { mag: 1048576000, sign: true }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 1056964608, sign: true }); + data.append(FP8x23 { mag: 125829120, sign: true }); + data.append(FP8x23 { mag: 620756992, sign: true }); + data.append(FP8x23 { mag: 1031798784, sign: false }); + data.append(FP8x23 { mag: 109051904, sign: true }); + data.append(FP8x23 { mag: 427819008, sign: false }); + data.append(FP8x23 { mag: 1040187392, sign: true }); + data.append(FP8x23 { mag: 830472192, sign: false }); + data.append(FP8x23 { mag: 629145600, sign: false }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 687865856, sign: false }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 285212672, sign: false }); + data.append(FP8x23 { mag: 662700032, sign: false }); + data.append(FP8x23 { mag: 92274688, sign: false }); + data.append(FP8x23 { mag: 637534208, sign: false }); + data.append(FP8x23 { mag: 1015021568, sign: false }); + data.append(FP8x23 { mag: 494927872, sign: false }); + data.append(FP8x23 { mag: 1023410176, sign: false }); + data.append(FP8x23 { mag: 251658240, sign: false }); + data.append(FP8x23 { mag: 50331648, sign: false }); + data.append(FP8x23 { mag: 226492416, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 562036736, sign: true }); + data.append(FP8x23 { mag: 218103808, sign: false }); + data.append(FP8x23 { mag: 520093696, sign: false }); + data.append(FP8x23 { mag: 796917760, sign: false }); + data.append(FP8x23 { mag: 0, sign: false }); + data.append(FP8x23 { mag: 117440512, sign: true }); + data.append(FP8x23 { mag: 109051904, sign: false }); + data.append(FP8x23 { mag: 880803840, sign: true }); + data.append(FP8x23 { mag: 914358272, sign: false }); + data.append(FP8x23 { mag: 931135488, sign: false }); + data.append(FP8x23 { mag: 897581056, sign: false }); + data.append(FP8x23 { mag: 645922816, sign: false }); + data.append(FP8x23 { mag: 687865856, sign: true }); + data.append(FP8x23 { mag: 947912704, sign: true }); + data.append(FP8x23 { mag: 402653184, sign: true }); + data.append(FP8x23 { mag: 343932928, sign: true }); + data.append(FP8x23 { mag: 578813952, sign: true }); + data.append(FP8x23 { mag: 41943040, sign: true }); + data.append(FP8x23 { mag: 1006632960, sign: true }); + data.append(FP8x23 { mag: 276824064, sign: true }); + data.append(FP8x23 { mag: 939524096, sign: true }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_2d.cairo b/src/tests/nodes/slice_i32_2d.cairo index 7a6dde9f3..2fa14a6ee 100644 --- a/src/tests/nodes/slice_i32_2d.cairo +++ b/src/tests/nodes/slice_i32_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_i32_2d/input_0.cairo b/src/tests/nodes/slice_i32_2d/input_0.cairo index c488dde57..17cdb26b0 100644 --- a/src/tests/nodes/slice_i32_2d/input_0.cairo +++ b/src/tests/nodes/slice_i32_2d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(4); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 96, sign: false }); data.append(i32 { mag: 55, sign: true }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 18, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 73, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_2d/output_0.cairo b/src/tests/nodes/slice_i32_2d/output_0.cairo index a7c503129..62871c4ec 100644 --- a/src/tests/nodes/slice_i32_2d/output_0.cairo +++ b/src/tests/nodes/slice_i32_2d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 18, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 73, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_3d.cairo b/src/tests/nodes/slice_i32_3d.cairo index 3c39a525f..13b9f712a 100644 --- a/src/tests/nodes/slice_i32_3d.cairo +++ b/src/tests/nodes/slice_i32_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::operators::tensor::implementations::impl_tensor_i32::i32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I32Tensor; +use orion::operators::tensor::I32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_i32_3d/input_0.cairo b/src/tests/nodes/slice_i32_3d/input_0.cairo index efd5f502c..1fa19b3e6 100644 --- a/src/tests/nodes/slice_i32_3d/input_0.cairo +++ b/src/tests/nodes/slice_i32_3d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,1007 +10,1005 @@ fn input_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 115, sign: false }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 96, sign: true }); - data.append(i32 { mag: 83, sign: true }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 31, sign: true }); data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 67, sign: false }); data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 85, sign: true }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 83, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 10, sign: true }); - data.append(i32 { mag: 60, sign: true }); - data.append(i32 { mag: 77, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 94, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 45, sign: true }); - data.append(i32 { mag: 67, sign: true }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 38, sign: true }); - data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 17, sign: false }); data.append(i32 { mag: 43, sign: true }); - data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 56, sign: true }); data.append(i32 { mag: 77, sign: true }); - data.append(i32 { mag: 126, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 70, sign: true }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 9, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 94, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 112, sign: false }); data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 23, sign: true }); - data.append(i32 { mag: 36, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 107, sign: false }); data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 54, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 36, sign: true }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 47, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 94, sign: false }); - data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 110, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 29, sign: false }); data.append(i32 { mag: 118, sign: true }); - data.append(i32 { mag: 126, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 87, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 89, sign: true }); data.append(i32 { mag: 51, sign: true }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 125, sign: true }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 114, sign: false }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 8, sign: true }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 84, sign: true }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 13, sign: false }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 35, sign: true }); - data.append(i32 { mag: 124, sign: true }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 105, sign: true }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 8, sign: true }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 27, sign: true }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 32, sign: true }); data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 39, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 57, sign: false }); data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 103, sign: false }); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 106, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 64, sign: true }); - data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 35, sign: false }); data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 105, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 45, sign: true }); - data.append(i32 { mag: 109, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 99, sign: true }); data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 24, sign: true }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 25, sign: true }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 111, sign: false }); - data.append(i32 { mag: 31, sign: true }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 93, sign: false }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 15, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 106, sign: true }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 125, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 109, sign: true }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 111, sign: false }); - data.append(i32 { mag: 35, sign: true }); - data.append(i32 { mag: 30, sign: true }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 44, sign: false }); - data.append(i32 { mag: 114, sign: true }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 84, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 36, sign: true }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 107, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 75, sign: true }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 40, sign: true }); - data.append(i32 { mag: 99, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 53, sign: false }); - data.append(i32 { mag: 46, sign: true }); - data.append(i32 { mag: 91, sign: true }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 121, sign: false }); data.append(i32 { mag: 46, sign: true }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 12, sign: true }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 39, sign: false }); data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 31, sign: true }); - data.append(i32 { mag: 46, sign: true }); - data.append(i32 { mag: 53, sign: false }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 57, sign: true }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 51, sign: true }); - data.append(i32 { mag: 39, sign: true }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 54, sign: false }); - data.append(i32 { mag: 69, sign: true }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 92, sign: true }); - data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 126, sign: true }); data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 58, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 15, sign: true }); - data.append(i32 { mag: 120, sign: false }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 94, sign: false }); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 14, sign: true }); data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 98, sign: true }); - data.append(i32 { mag: 103, sign: true }); - data.append(i32 { mag: 67, sign: true }); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 57, sign: true }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 63, sign: false }); data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 43, sign: false }); data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 119, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 81, sign: false }); data.append(i32 { mag: 8, sign: false }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 35, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 121, sign: false }); - data.append(i32 { mag: 45, sign: true }); - data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 85, sign: false }); data.append(i32 { mag: 126, sign: false }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 124, sign: true }); - data.append(i32 { mag: 38, sign: true }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 99, sign: true }); - data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 94, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 56, sign: true }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 120, sign: false }); data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 60, sign: true }); - data.append(i32 { mag: 103, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 50, sign: true }); - data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 13, sign: true }); data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 44, sign: true }); - data.append(i32 { mag: 115, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 38, sign: true }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 66, sign: true }); - data.append(i32 { mag: 110, sign: false }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 25, sign: false }); data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 91, sign: true }); - data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 30, sign: true }); data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 125, sign: true }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 85, sign: false }); - data.append(i32 { mag: 87, sign: true }); - data.append(i32 { mag: 78, sign: true }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 73, sign: false }); data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 126, sign: false }); data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 111, sign: false }); data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 94, sign: false }); data.append(i32 { mag: 119, sign: false }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 122, sign: true }); + data.append(i32 { mag: 125, sign: true }); data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 86, sign: false }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 92, sign: true }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 15, sign: true }); - data.append(i32 { mag: 66, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 74, sign: true }); - data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 103, sign: false }); - data.append(i32 { mag: 109, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 120, sign: false }); - data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 102, sign: true }); - data.append(i32 { mag: 83, sign: false }); - data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 49, sign: false }); data.append(i32 { mag: 123, sign: true }); data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 43, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 88, sign: false }); data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 12, sign: true }); - data.append(i32 { mag: 17, sign: true }); - data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 89, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 30, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 48, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 82, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 124, sign: true }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 18, sign: false }); data.append(i32 { mag: 95, sign: false }); - data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 86, sign: false }); data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 125, sign: false }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 106, sign: true }); - data.append(i32 { mag: 75, sign: true }); - data.append(i32 { mag: 109, sign: false }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 120, sign: false }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 42, sign: false }); data.append(i32 { mag: 65, sign: true }); - data.append(i32 { mag: 66, sign: true }); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 120, sign: true }); - data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 34, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 43, sign: true }); data.append(i32 { mag: 124, sign: true }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 21, sign: true }); - data.append(i32 { mag: 87, sign: true }); - data.append(i32 { mag: 62, sign: true }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 74, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 16, sign: true }); data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 108, sign: true }); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 63, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 31, sign: true }); - data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 106, sign: true }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 14, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 61, sign: false }); data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 105, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 11, sign: false }); data.append(i32 { mag: 93, sign: false }); - data.append(i32 { mag: 103, sign: true }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 86, sign: false }); data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 45, sign: true }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 121, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 67, sign: true }); - data.append(i32 { mag: 55, sign: true }); - data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 18, sign: true }); - data.append(i32 { mag: 93, sign: false }); - data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 109, sign: false }); - data.append(i32 { mag: 90, sign: true }); - data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 71, sign: true }); - data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 78, sign: true }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 101, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 107, sign: false }); data.append(i32 { mag: 11, sign: false }); - data.append(i32 { mag: 103, sign: true }); data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 98, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 62, sign: true }); - data.append(i32 { mag: 45, sign: true }); - data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 93, sign: false }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 120, sign: false }); data.append(i32 { mag: 99, sign: false }); - data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 8, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 110, sign: false }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 52, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 118, sign: true }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 22, sign: true }); + data.append(i32 { mag: 103, sign: false }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 40, sign: true }); data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 71, sign: true }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 84, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 44, sign: true }); - data.append(i32 { mag: 92, sign: true }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 112, sign: false }); data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 46, sign: true }); data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 77, sign: true }); - data.append(i32 { mag: 35, sign: true }); - data.append(i32 { mag: 125, sign: true }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 90, sign: true }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 38, sign: false }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 101, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 53, sign: true }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 26, sign: false }); data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 5, sign: true }); + data.append(i32 { mag: 121, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 51, sign: false }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 80, sign: true }); data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 86, sign: true }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 123, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 26, sign: true }); data.append(i32 { mag: 115, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 96, sign: true }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 39, sign: false }); data.append(i32 { mag: 65, sign: true }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 69, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 81, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 23, sign: true }); data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 24, sign: true }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 41, sign: true }); - data.append(i32 { mag: 122, sign: false }); - data.append(i32 { mag: 67, sign: true }); - data.append(i32 { mag: 84, sign: true }); - data.append(i32 { mag: 57, sign: true }); data.append(i32 { mag: 103, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 105, sign: false }); - data.append(i32 { mag: 75, sign: false }); - data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 45, sign: true }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 30, sign: true }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 118, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 124, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 112, sign: true }); data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 32, sign: true }); - data.append(i32 { mag: 84, sign: false }); - data.append(i32 { mag: 66, sign: true }); - data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 86, sign: true }); data.append(i32 { mag: 87, sign: false }); - data.append(i32 { mag: 29, sign: true }); - data.append(i32 { mag: 102, sign: true }); - data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 68, sign: false }); + data.append(i32 { mag: 112, sign: true }); + data.append(i32 { mag: 104, sign: false }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 36, sign: false }); data.append(i32 { mag: 84, sign: true }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 120, sign: true }); - data.append(i32 { mag: 32, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 63, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 26, sign: false }); - data.append(i32 { mag: 92, sign: true }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 90, sign: false }); data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 5, sign: false }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 92, sign: false }); + data.append(i32 { mag: 44, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 107, sign: false }); data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 101, sign: false }); - data.append(i32 { mag: 37, sign: true }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 31, sign: false }); - data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 92, sign: true }); - data.append(i32 { mag: 57, sign: true }); - data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 43, sign: false }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 61, sign: true }); - data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 109, sign: false }); data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 91, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 32, sign: true }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 39, sign: true }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 64, sign: true }); + data.append(i32 { mag: 97, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 114, sign: false }); data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 102, sign: false }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 79, sign: true }); data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 43, sign: true }); + data.append(i32 { mag: 89, sign: false }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 12, sign: true }); data.append(i32 { mag: 80, sign: false }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 23, sign: true }); - data.append(i32 { mag: 27, sign: false }); - data.append(i32 { mag: 102, sign: true }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 77, sign: true }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 123, sign: false }); + data.append(i32 { mag: 81, sign: false }); data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 73, sign: true }); data.append(i32 { mag: 108, sign: false }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 42, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 11, sign: true }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 39, sign: true }); data.append(i32 { mag: 87, sign: true }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 13, sign: true }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 61, sign: false }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 25, sign: true }); data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 19, sign: false }); + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 116, sign: false }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 33, sign: true }); data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 88, sign: false }); - data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 80, sign: false }); - data.append(i32 { mag: 103, sign: true }); - data.append(i32 { mag: 68, sign: true }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 99, sign: true }); - data.append(i32 { mag: 81, sign: true }); - data.append(i32 { mag: 115, sign: true }); - data.append(i32 { mag: 35, sign: true }); - data.append(i32 { mag: 2, sign: true }); data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 62, sign: true }); - data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 30, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 90, sign: true }); + data.append(i32 { mag: 38, sign: false }); data.append(i32 { mag: 69, sign: true }); - data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 120, sign: true }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 32, sign: true }); data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 115, sign: true }); - data.append(i32 { mag: 65, sign: true }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 30, sign: true }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 122, sign: true }); data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 60, sign: true }); - data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 71, sign: true }); - data.append(i32 { mag: 17, sign: true }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 23, sign: true }); - data.append(i32 { mag: 75, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 67, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 83, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 55, sign: true }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 101, sign: true }); - data.append(i32 { mag: 2, sign: false }); - data.append(i32 { mag: 40, sign: true }); - data.append(i32 { mag: 16, sign: false }); - data.append(i32 { mag: 84, sign: true }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 57, sign: true }); - data.append(i32 { mag: 125, sign: false }); - data.append(i32 { mag: 29, sign: false }); - data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 118, sign: true }); data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 17, sign: true }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 67, sign: false }); - data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 117, sign: true }); data.append(i32 { mag: 29, sign: true }); - data.append(i32 { mag: 14, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 100, sign: false }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 21, sign: true }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 87, sign: false }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 71, sign: true }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 78, sign: true }); - data.append(i32 { mag: 90, sign: false }); - data.append(i32 { mag: 102, sign: true }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 123, sign: true }); - data.append(i32 { mag: 53, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 13, sign: true }); - data.append(i32 { mag: 107, sign: false }); - data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 120, sign: true }); data.append(i32 { mag: 103, sign: true }); - data.append(i32 { mag: 71, sign: true }); - data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 58, sign: false }); - data.append(i32 { mag: 74, sign: false }); - data.append(i32 { mag: 26, sign: true }); - data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 69, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 83, sign: false }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 100, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 1, sign: false }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 121, sign: false }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 31, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 16, sign: true }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 62, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 76, sign: true }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 87, sign: true }); + data.append(i32 { mag: 19, sign: true }); + data.append(i32 { mag: 24, sign: true }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 85, sign: false }); + data.append(i32 { mag: 98, sign: true }); + data.append(i32 { mag: 27, sign: false }); + data.append(i32 { mag: 9, sign: false }); data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 75, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 119, sign: true }); + data.append(i32 { mag: 53, sign: true }); data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 114, sign: true }); - data.append(i32 { mag: 78, sign: true }); - data.append(i32 { mag: 66, sign: false }); - data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 126, sign: false }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 113, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 9, sign: false }); + data.append(i32 { mag: 100, sign: false }); data.append(i32 { mag: 94, sign: true }); - data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 7, sign: false }); - data.append(i32 { mag: 126, sign: false }); - data.append(i32 { mag: 46, sign: false }); - data.append(i32 { mag: 85, sign: false }); - data.append(i32 { mag: 6, sign: false }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 73, sign: false }); - data.append(i32 { mag: 29, sign: true }); - data.append(i32 { mag: 5, sign: true }); data.append(i32 { mag: 23, sign: true }); - data.append(i32 { mag: 82, sign: false }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 123, sign: false }); - data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 40, sign: false }); - data.append(i32 { mag: 24, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 99, sign: true }); - data.append(i32 { mag: 47, sign: true }); - data.append(i32 { mag: 34, sign: true }); - data.append(i32 { mag: 85, sign: true }); - data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 91, sign: false }); + data.append(i32 { mag: 65, sign: false }); + data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 73, sign: false }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 45, sign: true }); data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 63, sign: true }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 54, sign: true }); - data.append(i32 { mag: 85, sign: true }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 68, sign: true }); - data.append(i32 { mag: 101, sign: false }); - data.append(i32 { mag: 108, sign: false }); - data.append(i32 { mag: 111, sign: false }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 83, sign: true }); data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 106, sign: false }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 115, sign: true }); - data.append(i32 { mag: 78, sign: true }); - data.append(i32 { mag: 126, sign: false }); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 23, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 54, sign: false }); + data.append(i32 { mag: 24, sign: false }); data.append(i32 { mag: 95, sign: true }); - data.append(i32 { mag: 50, sign: true }); - data.append(i32 { mag: 25, sign: false }); - data.append(i32 { mag: 114, sign: true }); - data.append(i32 { mag: 96, sign: false }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 4, sign: true }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 107, sign: false }); data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 89, sign: false }); - data.append(i32 { mag: 126, sign: true }); - data.append(i32 { mag: 45, sign: false }); - data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 94, sign: false }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 39, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 57, sign: true }); + data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 103, sign: true }); + data.append(i32 { mag: 98, sign: true }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 110, sign: true }); + data.append(i32 { mag: 2, sign: true }); + data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 8, sign: true }); data.append(i32 { mag: 18, sign: true }); - data.append(i32 { mag: 27, sign: true }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 126, sign: true }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 15, sign: true }); - data.append(i32 { mag: 105, sign: true }); - data.append(i32 { mag: 70, sign: true }); - data.append(i32 { mag: 107, sign: true }); - data.append(i32 { mag: 41, sign: true }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 13, sign: true }); - data.append(i32 { mag: 13, sign: false }); + data.append(i32 { mag: 21, sign: false }); data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 35, sign: false }); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 20, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 101, sign: false }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 18, sign: true }); + data.append(i32 { mag: 12, sign: true }); + data.append(i32 { mag: 12, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 75, sign: false }); data.append(i32 { mag: 17, sign: false }); - data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 115, sign: true }); - data.append(i32 { mag: 4, sign: false }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 107, sign: false }); - data.append(i32 { mag: 61, sign: false }); - data.append(i32 { mag: 56, sign: false }); - data.append(i32 { mag: 108, sign: true }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 10, sign: false }); - data.append(i32 { mag: 61, sign: true }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 20, sign: true }); - data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 33, sign: true }); + data.append(i32 { mag: 79, sign: false }); + data.append(i32 { mag: 111, sign: false }); data.append(i32 { mag: 5, sign: false }); - data.append(i32 { mag: 38, sign: true }); - data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 87, sign: true }); - data.append(i32 { mag: 120, sign: true }); - data.append(i32 { mag: 92, sign: false }); - data.append(i32 { mag: 41, sign: false }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 71, sign: false }); - data.append(i32 { mag: 106, sign: true }); - data.append(i32 { mag: 77, sign: false }); - data.append(i32 { mag: 29, sign: true }); - data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 3, sign: true }); + data.append(i32 { mag: 85, sign: false }); data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 78, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 60, sign: false }); - data.append(i32 { mag: 36, sign: false }); + data.append(i32 { mag: 48, sign: false }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 100, sign: false }); data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 126, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 44, sign: true }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 74, sign: true }); + data.append(i32 { mag: 95, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 28, sign: true }); - data.append(i32 { mag: 50, sign: true }); - data.append(i32 { mag: 76, sign: true }); - data.append(i32 { mag: 112, sign: false }); - data.append(i32 { mag: 49, sign: false }); - data.append(i32 { mag: 1, sign: true }); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 99, sign: false }); - data.append(i32 { mag: 91, sign: false }); - data.append(i32 { mag: 20, sign: false }); - data.append(i32 { mag: 44, sign: true }); - data.append(i32 { mag: 18, sign: false }); - data.append(i32 { mag: 27, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 108, sign: true }); - data.append(i32 { mag: 76, sign: false }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 51, sign: false }); data.append(i32 { mag: 34, sign: false }); - data.append(i32 { mag: 119, sign: true }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 97, sign: true }); - data.append(i32 { mag: 57, sign: true }); - data.append(i32 { mag: 58, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 111, sign: false }); + data.append(i32 { mag: 115, sign: true }); data.append(i32 { mag: 109, sign: false }); + data.append(i32 { mag: 90, sign: false }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 67, sign: true }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 124, sign: false }); data.append(i32 { mag: 105, sign: true }); - data.append(i32 { mag: 36, sign: false }); - data.append(i32 { mag: 109, sign: false }); - data.append(i32 { mag: 104, sign: false }); + data.append(i32 { mag: 106, sign: false }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 41, sign: false }); + data.append(i32 { mag: 119, sign: false }); + data.append(i32 { mag: 88, sign: false }); data.append(i32 { mag: 73, sign: true }); - data.append(i32 { mag: 75, sign: true }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 115, sign: false }); - data.append(i32 { mag: 57, sign: false }); - data.append(i32 { mag: 74, sign: true }); - data.append(i32 { mag: 18, sign: true }); - data.append(i32 { mag: 31, sign: true }); - data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 55, sign: false }); - data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 108, sign: true }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 7, sign: false }); + data.append(i32 { mag: 0, sign: false }); data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 38, sign: false }); - data.append(i32 { mag: 9, sign: false }); - data.append(i32 { mag: 53, sign: true }); - data.append(i32 { mag: 2, sign: true }); - data.append(i32 { mag: 103, sign: false }); - data.append(i32 { mag: 43, sign: true }); - data.append(i32 { mag: 100, sign: false }); + data.append(i32 { mag: 72, sign: false }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 13, sign: true }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 93, sign: false }); + data.append(i32 { mag: 22, sign: false }); + data.append(i32 { mag: 22, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 59, sign: true }); + data.append(i32 { mag: 41, sign: true }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 98, sign: false }); + data.append(i32 { mag: 91, sign: true }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 82, sign: true }); + data.append(i32 { mag: 125, sign: false }); + data.append(i32 { mag: 93, sign: true }); data.append(i32 { mag: 47, sign: false }); - data.append(i32 { mag: 12, sign: false }); - data.append(i32 { mag: 50, sign: false }); - data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 81, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 29, sign: true }); + data.append(i32 { mag: 70, sign: false }); + data.append(i32 { mag: 83, sign: false }); + data.append(i32 { mag: 2, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 97, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 75, sign: true }); + data.append(i32 { mag: 44, sign: false }); data.append(i32 { mag: 65, sign: false }); - data.append(i32 { mag: 99, sign: true }); + data.append(i32 { mag: 105, sign: false }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 59, sign: false }); + data.append(i32 { mag: 26, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 42, sign: true }); data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 62, sign: false }); - data.append(i32 { mag: 6, sign: true }); - data.append(i32 { mag: 94, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 113, sign: true }); - data.append(i32 { mag: 22, sign: false }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 49, sign: true }); - data.append(i32 { mag: 30, sign: false }); - data.append(i32 { mag: 70, sign: false }); - data.append(i32 { mag: 50, sign: true }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 11, sign: false }); + data.append(i32 { mag: 3, sign: false }); + data.append(i32 { mag: 117, sign: true }); data.append(i32 { mag: 25, sign: false }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 77, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 23, sign: true }); + data.append(i32 { mag: 73, sign: true }); + data.append(i32 { mag: 35, sign: false }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 35, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 3, sign: false }); data.append(i32 { mag: 7, sign: true }); - data.append(i32 { mag: 107, sign: false }); - data.append(i32 { mag: 37, sign: false }); - data.append(i32 { mag: 124, sign: false }); - data.append(i32 { mag: 66, sign: true }); - data.append(i32 { mag: 78, sign: true }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 85, sign: true }); + data.append(i32 { mag: 31, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 55, sign: true }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 71, sign: true }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 114, sign: true }); + data.append(i32 { mag: 86, sign: false }); + data.append(i32 { mag: 23, sign: false }); + data.append(i32 { mag: 78, sign: false }); + data.append(i32 { mag: 40, sign: false }); data.append(i32 { mag: 91, sign: true }); - data.append(i32 { mag: 122, sign: true }); - data.append(i32 { mag: 102, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 109, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 59, sign: false }); - data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 117, sign: true }); + data.append(i32 { mag: 64, sign: false }); data.append(i32 { mag: 115, sign: true }); + data.append(i32 { mag: 28, sign: true }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 70, sign: true }); + data.append(i32 { mag: 33, sign: false }); + data.append(i32 { mag: 16, sign: false }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 17, sign: false }); + data.append(i32 { mag: 111, sign: true }); + data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 122, sign: false }); + data.append(i32 { mag: 117, sign: false }); + data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 66, sign: false }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 47, sign: true }); + data.append(i32 { mag: 6, sign: false }); + data.append(i32 { mag: 124, sign: false }); + data.append(i32 { mag: 71, sign: false }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 76, sign: false }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 16, sign: false }); data.append(i32 { mag: 103, sign: true }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 84, sign: false }); - data.append(i32 { mag: 60, sign: true }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 92, sign: true }); + data.append(i32 { mag: 18, sign: false }); data.append(i32 { mag: 44, sign: true }); - data.append(i32 { mag: 111, sign: true }); - data.append(i32 { mag: 80, sign: false }); + data.append(i32 { mag: 49, sign: false }); + data.append(i32 { mag: 47, sign: false }); + data.append(i32 { mag: 100, sign: false }); + data.append(i32 { mag: 89, sign: false }); + data.append(i32 { mag: 70, sign: false }); data.append(i32 { mag: 5, sign: true }); - data.append(i32 { mag: 83, sign: false }); - data.append(i32 { mag: 104, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 72, sign: true }); - data.append(i32 { mag: 116, sign: false }); - data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 28, sign: false }); + data.append(i32 { mag: 63, sign: true }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 104, sign: true }); + data.append(i32 { mag: 50, sign: false }); + data.append(i32 { mag: 64, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 7, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 88, sign: true }); + data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 102, sign: false }); + data.append(i32 { mag: 15, sign: false }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 84, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 80, sign: true }); + data.append(i32 { mag: 26, sign: false }); + data.append(i32 { mag: 30, sign: false }); + data.append(i32 { mag: 40, sign: false }); + data.append(i32 { mag: 115, sign: false }); + data.append(i32 { mag: 8, sign: false }); + data.append(i32 { mag: 61, sign: true }); + data.append(i32 { mag: 37, sign: true }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 10, sign: false }); + data.append(i32 { mag: 62, sign: true }); + data.append(i32 { mag: 110, sign: false }); + data.append(i32 { mag: 116, sign: true }); + data.append(i32 { mag: 53, sign: false }); + data.append(i32 { mag: 10, sign: true }); + data.append(i32 { mag: 6, sign: true }); + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 17, sign: true }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 32, sign: true }); data.append(i32 { mag: 127, sign: true }); + data.append(i32 { mag: 40, sign: true }); + data.append(i32 { mag: 20, sign: true }); + data.append(i32 { mag: 27, sign: true }); + data.append(i32 { mag: 68, sign: true }); + data.append(i32 { mag: 84, sign: false }); + data.append(i32 { mag: 15, sign: true }); + data.append(i32 { mag: 24, sign: false }); + data.append(i32 { mag: 87, sign: false }); + data.append(i32 { mag: 54, sign: true }); + data.append(i32 { mag: 34, sign: true }); + data.append(i32 { mag: 95, sign: true }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 121, sign: false }); data.append(i32 { mag: 83, sign: true }); - data.append(i32 { mag: 79, sign: true }); - data.append(i32 { mag: 101, sign: false }); - data.append(i32 { mag: 8, sign: true }); - data.append(i32 { mag: 89, sign: false }); - data.append(i32 { mag: 113, sign: false }); - data.append(i32 { mag: 89, sign: true }); - data.append(i32 { mag: 60, sign: false }); + data.append(i32 { mag: 25, sign: true }); + data.append(i32 { mag: 96, sign: false }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 14, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 32, sign: false }); + data.append(i32 { mag: 0, sign: false }); + data.append(i32 { mag: 83, sign: false }); data.append(i32 { mag: 52, sign: true }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 3, sign: false }); - data.append(i32 { mag: 42, sign: true }); - data.append(i32 { mag: 114, sign: true }); - data.append(i32 { mag: 52, sign: false }); - data.append(i32 { mag: 94, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 68, sign: false }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i32_3d/output_0.cairo b/src/tests/nodes/slice_i32_3d/output_0.cairo index fcd8f726a..2b2e8dc38 100644 --- a/src/tests/nodes/slice_i32_3d/output_0.cairo +++ b/src/tests/nodes/slice_i32_3d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i32::Tensor_i32; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i32::i32}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I32Tensor; +use orion::numbers::{IntegerTrait, i32}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,67 +10,65 @@ fn output_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(i32 { mag: 115, sign: false }); - data.append(i32 { mag: 48, sign: true }); - data.append(i32 { mag: 81, sign: false }); - data.append(i32 { mag: 96, sign: true }); - data.append(i32 { mag: 83, sign: true }); + data.append(i32 { mag: 113, sign: false }); + data.append(i32 { mag: 43, sign: false }); + data.append(i32 { mag: 31, sign: true }); data.append(i32 { mag: 48, sign: false }); - data.append(i32 { mag: 83, sign: true }); - data.append(i32 { mag: 1, sign: false }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 10, sign: true }); - data.append(i32 { mag: 16, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 38, sign: true }); - data.append(i32 { mag: 33, sign: false }); - data.append(i32 { mag: 43, sign: true }); - data.append(i32 { mag: 36, sign: true }); - data.append(i32 { mag: 100, sign: true }); - data.append(i32 { mag: 54, sign: true }); - data.append(i32 { mag: 58, sign: true }); - data.append(i32 { mag: 4, sign: true }); - data.append(i32 { mag: 36, sign: true }); - data.append(i32 { mag: 82, sign: true }); - data.append(i32 { mag: 0, sign: false }); - data.append(i32 { mag: 59, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 87, sign: false }); - data.append(i32 { mag: 51, sign: false }); - data.append(i32 { mag: 88, sign: true }); - data.append(i32 { mag: 110, sign: true }); - data.append(i32 { mag: 51, sign: true }); - data.append(i32 { mag: 79, sign: false }); - data.append(i32 { mag: 93, sign: true }); - data.append(i32 { mag: 9, sign: true }); - data.append(i32 { mag: 80, sign: true }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 86, sign: true }); - data.append(i32 { mag: 121, sign: true }); - data.append(i32 { mag: 21, sign: false }); - data.append(i32 { mag: 14, sign: true }); - data.append(i32 { mag: 33, sign: true }); - data.append(i32 { mag: 105, sign: true }); + data.append(i32 { mag: 69, sign: true }); + data.append(i32 { mag: 1, sign: true }); + data.append(i32 { mag: 40, sign: false }); data.append(i32 { mag: 39, sign: false }); - data.append(i32 { mag: 117, sign: false }); - data.append(i32 { mag: 19, sign: false }); - data.append(i32 { mag: 11, sign: true }); - data.append(i32 { mag: 97, sign: false }); - data.append(i32 { mag: 98, sign: false }); - data.append(i32 { mag: 116, sign: true }); - data.append(i32 { mag: 29, sign: false }); + data.append(i32 { mag: 118, sign: false }); + data.append(i32 { mag: 102, sign: true }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 109, sign: true }); + data.append(i32 { mag: 78, sign: true }); data.append(i32 { mag: 56, sign: true }); - data.append(i32 { mag: 127, sign: true }); - data.append(i32 { mag: 42, sign: false }); - data.append(i32 { mag: 3, sign: true }); - data.append(i32 { mag: 64, sign: false }); - data.append(i32 { mag: 72, sign: false }); - data.append(i32 { mag: 117, sign: true }); - data.append(i32 { mag: 64, sign: true }); - data.append(i32 { mag: 96, sign: true }); + data.append(i32 { mag: 77, sign: true }); + data.append(i32 { mag: 93, sign: true }); + data.append(i32 { mag: 107, sign: false }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 110, sign: false }); + data.append(i32 { mag: 114, sign: false }); + data.append(i32 { mag: 42, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 52, sign: true }); + data.append(i32 { mag: 66, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 106, sign: true }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 38, sign: true }); + data.append(i32 { mag: 89, sign: true }); + data.append(i32 { mag: 51, sign: true }); + data.append(i32 { mag: 57, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 35, sign: false }); data.append(i32 { mag: 112, sign: true }); - data.append(i32 { mag: 105, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i32 { mag: 18, sign: false }); + data.append(i32 { mag: 45, sign: false }); + data.append(i32 { mag: 37, sign: false }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 56, sign: false }); + data.append(i32 { mag: 72, sign: true }); + data.append(i32 { mag: 94, sign: true }); + data.append(i32 { mag: 74, sign: false }); + data.append(i32 { mag: 126, sign: true }); + data.append(i32 { mag: 49, sign: true }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 63, sign: false }); + data.append(i32 { mag: 55, sign: false }); + data.append(i32 { mag: 21, sign: true }); + data.append(i32 { mag: 107, sign: true }); + data.append(i32 { mag: 100, sign: true }); + data.append(i32 { mag: 125, sign: true }); + data.append(i32 { mag: 119, sign: false }); + data.append(i32 { mag: 108, sign: false }); + data.append(i32 { mag: 112, sign: false }); + data.append(i32 { mag: 4, sign: false }); + data.append(i32 { mag: 67, sign: false }); + data.append(i32 { mag: 79, sign: true }); + data.append(i32 { mag: 99, sign: false }); + data.append(i32 { mag: 94, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_2d.cairo b/src/tests/nodes/slice_i8_2d.cairo index fe08baa62..f79e72a97 100644 --- a/src/tests/nodes/slice_i8_2d.cairo +++ b/src/tests/nodes/slice_i8_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_i8_2d/input_0.cairo b/src/tests/nodes/slice_i8_2d/input_0.cairo index c6d2d0b72..5474f3f2f 100644 --- a/src/tests/nodes/slice_i8_2d/input_0.cairo +++ b/src/tests/nodes/slice_i8_2d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,15 +9,13 @@ fn input_0() -> Tensor { shape.append(4); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 89, sign: false }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 115, sign: true }); - data.append(i8 { mag: 40, sign: false }); - data.append(i8 { mag: 113, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 52, sign: false }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 122, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_2d/output_0.cairo b/src/tests/nodes/slice_i8_2d/output_0.cairo index 6fbe34011..72c92ba48 100644 --- a/src/tests/nodes/slice_i8_2d/output_0.cairo +++ b/src/tests/nodes/slice_i8_2d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,11 +9,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 40, sign: false }); - data.append(i8 { mag: 113, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 122, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_3d.cairo b/src/tests/nodes/slice_i8_3d.cairo index 8873a9c61..c604d84a5 100644 --- a/src/tests/nodes/slice_i8_3d.cairo +++ b/src/tests/nodes/slice_i8_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::operators::tensor::implementations::impl_tensor_i8::i8TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::I8Tensor; +use orion::operators::tensor::I8TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_i8_3d/input_0.cairo b/src/tests/nodes/slice_i8_3d/input_0.cairo index 472358144..d1a10d4ca 100644 --- a/src/tests/nodes/slice_i8_3d/input_0.cairo +++ b/src/tests/nodes/slice_i8_3d/input_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,1007 +10,1005 @@ fn input_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 125, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 109, sign: false }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 86, sign: false }); data.append(i8 { mag: 106, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 66, sign: true }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 80, sign: true }); - data.append(i8 { mag: 24, sign: false }); - data.append(i8 { mag: 45, sign: true }); - data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 59, sign: false }); data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 84, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 103, sign: true }); - data.append(i8 { mag: 32, sign: true }); - data.append(i8 { mag: 68, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 29, sign: false }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 115, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 91, sign: true }); data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 79, sign: true }); - data.append(i8 { mag: 20, sign: false }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 32, sign: true }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 92, sign: true }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 103, sign: true }); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 65, sign: false }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 81, sign: true }); - data.append(i8 { mag: 12, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 102, sign: true }); - data.append(i8 { mag: 20, sign: false }); - data.append(i8 { mag: 100, sign: false }); - data.append(i8 { mag: 84, sign: true }); - data.append(i8 { mag: 66, sign: true }); - data.append(i8 { mag: 31, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 49, sign: false }); - data.append(i8 { mag: 73, sign: true }); - data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 29, sign: false }); data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 59, sign: true }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 46, sign: false }); data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 58, sign: false }); - data.append(i8 { mag: 100, sign: false }); - data.append(i8 { mag: 15, sign: false }); - data.append(i8 { mag: 58, sign: false }); - data.append(i8 { mag: 78, sign: true }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 84, sign: false }); - data.append(i8 { mag: 118, sign: true }); - data.append(i8 { mag: 38, sign: false }); - data.append(i8 { mag: 24, sign: true }); - data.append(i8 { mag: 125, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 95, sign: false }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 116, sign: true }); - data.append(i8 { mag: 48, sign: false }); - data.append(i8 { mag: 125, sign: true }); - data.append(i8 { mag: 71, sign: false }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 95, sign: false }); - data.append(i8 { mag: 19, sign: true }); - data.append(i8 { mag: 10, sign: true }); - data.append(i8 { mag: 49, sign: false }); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 34, sign: false }); data.append(i8 { mag: 35, sign: false }); - data.append(i8 { mag: 25, sign: false }); - data.append(i8 { mag: 24, sign: false }); - data.append(i8 { mag: 94, sign: false }); - data.append(i8 { mag: 84, sign: true }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 15, sign: true }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 118, sign: true }); - data.append(i8 { mag: 31, sign: true }); - data.append(i8 { mag: 32, sign: true }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 66, sign: false }); - data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 34, sign: false }); data.append(i8 { mag: 64, sign: true }); - data.append(i8 { mag: 11, sign: false }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 37, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 72, sign: true }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 48, sign: true }); data.append(i8 { mag: 100, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 92, sign: true }); - data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 91, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 71, sign: true }); data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 109, sign: true }); - data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 121, sign: true }); data.append(i8 { mag: 83, sign: true }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 110, sign: false }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 32, sign: true }); - data.append(i8 { mag: 61, sign: true }); - data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 25, sign: true }); data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 63, sign: false }); - data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 80, sign: false }); - data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 6, sign: false }); + data.append(i8 { mag: 104, sign: false }); data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 55, sign: true }); data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 12, sign: true }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 62, sign: false }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 94, sign: true }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 65, sign: true }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 69, sign: true }); data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 15, sign: true }); - data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 55, sign: true }); + data.append(i8 { mag: 13, sign: true }); data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 54, sign: true }); data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 42, sign: false }); data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 80, sign: false }); - data.append(i8 { mag: 80, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 71, sign: true }); - data.append(i8 { mag: 40, sign: false }); - data.append(i8 { mag: 25, sign: false }); - data.append(i8 { mag: 68, sign: true }); - data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 101, sign: false }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 92, sign: false }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 118, sign: false }); data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 23, sign: true }); - data.append(i8 { mag: 106, sign: true }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 38, sign: false }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 56, sign: true }); - data.append(i8 { mag: 124, sign: true }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 85, sign: true }); - data.append(i8 { mag: 102, sign: false }); - data.append(i8 { mag: 83, sign: true }); - data.append(i8 { mag: 47, sign: false }); - data.append(i8 { mag: 62, sign: true }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 121, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 66, sign: true }); data.append(i8 { mag: 31, sign: true }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 69, sign: false }); - data.append(i8 { mag: 15, sign: false }); - data.append(i8 { mag: 14, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 124, sign: true }); - data.append(i8 { mag: 90, sign: true }); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 58, sign: false }); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 96, sign: true }); - data.append(i8 { mag: 111, sign: false }); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 99, sign: true }); - data.append(i8 { mag: 56, sign: true }); - data.append(i8 { mag: 125, sign: false }); - data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 35, sign: false }); - data.append(i8 { mag: 7, sign: true }); - data.append(i8 { mag: 29, sign: false }); - data.append(i8 { mag: 11, sign: false }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 110, sign: false }); - data.append(i8 { mag: 40, sign: false }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 42, sign: true }); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 57, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 88, sign: false }); - data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 74, sign: true }); data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 92, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 13, sign: false }); + data.append(i8 { mag: 98, sign: false }); data.append(i8 { mag: 75, sign: true }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 101, sign: false }); - data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 123, sign: false }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 111, sign: true }); - data.append(i8 { mag: 123, sign: true }); - data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 75, sign: true }); - data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 29, sign: false }); data.append(i8 { mag: 109, sign: true }); - data.append(i8 { mag: 37, sign: false }); - data.append(i8 { mag: 7, sign: true }); - data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 32, sign: false }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 36, sign: false }); data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 82, sign: true }); - data.append(i8 { mag: 76, sign: true }); - data.append(i8 { mag: 75, sign: true }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 105, sign: true }); - data.append(i8 { mag: 19, sign: true }); - data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 101, sign: true }); - data.append(i8 { mag: 7, sign: true }); - data.append(i8 { mag: 79, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 105, sign: false }); data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 107, sign: true }); - data.append(i8 { mag: 6, sign: false }); - data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 100, sign: false }); data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 35, sign: false }); data.append(i8 { mag: 61, sign: false }); - data.append(i8 { mag: 74, sign: false }); - data.append(i8 { mag: 23, sign: false }); - data.append(i8 { mag: 14, sign: true }); - data.append(i8 { mag: 127, sign: true }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 77, sign: true }); - data.append(i8 { mag: 30, sign: true }); - data.append(i8 { mag: 127, sign: true }); - data.append(i8 { mag: 18, sign: false }); - data.append(i8 { mag: 109, sign: false }); - data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 105, sign: false }); - data.append(i8 { mag: 111, sign: true }); - data.append(i8 { mag: 82, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 48, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 24, sign: true }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 123, sign: true }); - data.append(i8 { mag: 110, sign: false }); - data.append(i8 { mag: 52, sign: false }); - data.append(i8 { mag: 6, sign: true }); - data.append(i8 { mag: 68, sign: true }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 24, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 28, sign: true }); data.append(i8 { mag: 114, sign: false }); - data.append(i8 { mag: 25, sign: false }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 10, sign: true }); - data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 18, sign: false }); data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 28, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 38, sign: false }); data.append(i8 { mag: 123, sign: false }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 8, sign: true }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 90, sign: true }); - data.append(i8 { mag: 77, sign: false }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 43, sign: true }); - data.append(i8 { mag: 39, sign: true }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 105, sign: false }); - data.append(i8 { mag: 98, sign: false }); - data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 78, sign: true }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 33, sign: false }); + data.append(i8 { mag: 58, sign: false }); data.append(i8 { mag: 82, sign: true }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 119, sign: true }); - data.append(i8 { mag: 58, sign: true }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 74, sign: true }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 72, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 73, sign: true }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 91, sign: true }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 79, sign: true }); data.append(i8 { mag: 88, sign: false }); - data.append(i8 { mag: 48, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 12, sign: true }); - data.append(i8 { mag: 1, sign: false }); data.append(i8 { mag: 101, sign: false }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 24, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 77, sign: true }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 23, sign: true }); data.append(i8 { mag: 44, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 39, sign: true }); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 45, sign: false }); - data.append(i8 { mag: 58, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 120, sign: false }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 78, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 23, sign: true }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 62, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 37, sign: true }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 88, sign: true }); data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 25, sign: true }); - data.append(i8 { mag: 99, sign: true }); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 61, sign: true }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 104, sign: false }); data.append(i8 { mag: 48, sign: true }); - data.append(i8 { mag: 20, sign: true }); - data.append(i8 { mag: 68, sign: false }); - data.append(i8 { mag: 51, sign: false }); - data.append(i8 { mag: 119, sign: true }); - data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 83, sign: true }); + data.append(i8 { mag: 38, sign: false }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 70, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 23, sign: true }); data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 40, sign: true }); - data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 26, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 78, sign: true }); data.append(i8 { mag: 62, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 107, sign: false }); - data.append(i8 { mag: 110, sign: true }); - data.append(i8 { mag: 88, sign: false }); - data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 118, sign: false }); data.append(i8 { mag: 110, sign: true }); - data.append(i8 { mag: 54, sign: true }); - data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 75, sign: false }); - data.append(i8 { mag: 37, sign: false }); - data.append(i8 { mag: 76, sign: true }); - data.append(i8 { mag: 13, sign: true }); - data.append(i8 { mag: 40, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 22, sign: true }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 97, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 106, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 41, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 68, sign: false }); data.append(i8 { mag: 38, sign: true }); - data.append(i8 { mag: 66, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 18, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 96, sign: true }); - data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 117, sign: false }); data.append(i8 { mag: 15, sign: false }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 81, sign: true }); - data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 51, sign: true }); + data.append(i8 { mag: 13, sign: false }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 63, sign: false }); data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 116, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 90, sign: false }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 52, sign: true }); data.append(i8 { mag: 94, sign: false }); - data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 54, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 78, sign: false }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 106, sign: false }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 102, sign: true }); data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 88, sign: false }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 95, sign: false }); - data.append(i8 { mag: 52, sign: false }); - data.append(i8 { mag: 44, sign: false }); - data.append(i8 { mag: 91, sign: true }); - data.append(i8 { mag: 23, sign: true }); - data.append(i8 { mag: 74, sign: true }); - data.append(i8 { mag: 40, sign: true }); data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 9, sign: true }); - data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 11, sign: false }); data.append(i8 { mag: 106, sign: true }); - data.append(i8 { mag: 68, sign: false }); - data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 62, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 121, sign: false }); + data.append(i8 { mag: 49, sign: false }); data.append(i8 { mag: 24, sign: true }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 45, sign: true }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 64, sign: true }); - data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 5, sign: true }); data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 99, sign: false }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 122, sign: false }); - data.append(i8 { mag: 102, sign: false }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 17, sign: false }); - data.append(i8 { mag: 125, sign: false }); - data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 95, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 73, sign: false }); data.append(i8 { mag: 82, sign: false }); - data.append(i8 { mag: 46, sign: true }); - data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 121, sign: false }); + data.append(i8 { mag: 31, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 36, sign: true }); data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 10, sign: false }); - data.append(i8 { mag: 84, sign: false }); - data.append(i8 { mag: 118, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 22, sign: false }); - data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 61, sign: false }); data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 111, sign: false }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 16, sign: true }); - data.append(i8 { mag: 96, sign: false }); - data.append(i8 { mag: 22, sign: true }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 19, sign: false }); - data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 74, sign: false }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 78, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 106, sign: false }); + data.append(i8 { mag: 27, sign: true }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 57, sign: true }); data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 29, sign: true }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 1, sign: true }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 52, sign: true }); data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 118, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 52, sign: false }); + data.append(i8 { mag: 113, sign: true }); data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 114, sign: false }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 98, sign: true }); - data.append(i8 { mag: 80, sign: true }); - data.append(i8 { mag: 96, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 90, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 11, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 75, sign: false }); data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 98, sign: true }); + data.append(i8 { mag: 9, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 55, sign: false }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 93, sign: false }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 30, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 63, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 123, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 55, sign: true }); + data.append(i8 { mag: 27, sign: false }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 109, sign: false }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 61, sign: true }); data.append(i8 { mag: 58, sign: false }); - data.append(i8 { mag: 121, sign: false }); - data.append(i8 { mag: 45, sign: true }); - data.append(i8 { mag: 92, sign: true }); - data.append(i8 { mag: 92, sign: false }); - data.append(i8 { mag: 68, sign: false }); - data.append(i8 { mag: 82, sign: true }); - data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 124, sign: true }); data.append(i8 { mag: 47, sign: true }); - data.append(i8 { mag: 3, sign: false }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 2, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 90, sign: false }); + data.append(i8 { mag: 41, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 90, sign: false }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 77, sign: false }); data.append(i8 { mag: 40, sign: false }); data.append(i8 { mag: 74, sign: false }); - data.append(i8 { mag: 50, sign: true }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 22, sign: true }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 20, sign: false }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 99, sign: true }); - data.append(i8 { mag: 106, sign: true }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 110, sign: true }); - data.append(i8 { mag: 108, sign: false }); - data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 87, sign: true }); data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 99, sign: false }); - data.append(i8 { mag: 38, sign: true }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 80, sign: true }); - data.append(i8 { mag: 117, sign: false }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 74, sign: false }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 102, sign: true }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 124, sign: false }); data.append(i8 { mag: 28, sign: true }); - data.append(i8 { mag: 61, sign: true }); data.append(i8 { mag: 62, sign: true }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 57, sign: false }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 17, sign: true }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 77, sign: true }); - data.append(i8 { mag: 38, sign: false }); - data.append(i8 { mag: 17, sign: true }); - data.append(i8 { mag: 45, sign: true }); - data.append(i8 { mag: 91, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 72, sign: true }); data.append(i8 { mag: 37, sign: true }); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 8, sign: true }); - data.append(i8 { mag: 42, sign: true }); - data.append(i8 { mag: 98, sign: false }); - data.append(i8 { mag: 105, sign: true }); - data.append(i8 { mag: 63, sign: false }); - data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 123, sign: true }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 7, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 19, sign: false }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 0, sign: false }); data.append(i8 { mag: 11, sign: false }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 20, sign: false }); data.append(i8 { mag: 50, sign: true }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 2, sign: false }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 48, sign: false }); - data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 65, sign: false }); data.append(i8 { mag: 72, sign: true }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 20, sign: true }); - data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 47, sign: false }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 8, sign: true }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 42, sign: true }); - data.append(i8 { mag: 13, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 100, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 102, sign: false }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 102, sign: true }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 98, sign: true }); - data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 75, sign: false }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 103, sign: false }); + data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 120, sign: true }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 7, sign: true }); data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 28, sign: true }); - data.append(i8 { mag: 5, sign: false }); - data.append(i8 { mag: 84, sign: true }); - data.append(i8 { mag: 28, sign: true }); - data.append(i8 { mag: 23, sign: true }); - data.append(i8 { mag: 5, sign: true }); - data.append(i8 { mag: 77, sign: false }); - data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 65, sign: false }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 73, sign: false }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 31, sign: true }); - data.append(i8 { mag: 17, sign: true }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 23, sign: true }); - data.append(i8 { mag: 80, sign: true }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 55, sign: false }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 49, sign: true }); + data.append(i8 { mag: 123, sign: false }); data.append(i8 { mag: 77, sign: true }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 103, sign: true }); - data.append(i8 { mag: 124, sign: false }); - data.append(i8 { mag: 19, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 32, sign: true }); - data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 109, sign: false }); data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 19, sign: true }); + data.append(i8 { mag: 123, sign: true }); data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 25, sign: true }); - data.append(i8 { mag: 91, sign: false }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 85, sign: true }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 81, sign: true }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 32, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 41, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 94, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 26, sign: false }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 51, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 74, sign: false }); + data.append(i8 { mag: 113, sign: false }); + data.append(i8 { mag: 57, sign: false }); + data.append(i8 { mag: 23, sign: false }); + data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 118, sign: true }); + data.append(i8 { mag: 97, sign: false }); + data.append(i8 { mag: 28, sign: false }); + data.append(i8 { mag: 39, sign: true }); + data.append(i8 { mag: 44, sign: false }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 48, sign: true }); data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 51, sign: true }); + data.append(i8 { mag: 84, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 3, sign: true }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 125, sign: true }); data.append(i8 { mag: 74, sign: true }); - data.append(i8 { mag: 95, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 59, sign: true }); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 19, sign: false }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 98, sign: true }); - data.append(i8 { mag: 50, sign: true }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 99, sign: true }); - data.append(i8 { mag: 27, sign: false }); - data.append(i8 { mag: 12, sign: true }); - data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 5, sign: false }); data.append(i8 { mag: 21, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 48, sign: true }); + data.append(i8 { mag: 7, sign: true }); + data.append(i8 { mag: 86, sign: true }); + data.append(i8 { mag: 11, sign: false }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 102, sign: true }); data.append(i8 { mag: 18, sign: false }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 77, sign: false }); - data.append(i8 { mag: 89, sign: false }); - data.append(i8 { mag: 103, sign: false }); - data.append(i8 { mag: 101, sign: true }); - data.append(i8 { mag: 119, sign: false }); - data.append(i8 { mag: 106, sign: true }); - data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 6, sign: false }); data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 109, sign: false }); - data.append(i8 { mag: 122, sign: false }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 92, sign: true }); - data.append(i8 { mag: 102, sign: true }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 85, sign: false }); - data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 40, sign: true }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 54, sign: true }); - data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 39, sign: true }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 119, sign: true }); - data.append(i8 { mag: 95, sign: true }); - data.append(i8 { mag: 96, sign: true }); - data.append(i8 { mag: 123, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 104, sign: true }); data.append(i8 { mag: 38, sign: false }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 84, sign: true }); - data.append(i8 { mag: 77, sign: true }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 15, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 124, sign: true }); + data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 20, sign: false }); data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 52, sign: true }); + data.append(i8 { mag: 6, sign: true }); data.append(i8 { mag: 104, sign: false }); - data.append(i8 { mag: 93, sign: true }); + data.append(i8 { mag: 27, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 20, sign: true }); data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 112, sign: false }); - data.append(i8 { mag: 30, sign: false }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 87, sign: true }); - data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 127, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 19, sign: false }); - data.append(i8 { mag: 67, sign: false }); - data.append(i8 { mag: 35, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 104, sign: false }); - data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 83, sign: false }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 50, sign: true }); + data.append(i8 { mag: 77, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 17, sign: false }); + data.append(i8 { mag: 13, sign: true }); + data.append(i8 { mag: 116, sign: false }); + data.append(i8 { mag: 34, sign: false }); + data.append(i8 { mag: 105, sign: true }); data.append(i8 { mag: 17, sign: true }); - data.append(i8 { mag: 88, sign: false }); - data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 102, sign: false }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 12, sign: false }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 24, sign: false }); data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 23, sign: false }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 33, sign: true }); - data.append(i8 { mag: 90, sign: true }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 70, sign: false }); - data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 96, sign: false }); - data.append(i8 { mag: 20, sign: true }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 114, sign: true }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 95, sign: true }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 87, sign: true }); - data.append(i8 { mag: 72, sign: true }); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 103, sign: true }); + data.append(i8 { mag: 12, sign: true }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 28, sign: true }); + data.append(i8 { mag: 14, sign: true }); data.append(i8 { mag: 111, sign: true }); - data.append(i8 { mag: 3, sign: true }); - data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 46, sign: true }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 56, sign: true }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 117, sign: true }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 10, sign: true }); + data.append(i8 { mag: 8, sign: false }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 90, sign: false }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 25, sign: false }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 45, sign: true }); + data.append(i8 { mag: 90, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 38, sign: true }); + data.append(i8 { mag: 88, sign: false }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 122, sign: false }); + data.append(i8 { mag: 91, sign: true }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 25, sign: true }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 110, sign: false }); + data.append(i8 { mag: 21, sign: false }); data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 38, sign: false }); - data.append(i8 { mag: 22, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 107, sign: false }); data.append(i8 { mag: 46, sign: false }); - data.append(i8 { mag: 20, sign: false }); - data.append(i8 { mag: 84, sign: false }); - data.append(i8 { mag: 2, sign: true }); - data.append(i8 { mag: 74, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 108, sign: false }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 14, sign: true }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 6, sign: true }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 7, sign: false }); data.append(i8 { mag: 41, sign: false }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 93, sign: false }); - data.append(i8 { mag: 108, sign: true }); - data.append(i8 { mag: 65, sign: true }); - data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 83, sign: true }); - data.append(i8 { mag: 116, sign: true }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 43, sign: false }); - data.append(i8 { mag: 31, sign: false }); - data.append(i8 { mag: 112, sign: true }); - data.append(i8 { mag: 55, sign: false }); - data.append(i8 { mag: 75, sign: true }); - data.append(i8 { mag: 82, sign: false }); - data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 125, sign: true }); + data.append(i8 { mag: 51, sign: false }); data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 65, sign: true }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 113, sign: true }); data.append(i8 { mag: 0, sign: false }); - data.append(i8 { mag: 15, sign: true }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 38, sign: false }); data.append(i8 { mag: 10, sign: true }); - data.append(i8 { mag: 105, sign: true }); - data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 35, sign: false }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 43, sign: true }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 20, sign: true }); + data.append(i8 { mag: 16, sign: true }); + data.append(i8 { mag: 123, sign: true }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 126, sign: true }); + data.append(i8 { mag: 96, sign: true }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 124, sign: false }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 18, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 108, sign: true }); + data.append(i8 { mag: 119, sign: true }); + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 104, sign: false }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 127, sign: true }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 36, sign: false }); + data.append(i8 { mag: 106, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 78, sign: true }); + data.append(i8 { mag: 49, sign: false }); + data.append(i8 { mag: 13, sign: true }); + data.append(i8 { mag: 113, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 45, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 24, sign: false }); + data.append(i8 { mag: 58, sign: true }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 95, sign: true }); + data.append(i8 { mag: 17, sign: true }); + data.append(i8 { mag: 33, sign: true }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 35, sign: true }); data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 59, sign: false }); - data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 37, sign: false }); + data.append(i8 { mag: 5, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 35, sign: true }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 100, sign: false }); + data.append(i8 { mag: 2, sign: false }); + data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 87, sign: false }); + data.append(i8 { mag: 29, sign: true }); data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 10, sign: false }); - data.append(i8 { mag: 17, sign: true }); - data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 47, sign: false }); + data.append(i8 { mag: 71, sign: false }); data.append(i8 { mag: 68, sign: false }); - data.append(i8 { mag: 72, sign: true }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 80, sign: false }); - data.append(i8 { mag: 92, sign: true }); + data.append(i8 { mag: 54, sign: true }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 18, sign: true }); + data.append(i8 { mag: 94, sign: true }); + data.append(i8 { mag: 24, sign: true }); + data.append(i8 { mag: 67, sign: true }); + data.append(i8 { mag: 85, sign: true }); + data.append(i8 { mag: 66, sign: false }); + data.append(i8 { mag: 65, sign: false }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 37, sign: true }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 13, sign: false }); data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 58, sign: true }); - data.append(i8 { mag: 4, sign: true }); data.append(i8 { mag: 111, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 60, sign: false }); - data.append(i8 { mag: 73, sign: false }); - data.append(i8 { mag: 101, sign: true }); - data.append(i8 { mag: 54, sign: true }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 35, sign: false }); - data.append(i8 { mag: 4, sign: true }); - data.append(i8 { mag: 8, sign: true }); - data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 68, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 33, sign: false }); data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 50, sign: true }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 115, sign: true }); + data.append(i8 { mag: 44, sign: true }); + data.append(i8 { mag: 43, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 122, sign: true }); + data.append(i8 { mag: 12, sign: false }); data.append(i8 { mag: 66, sign: false }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 63, sign: true }); - data.append(i8 { mag: 52, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 23, sign: false }); - data.append(i8 { mag: 7, sign: true }); - data.append(i8 { mag: 57, sign: false }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 115, sign: false }); - data.append(i8 { mag: 42, sign: false }); - data.append(i8 { mag: 46, sign: true }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 32, sign: false }); - data.append(i8 { mag: 34, sign: false }); - data.append(i8 { mag: 105, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 124, sign: true }); - data.append(i8 { mag: 39, sign: false }); - data.append(i8 { mag: 102, sign: true }); - data.append(i8 { mag: 22, sign: true }); - data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 2, sign: true }); data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 21, sign: false }); + data.append(i8 { mag: 107, sign: false }); + data.append(i8 { mag: 58, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 81, sign: false }); + data.append(i8 { mag: 68, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 57, sign: true }); + data.append(i8 { mag: 95, sign: false }); + data.append(i8 { mag: 82, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 91, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 1, sign: false }); + data.append(i8 { mag: 56, sign: false }); + data.append(i8 { mag: 99, sign: false }); + data.append(i8 { mag: 88, sign: true }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 51, sign: true }); + data.append(i8 { mag: 3, sign: false }); + data.append(i8 { mag: 107, sign: true }); + data.append(i8 { mag: 73, sign: false }); + data.append(i8 { mag: 112, sign: true }); + data.append(i8 { mag: 107, sign: false }); data.append(i8 { mag: 110, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 7, sign: false }); - data.append(i8 { mag: 4, sign: false }); - data.append(i8 { mag: 105, sign: true }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 90, sign: true }); - data.append(i8 { mag: 18, sign: false }); - data.append(i8 { mag: 69, sign: true }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 65, sign: false }); - data.append(i8 { mag: 19, sign: true }); - data.append(i8 { mag: 26, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 49, sign: true }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 26, sign: false }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 10, sign: false }); - data.append(i8 { mag: 38, sign: true }); - data.append(i8 { mag: 98, sign: true }); - data.append(i8 { mag: 61, sign: false }); + data.append(i8 { mag: 5, sign: true }); data.append(i8 { mag: 109, sign: false }); - data.append(i8 { mag: 1, sign: true }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 105, sign: true }); + data.append(i8 { mag: 67, sign: false }); + data.append(i8 { mag: 8, sign: true }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 89, sign: false }); + data.append(i8 { mag: 98, sign: false }); + data.append(i8 { mag: 125, sign: false }); + data.append(i8 { mag: 9, sign: true }); + data.append(i8 { mag: 53, sign: true }); + data.append(i8 { mag: 62, sign: false }); + data.append(i8 { mag: 119, sign: false }); + data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 46, sign: true }); + data.append(i8 { mag: 42, sign: true }); + data.append(i8 { mag: 126, sign: false }); + data.append(i8 { mag: 7, sign: false }); + data.append(i8 { mag: 85, sign: false }); + data.append(i8 { mag: 69, sign: false }); + data.append(i8 { mag: 16, sign: false }); + data.append(i8 { mag: 40, sign: false }); + data.append(i8 { mag: 112, sign: false }); data.append(i8 { mag: 73, sign: false }); - data.append(i8 { mag: 124, sign: true }); - data.append(i8 { mag: 125, sign: true }); - data.append(i8 { mag: 57, sign: true }); - data.append(i8 { mag: 41, sign: false }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 39, sign: false }); + data.append(i8 { mag: 123, sign: false }); + data.append(i8 { mag: 51, sign: false }); + data.append(i8 { mag: 19, sign: false }); data.append(i8 { mag: 94, sign: true }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 77, sign: true }); - data.append(i8 { mag: 101, sign: true }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 104, sign: true }); - data.append(i8 { mag: 105, sign: false }); - data.append(i8 { mag: 43, sign: true }); - data.append(i8 { mag: 100, sign: true }); + data.append(i8 { mag: 94, sign: false }); data.append(i8 { mag: 72, sign: false }); - data.append(i8 { mag: 105, sign: false }); - data.append(i8 { mag: 78, sign: true }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 63, sign: false }); - data.append(i8 { mag: 120, sign: false }); - data.append(i8 { mag: 28, sign: false }); - data.append(i8 { mag: 92, sign: true }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 91, sign: false }); - data.append(i8 { mag: 73, sign: true }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 97, sign: true }); - data.append(i8 { mag: 63, sign: true }); + data.append(i8 { mag: 112, sign: false }); + data.append(i8 { mag: 60, sign: true }); data.append(i8 { mag: 54, sign: false }); data.append(i8 { mag: 72, sign: true }); - data.append(i8 { mag: 74, sign: true }); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 118, sign: true }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 123, sign: false }); - data.append(i8 { mag: 86, sign: true }); - data.append(i8 { mag: 41, sign: true }); - data.append(i8 { mag: 65, sign: false }); - data.append(i8 { mag: 95, sign: false }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 1, sign: false }); - data.append(i8 { mag: 57, sign: false }); - data.append(i8 { mag: 73, sign: false }); - data.append(i8 { mag: 40, sign: true }); - data.append(i8 { mag: 1, sign: true }); data.append(i8 { mag: 20, sign: true }); - data.append(i8 { mag: 57, sign: false }); - data.append(i8 { mag: 125, sign: false }); - data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 59, sign: false }); + data.append(i8 { mag: 105, sign: false }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 122, sign: false }); data.append(i8 { mag: 116, sign: true }); - data.append(i8 { mag: 31, sign: true }); - data.append(i8 { mag: 12, sign: false }); - data.append(i8 { mag: 121, sign: true }); - data.append(i8 { mag: 40, sign: true }); - data.append(i8 { mag: 14, sign: false }); - data.append(i8 { mag: 16, sign: true }); - data.append(i8 { mag: 35, sign: false }); - data.append(i8 { mag: 116, sign: false }); - data.append(i8 { mag: 108, sign: false }); - data.append(i8 { mag: 34, sign: true }); - data.append(i8 { mag: 21, sign: false }); - data.append(i8 { mag: 62, sign: false }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 76, sign: false }); - data.append(i8 { mag: 55, sign: false }); - data.append(i8 { mag: 101, sign: true }); - data.append(i8 { mag: 36, sign: false }); - data.append(i8 { mag: 79, sign: false }); - data.append(i8 { mag: 5, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i8 { mag: 2, sign: false }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_i8_3d/output_0.cairo b/src/tests/nodes/slice_i8_3d/output_0.cairo index 65e8ab3e6..6385f11bf 100644 --- a/src/tests/nodes/slice_i8_3d/output_0.cairo +++ b/src/tests/nodes/slice_i8_3d/output_0.cairo @@ -1,8 +1,7 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_i8::Tensor_i8; -use orion::numbers::signed_integer::{integer_trait::IntegerTrait, i8::i8}; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::I8Tensor; +use orion::numbers::{IntegerTrait, i8}; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -11,67 +10,65 @@ fn output_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 125, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 109, sign: false }); - data.append(i8 { mag: 115, sign: false }); + data.append(i8 { mag: 86, sign: false }); + data.append(i8 { mag: 106, sign: true }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 89, sign: true }); + data.append(i8 { mag: 48, sign: false }); + data.append(i8 { mag: 72, sign: false }); + data.append(i8 { mag: 120, sign: true }); + data.append(i8 { mag: 29, sign: false }); + data.append(i8 { mag: 79, sign: false }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 101, sign: true }); + data.append(i8 { mag: 87, sign: true }); + data.append(i8 { mag: 37, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 72, sign: true }); data.append(i8 { mag: 64, sign: false }); - data.append(i8 { mag: 81, sign: false }); - data.append(i8 { mag: 84, sign: false }); - data.append(i8 { mag: 33, sign: false }); - data.append(i8 { mag: 29, sign: true }); - data.append(i8 { mag: 118, sign: false }); - data.append(i8 { mag: 79, sign: true }); - data.append(i8 { mag: 20, sign: false }); - data.append(i8 { mag: 88, sign: true }); - data.append(i8 { mag: 87, sign: false }); - data.append(i8 { mag: 81, sign: true }); - data.append(i8 { mag: 12, sign: true }); - data.append(i8 { mag: 117, sign: false }); - data.append(i8 { mag: 50, sign: false }); - data.append(i8 { mag: 9, sign: false }); - data.append(i8 { mag: 100, sign: true }); - data.append(i8 { mag: 126, sign: false }); - data.append(i8 { mag: 93, sign: true }); - data.append(i8 { mag: 102, sign: true }); - data.append(i8 { mag: 20, sign: false }); + data.append(i8 { mag: 71, sign: true }); + data.append(i8 { mag: 53, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 4, sign: false }); + data.append(i8 { mag: 99, sign: true }); + data.append(i8 { mag: 104, sign: true }); + data.append(i8 { mag: 106, sign: true }); data.append(i8 { mag: 59, sign: true }); + data.append(i8 { mag: 121, sign: true }); + data.append(i8 { mag: 69, sign: true }); + data.append(i8 { mag: 64, sign: false }); + data.append(i8 { mag: 42, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 82, sign: true }); data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 53, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 83, sign: false }); - data.append(i8 { mag: 44, sign: true }); - data.append(i8 { mag: 117, sign: true }); - data.append(i8 { mag: 113, sign: true }); - data.append(i8 { mag: 60, sign: true }); + data.append(i8 { mag: 55, sign: true }); + data.append(i8 { mag: 13, sign: true }); + data.append(i8 { mag: 112, sign: true }); data.append(i8 { mag: 113, sign: false }); - data.append(i8 { mag: 95, sign: false }); - data.append(i8 { mag: 67, sign: true }); - data.append(i8 { mag: 126, sign: true }); - data.append(i8 { mag: 116, sign: true }); - data.append(i8 { mag: 48, sign: false }); - data.append(i8 { mag: 125, sign: true }); - data.append(i8 { mag: 71, sign: false }); + data.append(i8 { mag: 0, sign: false }); + data.append(i8 { mag: 66, sign: true }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 50, sign: false }); + data.append(i8 { mag: 70, sign: false }); + data.append(i8 { mag: 110, sign: true }); + data.append(i8 { mag: 114, sign: false }); + data.append(i8 { mag: 72, sign: false }); data.append(i8 { mag: 21, sign: true }); - data.append(i8 { mag: 89, sign: true }); - data.append(i8 { mag: 94, sign: false }); - data.append(i8 { mag: 84, sign: true }); - data.append(i8 { mag: 97, sign: false }); - data.append(i8 { mag: 15, sign: true }); - data.append(i8 { mag: 53, sign: false }); - data.append(i8 { mag: 11, sign: false }); - data.append(i8 { mag: 11, sign: true }); - data.append(i8 { mag: 60, sign: true }); - data.append(i8 { mag: 70, sign: true }); - data.append(i8 { mag: 100, sign: false }); - data.append(i8 { mag: 56, sign: false }); - data.append(i8 { mag: 36, sign: true }); - data.append(i8 { mag: 27, sign: true }); - data.append(i8 { mag: 54, sign: false }); - data.append(i8 { mag: 32, sign: true }); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(i8 { mag: 79, sign: true }); + data.append(i8 { mag: 46, sign: false }); + data.append(i8 { mag: 30, sign: true }); + data.append(i8 { mag: 34, sign: true }); + data.append(i8 { mag: 76, sign: true }); + data.append(i8 { mag: 64, sign: true }); + data.append(i8 { mag: 75, sign: true }); + data.append(i8 { mag: 111, sign: false }); + data.append(i8 { mag: 80, sign: false }); + data.append(i8 { mag: 31, sign: true }); + data.append(i8 { mag: 5, sign: true }); + data.append(i8 { mag: 76, sign: false }); + data.append(i8 { mag: 60, sign: false }); + data.append(i8 { mag: 111, sign: true }); + data.append(i8 { mag: 40, sign: true }); + data.append(i8 { mag: 30, sign: true }); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_2d.cairo b/src/tests/nodes/slice_u32_2d.cairo index 51a20483f..a4ad6e1a6 100644 --- a/src/tests/nodes/slice_u32_2d.cairo +++ b/src/tests/nodes/slice_u32_2d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_u32_2d/input_0.cairo b/src/tests/nodes/slice_u32_2d/input_0.cairo index dbc5b7d40..35b844ac3 100644 --- a/src/tests/nodes/slice_u32_2d/input_0.cairo +++ b/src/tests/nodes/slice_u32_2d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,15 +8,13 @@ fn input_0() -> Tensor { shape.append(4); let mut data = ArrayTrait::new(); - data.append(219); - data.append(77); - data.append(17); - data.append(252); - data.append(224); - data.append(113); - data.append(238); - data.append(108); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(239); + data.append(177); + data.append(83); + data.append(88); + data.append(34); + data.append(131); + data.append(2); + data.append(11); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_2d/output_0.cairo b/src/tests/nodes/slice_u32_2d/output_0.cairo index b1c9497d7..c16ade382 100644 --- a/src/tests/nodes/slice_u32_2d/output_0.cairo +++ b/src/tests/nodes/slice_u32_2d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -9,11 +8,9 @@ fn output_0() -> Tensor { shape.append(2); let mut data = ArrayTrait::new(); - data.append(17); - data.append(252); - data.append(238); - data.append(108); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(83); + data.append(88); + data.append(2); + data.append(11); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_3d.cairo b/src/tests/nodes/slice_u32_3d.cairo index 5c41d43ee..36796ffbc 100644 --- a/src/tests/nodes/slice_u32_3d.cairo +++ b/src/tests/nodes/slice_u32_3d.cairo @@ -2,10 +2,10 @@ mod input_0; mod output_0; -use array::ArrayTrait; -use orion::operators::tensor::core::TensorTrait; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; -use orion::operators::tensor::implementations::impl_tensor_u32::u32TensorPartialEq; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::TensorTrait; +use orion::operators::tensor::U32Tensor; +use orion::operators::tensor::U32TensorPartialEq; use orion::utils::assert_eq; #[test] diff --git a/src/tests/nodes/slice_u32_3d/input_0.cairo b/src/tests/nodes/slice_u32_3d/input_0.cairo index 406e4bd15..28b857a60 100644 --- a/src/tests/nodes/slice_u32_3d/input_0.cairo +++ b/src/tests/nodes/slice_u32_3d/input_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn input_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,1007 +9,1005 @@ fn input_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(247); - data.append(185); - data.append(145); - data.append(11); - data.append(240); - data.append(25); - data.append(157); - data.append(15); - data.append(129); - data.append(226); - data.append(8); - data.append(9); - data.append(110); - data.append(142); - data.append(240); - data.append(16); - data.append(187); - data.append(18); - data.append(218); - data.append(210); - data.append(142); - data.append(123); - data.append(229); - data.append(0); - data.append(38); - data.append(62); - data.append(210); - data.append(39); - data.append(33); - data.append(101); - data.append(62); + data.append(230); + data.append(198); + data.append(114); + data.append(149); + data.append(28); + data.append(36); data.append(139); - data.append(31); - data.append(92); - data.append(89); - data.append(15); - data.append(9); - data.append(237); - data.append(177); - data.append(188); - data.append(180); - data.append(180); - data.append(93); - data.append(191); - data.append(92); - data.append(132); - data.append(141); - data.append(59); - data.append(97); - data.append(91); - data.append(18); - data.append(176); - data.append(237); - data.append(50); - data.append(217); - data.append(224); - data.append(169); - data.append(49); - data.append(33); - data.append(39); - data.append(125); - data.append(203); - data.append(76); - data.append(39); - data.append(219); - data.append(221); - data.append(111); - data.append(82); - data.append(177); - data.append(219); - data.append(87); - data.append(38); - data.append(128); - data.append(66); - data.append(62); - data.append(243); + data.append(54); data.append(64); - data.append(100); - data.append(252); - data.append(52); + data.append(140); + data.append(248); + data.append(32); + data.append(185); + data.append(148); data.append(7); - data.append(17); - data.append(193); - data.append(197); - data.append(241); - data.append(55); - data.append(157); - data.append(3); - data.append(159); - data.append(144); - data.append(60); - data.append(103); - data.append(132); - data.append(28); - data.append(20); - data.append(11); - data.append(83); - data.append(71); - data.append(78); - data.append(247); - data.append(18); - data.append(138); - data.append(92); - data.append(240); - data.append(137); - data.append(239); - data.append(200); - data.append(38); - data.append(66); - data.append(59); - data.append(16); data.append(210); - data.append(156); - data.append(65); - data.append(67); - data.append(7); - data.append(41); - data.append(32); - data.append(70); + data.append(174); + data.append(63); + data.append(232); + data.append(20); + data.append(225); data.append(113); - data.append(66); + data.append(79); + data.append(138); + data.append(214); + data.append(203); + data.append(40); + data.append(167); + data.append(225); + data.append(226); + data.append(217); + data.append(109); + data.append(15); + data.append(227); + data.append(223); data.append(196); - data.append(90); - data.append(189); - data.append(85); - data.append(145); - data.append(184); + data.append(177); data.append(70); - data.append(87); - data.append(236); - data.append(189); + data.append(197); + data.append(80); + data.append(54); + data.append(209); + data.append(125); + data.append(83); + data.append(140); data.append(91); - data.append(188); - data.append(153); + data.append(8); + data.append(122); + data.append(254); + data.append(184); + data.append(250); + data.append(89); + data.append(175); + data.append(27); data.append(67); - data.append(236); + data.append(132); + data.append(6); data.append(157); + data.append(171); + data.append(129); + data.append(82); + data.append(12); + data.append(12); + data.append(195); + data.append(24); + data.append(172); + data.append(220); data.append(168); - data.append(182); - data.append(16); + data.append(229); + data.append(34); + data.append(78); + data.append(176); + data.append(55); + data.append(197); + data.append(32); + data.append(46); + data.append(223); + data.append(18); + data.append(178); + data.append(156); + data.append(169); + data.append(107); + data.append(123); + data.append(19); data.append(103); - data.append(21); - data.append(207); - data.append(38); - data.append(254); - data.append(110); - data.append(17); - data.append(44); + data.append(192); + data.append(121); + data.append(106); + data.append(161); + data.append(157); + data.append(114); + data.append(190); + data.append(55); + data.append(149); + data.append(84); + data.append(123); + data.append(206); + data.append(146); + data.append(12); + data.append(208); + data.append(36); + data.append(237); + data.append(192); + data.append(108); + data.append(243); + data.append(117); + data.append(144); + data.append(186); + data.append(224); + data.append(161); + data.append(218); + data.append(199); data.append(180); - data.append(1); - data.append(40); - data.append(223); - data.append(95); - data.append(181); - data.append(99); - data.append(251); - data.append(71); - data.append(79); - data.append(195); - data.append(85); - data.append(174); - data.append(72); - data.append(68); - data.append(62); - data.append(104); - data.append(102); - data.append(28); - data.append(71); + data.append(19); + data.append(211); + data.append(15); + data.append(27); data.append(120); - data.append(181); - data.append(162); - data.append(95); - data.append(48); - data.append(9); - data.append(98); - data.append(239); - data.append(30); - data.append(15); + data.append(67); + data.append(108); + data.append(179); + data.append(92); + data.append(66); + data.append(53); + data.append(118); + data.append(36); + data.append(217); + data.append(141); + data.append(88); + data.append(77); + data.append(31); + data.append(73); + data.append(87); + data.append(75); + data.append(227); + data.append(34); + data.append(166); + data.append(121); + data.append(111); + data.append(42); + data.append(220); + data.append(89); + data.append(79); + data.append(249); + data.append(234); + data.append(232); + data.append(164); + data.append(144); + data.append(152); + data.append(22); + data.append(20); + data.append(9); + data.append(115); + data.append(44); + data.append(129); + data.append(14); data.append(54); - data.append(133); - data.append(172); - data.append(228); - data.append(91); - data.append(39); - data.append(212); - data.append(131); - data.append(175); - data.append(7); + data.append(161); + data.append(167); + data.append(116); + data.append(138); + data.append(186); + data.append(156); + data.append(197); + data.append(1); + data.append(1); + data.append(193); + data.append(134); + data.append(254); data.append(33); - data.append(247); - data.append(130); - data.append(2); - data.append(83); - data.append(245); - data.append(185); - data.append(234); - data.append(8); - data.append(246); + data.append(132); + data.append(44); + data.append(76); + data.append(15); + data.append(221); + data.append(186); + data.append(59); + data.append(204); + data.append(93); + data.append(25); + data.append(129); + data.append(22); + data.append(101); + data.append(85); + data.append(34); + data.append(106); + data.append(70); + data.append(33); + data.append(238); + data.append(253); data.append(62); - data.append(242); - data.append(73); - data.append(165); - data.append(145); data.append(226); - data.append(10); - data.append(128); - data.append(249); - data.append(84); - data.append(59); - data.append(40); - data.append(145); + data.append(35); + data.append(53); + data.append(123); + data.append(175); + data.append(35); + data.append(172); + data.append(68); + data.append(139); + data.append(211); + data.append(205); + data.append(216); + data.append(125); data.append(224); + data.append(236); + data.append(62); + data.append(238); + data.append(186); + data.append(158); + data.append(222); + data.append(185); + data.append(147); + data.append(192); + data.append(28); + data.append(192); + data.append(0); + data.append(223); + data.append(239); + data.append(238); + data.append(115); + data.append(172); data.append(188); - data.append(31); - data.append(83); - data.append(121); - data.append(151); - data.append(61); - data.append(150); - data.append(81); - data.append(19); - data.append(139); - data.append(118); - data.append(228); - data.append(53); data.append(171); - data.append(130); + data.append(190); + data.append(193); + data.append(98); + data.append(191); + data.append(143); + data.append(190); + data.append(117); + data.append(193); + data.append(158); data.append(125); - data.append(172); - data.append(69); - data.append(168); - data.append(178); - data.append(198); - data.append(244); - data.append(254); - data.append(195); - data.append(246); - data.append(233); - data.append(57); - data.append(12); - data.append(223); + data.append(131); data.append(244); - data.append(136); - data.append(45); - data.append(126); - data.append(94); - data.append(217); - data.append(76); - data.append(221); - data.append(7); - data.append(20); - data.append(142); + data.append(219); + data.append(250); + data.append(219); + data.append(117); + data.append(232); + data.append(10); + data.append(16); + data.append(178); + data.append(106); + data.append(95); + data.append(215); + data.append(117); + data.append(109); + data.append(226); + data.append(105); + data.append(194); + data.append(208); + data.append(28); + data.append(36); + data.append(178); + data.append(35); data.append(14); + data.append(69); + data.append(55); + data.append(183); data.append(217); + data.append(191); + data.append(56); + data.append(1); + data.append(31); + data.append(211); + data.append(253); + data.append(208); + data.append(250); + data.append(76); + data.append(180); + data.append(140); + data.append(211); + data.append(249); + data.append(77); + data.append(220); data.append(98); - data.append(113); - data.append(30); - data.append(163); + data.append(21); + data.append(144); + data.append(21); + data.append(6); + data.append(160); + data.append(25); + data.append(55); + data.append(7); + data.append(13); + data.append(184); + data.append(249); + data.append(114); + data.append(248); + data.append(127); + data.append(215); + data.append(33); + data.append(86); + data.append(93); + data.append(94); + data.append(42); + data.append(175); + data.append(93); + data.append(183); + data.append(104); + data.append(33); + data.append(194); + data.append(254); + data.append(115); + data.append(26); data.append(171); - data.append(148); - data.append(109); + data.append(123); + data.append(135); + data.append(44); data.append(195); - data.append(52); - data.append(6); - data.append(189); - data.append(61); - data.append(187); - data.append(155); - data.append(235); - data.append(99); - data.append(23); - data.append(206); - data.append(2); - data.append(166); - data.append(67); - data.append(235); - data.append(23); - data.append(107); - data.append(91); - data.append(68); - data.append(164); - data.append(188); - data.append(96); - data.append(223); - data.append(11); - data.append(202); - data.append(122); - data.append(90); - data.append(178); - data.append(40); - data.append(166); - data.append(84); - data.append(107); - data.append(71); - data.append(158); - data.append(54); - data.append(135); - data.append(248); - data.append(201); - data.append(155); - data.append(228); - data.append(13); - data.append(33); - data.append(90); - data.append(164); - data.append(181); - data.append(117); - data.append(210); - data.append(89); - data.append(137); + data.append(226); data.append(65); - data.append(118); - data.append(151); - data.append(148); - data.append(51); - data.append(21); - data.append(195); - data.append(185); - data.append(239); - data.append(154); - data.append(38); - data.append(140); - data.append(225); - data.append(238); - data.append(178); - data.append(42); - data.append(178); - data.append(123); - data.append(56); - data.append(53); - data.append(19); - data.append(94); - data.append(149); - data.append(163); - data.append(181); - data.append(130); - data.append(177); + data.append(175); + data.append(160); data.append(186); - data.append(0); - data.append(7); - data.append(187); - data.append(40); - data.append(101); - data.append(13); + data.append(116); + data.append(95); + data.append(44); + data.append(18); + data.append(197); + data.append(192); + data.append(42); + data.append(174); + data.append(18); + data.append(65); + data.append(105); + data.append(195); + data.append(70); + data.append(141); + data.append(138); + data.append(153); + data.append(227); + data.append(27); + data.append(195); + data.append(107); data.append(83); - data.append(210); - data.append(54); - data.append(3); + data.append(153); + data.append(229); + data.append(159); + data.append(72); + data.append(25); + data.append(97); + data.append(127); + data.append(243); + data.append(52); + data.append(197); + data.append(233); + data.append(213); + data.append(153); + data.append(20); + data.append(56); + data.append(193); + data.append(250); + data.append(57); + data.append(110); + data.append(164); + data.append(92); data.append(205); - data.append(125); - data.append(30); - data.append(68); data.append(251); - data.append(17); - data.append(14); - data.append(23); - data.append(131); - data.append(143); - data.append(149); - data.append(252); - data.append(48); - data.append(12); - data.append(101); - data.append(29); - data.append(179); - data.append(28); - data.append(28); - data.append(16); - data.append(23); - data.append(175); - data.append(107); - data.append(102); - data.append(224); - data.append(69); + data.append(137); + data.append(0); + data.append(187); + data.append(65); + data.append(27); + data.append(188); + data.append(148); + data.append(67); data.append(149); - data.append(189); - data.append(226); - data.append(77); - data.append(112); - data.append(117); - data.append(130); - data.append(157); - data.append(239); - data.append(99); - data.append(100); - data.append(25); - data.append(89); - data.append(215); - data.append(186); - data.append(205); - data.append(91); - data.append(143); + data.append(47); + data.append(129); + data.append(165); + data.append(188); + data.append(84); + data.append(169); + data.append(123); + data.append(214); + data.append(36); data.append(6); - data.append(109); - data.append(117); - data.append(179); + data.append(196); + data.append(90); data.append(100); - data.append(48); - data.append(29); - data.append(237); - data.append(158); - data.append(244); - data.append(244); - data.append(109); + data.append(221); + data.append(127); + data.append(9); + data.append(186); + data.append(161); + data.append(219); data.append(59); - data.append(101); - data.append(50); - data.append(46); - data.append(163); - data.append(168); - data.append(130); - data.append(55); - data.append(140); - data.append(204); - data.append(199); - data.append(252); - data.append(131); - data.append(123); + data.append(247); + data.append(97); + data.append(99); + data.append(218); data.append(215); - data.append(191); - data.append(134); - data.append(159); - data.append(120); - data.append(65); - data.append(254); - data.append(214); - data.append(205); - data.append(0); - data.append(70); - data.append(8); - data.append(52); - data.append(178); - data.append(191); - data.append(175); - data.append(27); - data.append(166); + data.append(227); + data.append(33); + data.append(5); data.append(223); - data.append(137); - data.append(92); - data.append(201); - data.append(139); - data.append(117); - data.append(225); - data.append(89); - data.append(253); - data.append(6); - data.append(229); - data.append(163); + data.append(233); data.append(38); - data.append(249); - data.append(34); - data.append(70); - data.append(114); + data.append(99); + data.append(124); + data.append(220); + data.append(197); + data.append(61); + data.append(135); data.append(4); - data.append(93); - data.append(206); - data.append(115); - data.append(6); - data.append(84); - data.append(236); - data.append(73); - data.append(160); - data.append(74); - data.append(91); - data.append(39); - data.append(27); data.append(203); - data.append(39); - data.append(209); - data.append(97); - data.append(60); - data.append(108); - data.append(87); - data.append(75); - data.append(46); - data.append(51); - data.append(78); - data.append(39); - data.append(132); - data.append(87); - data.append(174); - data.append(117); - data.append(67); - data.append(38); - data.append(92); - data.append(235); - data.append(191); - data.append(157); - data.append(214); - data.append(134); - data.append(54); - data.append(182); - data.append(84); - data.append(34); - data.append(237); - data.append(145); - data.append(125); - data.append(131); - data.append(251); - data.append(120); - data.append(14); - data.append(143); - data.append(69); - data.append(1); - data.append(189); - data.append(115); - data.append(47); - data.append(208); - data.append(67); + data.append(9); + data.append(30); data.append(28); - data.append(8); - data.append(81); - data.append(212); - data.append(13); - data.append(32); - data.append(112); + data.append(27); + data.append(22); + data.append(240); + data.append(231); + data.append(134); + data.append(95); + data.append(107); + data.append(160); + data.append(30); data.append(70); - data.append(243); - data.append(24); - data.append(214); - data.append(143); - data.append(175); - data.append(17); - data.append(229); - data.append(118); - data.append(174); - data.append(132); - data.append(232); - data.append(187); + data.append(50); + data.append(57); + data.append(13); + data.append(50); data.append(35); - data.append(212); - data.append(247); - data.append(147); - data.append(238); + data.append(58); + data.append(208); + data.append(7); + data.append(1); + data.append(219); + data.append(240); + data.append(64); + data.append(135); + data.append(225); + data.append(207); + data.append(137); + data.append(6); + data.append(171); + data.append(134); + data.append(176); + data.append(98); + data.append(152); + data.append(121); + data.append(186); + data.append(122); + data.append(234); + data.append(32); + data.append(173); + data.append(104); + data.append(254); + data.append(75); data.append(130); + data.append(66); + data.append(61); + data.append(13); + data.append(208); + data.append(152); + data.append(131); + data.append(15); + data.append(15); + data.append(77); data.append(189); - data.append(49); - data.append(78); - data.append(20); - data.append(101); + data.append(115); + data.append(247); + data.append(200); + data.append(3); + data.append(249); + data.append(195); + data.append(165); + data.append(170); + data.append(227); + data.append(247); + data.append(199); + data.append(158); + data.append(58); + data.append(235); + data.append(111); + data.append(94); + data.append(116); + data.append(145); + data.append(179); + data.append(191); + data.append(222); data.append(151); - data.append(11); - data.append(134); - data.append(130); + data.append(177); + data.append(40); + data.append(223); data.append(194); - data.append(224); - data.append(183); - data.append(47); - data.append(249); - data.append(135); - data.append(39); - data.append(153); - data.append(226); - data.append(130); - data.append(80); - data.append(185); - data.append(42); + data.append(161); + data.append(206); + data.append(250); + data.append(114); + data.append(70); + data.append(11); + data.append(129); + data.append(22); + data.append(213); + data.append(115); + data.append(21); + data.append(75); + data.append(169); + data.append(110); + data.append(52); + data.append(108); + data.append(173); + data.append(188); data.append(119); - data.append(194); - data.append(13); + data.append(252); + data.append(22); + data.append(149); + data.append(144); + data.append(145); + data.append(106); + data.append(55); data.append(84); - data.append(38); - data.append(140); - data.append(165); - data.append(2); - data.append(37); - data.append(197); - data.append(81); - data.append(64); - data.append(56); - data.append(112); - data.append(89); - data.append(14); - data.append(181); - data.append(203); - data.append(168); - data.append(214); - data.append(86); - data.append(5); - data.append(213); + data.append(92); + data.append(198); + data.append(246); + data.append(206); + data.append(235); + data.append(118); + data.append(237); + data.append(143); + data.append(103); + data.append(155); + data.append(46); + data.append(200); + data.append(50); + data.append(126); data.append(149); - data.append(175); - data.append(40); - data.append(230); - data.append(233); - data.append(16); + data.append(104); + data.append(87); + data.append(238); + data.append(199); + data.append(187); + data.append(238); + data.append(112); data.append(192); - data.append(209); - data.append(96); - data.append(134); - data.append(142); - data.append(117); + data.append(205); + data.append(166); + data.append(108); + data.append(94); + data.append(218); + data.append(87); + data.append(178); + data.append(12); + data.append(229); + data.append(201); + data.append(247); + data.append(18); + data.append(143); + data.append(34); + data.append(53); + data.append(252); + data.append(85); + data.append(206); + data.append(115); data.append(66); - data.append(236); - data.append(234); - data.append(113); - data.append(191); - data.append(33); - data.append(209); - data.append(5); - data.append(97); - data.append(254); - data.append(151); - data.append(246); - data.append(173); - data.append(26); - data.append(190); - data.append(45); - data.append(24); - data.append(230); - data.append(20); - data.append(11); + data.append(180); + data.append(46); + data.append(65); + data.append(115); + data.append(229); data.append(192); - data.append(75); - data.append(203); - data.append(208); - data.append(236); - data.append(161); - data.append(125); - data.append(175); - data.append(140); - data.append(190); - data.append(153); - data.append(155); - data.append(70); - data.append(35); - data.append(190); - data.append(232); - data.append(139); - data.append(220); - data.append(132); - data.append(72); - data.append(71); - data.append(22); - data.append(7); - data.append(150); - data.append(208); - data.append(139); + data.append(245); data.append(24); - data.append(32); - data.append(10); - data.append(125); - data.append(196); - data.append(51); - data.append(174); + data.append(42); + data.append(16); + data.append(164); + data.append(224); + data.append(147); + data.append(148); + data.append(193); data.append(94); - data.append(219); - data.append(14); - data.append(41); - data.append(182); - data.append(235); - data.append(249); + data.append(166); + data.append(196); + data.append(13); data.append(77); + data.append(244); + data.append(170); data.append(113); - data.append(130); - data.append(136); - data.append(184); - data.append(136); + data.append(80); + data.append(32); + data.append(107); + data.append(180); + data.append(229); + data.append(185); + data.append(62); data.append(27); - data.append(79); + data.append(18); + data.append(213); + data.append(45); + data.append(76); + data.append(15); + data.append(217); + data.append(13); + data.append(217); + data.append(213); + data.append(182); + data.append(32); + data.append(28); + data.append(118); + data.append(5); + data.append(111); + data.append(230); + data.append(230); data.append(4); + data.append(184); + data.append(123); + data.append(248); data.append(85); - data.append(106); - data.append(47); - data.append(107); - data.append(224); - data.append(161); - data.append(143); - data.append(93); - data.append(172); - data.append(150); - data.append(164); - data.append(56); - data.append(102); - data.append(99); - data.append(219); - data.append(210); - data.append(162); - data.append(203); - data.append(205); - data.append(78); data.append(236); - data.append(247); - data.append(36); - data.append(159); - data.append(238); - data.append(196); - data.append(68); - data.append(172); - data.append(212); - data.append(150); - data.append(116); - data.append(207); - data.append(45); - data.append(54); - data.append(151); - data.append(130); - data.append(186); - data.append(61); - data.append(61); - data.append(78); - data.append(21); - data.append(87); - data.append(129); - data.append(87); - data.append(53); - data.append(50); - data.append(127); - data.append(63); - data.append(131); - data.append(35); - data.append(225); - data.append(76); - data.append(239); - data.append(60); - data.append(195); - data.append(100); - data.append(99); - data.append(196); - data.append(138); - data.append(208); - data.append(57); - data.append(240); - data.append(33); - data.append(156); + data.append(66); + data.append(37); + data.append(3); + data.append(28); + data.append(181); + data.append(69); + data.append(86); data.append(202); - data.append(90); - data.append(12); - data.append(230); - data.append(222); - data.append(63); - data.append(250); - data.append(140); - data.append(138); - data.append(141); - data.append(5); - data.append(132); - data.append(35); - data.append(72); - data.append(183); - data.append(250); - data.append(27); - data.append(150); - data.append(131); - data.append(146); + data.append(104); + data.append(17); + data.append(128); + data.append(212); + data.append(224); + data.append(217); + data.append(59); + data.append(126); + data.append(94); + data.append(154); + data.append(65); + data.append(247); + data.append(152); + data.append(175); + data.append(0); + data.append(17); + data.append(101); + data.append(211); + data.append(22); data.append(209); - data.append(238); - data.append(86); - data.append(213); - data.append(246); - data.append(20); + data.append(149); + data.append(236); data.append(81); - data.append(75); - data.append(101); - data.append(63); - data.append(176); - data.append(5); - data.append(32); - data.append(189); - data.append(191); - data.append(71); - data.append(240); - data.append(121); - data.append(53); - data.append(42); - data.append(205); - data.append(49); - data.append(29); - data.append(252); - data.append(110); - data.append(91); - data.append(92); + data.append(192); + data.append(155); + data.append(67); data.append(242); - data.append(150); - data.append(2); - data.append(97); - data.append(139); - data.append(14); - data.append(228); + data.append(40); + data.append(123); + data.append(243); + data.append(230); + data.append(32); + data.append(122); + data.append(90); + data.append(147); + data.append(190); data.append(52); - data.append(0); - data.append(197); + data.append(105); + data.append(246); + data.append(222); + data.append(119); + data.append(230); + data.append(73); + data.append(247); + data.append(93); + data.append(113); + data.append(114); + data.append(111); + data.append(220); data.append(109); + data.append(76); data.append(10); - data.append(26); - data.append(68); - data.append(242); - data.append(123); + data.append(129); + data.append(196); + data.append(138); data.append(103); + data.append(105); + data.append(45); + data.append(216); + data.append(18); + data.append(19); + data.append(240); + data.append(101); + data.append(171); + data.append(110); + data.append(199); + data.append(61); data.append(33); - data.append(51); - data.append(190); - data.append(183); - data.append(151); - data.append(34); - data.append(100); - data.append(122); - data.append(204); - data.append(149); + data.append(14); + data.append(253); + data.append(106); + data.append(3); + data.append(147); + data.append(132); + data.append(86); + data.append(186); + data.append(236); data.append(196); - data.append(52); - data.append(173); - data.append(189); - data.append(246); - data.append(167); + data.append(178); + data.append(125); + data.append(168); + data.append(81); + data.append(116); + data.append(115); + data.append(140); + data.append(32); + data.append(249); data.append(147); - data.append(106); data.append(72); - data.append(30); - data.append(58); + data.append(94); + data.append(88); + data.append(173); + data.append(177); + data.append(137); + data.append(99); + data.append(40); + data.append(35); + data.append(40); + data.append(160); + data.append(33); + data.append(214); + data.append(95); + data.append(229); + data.append(100); + data.append(101); + data.append(87); + data.append(122); + data.append(130); + data.append(170); + data.append(7); + data.append(63); + data.append(226); + data.append(187); + data.append(77); + data.append(166); + data.append(74); + data.append(111); + data.append(20); + data.append(150); + data.append(211); + data.append(8); + data.append(68); + data.append(79); + data.append(8); + data.append(49); + data.append(205); + data.append(31); + data.append(23); + data.append(148); + data.append(36); + data.append(44); + data.append(38); + data.append(178); + data.append(84); + data.append(190); + data.append(120); data.append(204); - data.append(58); - data.append(83); - data.append(192); - data.append(251); - data.append(13); - data.append(125); - data.append(189); + data.append(114); + data.append(205); + data.append(138); + data.append(201); + data.append(61); + data.append(137); + data.append(35); + data.append(139); + data.append(77); + data.append(40); + data.append(179); + data.append(56); + data.append(139); + data.append(14); + data.append(2); + data.append(254); data.append(62); + data.append(46); + data.append(216); + data.append(163); + data.append(76); + data.append(176); data.append(209); - data.append(72); - data.append(30); - data.append(251); - data.append(73); + data.append(11); + data.append(245); + data.append(3); + data.append(213); + data.append(146); + data.append(99); + data.append(200); + data.append(57); + data.append(174); + data.append(16); + data.append(117); + data.append(155); + data.append(216); + data.append(40); + data.append(23); + data.append(204); + data.append(158); + data.append(185); + data.append(117); + data.append(135); + data.append(13); + data.append(79); + data.append(78); + data.append(52); + data.append(42); + data.append(210); + data.append(160); + data.append(210); + data.append(83); + data.append(20); data.append(153); + data.append(37); + data.append(148); + data.append(30); + data.append(104); + data.append(230); + data.append(66); + data.append(11); + data.append(105); + data.append(253); + data.append(221); + data.append(141); + data.append(24); + data.append(56); + data.append(104); + data.append(77); + data.append(51); + data.append(129); + data.append(147); + data.append(170); + data.append(93); + data.append(13); + data.append(92); + data.append(145); + data.append(229); + data.append(213); + data.append(22); + data.append(241); + data.append(141); + data.append(115); + data.append(25); + data.append(108); + data.append(89); + data.append(17); + data.append(11); + data.append(241); + data.append(72); + data.append(211); + data.append(199); + data.append(47); + data.append(223); + data.append(125); + data.append(163); + data.append(57); + data.append(70); + data.append(166); + data.append(243); + data.append(146); data.append(128); - data.append(143); + data.append(173); + data.append(115); data.append(209); - data.append(233); - data.append(80); - data.append(99); - data.append(236); - data.append(10); - data.append(88); - data.append(134); - data.append(102); - data.append(225); - data.append(215); - data.append(243); - data.append(162); - data.append(18); - data.append(42); - data.append(81); + data.append(65); + data.append(220); + data.append(111); + data.append(86); + data.append(253); + data.append(199); + data.append(115); + data.append(32); + data.append(69); + data.append(54); + data.append(231); data.append(116); - data.append(182); - data.append(185); - data.append(195); - data.append(122); - data.append(135); - data.append(206); - data.append(106); - data.append(187); + data.append(76); + data.append(126); + data.append(97); + data.append(121); + data.append(213); data.append(229); - data.append(190); - data.append(144); - data.append(115); - data.append(45); - data.append(232); - data.append(254); - data.append(176); - data.append(21); - data.append(89); - data.append(192); - data.append(161); - data.append(156); - data.append(59); - data.append(226); - data.append(82); - data.append(204); - data.append(249); - data.append(43); - data.append(127); - data.append(173); data.append(152); - data.append(200); - data.append(2); - data.append(167); - data.append(194); - data.append(248); - data.append(112); - data.append(129); - data.append(201); - data.append(197); - data.append(32); - data.append(50); - data.append(162); - data.append(161); + data.append(166); + data.append(66); + data.append(158); + data.append(138); + data.append(12); + data.append(145); + data.append(41); data.append(95); - data.append(149); data.append(254); - data.append(26); - data.append(131); - data.append(210); - data.append(32); - data.append(208); - data.append(144); - data.append(25); - data.append(193); - data.append(78); - data.append(251); - data.append(71); - data.append(90); + data.append(97); + data.append(19); + data.append(229); + data.append(95); + data.append(158); data.append(47); - data.append(67); - data.append(154); - data.append(239); - data.append(11); - data.append(123); - data.append(11); - data.append(66); - data.append(232); - data.append(243); - data.append(155); - data.append(114); - data.append(143); - data.append(183); - data.append(68); - data.append(75); - data.append(127); - data.append(165); - data.append(5); - data.append(86); - data.append(14); - data.append(102); - data.append(86); - data.append(26); - data.append(157); - data.append(127); - data.append(137); - data.append(134); - data.append(36); - data.append(93); - data.append(231); - data.append(148); - data.append(206); + data.append(194); + data.append(207); + data.append(37); + data.append(226); + data.append(177); data.append(144); - data.append(44); - data.append(63); - data.append(236); - data.append(236); - data.append(71); - data.append(24); + data.append(180); data.append(37); + data.append(218); + data.append(203); + data.append(250); + data.append(11); + data.append(149); data.append(153); - data.append(25); - data.append(143); - data.append(212); - data.append(231); - data.append(27); - data.append(90); - data.append(97); - data.append(52); - data.append(166); - data.append(98); - data.append(231); - data.append(106); + data.append(228); + data.append(144); + data.append(31); + data.append(239); + data.append(235); + data.append(77); + data.append(144); + data.append(100); + data.append(60); + data.append(200); + data.append(136); + data.append(145); + data.append(162); + data.append(93); + data.append(42); + data.append(223); data.append(50); - data.append(198); - data.append(11); - data.append(219); - data.append(170); - data.append(254); - data.append(118); - data.append(220); - data.append(2); - data.append(55); + data.append(46); + data.append(121); + data.append(133); + data.append(120); + data.append(179); + data.append(87); + data.append(127); + data.append(78); + data.append(123); + data.append(10); + data.append(48); + data.append(202); + data.append(178); + data.append(167); + data.append(85); + data.append(146); + data.append(207); + data.append(128); + data.append(70); + data.append(87); + data.append(46); + data.append(56); + data.append(47); + data.append(38); data.append(148); - data.append(190); - data.append(131); - data.append(41); - data.append(61); - data.append(197); - data.append(174); - data.append(119); - data.append(89); - data.append(209); - data.append(249); - data.append(198); - data.append(83); - data.append(246); - data.append(113); + data.append(147); + data.append(109); + data.append(231); + data.append(179); + data.append(40); + data.append(251); + data.append(39); + data.append(122); + data.append(15); + data.append(22); + data.append(208); + data.append(30); + data.append(225); data.append(151); - data.append(174); + data.append(250); + data.append(141); + data.append(27); + data.append(217); + data.append(164); + data.append(129); + data.append(160); + data.append(164); + data.append(240); + data.append(44); + data.append(121); + data.append(97); + data.append(167); + data.append(46); + data.append(134); + data.append(217); + data.append(236); + data.append(3); + data.append(73); data.append(155); - data.append(102); - data.append(242); - data.append(102); - data.append(219); - data.append(166); - data.append(212); - data.append(220); - data.append(208); - data.append(218); - data.append(63); - data.append(139); - data.append(22); - data.append(188); - data.append(154); - data.append(64); - data.append(48); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(16); + data.append(254); + data.append(62); + data.append(196); + data.append(238); + data.append(107); + data.append(104); + data.append(221); + data.append(163); + data.append(114); + data.append(235); + data.append(215); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file diff --git a/src/tests/nodes/slice_u32_3d/output_0.cairo b/src/tests/nodes/slice_u32_3d/output_0.cairo index d8c9ffb47..4d40e1148 100644 --- a/src/tests/nodes/slice_u32_3d/output_0.cairo +++ b/src/tests/nodes/slice_u32_3d/output_0.cairo @@ -1,7 +1,6 @@ -use array::ArrayTrait; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::numbers::fixed_point::core::FixedImpl; -use orion::operators::tensor::implementations::impl_tensor_u32::Tensor_u32; +use array::{ArrayTrait, SpanTrait}; +use orion::operators::tensor::{TensorTrait, Tensor}; +use orion::operators::tensor::U32Tensor; fn output_0() -> Tensor { let mut shape = ArrayTrait::::new(); @@ -10,67 +9,65 @@ fn output_0() -> Tensor { shape.append(5); let mut data = ArrayTrait::new(); - data.append(247); - data.append(185); - data.append(145); - data.append(11); - data.append(240); - data.append(16); - data.append(187); - data.append(18); - data.append(218); + data.append(230); + data.append(198); + data.append(114); + data.append(149); + data.append(28); data.append(210); - data.append(62); - data.append(139); - data.append(31); - data.append(92); - data.append(89); - data.append(132); - data.append(141); - data.append(59); - data.append(97); - data.append(91); - data.append(18); - data.append(176); - data.append(237); - data.append(50); + data.append(174); + data.append(63); + data.append(232); + data.append(20); data.append(217); - data.append(221); - data.append(111); - data.append(82); - data.append(177); - data.append(219); - data.append(7); - data.append(17); - data.append(193); - data.append(197); - data.append(241); - data.append(11); - data.append(83); - data.append(71); - data.append(78); - data.append(247); - data.append(18); - data.append(138); - data.append(92); - data.append(240); - data.append(137); - data.append(7); - data.append(41); - data.append(32); - data.append(70); - data.append(113); - data.append(189); + data.append(109); + data.append(15); + data.append(227); + data.append(223); data.append(91); - data.append(188); - data.append(153); + data.append(8); + data.append(122); + data.append(254); + data.append(184); + data.append(250); + data.append(89); + data.append(175); + data.append(27); data.append(67); - data.append(110); - data.append(17); - data.append(44); - data.append(180); - data.append(1); - - let extra = ExtraParams { fixed_point: Option::Some(FixedImpl::FP16x16) }; - TensorTrait::new(shape.span(), data.span(), Option::Some(extra)) + data.append(172); + data.append(220); + data.append(168); + data.append(229); + data.append(34); + data.append(169); + data.append(107); + data.append(123); + data.append(19); + data.append(103); + data.append(123); + data.append(206); + data.append(146); + data.append(12); + data.append(208); + data.append(36); + data.append(237); + data.append(192); + data.append(108); + data.append(243); + data.append(15); + data.append(27); + data.append(120); + data.append(67); + data.append(108); + data.append(31); + data.append(73); + data.append(87); + data.append(75); + data.append(227); + data.append(232); + data.append(164); + data.append(144); + data.append(152); + data.append(22); + TensorTrait::new(shape.span(), data.span()) } \ No newline at end of file From cc547d76050c8dcf95072e13deac872f5dc24485 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 18:47:59 +0300 Subject: [PATCH 169/179] fix all_contrib --- .all-contributorsrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 7ae3aa0a2..6fa8034a9 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -87,7 +87,7 @@ "profile": "https://github.com/BemTG", "contributions": [ "code", - "doc", + "doc" ] }, { @@ -122,6 +122,11 @@ "name": "Daniel Bejarano", "avatar_url": "https://avatars.githubusercontent.com/u/58019353?v=4", "profile": "https://github.com/dbejarano820", + "contributions": [ + "doc" + ] + }, + { "login": "vikkydataseo", "name": "vikkydataseo", "avatar_url": "https://avatars.githubusercontent.com/u/65757691?v=4", @@ -130,6 +135,7 @@ "doc" ] } + ], "contributorsPerLine": 7, "skipCi": true, From 6b8d2ab18a1ee4aec258da474c2f2c6e0ce570a0 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 18:51:30 +0300 Subject: [PATCH 170/179] Update .all-contributorsrc --- .all-contributorsrc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 6fa8034a9..8b7ffc318 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -88,7 +88,7 @@ "contributions": [ "code", "doc" - ] + ] }, { "login": "danilowhk", @@ -98,7 +98,7 @@ "contributions": [ "code" ] - }, + }, { "login": "Falco90", "name": "Falco R", @@ -115,7 +115,7 @@ "profile": "https://github.com/richwarner", "contributions": [ "code" - ] + ] }, { "login": "dbejarano820", @@ -135,7 +135,6 @@ "doc" ] } - ], "contributorsPerLine": 7, "skipCi": true, @@ -144,4 +143,4 @@ "projectName": "orion", "projectOwner": "gizatechxyz", "commitType": "docs" -} +} \ No newline at end of file From 1723bdfd0b7ed01d61be5dc395a35964a97af239 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 19:28:03 +0300 Subject: [PATCH 171/179] update contributors --- .all-contributorsrc | 9 +++++++++ README.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 8b7ffc318..fc389d5f5 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -108,6 +108,15 @@ "code" ] }, + { + "login": "dincerguner", + "name": "dincerguner", + "avatar_url": "https://avatars.githubusercontent.com/u/32523713?v=4", + "profile": "https://github.com/dincerguner", + "contributions": [ + "code" + ] + }, { "login": "richwarner", "name": "Rich Warner", diff --git a/README.md b/README.md index d44564954..6bed1c7f6 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ # Orion: An Open-source Framework for Validity and ZK ML ✨ -[![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-) Orion is an open-source, community-driven framework dedicated to Provable Machine Learning. It provides essential components and a new ONNX runtime for building verifiable Machine Learning models using [STARKs](https://starkware.co/stark/). From ec99239118fa340630e446fb5b410857e53fd16f Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 19:36:48 +0300 Subject: [PATCH 172/179] add slice in FP64x64 and FP32x32 implementations --- .../tensor/implementations/tensor_fp32x32.cairo | 10 ++++++++++ .../tensor/implementations/tensor_fp64x64.cairo | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/operators/tensor/implementations/tensor_fp32x32.cairo b/src/operators/tensor/implementations/tensor_fp32x32.cairo index 8ccd6ebd7..27526f65c 100644 --- a/src/operators/tensor/implementations/tensor_fp32x32.cairo +++ b/src/operators/tensor/implementations/tensor_fp32x32.cairo @@ -194,6 +194,16 @@ impl FP32x32Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. diff --git a/src/operators/tensor/implementations/tensor_fp64x64.cairo b/src/operators/tensor/implementations/tensor_fp64x64.cairo index 52cadb502..622b6b7c8 100644 --- a/src/operators/tensor/implementations/tensor_fp64x64.cairo +++ b/src/operators/tensor/implementations/tensor_fp64x64.cairo @@ -194,6 +194,16 @@ impl FP64x64Tensor of TensorTrait { ) -> Tensor:: { quantization::dequantize_linear::dequantize_linear(self, x_scale, x_zero_point) } + + fn slice( + self: @Tensor, + starts: Span, + ends: Span, + axes: Option>, + steps: Option> + ) -> Tensor { + core::slice(self, starts, ends, axes, steps) + } } /// Implements addition for `Tensor` using the `Add` trait. From 98bd529a3bdc9205afc6ab2d1f71d42a9bf08ed7 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Mon, 4 Sep 2023 19:38:31 +0300 Subject: [PATCH 173/179] import core from tensor --- src/operators/tensor/implementations/tensor_fp32x32.cairo | 2 +- src/operators/tensor/implementations/tensor_fp64x64.cairo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operators/tensor/implementations/tensor_fp32x32.cairo b/src/operators/tensor/implementations/tensor_fp32x32.cairo index 27526f65c..2c9539d7a 100644 --- a/src/operators/tensor/implementations/tensor_fp32x32.cairo +++ b/src/operators/tensor/implementations/tensor_fp32x32.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait, FP32x32, FP32x32Impl}; use orion::numbers::fixed_point::implementations::fp32x32::core::ONE; use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; diff --git a/src/operators/tensor/implementations/tensor_fp64x64.cairo b/src/operators/tensor/implementations/tensor_fp64x64.cairo index 622b6b7c8..24491138c 100644 --- a/src/operators/tensor/implementations/tensor_fp64x64.cairo +++ b/src/operators/tensor/implementations/tensor_fp64x64.cairo @@ -7,7 +7,7 @@ use orion::numbers::fixed_point::core::FixedTrait; use orion::operators::tensor::core::{ new_tensor, stride, Tensor, TensorTrait, ravel_index, unravel_index, reshape, at_tensor, }; -use orion::operators::tensor::{math, linalg, quantization}; +use orion::operators::tensor::{math, linalg, quantization, core}; use orion::numbers::{i8, NumberTrait, FP64x64, FP64x64Impl}; use orion::numbers::fixed_point::implementations::fp64x64::core::ONE; use orion::operators::tensor::implementations::{tensor_i8::I8Tensor, tensor_u32::U32Tensor}; From a6a1085540ad3ab44f7e4cb6d0bcdef4cad68637 Mon Sep 17 00:00:00 2001 From: Raphael Doukhan Date: Fri, 8 Sep 2023 15:28:50 +0000 Subject: [PATCH 174/179] GITBOOK-26: Prepare release v0.1.1 --- docs/.gitbook/assets/gitbook_banner.png | Bin 0 -> 5744796 bytes docs/README.md | 2 +- docs/SUMMARY.md | 1 - .../implement-new-operators-in-orion.md | 330 ++++++------------ .../mnist-classification-with-orion.md | 113 +++--- ...fiable-linear-regression-model-in-orion.md | 158 ++++----- docs/framework/get-started.md | 14 +- docs/framework/numbers/fixed-point/README.md | 100 +++--- .../fixed-point/fp.from_unscaled_felt.md | 2 - .../operators/neural-network/README.md | 13 +- docs/framework/operators/tensor/README.md | 51 +-- 11 files changed, 283 insertions(+), 501 deletions(-) create mode 100644 docs/.gitbook/assets/gitbook_banner.png delete mode 100644 docs/framework/numbers/fixed-point/fp.from_unscaled_felt.md diff --git a/docs/.gitbook/assets/gitbook_banner.png b/docs/.gitbook/assets/gitbook_banner.png new file mode 100644 index 0000000000000000000000000000000000000000..0222c542d924dd0103c7c83f0e9a6c78e2ced6b9 GIT binary patch literal 5744796 zcmcFqqbM^fn;Iv%A3K}0%6B!=!zgH8eIZj~6iXDI0yat0W>1{iu^ z1{fIL=lvsoYwf%4y61em>wGx-?0sV1>!?#cW_nCSL`12nq4I%;8F!3THqUZkqL#+9M>*T*6vDXLnH$*iPEPMYw?t@;xdrd@CmqdPJ^?=Ce zm#C)7>yQ4#2M}cYmh=ScBS+8$ZTuh`vf!2gzBG!I=1wLzHoi}n>;hcqIU1QydC5k! zq4C)MZoBIa=6d%Nb5Y;X=zGU9C|VQ5t|Tc8!w?iu!Xq#kOzGHi4j+7nB81!$LJ$g} ziDB8U4a+;n7PpqiEO(t@3SFxiii0B8%ToL6D+cJ$yJ-A#)ZB4M($OXatw@;h#QEGw zq2^D$Abv|;s;oI(_9$1cUMi7(Y1ikcox%Ab(4fiAjW#{x4LQrF+`-_xpB{HN*R}?X z$9~5+D0GLTRb7dJYOr%c0u+CTLS<||xoi&&yS+e!usf|YB_S{}=C?Yzlh?b6NfMX`4ZF+xMB09DOiyV3IXHPm zpZyChPJF;_kMLh+@NYlt`PI=a;#el5ul2=b^31jeSFV`lrEpmn0`1p*Z}SATEN5d} z1^{>{Uc+iXUu#SIv@5pOBf18?Sjgjj64oFHv}!9W!rwRHF7wbGNWqL^Z;)88e!a3u zI9?5_KrtvR*LK1qAF!eqTj3`O{Ojz-oSERMrK&HeW#OKG1H|3`wC-HJ67sv5+a`t2 zE8QKgbf9U4rcG6DH;vt+0C^rAiBVP$WUT@-6DFDy2XSBIs_58fBBP8>);&*?oNAQ1 zcq~@rWp}0FPuE2fj?=bEYVyjSREvOjKsT#R&53W>bb?QqSkIr~m=l6XE1tvG##^Xf zcq3F9WO#v@lsv|T)#xj*CJ+@qtO{z$eVEs_g!eE%0lcNS)wq44aePlUJQuJ&{zAPi zU*`5Jo3KnklJ))vFrLshskG?)*D1l?Dy@>o(`Q3w82JPF-8E+vxLsGHER#qLQ6+Z;lP~6kb8y zYf?h6M8(+$%_Tge_h6M&oqzONO0R1a_Mb-yqr2Hz8WL zMqFnul2Kaqu9DItfl?&uaO<46dHjLW(DwK3LWZK%E9k!WS2IiNkQF5sFi!TcJ8k!a zCP)nUJ%$jt`(ZMURpuTh0ukrBDUu8RTJsuqZP`B)70lY&xe{e=HsC^kKL2JyoZ`Ey zlT2m1mTLzH8NGYMbWFS)wPisYyz0pu_{ZmX0737MQMwRX@ofsY_`Ug4pw&CCy3Ez400&-Fz)+SJwuc{G5HHs@q+%dwA2Av+Og5wfnALmFL|29<B?hndi_s^mmS2 z2O$s57)d`7u5bA~o_NXW19d=e5F_N&bzRDLl+RleRW81W4++f%Rq!7=3(hyJkp@|g zcX~9L{M+^G3qaKQ7e!FxsN~zrj9%Z*?L=VTQ5qrc$(-A&=f~EC1m6ZBc29y5hOAXbe3psQ0#rD@qE9y6iY+T4T5%#YT#kX+% z+ZxQuymCkE5xWdk`9x!tOO_p*)Ud$`*><%)bYR8OHS=O$w1wKcQSs*ffjSjia5?_% zs{h`|VlRWg>`JhE;EsKncRABr*CefSQ=f!VU82-)qrN8|_I4gTJcpUBeaR z*RB!ZE*4O?fuDKPc&OfG8B5DX-|iN}r);n5eDAS#mQAW)(>=x$-+y9sb~+h+h1TJF zNaxd)@9O;2ljx5HJCBXK2YV1|feQ)RQ} zcz!UW^BdK+NSy&}8=(G+Nm7qLIB}5*yJDv#1V)8Sy7ksw6#7k`su@z6V+(`k)x3m> z=D*#9Yz%9oYq}Wl&>I#+z_HL)4VV~bmRHjyR`ZpAuAuUsY>(nJ82B2fjo7c4Xx5ti zeN5R3l?i#Oz9M`9!NMg^M$cxK{Pd7-EpBF&x(FOg!zP)dtMM3mPoa`}2BHc_UFJ@i zgo~p)-qQ|)f)PcHWjP`XDGLyXI^WX9!imFuol}8bgFQh&Lw7lC{B+YK@r_;&o+o7D zmTm2E;MoNDVDky&x!41gXd%0D{ykLfS6`4l)7}huXo{u6c6kJ4+9CbMxDCJ6F_Cwb zeA~~;MpCPr+$~d1nbj?pNBEclrlBCxa=bKVWirZI@b~zp{Ea_c-49B&Oucy3)Js1i zawaYTx-8*a`5I!jW`3*J{QzBulMbs7jfY;1-ScP# zih1eV25Re#s{y*>{+ZBmHHl32qyUFW!(PhK2WqI@6+ zq}#>qPh+otzoAO|@c3X}f<4*RFKVb8%!aw9_NYN@>k5Ea#$tqgk2GDBn>HA|6St zMup_XBaQMKOqj@Tv}2vlQL@Rq#_iOlflb%)?{#Ex9t9Qdcl7J25K1C%E>RG7FSq09;S&;1&g@LulhdniUp}#wKcIJUrqc#D|gqM~{ zKayS&i<^D=?w9Y6UA+_Ca=Z+y3w6qKY~h{iOVQbUBzueW;dOc^FPt7wG!BW#S*b4= z#*L*y7oSr9ReZEoc=ly)5x?!B&C0u<6aV#gvQZa(ea+uzmB=6LHOAi{z;b?f7DVC~ z_Ab-LLOm|uASB9b$m~L$*eH01@+<`@Wm?(iM%Z2*!jG0c0{`8t zSsCsoZ%Keq!1`<>Y(razR4a1k6b*sBAB>Mulomqb2a^N3OyGH;RH(8mmipcC=0)?X z0CP-hD3Bnakh2(zq5p<4P-5Af3gJR*2CNQ#hAB)8*s_z2sx?USmjoU1Tz^{>zeEPq z&r6qlySkXDSXb=t2MRP(zOD2@6!A|5ln=oA4A%jVR=Y zKhoyxNl%Arr#D0`DeVPd8Nl4mFBOaKY>>=SSq_q}?x=y(K3;IW7qw$>;;bMCR>2VrUXXY3> z8vdH5%wiH>EqQEW)y>EPmxyANOWaFkgYeA1AalvgK9^yZS1<;1$#&T7BLV8zFM(;# z){EEH?bREoootvWgg7d*5xVvF&t^+Jo6i;1*O>ggo;`h5Mn2A$@87N-d8WzTK72Xs z+2V0tTax%Z;ujy47jh^ZV_vWOal2eeh0Ho%0nwmNom%A}C##~jKyf@slwbFBKKk>H0D`N8U%ufb(=11z7ovl_w3N&51-r9DFw@%84|N4&y3%$f~_{*sx7>aI(w0>Jv0 zu{GXr?|b!MWKZ#96y{#|D#qxGy;TMiQBP!rwyPh17l^Y*gmHIPIQK56|GLOF;8<@} ze|D8?D~K0VgWTkgn$?#{Z+b_Rd^L-7NmGav`_MH}DqLdE^JCieAa@FVLa6x`jasBa zvh9Wb`0UiSLJR;f^V&k?) zL-})C);&y>1-k0y^bEgz*=jFgfwSmlS7|372%<|^iK|ad;N490=AHzDuFoDF7NH;L zAe`SZ^~j^&XMs3JY8DF)nwc)H9l>WeN91#NGBYd5&P-)tH%5D=C4y-MCT>8mxSRL< zBZZ@S4xt4NZaE6f;<+Wc+)tzjKH-Bk<12EsYG7O+tXaoTLmUwe=5dLc( z1M!+`lV%p(^iNn}y8XEM8hct;;&n0SjWwtW<$*)Gtt+(^a7{LoX6Ix;^0naw(wKT1 zg$;IMzHt`mgSBnR-1kye03!JclL1`=+{>Ys!cKdq^7n)6cDy((rzy3V` zC$!cs?)A^>+>m>UYE7Ei!syPZmeiT<>g%U~9NO6ZnI7e&QieWipQgURdeN=Grd8%m zusv&8ufsvZ&RAAehbWAy%V)^r2s1Hjs|uga?71OX_~ZyN0{4_8(|J_r_uM^e6yGxw z>#Gc=1gc?`1}*=A|JlCsKA5@_aLPV31M>%kEK#9L#&kc>tL6tCn*r}(;#LL1Y;}|N zyrvSOrL4y@ZSP>W@mS$!l5qGV)U8T7zy>}l`$X)ZCoB#A;aH3Q^Z4T#4P8|^I>C;_ z##82Blv}Mbk7YRnXPTNCj69T1_vsn$87JLlB1D9#QpQ{kh!$lhd(@Yw_l?F-EFBiqn(w-S5P_P z(mufysn3}SHj4~L&D+f85+rsbuEs-p&lE8C*u!U9&gK^gz@b@N1qGvmH6dCac;eA& z)nS>(bL^r<7r0)Xy9<6~NukpTH%?h|M(bgB78`uK7wbNk~Q@p@EQt9m;Gmz00RmUvZ}#x3n)g z^=A%#x&Z#`TUU_wx>=5Y_lJGl)nK4xxv&#aC&R_r<-PKF>jT8iE+cE58*4^GSOz#p zT*}q#ir}nu!AjZySZopBuiss4q}Qx>fE=6F69Rx(-3HvaZ}2P-P1-fid<|4DFPQcBAsKelCr}YgXa^huo&J*mFVGc5Ws+f)I4!7oyq5Q|*f#(b-sV@9D z-KN}-RzA6_D9|aeIoWmDe#W&wh*l@@*2L3NnY^G*hp-~bR@O2Z0ap+SWo!PZsD&20 zC-2{kM;l=ycCT!3w4MbQu~gomyIk{VR*p9-VV^l29FJUXCq2pcF0MSNFN|b- zkI|Sbqh}AJ?n11!RjEfQe9Lz)PYbw&*!@$0YF!Q!kflMlR~3l41`|r9!m2nmC(0jFGUatq#tT+Q?|9K!pbvr?Ho(a>mam1&)UHvbh)Y*7hlv>#(!h-2In{E-XXzZwc{)aM&rphYpa#$@ww4R3|oE+HJ=^H?KGlknny?uS!sL z-#<3@{ZjlcGiG(R=Ec+gY%-M+34fJW!xV+U0WV1|p=`iIpmi5l>^HT{>6Z)1?>^HK ze}{hRD#_5`fgS-zytZPa2Yw&Aa|tH+c29wIW4ynk;=__+zYV$FjolX7w}X0R8kDKoSwc>t|qsc8?z92(Pa4v(1BtQN6L$KD1el{oXAg zw!Sw4p`-HCF~95*MT}s%O&6!||5>i4=NXjfnp#Xwvs`9RHkuoBo$4`>?EU1ovG`Mw zG5;e)aC%ACi|pYkPp&xb(Nq=G-ypUkgGMvwp?(?iTJ#G3GuPwg%O5CkTAu*HqIn?q^M)WnN z81S>i%7a;pYwO)Jv+Zh&t%bUnOp-QqmLFG1q*~&J48|)BoWBlIgHW+$avs?42zLMF z?B$;HPWlrBdMLx0)7mAq$EfGolS30?zfHY!BGf?VtsP+X<|3*ppNyZV7o?Bnr_Dd^H8cwCEmkgKUzbPCE?N8$RV4m34H{@?sHYly}=A>9OX*JpJK z3p%Bwm5PkD)RtAvNgIlz%lX&M6E0X!mlOQZ`GqngHj@|KYWa+qRT?hl{wu4|lS_TF zNNx0iD*+qGb$8f%C|pC|8o?@Cf>RBjt5W{zY5@&ugsu)OOnN>n%<|bdaN-${F@v#e z96nlBe72@^>OAc;wm7YJ?Bi`Y-xGuLg3z0oN>*0YCXU3qaVsuTU}Ec-#~QU= zU_U)cRov;AQZWLNh1Cvz##?>IvG2oI3H~xz+MJk?o_*3*8a;&i*-^?*nOhww3>Q?t z8ugs(OfcG*%5@Rk`a1Kvj*a@%%I0o{&yV_4vo_x&tw1WU#*S0*)krN3>>l+vO=^Ld z9kqGKO+I36HP<69pafW9GQ%XTJG_=!G8g5VzLz3?x8&{jmZzrqTD|QHhy!_&=(?bj z=qwNbak_7lzju36wm{KPK<2cmUTdIb zn`2?$s!4HgdU#r{-8}Zil2f?Bpe9Y8_$dCqXBfNJU=WOZSKO?plwp+lwXlr%>yur* zP{~gE)|p7o65XT0`%wq%8&`+tpoup%ijU7{s;Z%s{eo9Hz-M{TdnudWygA_*nabAv z4>!=>byeuV+x%jcQV*!5c*HMxz0U$jo_D*WbKEU+Gdy8bhdhB6yQ{K~AO-U%1)w_8xK8&~ICwi+ji zXf6Dxsb8#9x@uFI@j=?1IS%O_%t#;bfbBZyJtY&69xmLu^pJqf9OE@Pt6Xe|EU5W# zE9~&d`eP0s+PRe7uUH(e`Iv1yu#P^xa-ZZPo9a}UHDhjOIpQ=GVuF2IY(*2>}@%EYTIZW2^<0lzjXrGSLuJqf09urzUT(k14 zZ0RkxGlM6~Ug_m^^r76){sr^GFw%oJP}7X~rqql`mydY1pHchyy(u!`=bwd&*pXGZ z(GVQY>n!R4l`VSg>!8nx+bjLLUzY+`0LCciq|8YfJ$0?Q=9!x zl330MGw}#}HUG&}5XI9F*NpLxhpYW72CGG#1y>bx4mV@JEQW`<-ch<0qC8_Oy%!NXObA+|!mgV3x|i!sqKg;=a>S2}4=A@;fIIBa4M7T7kmqsL{pdFHe5FeX@nSfMhDdt9klF9>*Sa`A5 zIy>VpgfkSpdVI1ws!eis4zC)nQ+s&*DT&zD!-~cI^w}D8zX$MP)&zw21je7p!W3_G z6xDl@7bBmm?;3w4VV>09^ys3w9A{j}IPZLp)o3B-NlXOeE;@C{O=;V_V zJ(<+C(KN@wNsM-!aF)mZc3iqLhKW%T< zD=?YXwGw*iOY$at?cRFOU&eF9hLoaKprRyR=g-}MN$!|3gTfg%qcb3=b@z|}=_YPX zV248@mrc>{114W9b&~~yYkeg8%CBP#KyNxwnyA7xB@X7OV{tbS#BjaL*SeyCa}s~G z=)=?rw6O!bQ!Hz3|G7?^t)L-n^*-FcW+lcmT0=UNv>>-s{ zC&BTk(@N>TCTY+*uZyMG0O-@2D99&=Tr!;JQ8J2he%0wZD%f&+r~briiK zP1%)B?T0K5VD&-(e^*7fczlQWwqah+!hA-J__F*>srWDS)#HKfTr0p~A*u%CBv!Li zKwLS1SGs7i41`K=Rdbt1z={b3B6<2UdEjd_vfwq4cUf!C_M8Df(&RE@!CQ^p0$?tR z#nXZwnjBxf!~YT}faI}Zg^msnOdDlB;m^bYn=%uvF+l%?nNbw0L5m5j-d3hsa?(&I zIzMmAH|f@-vjrnX+_HI_j|F)E0}g9y&Cy%Rc1y2Z2F?p-Z1Usb&!Sd7E?F^aJdFsuV$*y3#N?~lYa6v-g@l9hDPGWgsSI7R z;N@sQVrIOCE=$5c7JlQgqJ;j8t1hmMI<-(`?*jh)raoUHw;OjAGFoHi5WTQj69E== zHa*YA4wd18R_jb6`kT++z?yrxA$!`%!bF(+X!_OBO;Cd4jKb#uk7rq`tClI;ZQ%`O)kF=Er8S~tMu2RyUCwKX7fB+v0mkk0mQTN`d041U zpe2UR%A{CTee3Dxvgz<4;6N+*sWxISCcz0>BbbG-j>d~!Qk zK!W^~UtRo^M?l>oI$Aus{mReLkD=`yCmZS|Pe@GS##B5P6KLYu4~IphixZD&nR>!j z`p(j;*!kCt6|a!Hl1#qGuN)=e@6saXr%lD97%*op=Pw!>(}}HxtLgN9(Ohj9G)G12 zCCWv?ol`iD@U7!7`)miU5;ICvp1tT1Tz9F;8bbqO3r6LJ?vopvZbnyjJW2q?KHM*j^=%JUB1SY>>|%etV+CLufhU|M|rLjF>bpp-4WzexlaSbHbcvSD)D_GjR}t` zryi|$zZ9E`e;)A?L8IWkVd{VU)JLQE%L`_XT~*GEob9GwuY+52?_WY^dU#Nvu3lUw z8*E1W?xVcq-rH};S*Xf36Atw8#ffDRnhv2H^*MLttXV(&w}}Mv#tWK>G*TxMZ@vsz z7;o<0;-q%gThwBx5Bp`}OT}gt&l$f$+|Hw2e3i?XejA&+fnbF0@PvXDZzBXSMY!fd8p01^lMH&w-a6C9lW!d;; zGZIHuld!dLFf=$)YiKd>GoK5Sr}jP~k7Z%i(~jm+Kt6WYL|trkLDo?h-#XU0iZK^= zv3f@ol}|&BMJ1Ok^DkRdOeXnFd8a}7&C2=AsUKvO=bQv)?CJYq4&tg^%{W2qNwwZZUoPqTDvk3Hd%ICY{)#Gr zie=X1Y3g08UUQRFd(wp4aNtn#q?uXq9EsnT30TV1qvlnXY{;w9?+WX&E>Cwq2~?!f zha|pM^eDI)6OG?#p3n-Wv35~cm@CNReX7vM+tdDgbI2;q<4cNoH<+=F zLtU@?i#?W;MZHV(J)$l4K&K~2aN$I;Ya~?gk_to2dHG97qGl>-WWD+P7_E1s*JsqK zCW{!$1aC0aeh&Rlpu$x#*O}LRiZ3>?^47JAiA><|q#jq3Y#vh%n0U^M{*r84UAw-h zh$khiTqWq~hR9=*a*0#x>C`)1=8Ei-UMzeNJbus}xhqcleG?n4pvs168~*opI$rVV zMRtgk`D{%;^Z1}?qfr)b<=8z7HJkIP z)s+6$C9q&U&jg+kmB8^^Sy4-keMo;jW?uP3V@E((kRvU~Ff)L4!AfvgRdB*fcf>!a zF}(8UDev=)B=J4?$BACu;3h9T+pD*??-1wtXFIP!bW~P3Hoz^}!Cary2Qu;@@&Cy; z3r`(bLdUQBss@9?G}+z&6%+3VmFssYqHlF(4)!8-ZDQ}%_aL#%}ehQliX<6*I+I9s{q)bj8*Z%-?`=~ zKku;-_KT3UEg}UB)TLlyIl85kfUbL=2jYBHPbW8=uGF+W$pT-1_i; zY*O~iY0`X;seczDO^^_eXDsT5U9&|U3^=`-l%$14`l#-sCy_T#O;-_7Ah0<0;-WVxIg;HA~yJO zUT}Pco!t0!YktL~I9R7;f>&@#IRzQ76_vEecFH?y5X@U!(Q*$on~&^}*b!RJQ$Vhh zVwdU$)r0OiTi>QPI0i<#X6S*L?v^M1{=Q~;-4fXRuXrz-?fXtws z9q+cV&XQ;n7YqI(t!=m0@w@uCN!=a=jIx^}&%q1H zb-sr;-8!sWhX|j(%5Rivoork1gan1a=1)B0Yn%kM57H_;jT z51f-c8Ei4xIaza4bgu@D%*+bnCC;SSP~qHD7dP9Owy}n~BOkCXZs%E4X3+eDpQ~xSDtYGPJaJPP%u(pK;Ou?h0{oxySJ2^wxWPIHbbUZvUeEW(MFB@9Z3*9#R zUw|OYcc^q5c6UgiSmeyO8v$-ON}!{wY=7sgQI68IK5+qOX>zd;&hkt6mvB3XW6tT% zG;^aIfkQVxWQy7U8JYjDYY($shMlt&BeSI&LzkA9|> z*uRf?8Ab!a@-b01=u3RBwCA!(kgn^?N{@b&#>uhCe}yN3YfM((J{SsH|Pb z`fndsMC-BK@_+#ZG1jT1<7>$VTa(0{wF~KQ5hi)3(~qR8ulTB=E4n9pEP@5au0^jo zmmp^uC;4fb90U?y7Ly}Bnmp<$T8VF-15IjaNmX>eR-3)rv$bjLjx=7s@q)-%9-Vs3 z61g6aF>3r7v)uJl>2=V0rs0+f_lmv#E;C4^@b(_Z6z9{AEzyd-G$xC=46xzwP@NbX z+GJiHiX#mPl_(~kM;G#yW0zC*ytdC?le0loQi^|edoRn4hS#FlhKpWbjmfi1MM8N}efa&K6E=Or|({`JA7o zP?Ax^+GS^qjR~TE6`@ACkid(^Ae(e_>EFmf!zpTvT%$)(k@G;XU6-=Clrp(4O_XCr^fMT=N*}IF> z>p>R%EmLxH$8y%4Wj4x3dg1@zP0hCDhnuVTH4S4{XqNyZM!SY8{L@B8irwu)2@UDq z)jg?3nKINo0SRWspf*kUy)pMvZ>cvJO&4lz&dL+7XvURfjXQfsTFf zDZshTFDQ{9<$Wnr9>-v|>;66e+lv4R(PHLuGvKi?bGTO3gLAJmMEvZfmP@vEe4n_* z+h^~`U!H7?1(4-_@qxDh(4%$3Y9wa7-pK;BsY~>%X$X&LZeG}Upx5ryehJZm8ioV` z<>46vY%qtK6@@uOetChXjGJhV*pe9#<8A%ThF!hLuv4;dW^3dziPd}Z;QiI#r>D=* zNX~RKN8NRaEuJ3B%kQ`n#0&NHC4BTjHO%Vj7c~?0;mgIJ0&D`WgG~ zwQ|;M7$Nr$Cn`3vq`_~X4=KHx{i5n9O$HeuOOdbdo~s`v4X;Uv6-BUP4)S9e652>&U@{4lAB{3b}qyF zDkNUPBJUh`Qhu>DYtHux#1*sJ$i{ss$7&OL)2Mz?CxTE zD0LCwvczk8ajKkA;+nZ6|mvKAkE+ zZGag^lWv07he42}l7*zCcRT+G(g2ju?-K@kyj4hYkEsg|UK4&7p$LE5Tjqh=6k$eQ zCtgKDXrUMW_l3fFXQQYFy$7rhX?>+26IImT3kqn<+gDlI;ZABCz?+^gnI|J~`tM>E zesv+f?evdtW_}<}tWKCb6sDY)NdzxYlSQGQFtxDSrhX7{cME5|AP<|C$$Te!sN4cm zNx|qKwakQqj7+(V_lOOHr%!i^&#}1e#+%hqCZWd|+Wha+CDREYy_?^+y?M7pYN0m6 z9}CYUY`tEv`Ap}_qoEy;XuUF-iK%=L$L{(}bi8>Hy082j>U6bmSbD)Nx8lG$OItS$qgWN1}a8SZFD#GlW{;{TO2m5|7Hw61r z;GH6&7nK-*xfRuwB_%f71&!zSAG%(AT;Cfk@~xbo`i%aU(02Fy?DX&A6K0KAJR!zV ztt&NjA!*y^EUSaOK|1Wg^+)7L3Ux__C!6fQL`o~0GU6mgD;E1+pcS0JgB{lDLmZ(NaVy~Gcf7}#+1NF`aiC+fMXNyXEsz!3 z3zXbmtOA=X8eZvMDR--u99N2`Tp}u9o>~e8mXNjBO$=oMc5NbwWy0AN4F9eBu z%9Hev-L~M-s7ELBStsoDrate8`c}@C)8c$@9w@7UinO4;NxXb;Jj%D+JkL=4l`Ej* zY>5XE5H_$~RPcJdbH+#5M)bad78cOWdnioTTD4UR^fSYj-D)SO0?N~V#2H8Z=Y+m) zOZWsJaNQLAjL5B=VGoW>4Dsi^5_6}gJFX`Tw4%#5OxIL{BhbQUnb?GyVrVx4a@=lb zLD7}`4b)k&pu=$e;ZATtM@nFgp+ww2VRzDWzHIHZGu?;sH<;|^@F&D?6?pI6H^Pie ztX=kt8JH%v&X1w9GaXF4u@TR=5JueL7$$kl%h)&nyrQc!)L=IK!}8$D5NH;GBiXMof*JtXuEK?Bp6EUxSt>47470dB|jL z_hmZe^`zszx}NAMoU1FyO!zL)CJc;iUj^k-V>33!PnWihpzL_b)WNGo&W`fuq&sT@ z)lsezmgErG^bgc5Fa`f6;g1jHU_6Rjcq#9RZ-*u;>VNDvq%Q@WsKdm{xfLH@@{K|+ z=z}nU1a_2sXy`tKY_8?@>eVXq7u0x2p6zOkP1HDG*R#T8`t?)uy(NSGO+V072$i-M zJQ{&h8GLtWHZM@p5bjk4T(vGh3H>0OK~J@qwkb_*m*>O0pclXe;l~BtNnHbBjlWZG z(=mEvY<9LhxQ^v_1DE=TZl}5zy&zcGNJ^{%#BLKQ)R2Dxf`12joDVn~BN~_6$e6w3wp`?x6ODF;E zg&^0APo){3X=@MF@2R`XXA(ivZ!-n|E$6E?@7S2^?Anr;t; z7D%VxiGQqA{3KzxyLv5{0c@#a*r-Yfy=%rWqukyY1{wMI%#}@E2&+!ioLll+Ef&d& zl7oMCV74dR9^pB{-=-W)1?}hp4fq(2TT*>U%t9?X@sSzY{ z>ZtC{um-;;p!O7W2sjC+yvK-Zf2r$&2_0*aJ1}(@cM^J!=}~6)Di;4-We6U%tL!P4 zRtxeUXtm*d)zmThaJj%qb8m>wfvF?W$Z9TzDtk@n!sur#DuEO`f8623K9-o6=Bvbq zUYf#{I_CVlGGT-VEg88S4^Gj~8%eXPHI<>rC;X0MzGnJ^A;QQ0zhq^q!2fLtxp4ZW z`KBKop;@Fka7IZAE)vgRD4+v{Y2l4cn*`D)FgKBZgMUf4wj`LyMylp*bM1{SjPHxge%LYn3H^ZrFGiv;NqxkUNzDj0Bh7X+-L5L$thR5Duz>I8JQ z&INpdvhi71SB&~PT6c$tLao!hj$TES1Vqrtvee((E63{!3!-Gizll0Ow6w{?${hq<*`%yn8Bh;idz- zoBzulj(bQrJNKb1T%JYH=3z&KY7UJBb>%C+yGg_cD1p%4mIfVoemI7)Z_iL1xVUbF+y zCkr;Hgr0hS%7$$E?aGM{5I>6d3RFiS41pG72MM3jr@&{Nq#tG#ph|Pq#z62jGSO#W zIH`4hDpXXmk?zc8Rqg-@^TymR{SFdU#dN^onSbK<&2n& zZH1JXB(#0N$_$#1)<^zN+&V6F=kgx-c!i|I+$FbAYQVy5pp{>)12EMAK`Dq9pir|O zw*(fq`=ukB=ht4)aWSw%$h>1*;w-}VdBrGW^q+$*XDyPZyt_v*p2(=1UA5+)RNP{_@XP^~one7gl8>A-vO;HL(xaskK+FCAy@)QHEA` zUo`uM$kS~z7d)GnmVQ6xi9qi4yZ%iSj#+9)0*ZKDk@=_xfe@rzqOH8#^*QdXrSM6X zi=`5ZY^f``T+9~{asv(id-X!`f;5;{{v1yvA@`h+lq}0gC~7J=f@>vgYeh4y3iP0r$rh1 z=cEqOt9joe%clJ6?KE3-p-&2MyXqU}<8XdZz%0R|;1B++vW<4_&ibrdabH>23jU_0 z3w?b`0W2$Y|NF6Yb9<&+rGNQFhWR_42X%U_*Ts9SxL>!4bvwz$My*A`}?^XsQu;9IT-`B*r5%n_j zEqOnDLop7$ejazF^OU$R^~;q`t&k0O+n3zvtw`Lbyf)fz(%%zy2R~f(#CLjrf8ys= z!JHT$eZOa2(fF=FcPK}U_Dy6A_(;p^ieIxN*E9e5)Xx9YI?#{Dz%mc*1uu`m{#id& zJrt$ycklI&`;E2VEz5=E>zMMlFKy8Kn{~?cNE0%hThdv(E&9MtSL<0&dcA5a)!f5g zopM{{q`oEh_la`e$YmdL@C|McHbOP#vJ|?2C3zby-1RtU(-TZ_4Fk!9=l0FH_fO<+ zG2UJOY$GK-A8?iVGA*)fcpAsYwhWCcy@&5$|MP$QANL*2#HYyCh9k=LxbG1$C^FP= z6xD*UQ)IaukuNjL@%N0TYi2vPlCr^2JpeyN9&bk=pm$R26U2DZcZ&l?EobzRh12JF zN8h2`z(`=UoL#dd<>-4&4PpOE8<8%41PH=>b)9>J)`PoAnM=Cjw9(?>3<(WJKOd+E zxHwA7P|6yRN6Hff65iiM`SUp?oQ(FE;I>YOq}5mw&S)3yERiM5whZU`JLo20df(UR zM84j2eNLvgFz23rb{R5F3EGDmir`fu%gZPl6@?=@;XP+$7I5+`Y@QVgk;Y@~UH@?e z*EFl^`8*5?8bZBO4hmhPJsM{e=xNR*E1zB6`!AEo>3dqr-KJ#Mmx@16i&&UHAg{UToN`mZ6ydE$=&_|Pgh2H<|OCw@U=7 zB^!;<>3~s@xl0OgHDDc)XTYDktdYuC%LXmU-x(>DB-xnrj0hR>(}IT{N2vgV$NM-T z_Y3~;dq$h*a`R@&#z>yz-_82*4o z7kSS-IK41SWSSoD@HjaOsbmZAf;7?(!Hb$Xv;y2s%WU$V@IIgDp}g|++p zc+PS|qtPdrx7C>e9G%RAEa=R2o1Yx*FZfS3LNsfJ;)Ww;J=e?qM>NYd3vxxbJ|=$H zVyr6b68#PGp6v(EtPCOZs@-ww{kI%ltZ9@#;_2XxsHgo^28w1|ieMo-*lI-bEI;dc z6_J)D5~T8l9Zofhz0Xbb)`9EOQZ!7Gi#YVk8S^^9WXM;tPkOdZMkb+24^}uI+Tasz z16epQQnn_`krW3h=MUk`!fvvp7v~fDy=Nza=iVc5!uR!)IG`fHtnS;ZAHiG!qa*}bI9Wy$=D+>nHytQf3<-gG{~wrY}~-)lN*&aETU&Dnz(W^lT9UdD5+KOi{F4udL%*^vR(I^Exr1 zOKTD(vm@d!^y4KnrbfG;_1&I4_u1B1Z@_%<959TC<>Nod zVT^alV4LJyfFAT4Je%#){QTloCuLb0<8M}F9n3f!KggZ@ZB7rpe2%EWn_r zfuqQP$@I&al~+0z`?E)OVVnB(kN70ijs>0nmaH^O)+d?o?!!Ppsib3)cS{CqwyDg@ zDEcE?#No1*`}2Aoa{4gMn0L)t@5dT@-RlsU31({sy%?+Q>^b@-%K?o@JOQ;tp#@!H zO@p`Ibar1OJDS>`Ca?$3&e>W}Jkq1C)uZwsQ{-@oT&}ty%ZdvYoYjiQsib#jE~ zCcGB?lr||^@7WeJvei<=a?&XWt_SRbzS^QM@;k1}bDz$3cD4iQ&-}jd{Fo1HpRD_6 z=1tXqmuxRB>q=_|dD68Amh7|4`sl>XnPJcLnS2QIIe7J*nd^{f%2Q6oI812Bq3*g6 z%R%Q4t*|wzKz9RA)yTmtV|h-qW1oX(uGV_IX1Sf&!tW|;S`U8~cw-a4Roko$bxLI1 z_k|uh$;qlj1Z0V1OKZ$^n|l$M%s*)v3!SKs1Ct2bsylou{Ega~hl5XG&fa%BvOLB( zr(UMf)^!h!v$DCow&>zideeQL&4;t04`00by$N0S8=Rb{kw(!pTzTjk+l_Jsh zQbK-db|=l?1^Wg30hgF_%5*!&72|-s&AiLkYnu^|C3>~V8gctqGDZ5|LI)TxN43A} zZgeTY^AKNQ*rl^s$)qvIDtCKzf6|}R*rf5}I95L31kAU3 z_{8Vh2;UIRo%p_H^&R6mNq17;{@kNqcv#N11e*zZG0Gu_Ow~7meUTJ7y(n8gK)e@r z=%5>2W1&9-7W~_UH>>@tdW1o)V?dynBWG1B_W)T}vsG7eU5#{>-utqKFpkr8wxIpW z&eiiFJm)67H?2R`Tl;#B!Y2P)eRtUpy~}*rRv|Smi$m>3Q0H?F_ZY-K#jH>5TF%CX zE)zd#>z+H-MHR@M+lMcT-)8-odHqBx;XiZ`mV@1JuHq-Hm6Yw2aXS4`!TT5(aeau7 zpotFEh41{RE+jnNGfW>f-8;QaxjXzyd%2B_(yBY9ti@BGfK8F+BmQX4?!fS3y~*__ z3)r!q8*P&=1sL^sC;BA`gsR24uW1YG`M1}ABh|Z{ceqk5d)SdD^3V4pnDTkfQahtg431+eG<=V3R+hraR za$58Nj0QZDvj+3{bj^Yn?he!PeWpa+@9hbPlfL_~WABXcr@$_hxOBgOx2=8!MC1#jnZZ=6NhK$kE6eN?qc%P-+$+9PpAiZr&$vjrm43x z%SX3;8f=~M5B7tW{qc=__tM(3H-dS>pBwrX=}=Af&?gQ0c`fjKoWq!HGw)6F)NH6R zIjih*=P^kxg+2@2>MAeMZ|Zz0myPxb?R=RDo>sL%xmY6jF_?SlQYV< zxo5ce@}}MWQ}{4#`Z%M13;(hB?%l3b-rb=K{Yv-Q4rTbc4IsP~_s^^tlMgWVQn=z;-}$%ByibI6y*s<(`tYV7_<4O_2j?*+&(8R=#oxQz%V&Kx$vn^)*#&%# z=)CFpo{B%6?<^C%7(iMyBYi?ggJ0*_+jQ z=%eM2F@d{7btcC#bdK<;U+w%*7Dls`cR`Q#y?EL`z1av|k000`q7NTTuj~1XB!`#! zMz&L3Pi?8>UvBeU1<5G&{i%+^I2m)rT2MI%9EDHS<*wBq#2fkkgQf|O)AqWvErO0s z}*S`ZR+_`qUk^2^V7Pv1}N)%5<%?f>|Af zyyALj6W<10`as4JwGZW$Ccx|4eH0|O*}k~<`rV!-d$ozLV#1N-v9;AdeUP0R+W7c) zjBAYJhcdQzTm7?sR+98|o_pw_vo9$ip^-Yhje71(` z-!P_gV?2+lzeeN1*l}i!c`NI5>F_LK)t}M?*0P*OVk@sXI((6;%0^@y( zl2RHPX(*Lo$im)4fU^d&+*vhd1)t$ZET^8E%R=oFS zoi75cXv-hdni}I>X=z#ao#AB**IjUEH4bB#qGZ{d`E80SxVYCI1b8*KP-;W*DeHH* zcj~d+zt{iTUND)^bA>Tx!oBy@SejpJX_JE2O0$g9o#DxSR`pC(z3m!XW`QB5_q8l^ z&AgZtCD13oGuk|&kA*jF#tL3o@tS2#HP#rnv~K}BfvQgGbJPBKzIj)4htKKPUr6nEV;da_`59fe)b%PCLC@q8eqM(?#?r0O!FtdIbmv4Dcz@O^h1sN6TQ>>X zhN)L$W}fKJmpPBaFpIABP?j|$^jOuu%DFi#qvNga^RuTRUNA#HeOI@&XPGl@+HNe- z40zdlTMPDNZ$#gnd=P6-rgF9`y<5#cmgX+BQ^2HV&$6%Lckk$}(xX2qSx#EAF?vCx zwz;?17W4kLxOx%uQ=MXv%g!%mguCVr$7Oz^|3B*;Z+L4p4W{3;Hmw|s(VFG^(D4>o zW2{F%uLXwvlaAoH`B2WIPuG`B=+N~W!hLFI{?q&0b?J2W$A$QNkBz{p-l88=a#eKa zM;%AtWYpRr8?oEbJCDw|*I#?1+pIW$vsU_Ar?knpExj*EZ=Sl7%dZ#^D%(zSs2uI_ zz}Fv-y%&5*|2FME-O6iSf7=^wvE#{~=c{OtA7mX%>yl2j^Wj@2*9Tm0UXa^;L%;8MwqB=oJni~r=+qZzDonWg zAj?vO4qcvZr zSJP+jHIMhPx3+y=wUQ`eXKx>vw0WgW+M z16;;g@!il$n&{F+p*3jRZd+b~1#X?bHaZVVeC+ishnItoz1E-U##6K2XCvJ%=?nKw zE63b>?CC6P!UD(b4IIG>wR9ez4f-hQZab$3S*rbS)(-qqmENua7x{V8E8o!FPM=me z9dwiB_9x|j4_S*xQ;WUQS}j|awv77js)J*Ht@cp|&L&20SZ+Gn=>2cklMc4wkCmVJ z2Sg$tUGD9g?cBkBOe$ZujXD1t9}MV6)St|G&_#?1xPDi7y_PU;#d_<#UaztqoY(g1 zEL^Nar`J}m?dw_k*xR~A=F7YmS>Ea#jCwcGTblH}^KES9>P{W8$H(?$x6O+W_?;y_ z8X$==C%QG_O|9E1Hbj0h4sEXwv;x;U#%k^OyWDQkPv{!Yyss_msK)uR1izJWwKwfQ z$*u*ca~TS4wf-4>Cs@rs)Q7?J|IXe-OPMr+54;@{>vC=NZ7=tWv#9=jORJlHt(HOK z_4Zt!`hO}*J0j14W8MS3uRH3(?#ViNllFkis`OsSEnL&zL%#P6yAB>4z6<6DBJ#{= zKMB)(%X6r-Ja8K49KlD;Y;fdbeU`JIm&_M-YbKRM6Io~esK@@9{>r$0*Pdu}(jLWj_?_TfGNw zu5_wi@}wQi$Fo64wyEEVMl7wd&T_k1wrM(zz2MFHn&$8!Ptfuy4`x1v>s*&?qenVy zMpfu`1A}wD=#S(B>K8bz+F-rKajNp9$No$Vvn}m)l0U7He%Bx59Ie5=8QVfvo9V}z z+&s7Z{^Pi8o_%Z2bM=-7;iaJmthOzpmVjN1>+Fq82`Np5h3@tIoy$rdK zwCwA=ky-EfVUsmmRH*L*o|EpfHf{u)J+Dk-_=wLl@5}FZk^$at%j>#=J$S`VXH%PP zywi7;iI0p1wZGO{A@6EBdX(!AWznN0aNI6nMd)U4)&z~Wq+e77(lF|d-5PyalijJCw5NfC5#fh&r$g}x&{ab1QFwVrATN$^UHYaVaO^2 zzS}=@G;Cf-X(N*sU>5Lvh&ASR-8&>3j5{~Ef8$6_5h2d#etlrUl7a@9Uj(}$<1VTAy7IAmOV^S<^+Su)d7hM)Vr z-8dG3oug@j{v5t1(SHkm5K##0X!X~1IOlDNY&-uTfe?|R2L0zXdc$5KVaUW1d;*+= zbHM@D+K773d`Q~RsCu(fMA6Q;fP(#!h^sngkET8QLqtf9cyqmih%%fxh|r z&^C;(5q)H(bB*MJO@|+i_<}C*yTNr6C#7a0;3#HhM!a+MvP58>zpqmw)%2e96~HGl zIGx#Ha0DYwP?^;2pY>nPd%0*NN5CBP0h|mSiu78JOr<(Q7lW<$q{FMM^}gwyN)8}`aOeS+c(P|X zBv|o%6p#J|dHWmsaE`3Z@@C%PA4l<$;Wo`Pbo;bs2cW(EqywFGwu>ba6=nWfbR?R; z-zQpu&5__tYptJ>{Xuo9Ge>@6-7N9a;fX4c*VKX*MnrGdPc5-l_kX7nS$PthiM~ukP#l95W>GL#R*Qv6+ z;eL{=5S^aK`yw5U?O;@eZp8W&be(3aUNBw@dPOG7fK&6VE^Iqha#H68ey_Tf>mE3@9sV`h3*o{N$)boK5Tg)}Os z^I)-C7hi^4|44>Qj*K|kn_1YVu6RxyhrZl`|BNSqYQVR#kIsS?EpUAGf5B*E#%!+d z_Rfyt`1j6AOpz7g&oYB9v>s4oIgaeJV#BrUb5K3hbv*G&>@sjISy9zCk<3F8bsO1M@|sfLq1sLXo?7=xS>Df6 z9EbIAG~*2f81-n+xMiLVp=IsXCOGrha1LF<*~1s;uqbcj5TEE1qwwOMu_ z#%tCV=v)iEO8q6HrL^POq6l`3gG20clw{9iebYR4vV|J(cCI-iW3{)A@?ncU4Z>6Ja=D0%h?}XKGWKR&2`H`mYYH+7}qLS zF-wK%gv*(6wd46HZ11vs^CGxoo(FvMUc9$^972=kK8M+1l9#TRHr4^ePBo)ULq>Y_ zr2kPN_X!*4h>RfIXDj$f$~fD2%m9MrKZK_**@j!qW0fZ!lmX!?FU>$O>+7Dp&((Q4 z=v(~2J=<6*LvL%#_{MpN^Il7dcRCGPQL-Ou)Kgt^5xYA6Tbo@}h5Y zpUICkGxMaLTKFv8r%1fKnXSIRGGoEyz1)s`;Iqq4ywJVKWzet77@^OUxrb;9z6mW$ zcH|bmg1enDS=0Sp>@o1TSzqSyG}4#RD6cWzi*vpGC+uLGWAODq_h$g7Sj*#Z6Z55Gb3GA>OipbI164AiN6{7#!z9Mt)TaXXZF6_M@Es+Z*%_yfG;sZMLvrxnNp~dYnVuP!@v#KiO0Dq!2#$98tjb&F8432iFEHlozNz0f zbZ(*tdWOBlSJ2CGshyDY)Yg{OzqB*|R-TXRgL&`S7nyN(u~VBR{~~95;`X?2*g&SR zA6JfcSmrEifqUr9n8Q7`Vjq_4X*MW7PXryv`HRK;EO;mDLfmiiWAQjZ=O_F)!P}~W zJ%we@onWQ&?F27hJ7>-Y&fE@sL~YA!ZYhg7wWIvQsI@5Bj~v-}iAS}zKSMe$l6t&y za!YWyirOZSAxu}PALegqCK-o2I(8i_`FCr**m9MbHpGzbj?({=Ey!SOz zd|DIpp8FO^rt>)qw)=u^7maJ`LgwQaL>g`U~g^Aot%b54pwJzEZ( z#&|NlgJ-*}YR8uUGK|afUOjxpiVNo5sl5#^9(=pIT@0OUJ`CMz_Qhka^l;ao=J`e) zGry}kkJF#SIDCyhj|`;I*743)2z|HS16*{Zd9CNGVlNN2g{Atdj%8Fo{7hPs&!YGG zzG2OUPeOTo@+;B2oXcXZKu3bDbBwISs{h0qWxIIr0qn=jrz=b?uM<6U(@Dq4Ys#x6 zTPet|rkP#V(~{?#(O$tkJ2&a`uYdh(v?qJ^jr2(9m;4@d9-Mjc{oaXFwOjT313$a| zI@9?_)~ou|-JBQBd0o8lvH^7uZ~RXC_{jFH%8-z|X4&=``z(v@C;EINm?nRTncGZ_ ze21+(hPQNY7b%lqXs{;Khyx1m!Ji)W#zUg``&d@a1^;nnUJqD(0-p3mAw+Y)b!94Hb z+3M$!y|{IM7Q8v{3GlZbcRks2gAX>ce`h~b=qEidN35ah9L0P+*|g-t0L@(WUXtnB z^;R>N<>0xjyTvfVf0cADx_-?wp~rD#4XS59#?9-=9|m59bCA&Yn&|4U>Awma2Xx7D z^WmE=g}Ho}r+PEf7uR3tigee3W9*&hwZ*Ws9)98Q&GdM$(ocF%JR5qV(<#w&(v9Z0 zV54#0*qgJKgC-dGiSx7^@P_?YJTKp?mc0b_A^12lRK|Q>HBa?@S@LCGe>xqCU)Y4_ z>3DvH;HU-qQ)#VsUL?ZC_4PX`Y#2e!mEQhAUo3!|*reUH6br$5KZ_Tt*^P17qRb`* z+l5N~{#3i-S{Ll~H#^S2jQW1oi%=Kki9bkkAQVM$QxX!DV^s3__i~KA9P8}C>?3TZ z28wpp_7hGXo6E#L@5-FI?Tn~*{Z#KIVbJRjB6e-=ptY;N+{dLT)->QWW;a$;5nmV- zy>GeS&Wsb2=xbYC|C7Ro5|3lhQ9dY_==-_RBrLSA>)E+HZ_9i!u#eYZqfNm6@6l)3 zE{%}|)w?zOY0ZTPhq)>l8b zBa8aq;)2!<*P{WH_ut~F#1Y9zm(!sDrSVwiVdHV8`vfb3-)PVE?v)3IW}IZHIuE%2 z^+la-I75>hZtX$#tZf9O1gEWqF*N0^Zp<=FQxTLvnb<*is7cV8);IL18Y;O#AZV#7~RznJGEo1lIg(}A`x^;x!5 z_1^KOzFRv%Njxe82726&q~919E%iySsbD8~=pYr)I3# zJBy$TOq4cuxQZ(8bgMW0TgF#vZ?5@|^vLkOJlA_@r<60nQkJ@KES&!fI5Oe!e_}f- z-)SVP=U?9L_I=yH-kx~zpOqb*zthq1tYMBvBU{%SpB3$~=(>K}pNv1z^7__fjah%- zHnXm0%YocjW4hR$bsr59w1c&dYh)atKG6~CGVCcnq{cFm*Fps^v!2FN**v-iQ}1u&u)fFj z?zRs(>qC8q_} z&7}Xl_G@`t^oLoz2zH#eQS#xUDu2)^tMhk>YEkov2C8W9k#4)=iexAc~$QM_xJ66l7%gFw7`{3 zeom&x_Fc0KdyI9NPoZ;Eav3G?9r^;-XW!y;S^JIOX2h(W;)+Fzq+Nk9HjyLbtcC9mg{@y$JxVx`&+uh$4@Jz3!DqSI)=wkeIOEyb2 zj!#O3gD&(3`5pJOZn*GPBe`#%!(}%2s2}fOPov4#!qc1Z=mmFH!*B=NZp;I7-Ccpa zN!M+E7Q;Id+cnqQyl1w^nn_=5*B#}Ybd$v>q}T}!Csdk_8DpUrTpZE(g`>s3V znc3r*c>GoQT#sft+V>Z*2st(0*Y>;Z(EbshGpvaz_t7bj$qJpQYJd0=qzVN_nKn^tWscSvj@H4-H^!UNpvj- z5=Yf#>==L24Y;z!p1aBmtfiQT$Rx{p`eyX&Sor<6(S6#A+jHJO3K@{<>A}XRkm{8< zF4|k=dj41&wDPE9NgK(gmuqT)n3*rWmG^eQa*m-t@0UKy#ma`5{nGmtteDqVd>-@G z>rxlhQ3?I7I@mgw`yKH=VZG`HN2@%d@l-?#{$f4xbhPF2RLSF!);s>c(qT0Q=7k0C z#W)=|@4BD$`D3rE{wW`SrFm9-sAw~dSL(mhA$VS?&29;&c)mO24&MDq@p;`kPkRfv zHpjDhO6;~nVVT$VW+3=^(6vnHPo7rv6}W0v4Lx)m?W`5OU-dUW%3 zk>p5F1oI^W2+v!@V;L4AAB_EJJ;`99Q35eCRt5&D?Y%_Ip}>8-0=1K&Bg8my;aAn z`mWv^6(8z|T{qqvPqb7vjqyjv^fnjL>UzNhk^KkUD+&&{|xe8iLPtNmD+D{#j!?xeH1 zKcH8?Pmlhz^k@Gv)++PsfQ2iW<@;IQW_su6yR!Hm?Opv*;J0f3>A(E9``!{Q zcedkE#5mfX6^B^qD|Md;Cf3)8tQ_$I^+Mqy#%${$(P7kdTV?40##jVnp;XbW8OeS2 zeJ=_V=Y%jt{aDLpea+H>$g77$?#2BdfrXDn4yi^o%b$b`j(&F)jaaToeo0hMjdX*^ zFaSFupaM>(GR*lmaErEejUal-;BhTQU{8j^%vkwrMm;!FB)3oifVvVL{s!Hih~~%bc9V#TgDxuNg0ruB6nbiFQFePL9L@U{f;8xt`1KOywkPqo zHOPH^wbTy7?0N^hHu?{&-_)yyJlG$v=|oTpI_ zU3fSQLFd~VSyf?2G>K=Bhp02g-V%M>^*Adom)>3O@?1h*&PX+{-$~v!D-?Db&wzc4 zsMyA<*@wJFh?$RnYjl#BOzIZTHJeL7Y7~#)c>K^fBl7>@hu1B&gN$A&3XsED6j+;4 zi@bic2VNIoYqpIrJOLDIAfkXBByYn&6kSSSilEW~g;}U1VD4wfZg#;u6_)-v5#4w;sW2X0*k$v1W|) zQJ=fnHd?;p5dF;vZF~);=;~g`qcHUZCvjwJu40z z=FX?bi|2`GoY~ew8^Ocdt&cKa3i;d}9-!ykkEOOxv1={qw~_sLm%(-ywQonq8qH5L z{48>o=E8C`+Ld~UhAX_E`J?kpxgPZ?I-lAp4x66!soqoeth;~W$#=hK_n&(gOfQ*n z!~7&(Fy$>r+r`=d-*2K@g-?U!`3j4{gN2v0me$CxnW+ouW}6U7~AmGGlIe zde7O{I7bi)L^)UQYHw@?dw|&|s?#}Qv(mUPk zfo})D4f)#)zKcO`gP*5tPHjCL$vh7Ce6GDO*$d5Kog=RH%}3MFr~g96Jj=LLA0zt( zx&0sa@x2xvWn}ZP?@(c9c&~*$&ioqJ#CmV%;u^!wVjeCYJ zq079k=DR( zIE&N$A-q}Q>1=;+W*UB`Ix_D0dtLox9PlAWo38Xf=u+?xFWJp#Ts|jT>A0Vnew|m( z{?!+fGIWs+<-B-KcA-NH9OOc4t*m|b+T!HqQt%{ zcxv`1XI`7@DgJmq>i0UU$mQhUeTt6H(WW65luk8kOm1hqljV4{JF>MH$?CDzJ);8MItia9^RhP7wbDayBcL=IG{a1 znmgMLzDo3blQqOT%spOY3ZXT~{wnni<@b5btT6XAV3z#1 z3?KMRm|yM=2rq@#7Tvr2x0%wX-E`)9EGu|EZOP^&I7btlwZc?iXPpWeFjZg9ymj$W zwwC(Qj6KgK@R6do(k(Sw6I$^km^9 zC!HO+VT#P~B#*)d0?fm&rSo&&ATk?>e@HXRrT2SpnH63 zBTdjb?^B;fE^Gs|sY7LXYNW5S?R95Sq@Y{LW;r>-9ZtenJ{OVJ8qk|{cHT>1SS{x- zXibeD;%QW`);?DsMuyHx-zIjVW{1I<8PAp`nX+T<^v%{-T?US!+?%y=|WI4djYiQ7d6E|)|^ehp1=6q z(La5Ge%EZJzXevrH+o;}SCqiv0Kqx^M3=6}8KpbHVD$fEyuuPaO{VI5_Q2(NmN;eJ zyuxDD39;W=We0=J!uG8CH&lmG+~zs0wvc8C_xkdeo=4HlT!Fin<0#QhTWuuPGaZ%_ zPmSbice-T#1p8ZIuO>Rvxe%YZn({2+6K9^qbY|pZ{TO=&DXU@+dArPy_z2|c)h_S9 zBwfqb%~Y~P5h)amw7|S zG1o;j5%is!|pwk-qTvvv27=}Snf97cgpf|-cJ6ZMt!OO z$ma)MEVfVb>$Yjn_K?4BhyKdhO+&BF^E!LoFY4_+gum&~0!%o|<~WD$BtW1wR1E#5<&wSPty!LwkkoDuis4etgR+G4Y@K~qUw%RW2Z(@1Oex@DlFo%J| z!CziUUv10z3Fbi#In~@#OEfb#Fk|YVh2aaFTQ$Be^!uMKHW79f;du znF^bu(|EB)REGf%CbR|&P!F=1V4*%X_wSm;TrK?4>|aW(s{9-Is8|nU-q>-ozAt8=H1M8 z8M9e7>bkoBrcBg6pIP^$eOMklaJc9RV{@?p$13fzm02A}__XJ=)P0PVbZ zzt!5bYu9}lWOjGnB%}nLitP&J>8#_A+xVUHnmXA*zCqU07a2)yrtcJ{&JBBXwm$UT zrZ$mn14k_1Q1}D-qmS=;@*2x>(~@qQ{;2z%zo+(#;&QX4e*C z7^7f*==Eq!C+!ypJ)aI2rDwH+!J9{K>mEdmZPxdp;jbyH!5n057`L}MufV7nV-WqC z=6V&~mrdVxQgPi#&b;~lZ0sdK5f_3b#p$UyP*u2fnxye0v(iDbbvh5jurQN@5exDr z$VAxR&sB4g_mrp><(CL_JNI53+S%26=<8&qjFiTzo!vNQ!|7THC~b<38kU)$rFKjS z(1Ou&-vy`#E@?r(g8`4-N9$+;Ol%pC-2yfrGH=vmpBZmhF%F@S*PQp?o)~1K@w8<= z3Ue*H=kMP8Un;FWpfEem_W^W;NpD#pvb-MENXW_vGdpS5%njDmZkuDVnyIFKsyP)n zQvRVvnzpMrt@?Q^B>b%F6}kp*jn3D-7)OJq5FfJdmIOi!WC%92CU&WXeb}b%k#$Awf*$G=%3$P z_`||43dQiv{C4ZdX}BlhOV=&ypN-_yEzh(3%hxQaqfQ(Ws5c>VlZBo;`6$bf-Po4j={NZk+3)&l9+`!lH}{!fJk(IK=Qgu6 zma8%l!9U@m7k(?E!?Ee6xJy)HJ73N!mp8J$noVnO>!cxfwtFUe=lxc}uUMD7HkKZH z@TK5dt6cq<@5q{Jy?~*NyYfjacENlnUB{r`mz_NJ`EB0IYWGtIKD9BtUdmZLoTGgO zzMA9uZfD}@lQrWbx*KTHS0{aT<@>xw5-z4~3*YBfPp$_tMb~G(mYp7aZVuc0X$FF~ z^{V;|r-~N(&VH@+$xrpvMYrg=%}0Iq5BuY_@vekEQqOOWz?86dI$yl|W}KGcaBL1H zE4=jnr@Cawu$l!ZjGbOBuVdC<0W*_1>zY~MN%C&d*Tzke7rmtIcXLMjHa8r#ogEIJ z+j@Zgrk$mp+m4w(Bo^%g(zbTZj$TIf?(gn!u0{Ej-=DnqV~)L{SGHX~Ev_HNg1$OvkohtD*2G@>3ZkSvX7Oi8uxACZ=+51NtAOj zdwc)M2hbAl5jvm$VsFlAuUBiqw&QuPi?xJ59p@b2Iv0C}!?NaWrQ4;QE$;1Yak{cS z@AR=18Mu;d;Lmov(;mmst#8)?AIM7U&N83SaT(#B+hcrs{cAsm_6E={!$tQ70$1yN zu08^1nP;!`_+0*2-iVFQALcG?wc55Ud6sSH!yCFo39YSV?mcx|>@^;6Mwcy(Z)txs)=Fn8b-|7NUv#-bekQp}^Q4NlnN@0M z(ZN!!_4<4#he%>?{C7aV>C*QYTx7(g88FXIYli4~fnneCQl3kD zR@UCq`I8P%ov*mcvJbP<>6S)Op%_PTy)?1or8H)4p7m^&vs@2rVAEo$Lt-rSfUfs^ zVbS$^-fs!|Y#*)V*|O=1Roo?=it3cDRdU~~NaC=(h=$8{m6wMuwc}UMc&_&Xdi=Kc zvS!6+p|4s^cfEDv6UL0Pq|-gc7EpzMnY+Iu7MJI@L%{*9nMjA)2ZC%u{sc-MriWNMR$M
HYU5 z_)m;g#$)usyWqOnI=;G_m6yRTe>b|S9edClvpyD$=vvs)S0P{AhtX||V~nfGyP&hg zdE4r5uEz5xxa=D~mh_3u^QE1K=N1kdqLYTKn)7pDk7C6Wsq+^jMdbL;s#|B4%J1d{B za(G8OCiSBFuw{b}jxIO#q=0YoSov9N>v>{bXNto_XFD3PYCRJdW|>^@xZ9W5Yu`q! zwa^R3Wv0K~c-F@%AM200ck*FLBDeH|xfYi_YzW}F=Cu#BVjG=EOJC`c@B91BEPcyF z`ooqVrS|f(v0UHD4om$T>u7DIGlfroYHzmjw%@DT|NH;__xrCVU)t-Jz$htFGcDK= zwImi11DF-doarT^<<2!>8bv-a!-{wuAYFNzD?a-EilCJNcsrB%jCqU*I6oBKN|mYs zGa(RCT(AESvFb#IyPpxg6VVxdNkn6`>tD{d%v{}g+I)bwUdMPcCk z5bOr;S;wXkYha-6GDB;o=_kd{=S1UJGJgoYYI~!|OmJfClF3sr@v~ou| z`Da}rV&rQ^0V|`Lxbl>vhb_--9HzZ+a^9H=rUQI#7J1~UehSQNRn*(e?A4)E1yBHr zh^~D+!(tX>BgNYF?8Kb)iN>`=;goiFym#U0EtCT8-_@jKRJF&<(>}hA>&UW>NN&!% zV_>T4=zl3))vr<>yqIVAzVN)@!NIEsOfubDL3cL{Bs-(x zT-(!3cjh`#)|Hlw3o=d=m%re%sefW}BqKui>9i(Zlb_n8^TVT-4;(`diy_?NV23&* ztg-&v08T)$zbN8rk0J4zY55*pYClKiKni?#wzia!Z^g00Od>rlnY`K>B@ZwfFw9Z1 zPmwK%_|`USMl%sC>s#7g91}v{df(*01?U=lA|f&$CCxb9TcuY=lzZqvyzUHZg6toE z-?BIwZLV???cI9wl|h8;IgAIHsgX7DB~dfcr)L8fCxz<845RVx>C?IEZw_j7;n^HL zd+5tQ6At4VS(`k{t?&gDjWDUaHRAvVPiGJs`M%i+GnCOV@ zW{h{}IQhBG0d=8g-}gD2L+{(j$3IK9iP{0Ri`sc8&(~~jleb>ko*@5H`+yNg2W~Ag z42aIw`)d2JE{pZe(YDibj`&7x07k84I$_##9ZhtYsMlkC8gwR`@;`X$oq01&W6FdE zJ2_`5j5&_lPM_VGn!~!n(GGSf3vOM`wbYGm-dFwDGuaioR3~`}8dAHMv!3cY9K(Rk z^DF4qYFWV|6?#unS!f+z2?x#@?t zi%p}l!eKogzh3GyvDwc_xLL<#qSvx+RO!v2MWyT1ZtsboC7sBEZnA!C-dr%!tWANDP`uFeOOC8ADZtOD+Sn--!Z25C$iWl6!&K&)I_p$S? zUD!aNebsxl8DuwIv!DJ>I1JdsS3BmKGSm0&dwwXIu~X&j(C;<#bm+>Qq3;HX1uRaI z`LM6tE<*py{mjEL761opv!^*s`AnH}0}a{d!E;nODe9*+(bHBsCY!E#!QFbpiS-^x>SDcCl3$w=!q+!Smf^`E)tSdv#W1isFUu-R&V$5oH3*zTB)sLGQ&_n);u{Uj`c#Yr*y1 znIRpa#@2cwEHpzrRYdGgI=RJ8X_rYt@>1>V%IKBPA zb03Lq$hM(J0-Ez;9%G~D=qvGJs?Td?mo;X=HRxA-^%$@370CV$M!wU#p|7eI$^EhI zeUN`_(1G}5F$=M8vk$_2&kl2jOh~qoAw%bJ(?EPg6*%Di?(CE3#Iy5(Un9ML4mR;( z{26w*`JBVQ74)E4O?^GcxYSp_$Zvr?-e2fa<-h1?EVAz3i}#Xkqb2!=o9q>|I9G*i zPA-4v`{@i^!Oz*xoOI#yOmk1V&4f$r4e-pOKI#Dvw@>ool|RQsbF7I)$FlqZF4h*q z*5|7g#?P7+pneC2dE8UN1Hc(*WTzWI>C0l8*EkgpBHeu9mEd zOkXWvnO;lsdG!xt-d%Y#?Im>PYqNnLg$dCka2>E|#hFr(8;OtDLdUQX296qKRjcLT zi}t0sJ=MwdTGtNyjaysy^wQM9+w)JX3JD;3(}~taR?@hY1e%dvon+ zhQ7$EhP6@XT4u``0LQK1I%I6fz59L2z{h7|ApiP_z4y`PEpLzTKgaXnTd}{>v!0Ch z=lI?B;S78K)b(>s$qwytpUzBT4qU%0eX1O7Sx!I~LuT6Fo^d+cFzT<`tw+t!x7a$e zHndddm~UH%Wh3cix*yHKLVbUrHRr?gLDWb%pElGP=NUBvC$Fs}uX|5=W%VrEMw~_U zC(CoTNqU@3<&4wG-gRH0`hjT3q=Oy8dlz|IWU#-=l?k5fL)Td{R`R?}#)8qjkWnNInGGikSF9&HP_!aio*$Y^}5KZg!9@XY!r<90ol0XiGL z3QMzH$K>>Wi0wjia(iX2gUDD-JfStp0$k8Pw~MjM-nZJd>VM*ZYy67_eGV0;Y{WNR22A>6eh#~|ap$zw*xp=hAmW)fAGfxwCm#d)k#(zQ z+%&`c`W=w)be9#R>zFNB%74X}Yb0-<_x|=B6fEehcrLYEfqEK4D}V*2pVT5DMtZDKD|z3V`Syk4hObv$kzso_sLDUW|vdBf8w<48phbyF3OKUi`f3TgEknK7A}ivH-Adf|0yfo{@6`rPP@gq{C+5{ju3F17qnQ7e|1Y?*kR7u>uJ?{d zH@SAY+XN}$_Eer!ePjjM76&%d6S|LQqCofe`X0;cogB<`&|KG9b-ZdN^eht|aK^e* zHID_R4jga5J}U2U{AMlWXDmnadsQ|y)*+rEIi=F_VT^7pe=S8DGgErPPdH6XaoVy& z+PE*#n`54+&-!n?XRg26a=+Od{pF!-=~|wf)q3<>-64X)BK(cx+inepYQZ+q4IE-a_uaTLVpWsZy6{JmwAEm=Ad34F6eO z9}77T#;Wo0+6f*r<)k?8xxcE(z)8mW4#)DgnJIj7KNwxN4L$39d+KG?qsQ|-FK^s% z=l&`>=AQBzU~s6e_{gj64Nole>C>1_>hVqyOkh#=>5I!kYT*uSN;&T&U1S$>ErQAwcg*+ zJLB>bnX7fqH@L|i^@rz60~lD=Bj&wWL!nRIWR~axO|1L?^om9qSBp+bW7_Fb@ARjN z9u=ogy3nJ%Zaew8t_K~1R7me*>d)=eh1VW`%$#_c@I=m*2%fAu(~~VDcg)B~X&d>w zD`5w(I#%z!=>1=HO#A zpZP=Lg~mGAU1i%algNpGxuOJ4=eR-YR~&?&EA{UKH|qQ@R|dy8qv4! zJMDBQDM@D2^-}*+{-119+I>QXUQpUt-Yx~(h^K$q2f;BoA0R2}LAc5iE~ zp2n~IzzTcgsqExj_52y;p%35+&E@9V9UnWxjFA|_5#|`s>af2ufg$0U-w+; z@O;=d_6&pGGv8^d<6aM#uDFdX_uuIat|MLb=r9`VPDy9|M4vA7&!^{VKl6K9?~}6C zrQXu`Zhr&1jr~#oJNtH}-#rf+Jihitj9aT8g2xRVw)Z+CrS0T=BD7|CU5O00Oi#@! zIb0XKuV>lb>AC*Cj3{7V_tUBJ6R&U`bN+5|1HLUE!@hg3g3F>CeNeXTV-jQWnLX%o z?VT5`?|qJ+jPo7czT;8vis}NI1STmrMr(xk?mk$fSPxkbKa>ABRCbmxpdDSUTtW^r z-#FjEWJhUuZUlFkDak9_f7)2%=9ES9f} z>D~KsCT6GqhF)2(wOAG#y6*42S4^+;S}M>Vs&#-52)eGl9WIi-T=2xU0Bqbps^DAo ze9HUO7MDZk)>^h_ZQ}X?khN_j&o_K!S6E-@g`cvL&C`J=ZnfgHoz`!rLZ%&%L)DSFI%EBk3|e7!5N#zKw^{a~YWv3!2g zLpOB%seVW=qQ!0d&|l!I^Y=(+z&n*~BMq;3ZN)h>>sD!`w(;kB|8k#U|6DG72d`Uv zEZi674n3iB|J+}Vqj$V=+pj)<^yubx`1j!8Lu~{~dy+^>mxt3vtcSeD^DpCD`8n6q zvF_|`)~9uyKCb^>pPMkNc&-#odEy>=?EqnZzmzr0P#A9ceyi%)ZcZ5AXLSFm&9#iF zh0kDA>1pn*iLTTImk<5)F2kQU8u997Ot!*W>Gr8q`^(W4)-3ZW7t0tv z9P4I~i|io`?Az{aGsQYq-ujOBj9~h4Aq_(3$cr~2BAV|UD@T$_(K_e2nPG78Hc4o8LdxBT zN4Fjk<216PM%cKs#I%Tx{XzykL|px?S!8m=Mu#nZ%{{K`tP@(_9E_Z?$FlK8^)zAz z7OEOy^vdY3$A&H1=S&}?F?wM`SXSUAl=Pm7IBGl>0zWJ`|I#gw0sC) z(rNDznKjd}`CJcTJc#ba*GXCOpEea8a5tlI^%$F3dM`3VXL<<5K@Tv1cg;wT$KeKb zXGJqb$Bp%hC}R=jYux`WQO2mlfg_1n<8&<%q z@XzBX^Xwh{LFs`4j!Ykj#>ek6e_))O^7=XdDr&X2alv}>R%9X0849KxAdewuE4|u5 zHnuxEMbEIm$0w1_=VY>cY;B=$HEMt}!1&i+h{oB|eb4+OMvE#}JSXn&Mkc-JdM|1@x9esL}#J5NEqH%ZB+pKHw;1@D= z{doV~0@q8VVUmM)FPo@CPQMa;_gv^1<7NfCFZ8XOir}T19Y*yCug_67FFIr+jd9g` zl9MSjXpaqC&1jNT=t+MG`>jR2R;&xlI!l(X7CKu)wixEsB#-f2^o4E_N%`ldm(2V zgF4`sRcwR&9{TbctsXKrjFJh9iwE}XC=DEGG``Fm7^Xf);dRI=qfx#>XL*kDr`I0! z2y<87{lj{=IbA`w@yLxFHOVYxxpJF><^x%W3?iNf~;9<)Uj~jkcS!H??iV*VDKhi z1+r!k;nAqid+x_kz_`uGk5ith9&BqSTRjjm+NFqdraTk$V`&^{MKkt!yPRFMb0pNf z_B5NTX0Y{41v6UavSyAo>nZ3d!Ij>dmuXD{TvnWrX%I~KRJ6^71iG9rGO{T zo9#@;@udCWv*X%%v_w_~oqE*G)~0OCyq4+C=RIYHe#|^aU}|3_o@3_YgsGm9_x@Pu37E>L2MT>X8$12O*_9LF@w$eZI zKZysseC&Go#v4o-e&%4ZTyA);m2#BZ0%)LH^BPHO)EgQQsibeYB6?(y4)ecjfK z1Xb1!z~LT$&xc+^pP$)HTSU#~4^}lB6X-U=t{O`sg*Ip2|}l2i@SG$V4r^5S8=DjKZ1zlHZ}_J-Y#B z);EXl$1-iupW2(g>OwCzwvohE>8uA^lE?62xL-+q2WE@yY3?_Uf{Z^`mcnM#4(!-M z-i+Vcm%rGrt(EWd`mKtu1<5d?d0Jmf?M1k5fgqq( z>c!Y=cV0yLU$^i-fp;}pLuQuN9K%ZeTFXbzdD*YH0+^2HeOtAAVe{>9nX-*r*g{;t zkq))Y4KSej^Lq_84a3MnFAiMgJ%Rh(d5&W2@3eTQ_oV-XKGWSdk?1mN4PKivU=g3N z=K4r_&;3J4-(JpKw&miKsO~bTcYYxTHkK3(BddAs< z!J}f&&P+3Dml-r$=(*6FM`o@yBZ$LOsa@9s&S<`_3Z02@-<=4KJ@4I&_>wwkh6XtDxs}sU3PH8d8b3<=Cr`?eV@DD zCffvjB-r~iUwhMzopcG^YnQbYMKjT=&Q$3(b29V&>^Ek+<0|T-bXcg*AMcPV2cLw~ zkm(SzUVyd2_noe&9ApD@!XdJI`Z+C;w>PitR-6kO<)%wx*kNqh=7?bP0uxy~;KAU% zfy+$qE~n?U%U{_Sihb!pN6I(ge_HkQvDP(9qmPrSpUv(bsAGkn!kgvR_ewFY8#aRP> zpJfuazsgafQ;db|MgofI{1`S}>{E2cveQ~L;iN8C$UON#>9JY7$2%lJW;EQf!7hkomkJt zzOC|JJ!hfkD$Y%Yy{!*Jc&V->6FSo~-r@V}T-|x5o{uv1U(NM$>jxcvVcI`Eaz^5& zytZ5D+b#S_Y2LKP!WNq6FWQlLh=tsk4Y; zPtu|`)RLWDbRhLhZ6@cw38e?$FKP#-mJ0SB^t^O#9)73s&#;qUuKV76A!S)S{R}F@ z&3QXzGsgP~Mn|zvYno9q_QKs?CAw46AqbZ|uld*ge?M>R`zNb@8U3$36J6i?Lnh}a zjL)!+Gv)9}9Gmmh3=f`v%1jG*@c?GYz6^7E#5pIWMW;JD7Y(1t^^ET`k5YN9;0(8exBs|)$(oAWu%yVUp6jS8cs1zJGtv`UmB*HFqc-n7flFRa zT%V$6?)1$#+X9_()YI<>G($CiyHSm4*{>D8VYK%AUy>b-PQ!p33!9o-aI*&KY+j zdYtbmjvU7=?C7V0c5vPp`mfS`FLbB-xya)nkhWf4hKC!lL*y*=llNOe9jXn0qou&5&uFcfH6YuABe@doVg-GAnmu@E> z@@*x-h0E6CSTWF~jL>yzIB06qE-GPQK?nenmZVU1IsnzXeKLM#=5%*e2(8&;;WjOg z+l&SE+)%U-@XX|@_Ar8{xtw|sQQlv0A%>^c<6%H}@mqCi%h*5=m9orlxN+iR5X1G& zhQa*?ZQOKH!p6qa9)D@hZFN#|y(SFHin>V{w8F9WVaW=eM}G0#_QUP1d}db)I-xm(Cue@8yf&|aF4s13 z9!)>=N!Lj!>wQs($NdexieA9)jpq0Kp*23R69#b5fyuSNd^ab{?|IbgEnTwmxNnaY z?GoQ}jlboq=!xqw4Ow62?8-u2{{ zRmDYjDRg__i{)kSte=Pc?gW!nhsrvL4eXw?btIf!CETExpp+iQq*gCV;A*x9drvFFJ4`38_3lsd7R#} z{XBQNkkaQNxNTC8*M#Dk*Qb8Oxm^>fm$=_WzvsV`&T52v(rulOY#00Fm%W%9k5A^? z<~!gMnNBT@^^^n0>)NXL0nz^lGT@Wzm>+LKT3YjSGF*wEf3}{`UXymp zGVxi_#s7}NIuc-B;UZo4{@7l#R>J1(IILcKw&9EAd*0uMKMtegX&?)4?N7XxdSh6{ zxTdptJBOVv+#dTYMpO1v*~6ptjT~+9vulh09{Q#a5D%$Nrj2^&HN1DLd~FAFWPA6S zZ?0_&99;MHgC@L-_mn1BE@Qp6bk0 zcE|r>QQqygpLdbz>Q8#C9?xnW0zn-w&4$Nb+xxk!dKO@=DhvXcGx6rJGh>0pr28f zR;}nTCc4HS7T7*%WO?j~o~*xH3Q3>l_XjUAKa?8lqgj0LA?^4uTV9V=*SqV|xa)fT z`TbxJ%NVNnlHLuQ&;&w51-xq{`Pi3wn99$MgP^gphNa)IKO7SPuFv+ z_WpJ9T22|ihFw>QJy;Dqm+_@NgVP2Bf& zZt2=S*yCue+-n0pqougFmP$6@z7_LrRXww}2aNOB%;H1XrVWOCw2()tt5~ySE4PNa z1#qctmZjCY#?lC$Ci|f+^Lki8-D1r#Pu{QTR*x_B6K7}8M_OC6-mZ^@e&@kvAG7et zEgkNj3m+)?#KZhsAscJEci#uMrTpN1=?^+ZvyXgwLugbL8k7#H4Y4NqG+_OzE!=yOR1 zDBTsjJ@XgRkK40`md3q4oOWM~waYkTzW>e&Utz@UMy>w%T+6>T7G1mZUec3`_TTfK zKcoIquE;e$*5n@E;UMct1@0c`zizkXUurM?`WT;eDtjx}&(xpxlZTe+>|Vu-{#@hm zdF}k!x&po2{Z5Bh+tIOoMn{>4P&*i3+n<{{%fL34`qw^SYkT`|#>Bt&Rxj>be*M(n zQ-KT`FpoL5wtjFC;~9Oij*YdGaME_VS3F<%G>t3u+}3eF>CvFk6LQt6_v`!qK3#io zmA=_OdBfMVU2D&4BfZz!^oJ!0iW*~FZP3gzj-Jmc0e9YZbiDNMwpJ%Sd)_nAJG+n7 z(wa!`Tg@*PdEDA|t#dnhZP`O%np|xf9>-OV%}3GJ>T^^7o-BVZoz|_=q2evkerFr)=Jgid zySf`b5|8(DEO8>w{g=h2u9vD`v*aTfqwn^K@7c(w_9uKT>pkl@$2e-)m?l zZ*-+of)9CnQcv4_hcmTxaL?DEwr5Wz!$jrS^LR3^t#CdbuexIsenFK}e}(t>ary1_ z;kq7mo8H^Cw|jp#mX`V`&NY_&?|!o9Ic6n}algy6Y7VhpR+=bb#xlNBTfK`fu%&gG zg(HW?Hk&Y=^ ziC@n-RZ5*knb)tQS7Oj>T|j-d(;enqkTFEF$zX0vbOZg6(Cv{t7mYy0S%mNBcSPjA ziMq+kM9wV2nF=^su4Y%8f6yk1IqsdwiGveg(sN`}ofM}k9C%p;-@@cP5JmuT`w z5mnX#lS;T60mCEW%&{$*^JI;jOU99&sv%k~BE4yZWEbG`Uyh!@bcbG#f-$8vKBE@- zGhG`6P90ta?cNbEUd6|Z&1Q6wZj~<+jzt!dpkFk=*_H;4V?JqArZ83d4S`ojIQJ-D zn<&^CRRQh#yrB)W+&OTwi&qz{? zW5y8_U!Gb|S&eQUTSSX@!A}Ceo4nVKq!1u#$*-B+>Gz%O>GEnV$V<=o(XzZ;UG46=Y84cmU)TDzpA~IT!BUG;!Wze#oqfvKr2UkQ)jtsWYxx6o9 zm|KEj42kHg&8WIPqKLW9w8`4=+C-T0>=NSedQr4{Lcs!K$GOPeMHaQ%Fz3jr+>Yun z9yxv(rcQt0i6feI;E3(fhzN<6&D0sP*p#>KMzEy1j8mIVC?mR5dsj2`gibW+6S|`4 zFd-{4ooE(Chvf_PLU%W-fh#tbE|Mk%YcddvqVR4d^q<;Pp8QpgPk- z-a>B%j)#pic(!Mez{ZWw|~+ zEs;~fd9oZY^yeuHP@u!CQSCDgdvx3*N6+Pmk9RxBjJrh3Hn(Xy$p(j^S*AzVF+;x@ zSye`GpJPU^_Gr738Ii}1K47=*vKm*Jfy`R{kz#bnR#y6rB0$X=jEFVhHrA0Inw7%FlhwCbHiIT5^CRMg$bXAI`PLZqHjhfp`5{>lAEnX$Ptek zsyf>2f3cl7bG5ZJzeFpq5i!*><4(GTJ#*<7ZsU+VhYqIl!g(=0cYACM*x?esNeel7 zMz+Nt)}M{}RQ5%h(ATI#^dWuYQgtK~`aI>Zn$qpL%Lt0)*rrHgT7rB^ym7g8V2pnm)aqvgyE8;UzJdW%5Fi!i>xuRa5`$s{evKAO; zbnUv_q5TP6n=Khd1_{jQ^pnp08O>3BfT6Qz-l9_zXE>Lb}^cR?;T8;yU_W>C*z;jS3ZDT>l4gBssh+}l=+_# z!Tj7rt;SFyT6OkIy(B9I?={}d94)oGW{@4F(x=@{Z^1J&j*V=DV>{p5#$g+cbtTxb z$-X=XUm^S`owp)WSCY4{7wxHGtsUOJ&voJ)V_`oLo=kCTSQ{(@%&H6ltG)@{A=x}L zbHVYW*;zt|314IAZJJ?VXX{w2`PwdUoa)^NW$@&p8HgZ5VMD2o=4^#gY&I+thvu|{OS94v#`FntQ#Y6^;%Z6Bk%jL-Z1J7e{^Kd%=@g)qlL~L*5XGF zov1(F2QL2l*S}`_0|y6XDNge8LEpFD{ryJ%uB*?NWDMc`tgC(Kz3N|9zS_yoZ7po7 z!12^)r%ed?7;EFGbu!Dmt%)3F+$A4}nPiA%zjLGO$jF8EQU-X^nZVm)-PgLB%0m=a zn>Tc%`n&TT+UtYfIof{>`FRxkIF{Et>*nI#if&o+z7N2ZSi z3tv-NpL9C%y@IJ16W@hj3Yj)|9(c~{*Zb|^n;38(Yc=#=>K`y*_5}tTH}30@i@#`1 znyLO8gBd^TxrWo<9b+2z(;1pp*fv53Di=AkeT=)1yNCL(a{E6=_U$d_BqkjJ>aR&3 z7+Y$ev&qi&+}R&RBRY}O5@S;%>kDm3Ak?SS< zoZj!;7vgt(JmU|q#}ic^ta}8SReZ|_BtwbXTFo*qPr3|^%Tb0=ij9K#@Yy|=x4qMT z%xJ~;m1v&Vbz~LKI0VnN9&&B4!ki_MX+3&ti%r-HT(~Vxfo2jvX_5V@F$`OM1{CAr z41Cu!-7^4i+p^D_vkhzZ(v*Dde=oF~?TNy)svk$l(lhe&@!6NL#xzUtYuZ}aBiFLy$)U65eItPD z5PEbRZ!%NDCy+AMi>}BebgRL0b^rT?eWa;Ny8oEuGSh1-?z0Y;&ct2&wWK#AgDu;8 zJpOaqsc2)7Z;GoHa;Epb*!(EY>*kpltY_QEPqmY6!L7)5X(!I6=JsApToJhrvaKYgseW{{}#wO!mr7N~uv zI!`CQarG5)GRx2ZpS5?01b;)v6`sHe<3j1L6x z#{8MrE?jrh`9{Z#q{E}yBQTZ7@*HP>uIE1#jXW?A=ysCxkT+CYBkTN4GWp`~3{dAr zgm)@uW4hL(Q^d+4Yadr!SEKGsIF01f_j5e@aXt4m0E_Y79^+;9vz7K|W%NE))aR6n zKpSkAEyrl}O4v^vJHuXA75F`XbZa52p3A>I;mn)aLENi76(YtHj)0!UUi(TmSM0M` zKk>{b^4DB1jlBofeLg3^Gh$<bG)!DpEEYU)%2^?YkO$C7GiUaSTgo!jc3SKLw^32 z6YH#f3n@dJfLO=vD2(9&mwqHWeEEwS<L*dtIla|)5GCr#P@xehs@J&C!* zh}KAFS)*8E{fn9Do0OQ>n9Rr|X3A=z@RTPvzDro=Gfi!p5TMd4LWgx~zwnHGbzly_ z_@AUff3f{PO}n|+2|j;dXHA~p_5~D;jQ86?cVqAGmDO}!;D1ZF0H>%p;P;k~mO@4Y zS`;GH-vTru_S?BEh7#!#+18Pal?XVpxxS{LwJ?7w*Ka)2mrwHWr7ln!n>QWOjokpf zp{wn$WJRt0{48zy{kh1sd^xr>jke6UI&|01Z_DeB7rt#@U=BO|D4B0Ndh?>g@H)TI z9rtg+LvZtnNHwUa!x8A4yvR4aDqoB(*|D8&i;Y~xV%vUhpAWVex}_a+trtmGbKlaO zspgs=<}&7EGgjJ{i?Z}wE3h5p1pQO{m~{36;PP1CkQkC@9^Lk5rC78eo_0N&%RTn7 zX)|nqWSfBXtN47N-Q5{j744turVm(`E9t5as@=@}O>#?%kUL(u{(GwS`gbX(qz9lM zlBec1#n|@GpAI7O?~bo_JY~PVAEjhoNGf#kv#EexhVA*5_tN-xJgUn%@eIN^3Hel| z=M9@{?)O#a$@C48K?^R_`PA+%B_8H>zerDbW{(NliVDqh3@MKUUVUqe?c#bmr|1}u zv^Nb{rK`Tcfs36)%7U4uexW=*3f-!+;8?=sseh9DjlATC&yVPX(<6KPD^KHtHiF)u z+`aL~?su|_{!W*T&N@=IVw*SbHo4lTt$q?1TYbXs*S`*7P1Vg&wpRlV{`T@4O2$Ix4{{6_q&3m46mS-MM+=R5TO=CC0FI^8( zd2Y*iVux=>bnw;RjS^tbd_H!$c+8_8rgu)Q>s5P0`8S=JLC_?y$b9 zmNniJbnQ;Q=S!;#VaziPUi2;BBZjK$(9ewpZ|Sld&I^M2X!zln*~}=L?Dic0ir2E& z1C%XDBY9%Es=giDnx-C*iJcubon;sX`QNHH?0{|fSPl03=s;+bI_$931DUB3&)SS3 z55MuijeA*c?=~tuwZ4#ryDs>6LuoukV9lTLG;JWsm$K5OC;4HXdM*!hIKI_24`V$H zPkT#E7VwdPoHsW8orvEGdCTAQhv)z^d5OCwJ*nkt3hx*&>)$8av+jMmYHhZlG=x=$;=|>+a+pcABB~d-HeK6aRFE!fC-GIFY z$^HBmZe9v$ASF}Kf2meUSIC`+1>*X zZ*^L$lat=n^x-g7F#p{DRoUCKJm#!3lg@|dZwbdqrM8=NI`D~MfNsvM+>T#Omq9D# zJyf*s3){y#ySDW)t=*an>Mz7lQJ>YF<=_e1-F0pJSH@8MArJFH(cNFBnf;-RR=vK} zIoj+0B%z99RNKPgjD1-ttUYD_S&@H>v%AE76{&O=zLD=z^l31`ZAH6r#^2rAfR6D6 zO$ty8=yI$xM5N!>{l3SNvHt`ypx@#H&#Y5n&Y*ng zos}=LG=_gbn0RSatX{@^(@l-V(Eh#lc6oGtc`5g-qq3c!Q}s-f)nBzkZZG*3n^eth z<9BsB*L{=k^o6R?1@v~hvXKX;b^Sfl;o0a!Z$J0?a*KVqL3*H~ML%;tx_4}Cbmc`% zsFM&X7=38@QmZ7je(uN^EN4O90==@a35=b*;F)#(O*`w{FL_2%HT_(be)}A4F82dE z7J2P^d$z-5l{d5eYJ;Cw%WKL>KOiyqobn~#nKA6mCt0?T=TNR%Y&WkDRpyo{qNw5c3$dX+hj#Lwr%Y|GxrMgJn{d&kJ@E^9;>l? zo|L9stivG`iEoC?^%LAQa4ZGqhk5C0iixbZW+jUAoP#UzFO9SJ0d5<+)+~=T$uKGkUO zz$>kzD8K$W=GTq?ItHv0TYYUcva`FcLyk^Q+=`{zhpzsD-GZ3Zw!*$1&cpJXJ)dms zPh-Q`Zss{{?8I7=j4_Z_4|MhU9s}hw43+haHuQk}s0jVT^V{Rr7ekCSUu0U0FaOtn z{J%TLNjFDX{U_XnI)B&O643bg*VH&s10o770?r4fp7qU}#|;1@D7}reeMLRu77=Rz zC)Sjymmm4osMJ1!cCR6luIC)_#=eTS+vI=Its(-o8B<^RPl%p$CA-}#qAcaxMEGVm zOL3dYCsBhyr7IXZg4( zN~sQF{99g*yg0s*7wn&ROsd=*FVUHbt|s}e$>b^DP{p^NOkS3BV~;fbdc4&h?Aj0B zv@v4bF|xGW8>j~y-kd$McMkNRAIX`+F*LinbnyxDYxzPaLzQE+JO~;5x!;7!z<=p` zzGckq;;Q#69sTnEJ6PNu%I&g0IR+sWo%ECZ)o2TFM z2e-c7h2oLc9T1MKmcY^z1g%O8Y|L>oqLNkCdGBFF(ZFVFf}?syb)WIZW% z#qIZsx>zIoEUfckj3z0c+ruN@hMjI56A_NUckm5#E7{z9C?X!-?iadqe_Fz< z5hW&WMxSGuZ}SwO8|&dnU&6M7?DP)PWc;96=P%u8%}lkJqdZ)C;mUhQnOHYap+2xS z_)zRPP+m2S(~ZIG_FS9G^90*1Ay?R+G29-Qk2CQ%;$Pqoi9W%I#OB>N3WhTpuavOS z7|q5{##kI-BqC6gZSd}lG#6~vA_CBv^rzcf2_2(BJm93~O_AG|I!}m(*yE7-S3w7x zJRXnyH@bcUKbu{&-(x8qw9j}m>s@@wvyIn1N2=+z-9&rRwGcIYjnjQI>WEwQI5O8~ zQ=bi0ME3f~Q<}b%mgsPj|3pNhq<^wLp7eyCxZcGroS*wy;9TGVk|nGE`q$aq-sc#o z$Y8yhIq|`WH3hSyPyE4h9AjO_7TezWjgEgc?DUm*%H}#8f8BhPke`EMl$c0F=K(#VR}NJ#y)uarfkMir1&J3DhA4aZI>Kd0_L|lzj42YzZ%gj4EN_- zv*RFTZUb+bH(v1dB9nd6;rH#gpHIPVrUNHlIo!V5d(;O5#tx%Z@GaS>Q!%kVvb;$j zY%mMol3U(Wq0+Z_plx@ddO~4`mtz=v`)oQp2GJ! z+WL8pd9G2f&2kXQKr%*2V+D5J=E&sMbomK({f_W=&!GezW6If_SFAd8gJIoiPV>H! zP??B$8*3lfXUsdK?h)|qytc-{I@E}bwZuM(x7B|X-97)X-+KU#pWUDJS@dF|epo~w z$3h-y!LsKAkQhZ~EW13hP^?2`dl~xxj+X%|;Cfez4s@ElE;(ITenxYH=wc^C8y}L^ zsS(#syLz}0^|>86$}lGD^W)luBo>M>mDrPu3s-3_30J#c{c}F%i>Ru<({CZWi;?&) zQh$E(8X?*~f3I32_jy;B-8~JL&fmN@662TsR@+M~>q=)tc4tg;M-4wUMO%#Zr2`v- zu`v8TX-+!csm^oCQ7d}PQTJiponYnw#-+F>5_H!KEF-A8`EQ)$124>&Y;Lkmhi@N(}ibQ0FaU@^I`owc-BZ2+5=oReO-hCBG`y&%~ z|0G#8dA4&IpC-E5%ADq4r*l0KFP-cgu}=hj#ozoq@vV&$j1lUGi>4HHdDJLsNNcfB z33JCDx`N*wwnV+&W8}H?e$bpoRE5AurQ9{Q$KkqsQd!3Y$E(OU(jZkwXCDY~>%v^I z4@42ZXkGT8a)YoMt|J+a73dePG1{2e7^F1?TbG7p`SDO1`!JDNlWw-CF>}ns?WskF zNq(m+zh?E@0ND!MAs;g}8eq88oEHpr6m0LjlT8Q(`FAizi>vDXeb+Vsci5lW)HRVnDRiOEdY zrhJu{Ese%w0&>r~miKiMuZX~5(~ONbVAk%gIp?Abeh}ELc zc@OVck$9}0kQ=^0Eyg0&t))g}Ui(i!w5L!bVJ#o($bQogM&xVe@Fcs)=K#H`6V5aJ zyS`uS(-fVaarWQ;`JeaSUw{2d&tn{9mCyPE*F02WjX(Bz*BT&29txZ+tAFud8HTm8 zZ)5iTTo^3*ucLnGqhQw}f}X8$$67a+OLeFw9Lmw7tX-Rfe(s;~CkKULUeGm;+dTw7 z&p00+e9n>AjomJ0J;3(zLuck}zsAnU@w%IE{UQagx_pW8%Ce_Pe)$}Q+246i0&y|s z58E(=u?0qkSE2_~vYR76x2}!lKVwNl@9FHAHtV=nADkhtH>-m)GV2Wxo5vn}3fJWa?EeTsxWO1i(*PkqxLqC9 z7jpZ2*0TeN|5lT{M`u**zNsjFuCQGtd%W>qQ}i~Vi_g+2)Q@_}@ucRN$h@K+*-|kd z$h-9=_L)9O9&OxkP2}D~7~wzKSf>Q~2z4ammWjL17m914= z_5b|-Y3-)3Ez(+s^^ez=IFc==IFsJX-v`#06K*7Yi~CP#Z}FT4@~QDamHYUI`7AiD zF(=t>x(*zp9q**~p?{FkdBf?wF~V>=ZBz}LvujVyuz-v*Ht1)WE)i&(?QZ%mNG z?C)ls%WE33*5O^;{Lb_U>4D;#jpb)Tf4JmqKc7>K8snMs6v>*u2VID`8qYl9xeadb zIF4#xHP*cBuhYCacg#54@VCir@lC8gnyWz=hu08yn1~}zn_T{;^{YsL^!bf zj>e8TCWU<|>-(%m6Rs{vHLY_wuZ-b(;$CAomM@f%ckqbWbl?p<%YwhV^GEFeUg>D| zY5lM3RxNwtVMphGYJ_$lzBJ}+KgxO*>3B;?9#nnrEa+c$_E-4f^Zh54WA5~GAExtQ ze@LaCF%AB2=K3D9=$>kccU%vHZa^cJbJ0_XxHEoj^j+6Hg=o-Nb9!_fr>d&bmiyU!`fM_LnG6eXq}>y#H&xw+$lFy$^F^ zbnx$NPZkzhz`mR7q_g1G_}s@)bbqx4JNc9~r32_2G^s>?qvuzKs_UUV_Xq#B^))?uuy^m^RtVIX!k}YU- zeK7j=g(czjQFJ7=v+CQ;ySMA(ke@&D%7_J2YbU*jdbqtS@u73AN?LaGK0QC-qMl7g zr`Kh3{dPOIX$NK5q@`33ZDbvg>BRc}D7EEDzKgC2KEHC~A)UU7fu(vHT0VW#Z(e~{ zgYA{tz?OABPET61rmzljMtPW%9sfaFp-X3Bo8yFIwO=6a>ia5@-7EC0#Bw_OEFMLX z<;%w8{FV-Acb4xz$`a}AdZ&XszY*K%#;Dc(&<5-1ydEKcEN7*EFM4_Y(RR!YBUKDX z{RR8}M6K(3%s)ms(8PV<=RqeOh0-w?hLwPjg@yt143S4%5ZHz7{j)gyGwftKw_qmOjEm1zXKPdCv+lul z2EBhY{=0K}bsgDob1oKhi|==`G`LTL){4GNw@ebk^M*#YCd)UG!BQrhnc?s2c=_coX3vwqmx0H`M{$9q}S3(Vh^l-e;l7Mzc& zsy#3F@m1$E{H&dhb{UsfJcIo@;j#oH-Rk3Z<;9omeiysUwqQLgxPt2B`Eap-Ay4fJ z&6O>^@C>LW5;?fw=^f) zxz)b>6Ma|04-l)}tLKy6FdNg*$w}w8Wpx(VZHuG-8`GPOz(cV)f7mUmapkk}{l{TK z{IrwfN7}|-AB?xWNgswC#%|nRimmDJTma6=I9vf=SK82**xKo07oXGJ59xKX*C)Mh z<9e_dRAf2U`$74$yzc7VVJY3%nCQmyScLzRoM>uDW{)kka>}#$zR`ya-zVdLF zn(wTE%%5%v9<(e?-haO4_$bbf>Z^-*kCEc|41D(>O+ppY0-?TtlXL7HBSv z(Qoi)=2MH(Sk^vfg_|mZX5HyE`a24ZW`}ub8~@W^X_JQ{G@cC`{NwwO|{9gV2ZZ3;&7F`kmW((yjKM=N9W2T=NT0@|?aUmtP58k8Lr1>^Hyhnw9BrQP$0NvGP6ZlKG;a zlkIb87qjisH{(_HlPv%Hp$wp%G-m!^O<2j!jif>6Ty^4qt4UZhKl{jf7@lbW4=@ihyu$JZkT*6y)a z9%Iw#-=xkizS-x#A|rh)Gr?;Ya`Wmut15f?8(r7^M&6jur6+5Lum8vY_a8c6&`ma6 z!HKv3Edexe0}UJ$tp=483ul+?c7Mc^!xrRPou&Tg9z3{B=%(?ch2c>*gJjIx#cn0K zej}Yqn_>2E21`HmCB4z%QDu&Z-o$lX&+f=R5(e0A#kINdh#eppHfBinXWb;e`!YV= zL?iJ<{qAtiMb||i-T;e^hte%3_pK*_@(Vyg@wStQjCcrE9A)t5?SX>9MG*U9 z-rt=OQ7GLe&E?^}-2`a2fcb4*)(R<@pLN634y^D~jx@kgCG7WK|N7Vcmv7y)#B;~D zgo)F8ruP?bn6W|L&bMc;v6PW+sImTg4_Qu_Q3^gClG1oJqz(AcRJXg)P z5#{#J&;#~f<95DsD?2I0s`FseebgH=B64)T1=kO5SW&AlYR-Qa9n5R?FW<1;+|)Ke z51=zt-ovfJ^Lf4rnv+E~Fdb}jW|5=kTpxG8=WSmfxS<>Xsb;W+2Sm+A954rZVniVu zg?xb8=j=R5=f{|$&9SI5M&G%)<Kk=|8*LkoQ{2WIw|sejP?xRzZ2v?;4wLh*;dl?YmBfBqKD%uj>-N8>iv=Qb z$((n*$;o&s69)7JGu^kX-*cRFr}j<=B-7;|ifCv2>bH9RNv989-CV_#c^)vh3nC0MF&3V zW*fXwZjO1rVQwy1fgHQO`B_+LVH%KI$B!eANwPbRZH#PlV)Ei^+=OcOJ8pi(+cq)! zM7oSX!rnT@@_avz-BIV_*rJ_2Nq@WjTfUb?&iqZf)#@|E$dTb$p9$#!=B3cd+5Sdk zkF1NiKKrlD3Hm{)eG#t*-}@X3C8{Ir-nu(Ri|1B_`)$cqSiR9snlrq4YQ*hf zKOTwej*fOa@y zNWHN!^c&7=)_wE+Y|nF7KJ`8a7P8#k0utu;zt-*;DPrXuJJ|S5JQEvJL1)DTXNRjn zKkR&+xP3GFgLET(>mRAUf~`o-cVmM-%I^J@y4&`nOla#nnwmzW>4bBUwuF5p)fL(M z1u=yWUTrO77LaTckGy^p&jXhxd`vefvM<78vWpzRI5go)LClo>*pRdAGex95N$q(Q z?+}>P546Wi{xtd>`XuDFv$t{ME8u-ttH8dYZbpApNCw%@4S5V~<7*aBH?B$W`Wa$z zkvvztI9k?ymhQFs;-wN`kMh*n!Ai@ZdCvJck%x$bB2FWI&h3q4rx{1voSW{n zXcD#tks@_9Hpns2(#fgaRX^H6$7~ci2q$Eky7x0Nv3y*@R<*O;Rd z`g1JZdK#at@^Sm^yumf|cZ@INb?e`;#U@(D&gFcF-)L^@MTPHpRSd9-jqz;HbYi}3 z*D)LE%x;a-)*_PcgZLNH(X7SU+%2=Vo`G$H_D!b^8Z%p$_xv;#fwg(lP6V-d$o#qZ zVEUtIPdR^TY01saF@~*VBt2~M^+Pu;|Ex$`Huj^@rB`!&YxT+;a<}nsS)MH4k428R zb*7`S398$OCvS)5!k*^H@Q8&GFQo{YkjLe2$u~!^T{8gtJlg8b&PK;t!w_^UPvG2*(}-<+S<(adhA3mu_-+lMus8oUsZ z3J`~41lxq2U@g< zn)!SV{%FTDHU(wv-|*{tZ|xHfwscT5jK-iRx_N!h8nE?Y#9RZgM?`yqs%7DdG0M0& zIlgZ@OC;P1c9$`j>w44=-bMB2W|t9HiH}*vY8?(WIY--KI-h-*&yg?5OzXlo<wh zL~-!`eD8bt?*Hb913R3J7z}mO_ICRuhp}FadSO`pG4kHpainpXf1|GMkXDL#;5Z6K za16j)KXHq_+fAW0iF3+@$)lpr6?ETYPEpo^$53uZv4hpO$^I;kCC-7ZGk<6f`PO_( z+X$Jq2dNp$;eO66xAxrCdb;1Z9uzv=LZ_cK#HWuQbZ2PmkET-hkUzyilp_V z8=bVGye>EN}I+pAp@58Fw;Wft);qK1o*z5Od2jy*e zJIrHNLFkha>-5$x&4KwZv;I%gmDU%QTgTlJzKH!hovQ%7oc3#7chA2CoBccg5BS9< zuWVOwLt%#-laDf*{hYbe)A6`I0j4|C+lK?e3xx=cSzQfw4wE!`d|;<=$(T;5o)3 zmU!%KA7;A_wc#1YO1wtm?JXXNsEnB&8;gm%wM30#eSwiQXJ3gY*MDyxi*$6tq${6c zm0P2o6O&yu;5jHfTk|m<5nOK?p#B3x8#M<+#SNSta(&=F?WLn>EO`!NZq8^6?3De3 zb>~iAd{2Jm{I$+4a@w7NGmK^XvO%}eoBI(qBIA6+!BeLjLKK$~j?T8!&8%O^ms#ae zpQ`&d_G~`4DB|fXoFI<>acqP(*E=z}G+Tb>sshS!EwBcsDQzV&e7Bu(KydhzEYL z>Lgc>I`~L)J#!~JI`SDQ*SRZdT8h>vLiLUI-!>LwWZuAho4g@`UuTtVU!0$Mm+y zD1AV?l>NJp(`k7P`xwte`MTazunM$!k1?%*6ko>sl>1}J=i1i0lI~X+hPoc@_E@#9 zQSzCaAl&6Jogq~fC0$o-MC`*kR?_fO?{#=Pn-2EVq8z8lvl43x$<8L7KOW`pha*5A zv2HAjo&jUWd)In0R?(D?r{4B+e*N`Vs>ghzdIru%59-&j3BJ#&Ngj|_vxcyKh8_0& z8tZ*F2dVWj_Y|(V^79v|y@&J1$TMrtPeC`^oHDO<;#}+mz8kTY8MqpXia7TA5dL=E zNOH_N*!mjhopPi-r9Jm<{3Vf`aWAhA<5{~a;eOfu{FrBdw-GWmd?T#L?3&X-w4!c9 zEM>g5UQ4PJl79;l9bMlzNdAuC-+6woeH!-RW6gZ6T^vW%#a2ip5coF;BRl1#*$)M(>4Zumd5<)Zmq)UES=CZ@1&m2BQ+ajuP{w-I{H z>_drCyw()i??o&qLRekMj~w+Il2`*1?<>~JhSlufuTa*xAx2{{s4+=ex|Ib)9@z9`wG4ycy8G;bK)<-~Ysls>xR!1@#yv>wukh3DifLbYf>xDQOXJT#|h zl$z&%lHO=()1X;lLnvzw=?0t%C@#fzrg_L?-2;WLt}dB!9;IGMjt~pJz?d-LgbKFw zjA2|x+5S)#W*@$rQ|5`F`+2NTStbCNY-qg4F}n@#u|ItCBsaJ)HJeg-p3)I~X5i~3 zF}=GyyQH|#xNju#a|fvI9T46D?E>64Jcn~o`4H+Ak;;ykhj~`h7zhB2Ii~%le^v*3 z-E4Mam}3sIheS^K&HZqIJa#$;7}z@1I36hfm`)z^)Yd3qsqG(jL;AV)_c-S;fJ$}x zLLl4e^}O0Ow|J=@D^vPD9u3d_J@8&$$XYkE0X2ecjtta8caBzPZ{=7<+LTXvkmV?d zo6pbs;ZyEfF7Np_4)dV;kyW%ACzrzq*)`m?ORbaB$i^;T#z?n>iO6@@$8pbWB=A83 zKS4vbt9dN=*7$B=YR{uR4+{4ie~*VgNnO;BdaB-x>iaQk=Y#XijO+b179T5I>dQkr zk}P#;VxjMBr`7My(>K{S{nnlQVFDfDzD44NzzUs1?!V=c!u8)T=y`dcbn&Ktth>@8 z=aZdob>e%ndW+6HaEvt5-}*rCYaN7A{ep%u$|05M2lN|MR_6XArk`vf>nL^iO;(#O zQs<)R?)0+BmjK7O6q99`eNb3fS52ab_;?h|^qqa}v0?4wlMiXW4EjLcpDEm>jL|yn zQEoE(La+#m^hajugKbuhS1eu@GiBe$t~~!nI-c6EbzA+&i|=KNT7))5 zC3#le@Zer9cD%s#yvf-U-H(aqWPCU0;g{Q?GbtNgw=9hCH>OVH4<6y&7@oIlAIHKr z=hQa1Ay0=z@cFK8){#$RZgh0@jxFDL&;8$%bw+;IT!zxoQLr4nZ|T8$7Jb|=*2SGa zD`T|sfWKwKw{ZwawkW5})m>lE_^1z-Jl=C;zqi>&ZKu#n@@#f#gSl`F@gwii(m;3@ z>cRJAPQ=Rf>&Ar_HZqlqE&J5ah=>`-BIH2YvR!g{Tbt|DSka|SOW%+0bY!hBe;D(P z|4{3nyzZOv-Yol@gUV5TwdM53CyR9LXo`s71~~BT&K_*|9)Gj1fQ=5xJaXq*I$Cy@ zCD>d;`z$9sw=4(SG(gFcUe`K-M;7A!0xb&g$Pn4BVG!N; z-hLm=SUSB}PIhEG>xErD6X%gZ3(SGY6P_FNVdS4BO?H?u#CixAU=($hYV*CvA$j>& zA9a38peJm@wtQGyda=gR=x2MxecB{nXBOrW33=dl6>J00IC1Uqx_14Db*1X)5Fp_9 zC9~ofN4AX0{dlswuljT3Lp@u4pd#Hx%f{pP-;s6O&bMM6i0!3v*oO4FQsjF*5igc* zS~?8zLCjZ{tFCSz^JByz4p0P!t%NQ~F&?+Jp7cYPEPrQn(k=DC(}o)uFPAauYzyi! z9}nh*=Q-H@-u8{K)|*WTyYWeFxwJw5hEzG-(a!$mXl<$S?Tda&@;#uO7Hl|P^kpxn zqhMV8_et_tJ_70JmD;D!vAOFp3xTF`SQgzL7yZYieo8X?ms`i z2c2}DeWafl!@0^b^EK?ag(#pLl*XZH$BT(RzTcKBABFAYW)hJi%Su%ffLNqLbj=iN zH%CX(-&n5IIr^Y8K_@@qx9vOhb5ofdRngmY`=$?eWG~OfPLnQXe>K*j-}l5;g)^UD z+`R0lYJeZ0#pJqnA>*2)-&kKX_GS=G1s5p$nT_t(r!mIrpXKzQraA}txd6RgIi#=6 zuT@|DksW&Ad-Gw}5BZ~nbN>fv`nfS@W4vG~Z%#K;twj!tUkh?Hn0}FRMvY}!!5%T4 zn8GGx`Q+5u*PMSp$DNNnnt|ELN5QD%U)&#mm5Vq?2ZNlaOTd_3)uIbJ47aq8j295L z8;^Kc&wCP9)Giq%5y!!e;u(0H=#^D%a<{iwPSX1J=C!Hci%sN zslL#SgHhX%Pb4qapOl3t^MQnjE*;5uOW|7er$EI z6`GH8drnJt22C3K3H!l|l=S1mB+M~Q|;%b64dAlE2hrpFH{g_>CYWq z=@_5wd|)4T<$cbT&M^*LkM7SC#u}kIjaVN2^&zoe%k(i`jWaaT^lMaIvg60iFxPPi zebc36FSWxsx$Ynj#znGDm~;E*yyW{yZflv=W^G<|D_^Qnx{8bhJ78ruOznhZJRLC#(8k#Dp(=%%Qj zGvBamH@bPfbn8zt@=y;mhB?ZgPyXWF(uX4#z^!DX8FReFTC_-#q{y_lqFjT4^r7+; z6VL^;tv!*dRL|4rrbLvW`b@Ff?R=vF+LkwUVFBeKBLhr@k0a^U9lJ?c67^DUM)YVc zHYepa-u`A)mOHzJ&u&EaFYr0~(i(q{$U}}J-Y|Zp`(_Kf73jz}P534m1TQ5$ zamMX_HrA+5jYiYS_CA3ob5>Onzv8%>ykzwkV|o3?+w)M5)EiLecyI)eUDRNO}`PRCA0kB^N+e+s}Q`93!hLVh+8^rDNw zmqyQ(%Sc7yd~wu zROkbJxN|@>Q`Gf#>*f4AZxy=jI7bQ~UG2P^S_!*rH#ZjDNw?|+>3zMN7)OM?$v0^t z_ON{OeefDPn!M0tyrLR*0r4}_i1qo6jm!R;E>>zc>Fq@)jyc}Ye%U?rZJ=Qopiyqk zyKfB>DK{+hL1Ej#+THZX(I!&#LK`rNjUu}Z?3YFRUL=-CnJZzWTV)I@lA|&?eQPmF zvaBVXOY$2-Ri9bCZg;^BBfjy-BxWz{o&D z>g|{~Cw+ZO7auvoh`@()Y3x#eM%kD&Kj*aQW+uP3xp?FQ5*+cz=91;s{@41`C!q0x zI5m7H;~BpN+x0-qudep-R(hQK8>5|g*e=T$MuN?HAY-VVeJtGSWAqaQLPoRa95FtM zXDqbyk*rUKeULY1AM#DFtXDW9*OLvzh#QhNA40}s&0(ZLu_!JWAybCggOEexiOW`X zw^lN?GM#Mg3XB!5cg?r z&*8V>YilA$uTqcPf;?sZsre$-O}x~@bgaPQGe<%77toK;(L>4&zJfa8Om;0{w^4nh z8w*jiC%%w|eSEu(+LGJf@&OOnS$NMjfN!lY^7-qRJSDgL|Mri~{$BmbH>Hkz3qADf zXRR&9I&)r=j4?iMTW|W*Fi(jF*YqEGBkRoYmmS-k7FiQ85=4quw5!k(&Mn$a;{jX0 z>JsC7jtu{ES`??eHVBQZd~40(*I%ig`k|hrdMrQN`;g208+CnHJGc>ft!JVBKpf(8 z=yIFwquD_vykkqwCWlj(tT{PteQG2-$9>|yv8>xW!!+qOY_J7r->&Dp_TVJHu0Jth zR_DZK=u08pyA2^rC9WTJuVS4#F~I5y-61{~o^rQi37F(Oa|*et&u_(uv8&|D)n>VC7m zZ};S+Mh3FTMIBzabufOgG*;AN*bBJkXGU=u&<{;E(&o|N=8W&y{&h~f6lOKkEtv$yigli+;v<7kWd5)lIlg<(Lc36s|nPa5bNfXT#tj(uZ zQP#%0KZc(*Q9iLPi{j*Xnb*1`e5-3suJ?Nv9{9--@=%A^ z*jWCN^bm}tYKqQ)<&3mgqp&_?xnnz9BJ+^W3_G5AWo&eAx{X`y)_U9U*duda(`MnrBgoo)L= zfq&2*#rU!R%R0cLyZ|m|KEbsaw}U@9@|EFxU#nm1uQ0l4EI2~Jhazt=*6|3mEUz@i zHA>s6kD@lAeZ_IO=r8tmvVCfov0d2dz?^882FO(MSJn2=a}*1V!saaj|C-&ly}mdX z6?2K_V$5#Ks8J%!&OSvd13`2gPJ@Q0%{NoqfMmvwYr+px5aTyJ}lpu3X} z^R+~54LU$?M#84EzfRE0B-yZ2Vw=)RK{cIxg@!7Rq1Yfk%hBHl{p%??kw1x^eYTEsfV_Tz`7%A+oD4fUmIvtjSms6Y znxcv%e51fW(=N{_<0+Em82JpFH(>vvb>9)llA|6nZgnp;UGx^6^LkgEd`>aWXY^-d zVlIzV-!5V$`%Xgr;P*ZU%MUdD$2eFw5%!9IBj!s;!ZM77Mw+uT&eotVKePYIy3u@D z*L8$>&>otcW*i-BfadF%PPh6{2eaLB%;OQBL-!f3#)J{1S0`4z*?#{0pEIAGje}16 zm|^>-dpN^;a{KL6f4?4&XwYmRLBt2fDEN59k=kl0e$=8jKjF)XLFWv|o zT0f9OnlYh&UHveP{T!D?@Owx0aZE=2JO%WPvE69ok|heyWq3tW$1wl-F~2hJywq0u+w$np&coFTo}sjfAKG0Jy1{EbMg z6Q|zE$jwK)n>l2BKC#$ z%H$8PbBm6Bd~A+lGuYl@f6BL5)OYK%kD=1uBJIf$3iV9$;iY6xU1y=Zx^S z)#K4p@w*?@@=b|Hp!M@1bDaBcQy}W=eChIL-vbHRuoS`Fb+DH8!)ybl{;um)z`3g) zTZgjqjg}k(nVcSDjm5O@jKzn}h)uFvVN zegd;LM^AcSf-l|_*bu7#zwiH0lrvXk6L~Ao{eYV&6y9r|OVlMc=1JcmbYZgw#|>Xlp!!HJTRPa#IaXQ#;y7A^l{POo^o{|W zb;64wPW?kt$@mOE45&P-B_IAy#0e4W`C2OUna(nomY;NT`ghU~l5IvjPM}FR58FoO zoo|hbX9sy=TE-%h9BZU&Y;1zpn;&j@y%IJHSKZvp(UyLZ{2@is$va)#+f&Gp`rd*& zsq}FhJPJ1Vo_`GKFp5X;Ib!22R|K1dAcuWdLO!*@ZXNwrcLmHD3pucsy>64__=5Ik zeJ_1t$CCSbAW(lw-TYk7=mQ|MDG9$wo(0Clz6fM>s3yDAlcfEe=v!B^-4W4Z_nsEF zNDm$fR7HKLrc8vf4^)(F$P-2yz-+A#C40HL535|` zsM+2^C*~ikM{+$S6+16&{=nbQ3GEe@9i)T9W*Ut{vKkM4Jnip+FPHqnhRc!l4cFIF zI-tHLp|7MO?c87deA11{Utz8%%9d_<^?4dQx+>`3uXj5;ANnExHaQI4DWdW;W|HJ! zFAuN=pxKAXa>RsY{)#@08Ey9ullxKD`O&OxjJ)xGp8XBzSf`aw>A%PuQBBqhEiIs% zU+r1^5|a&EP<>7V%7u;{w7@OWx4Zt4e6cClpZ)l%imz3OG(0x@ka>yw+34P+!zHgN zjQv=AEAKpKTOI4oJk0INxWg0)%Rr?wAFeO86${R%V3_qQ z;I+SyC%Z&N(*-GE#mBZ^$nTweLdLe=`eK*)x5+R^k9bQ3Yi;rs+rO3L`@fI&;i+Dx z?P%6Ubm>5&SLH=dh`<^}v^&Qv)~MUDy#Xgwch^OF-KX@b!&-y-?ET0a$cpU@I1~rG z)!E;jE-hmRoCe{N?w&l@gbjc4cO13FN zzxAb_vFQ_KD!P?1XPKjyxiQ|~)$>NLHZ(#dE?>v)!v$#P`uFEEXe@ZGv)k7hp3ljU z(aXNgv0=F{($wvlCP`iXV(uh-7+bHp_9yR-{g6FO)uGIH^-0-}^+P)J@uu$j_N7jy z*6shjo^R__#7@oFB|D9CEgSpBo%1<{G8!D-?LDeyd;cUaot=&MLT3Cy$11+3J#lLP z*scrJq`*fJ30VADSHG8IxkBuOc#6lz##9cP)1`C=%VQ|xj#vH}Pp*20wDqDM@iv;d zl%>%bH{S=5Z=kN9=SXA6O1r84}>0yktG2wEiUz>xR~M;W^pp zHRyMbFGfSZY*Mbr{+7$hI-TFuroH^jRwpt~aeeFX>$+@gml7@j8p7U+ukj||%Je4M z0kC`K7b8D8ZA()mtTr}SZH#iRiSa?Xgot(F(-_T?Ue`ZKj`3CH4fA+w4PRs(3FT(S zjh)Iob5DUCG+xi1{PTOS?2Zgn>&4%XI&cuJ()XQpz*91v(5|0J#y7RxKGk-s?cmqW z%U6230G(_()VkQC>P-6^bN^z8cXY~ruHKT#IoIR#Aij9yjnILn+a+NFZg>5)@jCTU zS3PtfwZBb7JO6u7ohaA#{?=UZG1wcvd?83|?Z?{Wx$x(goUX&{1rcp{fq$c)Wc$%Q zzN-CkzrfakH#)d*e)&+or?2Ti%BRxLG27RjUU@xA zwSev$F-PCXbjORCe~YqAINY8M>3ItC%syJZ8C!ir=d6Z4-b5UM_0xxYQIUMxp8N~n zZn8bux0G+uga@DOU^%Aj5y!V`N#DqlSP)})c+Be z2276Pk4EEtJR8t%rJHeOk%a@qpd0};-uC>1=N$TPM!K|nk2?Dv5xNvXiHFeMUjOBN+A@cdbsId4 zJ`+9N@2*}tDG(%I|9pNB=&^$ZID4ezUiJtjqZn`j+eo$|hE9 z{~rEljses=*DOqcvwnC|Kgo`FqxKgC&%M=)DbJ>Vh`M>_- z|IV?s+r-Ye;S~$qx6fEZD(qVIs+CnY@v2fU+K_;_{c}H$biB z7KM%n(V$p;SFZbZ5<#UH^aS0SX`c*uKeI30;|qOFe>|~#EE+Jf&-IRPD$lpPSNZZe z^c$+w`+Oyi?q;mx(Vp(xOc0<)H(VYhqTb9%m;uNv`a}l?UFCwj9ZMc?PC}tZI@1lx z3kV1qg~hY>dq!Q#w^GjMpG05b&(%-kp%U$sZ|Q{FkBlCHxw2ahPBNH&y8+LMlcDK7 z-&#|qdM9o<1Htst53LHaQ1PQx!SvLmH~Z`fFa{&lLR8yc1dL0Ion2AZ0(;Fr%u@-Y3h~k! zi_|Z;p$+q~4)sV7Bv%59QLHl^Q`wyFqLZqY2u?nClu|#zZgzRR{xe6S_8V1Uj{UHb zK*V_^%|LU+_L6;;Y5(d?RSNQT=cikWB6?fKUgoH7dCi|A&&Gzc>EP~=dFZK-V;h5* zYjOET{`4E*yeg2@Q8#-$+G)DTMiLG_8ePLW$b29tY&JT}kML0pKN}B9(+BG-N9>S| z-22Rw1Ics=0?5N8Gh-%>DiQRYlAzD2soJ=4d1UNL{VF`XXsLE{R&FiA@3}2lIz>ph{&%k z4o*B2P{!r5tw*Y@NOKFA3kg=wcgEP6&UV}_i4M$X$>=_t3z^s!aR0YsgY}rsb6uVN z-5Gs!!0osFMNVu#8B5u3zE#(5_e=d-V`~4Vj+eH(e2go6>)VIr?Y<__`n8v0>`3lkH*yfWB(95>tM61 zJa??`Sk9d{j{XMbgYiGjq4_lKn^81zn*)oKnQjRs`(^#WIWT)!Zo^iEwGRJ}_qn@x z3X|#G`R`e!MeebPSw^JIvu!XVZPA(d7yBG1%eUlyv!5H-$|4BmwF#^3aQU72{`%Ly z*6&zL5!qu!l>cduf2FyzIkUA1TdVL$Nx&n?X0A4vhlTLE`7o#JkA|E zLlFdi09TtXS{?HGW31+L)V=vuVpz``xzE1dtdiykZ?&CsV_3*+nXEErituGT5UOBo z$2x3y;LR#a>U?2`<31j3X%cl7tYUNAulW~$*zl~~dh5}|*WB1Tl<8)`JXl}cTHnhx zt4BVt=<*NsAy4cukVniK;rAkDavXe6)Chs9oVL6kEP!t(fSEaG5*Xuj`{U%P^hy-8<`8n(2+owqDQ1H>y zl6k+adW>98?hF?4e&E3f<{2xObo!Aa&nWd_=3D%p=G1U^yzl4?`?qwk*#?uxwHCrR znTzy1XzBE*<2gDxM^oK>>=pH7-O785w$AMI9}y96Ry=i37dd{m$$NVu=+^mMd7C&_ z5_tO5(D_IB$BrErzAy^RrrvgU?f)p^&@pm^_D0rXZhFkZmu~TTF3ZtxidJ6ye`9Id zM{*2w<_~%e51(-3`Yac|JGYnTUu}p4`3-Nwcbp<5XJ~&x?xJRKoOzKiqm<(zOLy?*QJ1I;8>O*mOIJL zp}g-Bt|@+2#CL1Q>7erm$p3@vL5zJwq&qhIGDw59btUH|drxbKeCRB2JM9w@PFM1a zgU7_{cfJLAtNygOugC9W-4!wE(%BZ>RI`s`a&oU7rf3M^BPMxQ=!0lGM`1f{%s&a+ znU22BGoW1Z+5+-cteHzWe-Yw3=()m(q1bOOQMl`Iq#7qbM@Z+xes{ha>Sh zwyS4<2zHp=MT{eX%Rj&De8ySq)!oif&tUsSWCbR79GZ-%J3X}bg1Lg z>d7`Z`d5zdeg7vLs_fr>kQHlnKp|Mz4v?3X2zJBogIP`I>#EKivODyJma=1 zNcPluW7U#yGTJkpd*F9;HjtY<4_QZ&3Qg<2A*a%;-_GO_ff!TK`mWO22VZi{bIfZF zw!Ze;=Jd|j$QjSA9YEH6=y$LWw6O4u=A^K`#rzsJ7XS9q6{E~Fk7!3H4z@KCv)wkg z)~@+ack$bA?)J#_v|eufia}0ri`b5!Fn`ee2!&{?v&N*`&ZBZE|%M1Fe!t8l(8Id`&E@mGG{TF+G zG`xwpKu?N7oG{%QJ*_xaQ1^}SuPut=H z+@H{u19`|Bl(d$J>sUAD8l&CEKs%Xiuc}9SKALk8Gs|3C_z>O|LESSR&le6Dn~z}*5K^b|DT3yY0Tmlcf?rX->`tR$^M_&6g9~IkH z$$NhadgH)+I?o9s)-%5~%a&3pUz5Mq9wbWjK`z9!6C4?qe1+k}Se?dY!xLmtb#C8n)_k2IdOjoo;6 zfb@-yRBz+ziE0tJ5Tu!D^4xf(tI|I!U;&N%K1%_vnPP?VP0|f7;28Pb9-YH7Quze- zfzJ8wtNf4Cwjd+?en=yW>TWEVS9Xa3f;Y3;QtrbV!{Bp1Pz-V)Xfnl>A5iVLRcy4KA*As5|#wh%i>Zf{ z3Ha{H@xPrEebG5o24&%GQH@gp!t^N0%0m6ZOAG&)~OPq|=Qj*FOl8(`k?ZTTzN9&(@H;hLk6F|-S=U-U&cx4J&; z_v}vBzDRegw!GOoSvN6L4X)aEHblE>V*%&6=A+ohM zNME0>N)GvsyuF`lG$cFWbmj8as_`4wk$Jqw%Ry45;pu(w68)wF7vD}<@XoVN4-82( zYP2`yE;c20_<=FK)q}d^p!ajU=i->@W}6SQwWwoxwBPKd_mRrjb7I#vA0D8bBsHZp z4o%*-y*?6T4FrzF7krSi!eP)m#MAftqaNtYKdb#_xnX|qd9#-j(<@_hsQc^rr{r_Wmw*9%BE~EK1-_G> z50YKi_x_AVcVxK&+_-#>v<4A{WtS4)s8D&80`k4CtWT<3oxvB49veV!8KW<0H~Mq3 z{B<+@PIjmV>drJg&xPYY=au>2Zm#}OavU5!)2w=Ul<>p@UW^-EF0eUh2OX9iZdbfK3YfO~vWEshU>%&rY8r63&|FUiu>NCm%x82(9 zI)~EqoBxgW7N6Z1?&oJ?=cVR<_`M;2D-(~nSN1r-rJQXd_~9L9vT^3NY;5=jb9-Js zx`wi-4-PoUjPDC3W4da^?OeV4WEoRsj5QBxyi8fNOKS&;>&^mx>*%pnox7fQOs5WN zzwjfCNvHc~pS84Qy02elh<5JrI@QO@2s9orS$@M?tHQ`9johi0x!Tq7l*X*UeX%E7 z=5;~4bPFSH?(H1(#T*x5 z9g2B2Yl>s79s0gOlV$ZmrD7<1f4=EV-Pz5}9BKAxb~fqQ==f?r$tR+E?WZ4*;-P4U zMk(JQUby#2B+uaihy7emxt)e~ta~SaozK_8&6BXtf%_kPM#+UfyHWo$I>8}R$qmz^)>|IT?)s@Yk6&@(+j;ym<*FSj~*U!c|3 zW_wyv zPHvg+q+qU*bl1JFbDo5mGIs0irun&1eS_VOUf0H&gXG_Dd^c);*FRQ8fP>}vV53#% zbFk<{*25&(vof|MM6cT`1R~58iciN2kKRl&_Wi!=x|r7iVhxKhO2}Z`19^ zV?Ing{%p^#WWEgNi+Lrx>2(ME!TiT~TQ|?X5aN3~v*P*4m*9Tn{*4X4RlDuK2mO|i zQ+qyZ{xVTH5LkTuMLoNm{Th<4GV!7ClqVl+!=WQ|yrO~qh9rSL=^o?EHgt6Xd>0A1 z^7bX`vSQ11$)%3ulXN;E?e7rnv&@(0ytZj9Y?RNUr{)`7+7SQ2mdRDOSq(TJt5++@1?f-1nvp4Mt*^Dc_ zMSMs965HhqkYn9=?<+*oo<8{ot3fTh@x{46_^eE}e_gpJOchIuBjhycWZCmD@Wl0= zKbn>o?8rFx7seXwati#RQww*;`+HML0cUV(=+ z<7I0n^DN5eHRsKRQk%ZqqdVfvh2eG6+p@ve1yd{?eCsjub)b7YJ8OMyv6g`G7ZIg% z5?J2pkOz6)tP}6f*!fvi>GkVgw?3?cnl79j@|jDtj_19Bw%(c{@#FMWOwGilyeyCI zzi#Lf*16?*c?)DT{JqkggZLQqwSQ4l`ol>dnxAJF?Z4yZDQeUtdG z*!pzjK$$py-B`%-Nx}!QbKF_RI~g?@dgWs4!!^eT1^sa1=6kV=HtZqLh5g{Z_02Xq zb1`SK1yqi8tH~|b%lT#W^}qwGKsFRV+tD(oNN4nQb}jFZwAHN-nXRVrKu_lXnm^5n zKCCTtNhRrxjE`HwB+ei2(p;%Nb+gaJbMb&5R(1KO@dn$>|M`FZuRc}Cg3q^r@@={0 z784@C>g5PRzVOuCVqiB%o$GeZao_GW%O^ww19VTmz~@0l$>vc)@OIxcZnxq}W`;}X zf0_ulR>x%GQ=sAGV7jx_jWPWeR0PmBOMLrK0n%wsM0Sz+cJ1uw+1_YL%GYnZwgh8> z3*rvs9(&}X;)`i+l2b2E-^BO`7+ zDA@sRyv<}al%}MAKyUECIJHg1-qFUyvL_b>k#%|}eTX9`? z(hZIFo+H@W4d@@b?Oy3-=H0EKUApI{xnbGo$e(9mW%>P`HhK`|B+1p8qp6zy7;A3r zW;oO(f@3Lg^FMsBJ?WVrRgOT0sc-RUBz?w_M3i(PvT1t19?v;ZsYC9{E{_S_aKSnj z?WftnD|I)@*&N<>^HXo0gRMVUvW=~Iu%#(UzvU%RO2744>0l8ak6*=7`j|wuz zeM6xdsFIlL)EDHx6K?fG`)WL}ZVB=zH53&l-3p|dbfndP&k5hQX>&xkfblIRULW1m zY`4vSIC}Bf-@t6CID|glZcJ7=oVNsbW4tu5kbta9l9N1#j>QhRSrz5l$^*vodYAsd z8)GKVXu@W^2yYw8$8xfrk3oLWG3Hxu$0mBX_sMU%+StoazY(O}CIf(yLN7T#^F}D~ z>6y4eirmGbhqco$JjLzSB8Wb0PFOdyeKuYDW-~A{NrxkoeWd!VyD8F#;XjZ+!%s6G z&TVhkkbmN@mRmMMKg{1J;o&Mr74xNb&&{pa7NN@)4OZP43G@1Ixx|6=jbo;fqZ)pG zVRSbIA1R`@@m!-^VltfTH<=Ue_Jv*P>qQ>A?P!U>1LYx^-12SGC*tEVZ{xguF}uz0 zlW+TC?8G-UmJ2~vIlocP=W0G@d%M%MDWc94I?sO}DqPX|Vcoy*pGOTxzgFU=*ITZCPLNe8V{CW|qbeK=b0vIi zW8fI-ll3Fnb;QL9UoSmtb`ts7{#xJ07=C+aU?#g!yy~!3eT=n0WDt{Ibzr^f%OC8W zKPLbAV++5*d~*wK8XqC8gmZ4spZtK%j)E^^QJOF+#B57jpCr?J!h&tKLr5>CTW66- zpe`~2Gka)Q=PlwL`zDq=x}nX{Cr3dD>Fy&Gu-;(%YHNguqXR?aatYgz z?(*oTN4A$)=h~dZ7^)_IaJzpT?rXSGgFGC;HvH)+(@OQmnn~bm#9HQ0-#P&zUWLz7 zaia~B`!GFb*c)e;TXTcj5Ej7=fkYD;kIN-p3D15B-iD;>vH83oD zD%#tK0^xRT3Y6<}1>eT~MwMbyeQqGi;#hWKNcc>1j#k8Y;6t2i)49eoN27DbKpnCA zxW>&7IxQY?9ZZpmjPuiNyIS#a;ti?T$K=`N*yie!?X~$f7Z$Vezn_!+wYf5C?M7Bk zXh)6w!5dp-(*y6qxPjiNyl@wC`4d6ANAo4Uon<|tlI7WHKzUzfRUB^kn7N!wqiYFQ z^IH55-MD&u`iQlzn+;!&T%Tj3WDA0RjtYnN?8;L8dB{IvjUa|``Vb$o^VY7cUd7r1 zZHkL$k-8>{9~6ntnYHWdP6yn!3-aet6xVZXEMX~@A9VDgt&rRPa)POg>%j|`Cz?x3 z7y)p$FI0Y{zrJ?3SwH6WDO=mHbu6fI@0b~APge}#Cp9RLtqNL*3PkWqovgHrIQP$kV&E-P~6M-J!F=x3qy9^?*{$vbg z_VHX%Va)g8IY*kkui9DE+#rsj(Kr1>N%DwMB+`CoYR{e@GNeyPm*JqX)*dk`Q?jp% z$4>NBVC@sJ5ck_{Ip}?B=QuWNftuF}Og_t;L7%QSWYiSHg(eqDqnc zmYrHy5itqw>4Ow5zE-!_IG15M^Ez&ab(|-B?wY;Qf|X(q-FOUndBB+ftY@TkW=Z3d z{dMMV)2aQ9}Reo%M1H}Ke(sY*gGp8=PG9OM7N(yKTVq!W1QABB%;UMHeqC2 zggQ5kE!t-TC#uyhEFQab;>9Q1wJyzA$e!VC@`jslxxIWNp*^obz6a1_@|^Z(1=N_RJqEGH*vUpmf0WI0o_r4>9MH+_0#3H3Fm?LT>t>X{k$o=(TQO+P zk#@s-6PMDOM2T2k*CY)0pzbaoQytSM<7hC(%f6RKn2B}k4)2=(%Ij0Ci%mZBo`6a| zPwtJVFRzr@-SI{K{*D6zw>zJ4uj=djz*mDp3p6>VT8o(SG_?TE!To%U?cRFAX)wloesQN`IdZ0-CABj(pB!b)+Ol@L4-J&o zTU7H}cQ-=;D~$j5}R-!@S3Qn2OglzDdujru9&42gf1wM%dXD2^Ityqn!`H zT&!F9{KT7ly1dZ(@Gpw)7W=w=?CX%aml1ZR+k>;`*uKd`!s$G;Bi8=i=UI6zf^_EH@UiTf zoduue?@FDXh%}jXvDx3B6~T_}s!Ol64Sk(*JL#J1O2B_G28gYUpKb5Y?9-3iBJt;_ z7X+TqzZp;aSyehO#pRMb3g{%$tBt>HekDpiN8~k#if8-sI1Z7K=`mjjv2e2QFo%|A z1i-+nXeX_IB?_T{oP;{AYY38`+gf3Kq!l*BbS?JT+Br9SXuPMlUEd`v!)MhI*Iy~@ zq>Vw&$I;;CngyJ@+~92Q6XAk1W=Yu%n2UvJRT-9w>FIXw4(2i8?UT`?+B*n&6wvvBe>r+0 z48D(<(Pw_YTjLXXH z+JMEWE?&?AI%|aJa#HX+1p~R$!b%d5k-%iA>Qg1?pv0w z-o4f@Ex`#O@A8`=R=8!z0W;T!^dvzW2_Qa`MfLD=cUZF_CaTvQXzh#Q462}G$a%k! z>!t(ySEBD_d0gM-QDn;-vv|xI9`wCl1Ix3SnV6{bo$4;XNo$;x|x)T_y4nWwcc*fAJ|+yZxZZyx_j9{!q3!#1 zFTYQzlTEZ6>*0nEiErU%@SH7;0u>)&H~moTnu8;M{PEn8{Lic-Yrl%_2c4X7HaGL4 z%aebY>dE?M2+QNDYjGSWBEtm6!lk4M|7o@X!b`fjI0 zzR=0T_4(|dxZJ-b?d*@f_#=YsK)k@eqZ9H-$7+}9kgaZCyif0*bZh@U<5M5QhMtW7 zKu5i#Z|LI0`A5;6se<)*{XO%zS$~kHJ94&j_@#Xn`BuLz9mR(fG;ew#?{uRVI^D(? zKeXs|{2)7Q@*?2B-T&%zuDIC}Y1cA?e`=qR&JKs8eaybWaD(l=d)1Nlz8-@AQpZv~ z-(VK^-{5yShz0U%dJ5AM-?JTceg?cU>)qji(Z0ug@wXnT@qF?;9_bz1iR(AZkIqbg(=#hEe{KBT#aaH$?7xkNZ04$y9|aqN`#n!~6Z_j?6J>je>gG~;#a;~8 z9i_#U*V~xMnJS~nRuH+vQ5PwUiVjE4-IuJa^9}+Zl!;3oS4>s$cCe~Hb@FR}F zqO)C-5Ws<`gIAuu`3KrZrc5NuYpT)b`jif%&eFp_*5pQFicL>MlyTSTQ>mp0yHw10G%c6NcLU*t6 z4oKtjv7h51@&&fxdJ-NOfq(tovi+(*B4w?Rf3vmx^Yl2E^FbLi>8zB?AIS5{YHO)N zB@-qV+jpb2_BH2>Z88Pg_RBFB%+;URmMD)Y^h(Yb6rt{W@`rV&OYQeMh+i(-BKa9x z9;|x3Yv(Ox>?AZ_F}6?Ds@WPPUuNly`?ud?qpRPvUOZ^u0_IpB+GV*bbiI#&*HP*z zy6m~$LGKlGzWH1!AC>d=&wg`1@y@=FtYY2bptLEDBq8bP4yx2f-G1~_EP8rrlU^?x_V=I2_usBT~W71wU^z0&fgvw@%Q=evq@^1=MjSwNSL z$9AHv&tES!36 z$Om&I{~#%}s}*A5Nq9}@lZ}m>UJ1Xg*y%abNojmaKeO%|jn9C8za5Jm zO~-tR50j1G!G#V9Ru56%Vt+dRH=9wq3v$hU-K|+{akZU=TOZu|_jdA^QJ8%$@tgwC$ucM&tVBK$Qg~?PjW_JtI=c2 zogJ(=aM1IhAD{d0|M9>7(%o(wQ2V0ZZYSx!h(8j5H=((n*%$bn zEZRhRZ$d~)YQVpPX5Q47w9q8DS+kTsI_(L{9dT>WJr)OqwbpqX(DmDH<7C0-s1G{< ziyLR`AX2^&^`P5F$_-enPw^#uzD>dVck)flHWvBDsubyK)Q#L-fAB_&>98Kl$t9+Q z8>Fm1;eei1$l$pN?Dc*e%st(-_e1*T0cGTk%~oRku_)M z2KSDJw^gIUbep!u!Nq*L^^tU@*E@{Y?cw}S!oerl?W5ijWIBRv!XSNM*glT|F06z+ z2Ch%prFBflD7R$pBKcVK3!Afg^Bmbxh+-;0e=MGu{Sm51qWuvOy!@73((N`E80E$3 z(AYRMyy}=)6?AOHp!WMfUkmM~NXBGmj)ZA?6Ycpyw@l+)^WQ0-zo!F?V?Bo7N@f`B zLy>9y21e(JJXiMI)|(VeaYH{0=`FwzT(Qdjel~2Q&4IXowhP)fV#*|JuJ(M4{Vn z72qwqjWd6gYzs~|Nk`WG=4;Krpwkyin4L7a#W{t}0G0wDiXwj~;p6HX+1%tC;C_7~ z!q=RW`TmzLF4C=p?gG)qFJUi!ULt4G-znE4*(@8cK{z-vNcI_0f74^fJKGNpP=^cH zagkPLCw&XsoIjc7(cg5)5v7e6IRY(5tmMS+cl4e7(KHeczqx&mUg{X@w3ERrpZfyQ zKbLb2pT}>lr(1N*zOKeYw}KsXep&Unp9!)R`YSKW$Md{_C0^qoy(C^XtDx#1r<;={ zunrXRvN*>j>PxwhMq#WYIX^f{ zTQ%!7Im&ZAHaC{@8Y0WPb2rY_5RV2CV<-N8h_ulbMKE%L@ow)&r$MP8YKxl&*fCYW zVuaOXFqVtPJmMCt4MzPzgXtENd)E*L<63oIm}3wT2^LXKTcU*QmnB{=;+t7n?m1E> zkFZ4m*+tpl8`qCxq*_9^RbNshHrw52H0-o^gLP=q?W7|G^5QkH2TrM66>A$d zC}vmPXBl;W#%Wn~F}{S(yFV86F=o;g`6KXh@rOxX#NoT?gRG-b4l_A*g;K&i!Co{|vW!%OPP|@@EY&F@BF(mL|0V#QJfc3+rvvEDkp6j}mp6ArY?&pjM zL-;--5%qG#Yo}=(r0z?J^4LpiFJvr7hEH=Tc}zh76TThGj}fvbhJDibm<}P_Y&zt8l@41IDMBQsR z{BuX{A24(7D=!7BO~$Io4}XZ2H@T#{(~cP+065v zWb|S7DA~WYhj$>hg8iYg-zq>u(y{9!YZ)N_Ci_TVq=H3Jw~SGE^8QI{3hWDMUchkN z9`=&Xrn%3NFTc)b&_u@OGEVLsuQ{Cb+eXGeLOW@%0`2yAh|EQFVAKob3FPzXj;vr4 zS2R8)^m327IX|$i_ zq|v=R#+JHsgVDr1dp3P8a~ z<8vF9j%KaUc=&$q=b&PIY^<#xL-JlmvcouEYHR+o@UUH~V3;!p#=8cd-13NO}FoaO=4+u9ZK0e>W;su=&0wp;_v$-&b7++HLr- z75DrQ8?YaujUh%kLwTJ;r8!ch#J=q($#LED`=Rqvyywn)13uS`i@`^^>pgSyMNYeD z<2GNsZf!41#LdOmE=S!yE$Y&QYZnGX`vuY+SwY_yAt!3c)@__tH zy_NO1Zj93<8!BRJ7~MIVl_hldsJ;#Ih2b*OokI|V2>HFgyxv6PDmOp}VtZvB88O+Y zXLNqZ2SVF^%X@RC2Y-81Vv0QN>tw%d&kXiKK_7nZxfHiutm|$40PWvxx6|H%l>Q^n z?dID0VP{(B8Sxc~cC|Mk{|S3urbBJb5%F&}8MSSbb3ZTdIxyS6WBIrDKF{qd1zzps z`$KCKe2$rUfFr_}sG{@@iqd&2{PyFj*Vg`7FW7*j`jTFr|1lhFzNY&^WFs7#0OlLu z*LtNJxt#mEc&62GlPpXYI>`Egb2i3v{YrQU$1v)rH9uP;9C7vz6Yp&oT^kL0f6{xG ztKC_ctgCOVra-^fl(7ZRv5g!0Uhe;RzKnT;ZgJWWXX6fHw1I=boRSVj9EN=` zx#;X_4P*ynoG{kxJMsYHXg<^GSb^5ye>Uq$Mu+Xy@t%Q^auAkcABQwlk*|}m*OY51 zdxwlC&Tg$#HTj0OJ^g&jIXRqTqbcTm$sN)>0=KDZS+fdXD%)W^hv)Jt;`N*Vg=2(k z4EDX=#J$0D=3|w}&#V2wR+$H?ZY8Ybdz9AgT<_oi`JeaSU%M#C9p)ONwBu_C$C2lf zc@TWUSs#3Vhx-OMW*Wt=Bd@Wpv}7vZ>P-8+DPNWKNgMFq7~2TZh~x2(_Xp%NVZNoq zIodFvb>lUP-?SzXc5=3BKG?4U`t%uSJF(>uo^|4rJ4GMA)hYOc#7cV6IqY4cbJAoq z8yFnN?vQ%)do=BcYBJ;w)~vCCMok|Wu7WhHiJ4`a^(EDMM*F_})_q+|E6bnIz_UHb z@M;I(R$I7ufqA#tLS$g%WrG39v4y|=bDyJYuBg-MuISA0PaRIqadT7)>;ospM zIZ9vfmW0%^jlm-OQx-%O8{XLIV%G7vDTeR4zR~p>>{SwxhQ8!P-OO^% zCHIEEvwXlp)2g?lv76g(=Pu`epBn^}vgW0mQc}e3`F+vRF0UC-*Z$j_ ze6oD}L2|@`IuPGK%7H?@PX8blksHHJ=SAc2_MZ?s>>u>}h|TmjRh1TDWVG0f=RaZg zZh<;wkmvSYnX}#6hG-woD(uAPxBp<-1ndCDRRMX zEHi{S^=uXwZ6-LN3~WvvcI8Pr^Fi?694nEx$}uI-?5+s0_}p*Lu1@cF`1`GX zt7DpRSU{aG-0$$Rs!1nUd7rNhZ;iDmCGOi~d9`|cPBkB>2ss4aTK4h{L~U1EwE9A0 z^mAZy*0PGRt$)lF)juVlBRaH-?c!hl2y72&D#onx(=TP7JN20JCe$y|;B#lFCY~P929upbZAF$_H zX9V8d>A@tQ7q24iBQV3x&Sqcee$v+8H2lEinLozLe(w*Sv?gl)5XqC-;e+ff;s&cj zUND*G`-7y-zq)#{Zf)dtSGKJCytKjcJzmD&FxRV`YSt&Kfwu018%*EQoMsXxZWx0O zJZ^PDU=Yk5<6G(J{xbg0;|p|pca6UKQAgL-)WzcRqJW=wX(wNOibJtoIUE<9lSi!d zXo$n^*H>Yirh%W;?DR=nUSf1A1X=RElL3=^+OQIR#@$U#i=3%fjWZn}q&Wl}oZAoQ7+10rOs`)bZZf+fl}Fk%OAda#ZXhvDBMSBXs0%A87sZjN3=hgjxGh?_Xic$dH9?@4FX(LHbAb2#95^_LFE{Ao(|`71p=_UdD2PblFWN3HwxE~Qbg z$yXl3reP~jzh`c>vH>Tb)p`){+^qI|5z5sf6EJ&jyZ0({EqN@ z**2w`u)3hql&S8hJ9dri8KtUIuY^87PC>kq?M&h-|AjVeo1a*T-Ea>UKLYp zlQ#Yz+Bogbz9C-|zBPfz`o{kJl8{_tzMY-y-mhG;?9E31 z$NGCAUCV9cDeigrHv8I^Pr4uetxDJe=$ke%)8zIF^|c0`)$^2c;V$Z8;0GC5mpgsX zey1~E6VSGs%co?vtmG{i%AVUF)9HC{VMu>L2DaCgGhubP8TovDM>Ap}uVuhROe%#I zo`b2g{GZWX{McGtotJ#OQ_mm9#PTwd$H)|Smp|0L>&N`ebsv;YCEBRC(bnny| zKA#(X0S{;S2Y*;q<<*xNxeeX&;Qe2G;^T?sTl-vV3)&9E5E6PD#x?0@Pr)4uV;k^^ z##kilX#G}K2B<;Z<8Q|v7a9L=Yh88j0)cQU_I2@%>Q9@ms&-f6`Mp-Yx!)hXeT_a0 zD=dq7X^fT-;Tl524@IZh2YII!`RaA~hQRDx-=Nu@O)$Yk}*2- zaVodyOgN)Ss(YQ@z_AiQ}$dN#lfT>6Fvgc{ROA^55=u8HhEVCKB2`n|~`U+Ul;LinV1Hw$Z zmA4P=tUcQ_=iBv+Y4N6Wtf$$d5MZUE5uQGTedN|_)Fiw2DtPPEqF~N@=6*dzrQkLBs=C=@-k_N-1f>BZC_+qp~ zQ&88x@7q7t`*#DL1scbWZ?^E8;eP*4JQQP^Zw>>CD3<~;D3$;6mpV3&g28g+nXYL)mscK-&ny>RxJt)zqe$O z2zJrMo#)Qe4@u2Av*^M~w+cxypg0FSMp*w3-rRz`zU1`t*+e<@1z-P<>)tufF|d_9dFgM|4lPEjtUmq*keYhfsE zy|!C0=~il*68kXlmq%O7Iz9vu#t8D^EhmN}F1k#2%Gk;Ih;h)2M=+sY!{oMl(4stH zFqW<4Y@HC1WQ2ZJsArHa7gz+vo4#*LavTXuxn6)VM0&D)3rsg7{)h~UI=a)j1;A7N zmhAR=j)-X(>#x85mFg|gpD3{&(KUANoYLIe4XOu4mNsl<(V)s=#ga$o!6k>*mf`RF z2FL4z(KE2pW#eZ=__$pNZArb6c-ak)xD|HHm3%Xr8>ZBI?P!rO@QYga*nm$9{E5q_(G#b0O5_;XuOk4yxGxsjuw)r z9NWpi|DLyk{be^h67L-4GKH{j{u|y$MIzgmvNUh(4 zY->aa8fi|9XRHq~S2;4P>mbekE$S%K|H${~$C~a=(F+yuGt1%TIY+K75yC(xeN!K& zR9>~LaVSPj9kAJTo>{#kZ!~;t&o7-lgosF)_LEQHe{na z?*B?U>@YHh_FH!ScIy}mO1I=!i|xIY0IArrm-&mQFQ!Gde7p-}_ytziooJ7J%> zoTcvYHsbg;619N*Q9VBteW|Pm8QsFwnw_P3My|(nbNJ6o&UQF}+X38aYlz{aOzn2p zyW}mecd6gH={osm>f}q`9k!0-e(Xs4#BUUr7~_ebKfynWKE)c_OHV-GeWMyMhf2m5 z^WVYm<||nqw6{Js67{9$v{tc`+pvfGo6_g|d~0uwY|CpJnT`@cd;ajTb6-IMd(G*p z7{=&vzjW!sQ}baQ1FwjmW32Pu0QS{rWBHAGc>HEvh(QpW{;)4%m@X=b=aO|$v=RAs z5itk7_k&V&0Y+I5W}Hj9mvOKq*U6SIb!Q~rx~lNC4#~C#Q|MT*ORILCL%+FvWUQ7` zXs-@Kam1|y)|p~`DQM=47Fl;2k076#uOwOz!?533}UbFVDx3)HHYd5#<{P$R#3TuZ_c|7+yaIEWs{GTXuo>^YknxgQi zsWi7!69$qY8Q*JaZ*1tTbEWA|!rzcM|L%5rTU)SOu5lkIFsAsV;CfQ32lpxkqP!4} z&e%!dgISEi^dp0#L?rtbda}wWj34O0<6*7SeHYDGeXKb=G3r^csV84MInM?&)b@TT z3M2cU$oC@AK3@)Gx{{+W7XNb-*$Z(n>Pn72Vf`>1Z2LGEWn=P6I1D#;ub)W&NIZV# z3l^cRw7xnJvxKi@?LX`6JofA>2$eBiZSBQ=Zm?jy zYZrELBKW&LpU9gq=Z8lrUHHq144o6W1T^ko-%AK1!9P@rUFL|<-Y4=wj5j=LxXsC$ zJF|nXbFKanm;{sQR9tiD>=x2vcI)m6MQ1}l&y#AFE0H`m68cfV9^dOyxW^82YtNHC z9E|PNRqK$@sX_}I*gpC&9$~~H@e#waU1B{G5jK{tGo4BiK*FXF&PCyu$`khX*CxWX zP=5Ari(W&00e1GpHAksf2yuGx`6aNHN|r+}1HCa!bI*l8uX2vO#A^$NkG=E|DSJ84 zevC=<9eFWiqUtQhXa%P#_72|v>d(k@YxeMX&V`EOe)M5%{O0dW2S>cM{h-kVB)~Z` zJS`)yJ4EE!AGb%=UVC0*cBaT5>pOdj@`jQ5u#l}$gdPvRzwP4ZQ}hG+NFM2u&o|MW zG2YE|#qS@CfCuH-=i%hhPw6bnjg2JiEv_$PGW%>;l5zWdzigKfZ_v1#z$E-~`>{V_ z5vWm?aSa~xUwng6V8-ABwBloGc+YJn>c6!gRDFhZK`PG4ptCPp&&muSz~^2XofadK z=;gJF-ImNyq@+7#_01&-HRCHKXMebL4tqM zxe44y9+K%de0rr1?8hK}2wy1cSj71(e{m*FeQzG^a@1Gx3HwOc9?rq_md~i7-jTXZIH3YR5Bc+U24?i2>xcYpn-iNOqmOmFW2F#+^vB+Z5B2w&zvp#kF`2dV z6$`uASQ&5l83oNa8FAIQ&L3mGVI+l z%anECBk{JN1;Mogez%?`du7SL7h*h2I*)(*-g-~~eUaA>chi~&$cp1^Keu=a`UtlT zKsiSpul*SpZ%2gI^Hfyil}?GKBiW*PX|)jqr>Z*yP-Qim6>r@D+p^onx_< z0BGvNTu`kt?ZXlrTii6G!9wZJ``W_DYy9r=z0%cCs!*qDRemmi{97OEtL5LBAt_Ci zrKP;@v9}v503gjd+18rCTS=gNXI-a*m9fS=8GGV=c^Pu-Kgwq}9y9O7t3Pdjg7>na zd>dPI7&_W|uv4G2!5*8=_k4(Qm<>F(fpv7x%Hk0L87VsNM&$SJqcw&=$`|tUq;Ix5 zTD2~C3)v3PAf8Z4k{ zWz6*4&oZ!fJ1%`6rk<%Xpc^~6m*uV_v+W7=)BsyRq`#em)K)`Nrp2(%THGiLUwwJ3 zd8dO4t%3mCD|B6a1I^|Teb&u+%sMRgL`#zUG_Gr*d9_*FqXjE-uow7!)ZLAI)!&O5 z!LAFz6?^qFpX>liHPqU9LPQ4?t>b zr@N`T=KZMINT+n~v;R2X1Rf5oyxv5cYv`_M$T&`;2cAVgtjwg3CDqemk}6N7pd?%b zH1LHOOm}B)g#_D_3swt8=AKbD-6C*`*#=(m@5N zH`&>F7eZI7px;cdT>sI+%|;F|f2PB*1J^IjTtD}BCg+$j8hP5+XJww=?^4A|{-S?w zp3G*hw{1M+3mvrV+^Vz_o|1pQPaa~qBH8+jZxdegUwd8PUT^I7-tH~#K6tfromH69f^c%EEgl^4~tw)1Rq zhcK4!+AVZ$>Iw{4@ku;4Oejg0DOTedMk8mLUgNVr*TETMott*j2THA->g%=fK>uR; zt+=TfV2A(DUCwxR&nqg)wt!B^_HWN?TYS5- zgN=N?C!^CFFY8;wo(sqa&W(-jK^L%UwR3YE&LqG1zPEqDOE}kq$8UVG#zykWHko-L z=wluIt-TG}@VSs(l?_1VIoF@vZT1U8M8Vt+wgR%?e?@4eV%DLlj?kMiE^97@`(tBi zoBZCo^qA<+`1a;n_`p8BQ}Ts|6gdz7brcL{@Ar+P{BnB0Q1sDftv2&awX^+xVc;Nj z`(fp|4iRyG&G+_395X{&c>iXekqF>BMqKWI^nK%du`b=@Zs!Ka1M8hMt~CqIV}xnW z{aC7QUS6rA&W#Gr$voh@)6Io)Iv+8J&RSs2RXGqnDaon_f190~A4Fk<0qQjA0;Rs% zL8LgC_%z<%q#X{delqjSvY({u?EpP~P2 z2xrboKczUHUjLnUt(`8t2MtX>!am5Q=g#kqjv4*Hq&Y&Gte;%A&W*|8S^9<;H9Doqa6HF z%U$G;^LHlqTMipTN-&sAOrQm1pbXyYZA7id*8HN+Yx~XV4YF)#uu&! zJ&!c%yIsa2xBm(k>)2T9wjVKH_uSIncj)lk?yJ2r!b)?Qf4@zWujD$iTG|^uA@h&C zRxFrte7#mNDt%44_i-|w;rzBAdOsD%)-QM(G1DxiV%XgD-oz>oA1s1R?|m51(VjPH zT@hHrU_KbD4XhV`hc1oF6J+Fmt{$xi()vKM8T+@jE}u)QZe1p_joQZgLg2g?)r*byY-+=2VC20Gp_4bvY~JF?%wxhv?-VU-6^+5Wm6C7i4G57`&C}Q*Dbl( zzMWmWg|~;4=ig#@%bVp`1lM;=*^g28jeNmmGbdY}CNUQ#&!f>ZJ03tezwk%;vK;bR^Mx3#6dVtZl6foY2$wSx}^8d-*_*h-g?$8w_CB*URPz`it8zM zRrAWne4KR;R*g}J{aiBE|G?7jciOxFMj0g^%q6WYFb?SaQS=L}e2gW2cNBH#*HQS7DZuMylJ$IaofT=6|417}e#@9N-~rmRI(RbiR-(CgF{&b6Wihht zRc79XFw#w@_fVFbX0o8MvW**R;x^wpmhlz$uMge0O!@Klzk9Ki=G>HwebIm2(u?5O zYV)WPbc4C2AFB^(U2|#C9x#njHxZB*u&S+@O7J7K&hem44s# zTBMT^x9ScNxD^FI+?x^|PK3#2Eb`qqN1hRJ%btsF98;uk{o8K2HF@Lobc5N-5Q{Kl zz)k;PfK|70#O-iY32u)KbiHlN`jv083T!sgZ@W<@qSE|MK+ojc^#esB7=sRuxjc_N zFO)1Aj1l8eo&kVkd5mIi`hxit4X?>rnlk}egK^|rKa4kpc*N`39L~Y0sWz6F@Fw+( zn%{I|g|&Yi`2b_wTy8qwiC^u+4OKB$dPhIJ=k}8$!wcyd27`S2JkITWVE@s$dF-Zp z&egnGRfQwc&Kqk&Ugm9rd;=Us)H^ZiIOL;^8so*IxwVt?!w`tyPH(sS?GC4|*7Gg3 z8V5IwS4_V6Hu$0o^9?im#fCgreET-v92YmV8ZYEqzVSx$yPnm~&(DwBKYS5~+)j54 z4ZpYyc^5U^dTQft^6FUXj0i%8t&Y(gJ{|CJ1j@C|(b7|&bz@Gx9XoXT96R;7C^wtK z7+gPGhoAYN)4Y*pMJCXC)8lIt89GGHhsrscli&8I1c<=_HjIVQMIB#KyM80Z3F215CxyWjwSA@NTqE(>Ya+^HI z$Lc`cH_e-R-%y8g9>mdTpUno~Mi-*m6a^V>E4w3J{=3fKD;lxm2kQ^Z2aE%b`AHG< ztgjx`*Ljt6D%sa)HslJ&)UnYCkq$tIrrYsH+yWL6Kk}_%c4K*1&PDqgThmWdUSqQ^ z-Jp8u&`&;q9GGQ58PEgE&aoe4ym5dXv}8CwJO3fS_q*tU+iAl>Xur%Cx_v3SS^SO! zkM^4)-7P|W&N$jkq|8H{tUil2&bNB<*jVx#-YCK)V<#UI=V9|zPPbP>LjI%Ooqw8d zUhRAo=OqP>QqsAE>CiuATY$H;-`ycOVEtrmoqjXp(dw6EC&4}!UI@@M^8=>AWaUgJ z^Y2*GnED_^{=p?#=WUP~0eh^H>a&ITk+9w1nH1f;X=EFS0s&Jl`)L=IA$UPP#>xb$3ibkAH1$mHb-~ zY=406@3B_Gj;kM?9QzoZXRPr_=(mzzV^eK_9W)$ZH!<4UhnLmBU7ml~nrZ#$(9ABY zfjrka3VCW{gibMDn^EL=9ZRb{Buo~%)BMoWbsHv*O6*Z$II;-g?cJP~Xc457XT1?2 zlX>bq^X<07Kkk~1vo5zmH~E{Y+gkg%XgiPA)or^}7!XgBAZ+z-2Te(~=K zYd369t-N6{QS(FVx)CR<>hcpX>YB^*nnTA_pqoucSR2fL)+Qc6w0Y(AD|?@4vwY5T zbF=KEn~|+m8>3jG2wmuQSz|rQZ!RymIdCY}7xg0k#!LRR^xeh=>69gdp=Tz~`nndZ z;avY`J`mn)oYojVS%;3*#(EIEi_e2f$39uE=eVFf$1!9~<>k0`$0ig3n(W5FITlI! z;r{KB0JwbiVRVOaHfw^6#RiU>5865m>v&~vmym~tLr?Wd;3|sw2Op$=ZAftHEe)~1?*<{!SfIL9zl!a z{BhLiFUWs`_UgfR41Qb$tz>e{x;gvZ>-iArBDWg`yX*Vp%dNS-k(GqkaZ-8IADCDd z7oENM{b(X?Un!yr&pD{;W~&`qQ!JN^tu|c;-*Yp9Pc-)C7^8%YzwakUc*EsfaUNtlduA=>4OvvzjSc=oqPS4$_fy_KAD&HD9uyiu=1FW`Cz%IC9j8MlNTG5x9G`>eY#yZjS z8~^y;!hC+7=z~&(FlBtbFz^}z*QHXUuyImc1JpQEZfgs1rezKjugNn_hex)}IC&T0 zHjIyt_?(N)evi+oWZmWC1#~2z#q6Q~o@d?e_2OAku3yc!TjwHCo{Jp{{)>H<)TzWP zt#7huFgnxvlvfwLG-xb?mqNFg4}YZnlYGwN&ddB&)@QT*Gs{%>&chd(fBU@?mdCP3 zu*PWOU%8{7qi(SJj_w0okTn}~-{U(f5Bk_cnPitp-`@RPy4m*ja($BQv$%a2l363K zX9Q+j%^vk^B-&%9_h+4t!ZVq-9{H*3xTuro`t({ORE{dX$IIad%bJUP-XeNNiS2vY z8_YT?@cW#@spm$?Ki4dwJYgH36OoLePKdIqAu};|BlC#qS<=1MM%e9Rt@FUR<9H}w zB0hfsayg&HdbEwIYNr!t!tZTDhj)5lQgyuGVNR}d={p|ZV=v#nOzIB$4hgX+WW~T)U-?|W zudSP{;B_OC>yz+t!P`On{pYKA^H^Awd-7e`DQBaWa`3a>>l$&G5Fv%n!fLaW7CY=I zPPS^Az>Zc_#%Of$y>)-D45a|=WWOp6D@w1#q`@Xm!6)yQ?3|Awc){scqX(?GKICcE@A8$cK;b zRlc6XltwHJB>uMr3InN%8$SvLx1)bZIq)Sk_k$NHCHF_9w3mRkWI4`sMO~;Tj1%k9 z=P2zWf0vCQp#Q5x@)?%+yW+^#={L~JDLrfY*5%*zr;Kf?yDy*Su9+K7?K>P}mP5^( z259h;d{X_rjMNRGoh*esKg;bF0kn08d7+qJUVCik1{NTSFs%GpwZgN4&U{M&>S0S-ayTL!F*9~FL!wn z6YJQInM#_B#RDg{D^d=tVcl3Z{e}0t@?0ivgtIy}+DbuRWrF5&+C-R5H>7mPxWr{ z6#*+OxY2v99+p@%^!YJr)_i{F$-tPBFQ(ectCiXMC??0WDBL&Q)Pu6H_-_#ZX=i&z zY*yL_v)i$!XTI>W`H1Qbd+~cdOe4I(3+1}8Ntk67yz`13!jDbu-7KS>L4OT&3D~yaO_5wCazBKRd8I)!*`J&r9$!jnAaIr8Z)+hJ*Z_{Jt=vzqi9OM=lQ)=D)Hz$RXlb z1!);WD8D4TWjw=?^%9LxpTNe?EbqA`reVK^@Qr|O=k>Jw3U!k^mM?R##IyupnZ(x5^eM%UvUxfM*0Vy@)Bl#=}(`5@GA z9gjMIsase`^Ez_KWzO$o(#(~$G3(ptE9Z@%0BcszVQqg!dcI5$O4GwuE-j02Rk1#0 z7&O%ZdN#G|1XixM`9Xa^8GxsPpR~&-q%WpH&hxODo03RhJjqHf_M-RB_z>9EA|C6p z{%>?(@`-e)vmr za(B+O#-A}v$guq$R6bR>8qd5St!|WUddBM#ydWQWN@hPS3hFJ7m(BOfhwPBWby(_z zQX-v?o%KTcN6I%=@ya8pH?#ch1xy6LD!X6KL zZ)5Fi9_2k$va288E8EoZOuy7>?r{=%9Dn0$UUR^;il{S5`|I2m+*)+)gAG}@xbO4q z74v{$AAC00zNz-O0o%UEM7GJ>dt95XcD(MaYSY+#!*rxtQPO+W!56|O&QH~$x=$o|T1)Gc0qMWjMq|1`5F7pQs zi*@+H+ROIk1gn*ZL~+hHUnAaehoKFmQkKfQf=XG+&e3p*oysosr^+xo4nQ=#nr zhuYcECDQZEldhd}Im_}WupH@5BaBgKblohxXJGcRA9I!uE5T#?hJ6AjHa<|7U$ph1 zQhlvn(bg8!dPq-h_Iql|bKBZ=q%XA>_-`+Nwl^|HhKBq zWsJVjajMYQI`p#(a~wGGWo|F;T`bbPYh5|)-<5V}R0DVSekRSJ%SlWZ$UXBM%yDPu zI-7&-w`0EHjTSF+o`i=b+2N=B-I$JDy&|D5aL)8u4@}*5Mxiub@SMuv-`#uu!00JW z?9%VyK`zJoth12jvDQ|U+8*7ShY*j5@qOh(tB-lEtw-aW1=ERk;Bl@8?U_?8R}cC8 zV(PDBwT-TZ^%#|YooOf6oI1OG&*`iL+RF8&a<6PMY9{FSeaYsE5{@}LxnVkey|0s# zB>w}Ntz+)(1sJRKjj_cLRzBn7JXVau{TzjcEt?tP`y=21+wt68d|d3P%Yr>OzjbqA zMw{x~z4>Zhr|;7ptv*No#(6;=QNLJG zJt%~IIK`az&*fW3^SK$We3glH{to-(^?kea`j=GyAFzkbZ)by4UB}xTDU4sm+1n08 z8x6l@A8epPce$*6fK(@=&9|Gos5a|`@jw3ef877tMJ({hd%ym2;Cdyyfg^tz4>!85 z8?h|9DMxz&k{7|XBX*nhF*cDYMTNg+x3a6Zd;1L(g89~%LbTHrPP%OxwV!ko$N$gTn`O(A<4A&l+Kb#lpZ@4`djD&zc&2DK zB?S-&NxRppS~J7%GaX2fm;~U2D^E8*>}>PYB>^m5^J=TdM>8~emAn&K$Hv4Xz9iO)MM9-Tlv>WrbOsuNYx0Zeggbuo}xbN5QjL3PbAp| zLCYz@(2rL?IiPma?YnI1>1$~dq}=sXw{g|(WFtvfu~Ae#?rqmU#<4HiJ#6&lJ$592 zPWHIzKKS1KZDAp8NBLv+Z}_IL_r&#lsv6!gEL^~@*qmgP^6tA~IPfxUq*H>)%rps* z@+W_ev=!9`J!uaYcK;iGb3NHEF`HkMRL2|LuQC=v zd5?|$@84Fw>Z5T|W^=v%;AGl<3LCDBujlQ|LA>+?1Bsy+GulB`ra#R4A3OD&JOF}a z*Il3Vc`+~N<=#=7y z0nw#$>RQ%~Q=N1d+vx8jc1jz1)$V(PzAi(05@6bkzomDKhmW!_uY2+~cfI#DHcK05 ztH>^W9Tg|<@GNj}@(PWJFrFgdyL!CqpOJ5AAU87q=(C+p7>7@Lx)av|x7MOM#@QLaiGM?U!jiTsVB#6B=3|bOzZD=`^~nOeKN-?pu5MHzGfa+-(Ihl3xvL5{HEm! z&6eGEM^Dn^Mv||l7ve|QU*maUp1XacIJta6>vBVUp7H9n-z7Img1@7a!JhA4>q*y7 z{bC>TIpK&=OyAL5!4C6}V;AVT?sk7IJ2Mw=nAZcZmCd(|X$T`xxvDSCMqBB#jvcsH zV^RNK!nG*lLwB9@A+eHT3gJI?EcfLU#E{?P$`gO|#687g_}xk?TiwR5NU!*0&90A@ z_ghROwtS4+-juH*dqQ^arkDab9iy=TocLi$cQm=qT*CCjV_d3unb>*~pC`>vn(Ol00geUfG`%#&>q+uKhfC|SXGCp}TTnkQTya+GjZn!~iT;XP+k z?IkZqZnK?aOMR2R5QRDNdxNK}kG{c8WnbJZ^R_xcQ1mLS@l;PO=I_{3Bt8T0C@&Qg zYgas7Cju=tMtF+nG9J_sRz6&vR}o*WC)oaN`$Qa-){#56vDgDVy8dJ~bp(oALyc46GzgcYt=4_Me zJNUi!9qF@Ds5yP3d|+7FPR2SL$(^|Uy}mzNflFhY%O$rTv2JWC_!hYQHDjy45+Ad~ znXNgC#9r^tV^`acE(S)E`Hjd?pkH~+e(==_6Sls+Ti^D+>G5UeB&;wNWR1sl%&O0I zE?n7)QSK!%6w8g$%`()+dgs;VxR8FDw5_+Xcw0CUT`u}+VsnwV620ORjXsyoqf+|? zn|dcE0q=XcrSCQW(Y<`cdJ0`w#WsDB7v~O^{1oob?-8@yHzuX`IXGrLxBtw^5nHNr zRvCjpCNeg{*!xu{O~2`6`6iPxE~Ghy<SWFF)t*hqbazE`$)Jb%Xa zta70(*Foj>`A&6}%$6SVNzysjm2-#gOZi-0SjkMouXL@H7-1Zq*A%U95L-1|%{(Lj zu6hZ2Z_a_*JR#55Q_&O?Wf2if+ds^$QA~CiC(>99wz%aa%o_HEE`0v|nKLln zE8FYRmm|N!Hq#n5QMp8ab3BRM)DD}me^>ntdJo-S`RB4P-G`9=!47!Mbz9;|qMQ3P z#~uWODbMTl@%>zzJaJyWPh0lZxo|UAsAGtNQHtz6=BoLT(*{ERMZ?%8rrhHFh$VmB z>s@WL>X&cigRi@lgLiDQFPgq<4CRCiTOaIjZ$##;F-MKD#`DU(LwlC}_s& zTOYBX9QT#CE_GF$%h;>@7cPODqhXY`jxH&wQl&7~^YY zi0ygWPUEtyr(`{wJ!W7%BSDm$}Y`2I`D{dAx-Ys#+xOtop^{oGRJ z6}a+}lj1?&pNPFfKHWD4rKA9rG$>$dY`CSo0zLa$1|a?b5fiUh_Q#^#0isp^!BMf z4tlnfyDbVeYK-=tp`4FG@d*b6OxO0UhF-5Uq6lu{`+L?BW)rx6lsM-@__3cA2t=^V z=%5@XF}(Q81vKsG9RHBIvrbR&uzttKrbn-@zg+b|R^-0w$zDgQZVss1B=VgOM;wwB zwg$&vberjB(6$8o3`2fyF)n^t83`lRIpi z<$Uf)lF)dv_r^x+Ml;D%!GPbe247p5AWCELC0Z_gQ3amC{bgMz@NF(!l%!!408cuA z%h2jkbkY07FmqDu(mq@DfWITErkIKynE3P~o6i6f)vbM!K0Nle4DYV`vG=Y09wjxr z4+xp`nH@0IZ)JjU?e@NHAG2ci@2qT1*Bi^Wr>@z=o;M{a4)#v*_q=KU_JWKpdL!6x z_=**iCuQCzZ|-RB*NEe*d|OVeEgLPoTw(%i&&^MD7OjJVqJ{70-PsTARATrvi>*Ek ztUD6q_PW}A*yF-fz@;mV>_2vRcU#Gd$~yRU&@_3k zzPsAou^ijqPhY4|wTQ8D$eZ#JTrPO#riz~tvl=k|S& zr1!-~#i3mI!kCj^nD>t@Og*8609LpP1G5?jkFrWn7X0r0e$&(W*!PC|v2E8Ez2UYU z^(TThp4pV;<@agi-w3-c{S$la?F1ymk}3QiwXvJTxf#mfM%|@$m^;9(}<&WD~#Ixo}*hvA1Cj~HW$7( zCH5fS6|bd?%ESZsf8IRg@jear_KSV>A}6E^=_63?ro5AX&fF&Sa;eX&U60-nxEE@7 zw}FiqOFgt-G{#PT`KhhhiqW^rWCF8|4D7G!L)(^tg?BHyhqiP~g=P}o1pU@|G;m3u zG_E$h`8lpvCMKUwxI6mS!?k-Jw)2hSN!ODDevLT(RvX=ZlOsRIh3Us#-fs=C7%wFT zdo`ZXI8j7RI*ofvuWfAUb7$sLbt8&8{TyY?2}sd5^D6g-1^RtabpHK?JPU!_+eeH+ zeZIAghOWMjJ{JA=yuXXlh*x`>_s@Th=|BE<*bnD8`tW_?bT9w+P)ieR$9p}V{Z`)R z()cd5L>fs;R*cQ!vfab-#vO_+9J4>Z9tt!yLDbKX(6uy?*#!?ZP*jzTHo{Z=4|gTCgkpNgVnc^mJNQeB1QYzthXH zOZot@7xo1gtmKv7)%f#~&(FkaC4uQR+dy^Fm7&~PDPC;9mvRs9l?@`j$||(CEf?Z! z7v_EXF>MmcvtEDyz|78l`AuFkb~c`Hzm^~IYWQ~)+23!AC~fxH=ho}s2gx7XFLdGP zPlXqjGSK}p^40!RuHq=?l0VAVAR|={>}6QREZKiMo=~5ybacJhZJ?UtNX9gDe)(cU zLwN%3`ubt}&Dfc55S1fcp+R64Oeu`0KAz%CsFP!@K_m}V^H$(WY|38-Mn?9N4 zJ-pTavDF5(@8g{FcvWuU;cZ*jyWeDCi zIYeT?dHv(c30|)+?``xoy5Gxume{@=qq&GL!R1ju6YhO5XG9x+Vm(1j!(2M~(ZoDv zx!Fu>!-B2Me$JV6`9NEn>_v}zYcAYo{AQ!?8dGrnyKA)-c6^V^`G(2#!N5)3PGmW` zDM50?b~2kW4)o{xGyU=Xb+hM;X=r?{@s9a=(93VvuD_RfR`I0xO}wWY%CuOe3R~-6 zXu`t(e`!bl?G-&9DH@_n0awkhX=c@R@*J+4?uY%1A5elO#@oo#1c`)}evFMZ3V zFz>akq#u*kXPh5z=RA@0OpR`?_S?0zGZ(b`mY!|9+TZ!hudnZCY-q92-)y#@$0~ws zU5_Wrwo@W3zvH&^b;3-(`<>-{bmg6Oe5~PnZYHAT_Gb8xrow$QC)#+U)T@=N`dXWI zUEAmCPt~UB{K(z+``Dyk-(r{f#;B6jKS)2wZx6M*exYwwkJ9BEnd&yzZOxPvMkty1 z^y|%qtnu>YrgP_8Jw z?o#g?N8b8Ugok(4&flBw@%z1;G}L#pL2bIzD%zpD^m1GH;(l*^Hy7yk?k5Z>Ds44TM~3;?$P?yiM@kPYPtpD^%wy6n8D^vnx8%bZT1xN%=5 zAdN}nww&~X9n1NY!{_^}b`@h@^R7cCZDQNp1_9hBmbxFh7#ne);nd+>zy?3yWJ}98 z)XA56^4@sQmXm@;AHM69icv|!VriG=&ta=L+!hi~gObU;I81gHP_^ z`U*qTPUa79rtR&0RQw2*aU&U-gZfEF+CkDWs~wZmpAp?LeFMut^N)9(c3Qi5-D6>n zd+qKyc@@(h@GjcWx1c^|0=eDqX9wl0oe+)hI9ZwgD|Z_r-0HsU%4ZU*z{bMQ>It=R z>kf=vrvCo@@6^N134K8e3Pk3>^M10PP7wA!xuJ;`s3ebcU-DdR@FYtFbBHV)-n+7HzC4ddduaW7i?E|f>Y*HJOIp~~hRAD10OK?C^+ z*z(WQ7f;fNI_<^SZ_Ii}{9F16yYTeIwYSM>!#SB^D=+nwraN?z*!NxSPr6bGv|7Lf zo5y;*Bv;5cu`f%TcK4IB+Ro@^3tr}WeD()yLiI|&@6sN`8fM=8{(LraB>m(()X6bX z;$^f6?Obqlm$lO%{Df#(ub#S=NlEXU0ik|9xj=V}bKQB>`lT^b<2l)$T?}IpZJ|?a zHW;#`vj%dpF$&87`#Yoi`F-?3I}^OBcx0Fa#BCe-j+$sydeU(;Vl?)HOb1R5(Gx;; zn2PPoC3>a2TNjUYyAYfUp?dqH5GA;+s8rr(a92V4Al zNK7^R($hbW@;)*+P8ztTd|J|i_wgG%E`KUEjq1Yp*+(i$)@wsGS`oSev(ed|E zU(0KoTz)*E1Z~WTjexo-8J;j3}Za$->n9w zkrT=K2vZ?m){{!m*BQ?yZD{lGtBINLt?0j=ya#>DI9FuE78&SRN__y+$$IM6^^5!8 z$o60-^M+@=$1qRcX^ztz^T1sGENDznn`3J`9;M%t+&Saj?7hMoJ(j81ZaW?Wdtex8x@3REhnmFc}Bm)y_}JZ#kKuWC}c<{U9gy-EE_b(vid>?DzDFAbZmN zV1ApAIc7224dQDo#5Npts2mMHkzAzmW}fTfUAF6_&DIRjQ(T${Zl@Fz7JL2ayVEm{ z=ihG`kJbG1ikF8y#7P;ii%vZyT6GMMPwcXY$}a(n5Kc$@3OX7_BmX=$dV3X5TE~>! zJXOwmvwux}>MC!%yL@6Ols*5Nbv<;gUwANVFvg{(zTxDZso&roWQI?q%eL4$W?u9_ zpGP_W{a^oU{GR3Ni3F-gx`Vpf6Rpq0zQNXFC-;msX210XL8JX+(}Ne~^lRL&aPE4d zP>(Z*%?*)_iiuuppN%TAf8BNRX!#88D?Rm$pGW$F+U!dK*e!jI6a4Zdt_5p}%@w^w zz8O4UPL~k+O?dh1nCaHM*Txq~pXGDGr+m5^VW(0Na|)E|Rh<#9g+ab3Uw9%xR)H!{rc zgFfEe9{q~sS}TKXE?w?Dx5xVXJio4`oQ#{fj;L7Y`A+K6oX+#FJaL5PFM0WVMqr7X zZS9-vv-#d}j?DZ_=Ur%d_+D`^Y^TX@%`K>3-!6_Ly-RySV}NSklDBzz=N)4v6YRtK zO=En>gF)YLQZByb`e6&R5|IJeiyT|eg>up8t@7@L{?-?$fBwZ7!{vKSWMV^2Z0B1} ztVPZP?PZ)hijkNPbWGhyJTU8j%NPMRu2o)g{V;^81TNE~=PmN?4e)WCVVh)bS zI5)DKoNKF%!TXojDU8APU2Fi4uezfT$+pQD!zH|4@bJOUYFw-~O=XyE`!bKhC5H&! za4&nuREjZcECTsurO1q9Bj8kEu*BCv2LPZt(*4YdK;IC%IL(3GEK*TFn|vpG0Qzo{ zox)5;7~pF5NK9+`W3{oz$>sP?=C0z>xis&Th2BRjE6)4udAw==4M_AGDXzcFp*oCk?~bmoz+o=19N95iaY=TpT!Peb(0 zxJ}qDr`Itw@UxK&j;9^_EVlMA7Y6^R*huj<{1^Q8Ep$~bLHm~fP6*P+bBV5?_%1OY z=_qpgJeQ5>LoSRL#5Y~cch{T|Hs^iDuGuDg&p|NW<+g%em8+o5dD50g;b5H~2nsdl zxZvaLd29F8_F}AF^Sirw8N2T*o*sHsm^9j-Pqpz4D|3FD=;R72hu9>nja7pNrhNFG&)D9O z!9RaG<~p9FNpi^VBUVvcUVgcMk5(f0m*Y7q3pw`CZFru<-gL6sUyHV{1yeEI{BNgH z7&kXOYu!)r{HNubHVE${XFdxlx~Q#*qiyx`=6k=#ef7{Kc_@_y%`xgcs?$cyr~Fea z@$%n>3tz7~37*Trnvval1Nh%AKOOfXX30FS^i$f2tIzjm+1z2Jid}duSmfN+9Q)tk zyPV&|etF_X_iV`0x42H@J37xec_F-1Y?XOr-&g{?xh}WP7Me%liaD*(h4(Is*|=QTD8?mR*ABm5jLD|mL??0Fn{g}0 zB2hWToF{d6JybubJY3dVPQSZuMJpFNS(E%r*G(qwzDFa13~i{Po|r4Yv+0CM(VpG? zu0C1N?z<`LiM3o$V_vMuzpvjtnmBLGNoxM3*3T0LOK=e1>Iwn6c|T$?a@+539sKJ+ zx0Pq?yzm@G?XYv|0toc-?Y$uevkj>PU_2@CRY%V&=(Pi%n&D0`mOn*4*-h6syYkwk zWs98P^i>b^x6dQ2A0g_CKz_l_Jza-MK{ zOsFH+Us_JvoiA)A4Xt;c`!ad;F|1eZhAj^tV?1QBf&%idPhBp_^Fdb!EBod+k+$}0 zdnWsAgn!SkjAGnZpukI;Bt|?Sd0Ewm)iCW z2qO-<9*iOjZ!hFI{Hr+z5C)T zazVXX2$W9~j*Q;AX~1Py?k@3^*kK!NTiP|IAqX=$zsUcZeX{dA92^e4v*qgFou%-o z_rmm6-VmZ^cce>f&|@pEt4$Jpu+n`u`^W=IzVS~#`QhtedsV!aWP^P#SNk@f%lilz zU>|mJ-z%^c8&f@+ybe^%iHM=Um8g1n@Cn*%-$oQUf|ggqR?v}3m|3$sTvpk@ z;nV)i2^XVJs6Tz6{>(i{+X_n!I^OqbXUDF8cI_vd|Aa%TZYv*Vf}_>m7}?;%1+0Yu z*L)xH46Kw`XK%-Tx|U>>!~P)gix)q^ZUA3Epuay&!V|B?g0r6Tcw*L1gs_%)pWInj zk9mUP0jjpiQu}TD=ig$WmdI(bK~F4v{`XQIOupp;J4|5w4WH1b*>_6A5V&UhHoIz` zZ1TY6L2a)^C7-(4#(Kj_b}ldJz~mA)a%bb&RhtRmyZMCL^|St+Y;<9=-`VEhTxFl; zWCZxEh};dn>9s}KbgfVOblTWmY!#~ms(QUoY@@HH=&TcohfdE4MiGnMt!gCcXtc8- zW1dOJC6mT4?*pkNvZde8&lx9YKQ!6iT+W(sd~2}>tKaVQ_!<-~*l7FQfLSZH+KcOu zosWO~mSj{JIbP9YB+E9}#Ni-&;Z;GGiO)bHPHq$$LT$R0UUQvQZ-4iuoZAkA>15KM z+RQk)wT0w2EEden`p#{u1+nGt4F3XeKCz%AoR^C}FB-qum+l`-_5NUcG5GMjvdP`G zT<0=aPqOf(pKG917E^xh0PF2B+fD-F@^sUor5ICN@G{#cAeP@dn{4DOhQGXyGS9X( zg8PiD4(UJikbP&1XQ}=j{h7CV`FzdugvGl2hu^&oJAErX={7jqebZ$3{$akue^Vq9 z3(g4@$T7gb8`T>ogMOd?2`_AE*wUv}UL+~5_UfswCVy~FzAEyyuR{88@q=gmsWw&F z1OMH#I$zrMgQXv@Nh}ff`}+qmsg1H}b)Rlz{{i>@X|LHbdB)mr9V@V9;Uer+f4}8C z1|SjQ6G_fLo%c)*^Xlk-31cZwcbCcpf79b$(%;LA^l2E_U%HfUL<{W5=fZ}t*DPNb zS(eYTg`RPvPi9*N>+8k-OUgO*&}s*U-UZoSwuw!*HZ~V>y0uw5iUI?#zNHPZaoX&N z(p#r;7CNeo{Jo=`sxa$a+F>2+1}sHHh$Qq65HxdnMY zVeT%+gbkWWb;~^LdIbh@?{(rIV+yK7dPpHj3+fy zB@65D`%a)Irmb+S@5+(|bS#VC;@qRnJKRrR|7Yf>=H&EfizI2Yu(javU!4~mYQQG# zn+1EzwTn>>wJY~E}eZ=`GT&dSjQ_eihKJ{Kcmn}E! zH<$W#v;`Qg$7t5{@)>8pdVi(`3e8VVT@A@Uv0WgWfM@W-+UNN@Xl#x!UCIdYYv~)Y zGi_lV*WnnO;Jnko1NVK|pFjS!Z=XdNG3Lg6%G6D1|Npvlp}!w&t@g(WM=!Scu3X>_ zUu0hD)=jO~oa3qO-S$VL-7n_Fm%d}Untl;w;eWe)rpoxY3-WgVG&WET8{b{E`Oo+( zb_4!67r3uBQ{R8&|JskSE$>@2IRJm!7{;fM<{UK5r7#9zJQLQ-Oj}8|k>^bvZ717- zLpwTVtLR1T5cByX}@;Q4>o?QXY5l7D)jepTQFE{ev%StQn6L+v(mF`i`Mz* z)BIi7=I*v&@?w!Ks;}`PU-05%LNw{aS$-(5{TDbU4mlD>pRKkDn~>PV_aVVl&7bPn zr4^2LPt3=c+R$ZzEK0dLe&#yAUD0eezaLxtSN?1GDc3mw?v0O$fv(H=aFd;#Z}gbT z9n0qUH^(kBV`X(xZ!dSeV_RF68%a?N!gi_rOQ$jQ^t5>T;7fk;Ri_L2w&MmDjBS2Z z_S7TN$@HmaU)Q9xxYo-M4gEIThwM{kzTnXvj-JXT;yhxUhj+Hd3`ai&nU*=0Kjj2Z zW$F9ZFLdsyPu7xfIgDu*Iz+Z&`q%ZHnG;V}(c6cG^n7n=+niU1zW(uQ{#Ks(PVRSw zx^XPh@B#Vv0SBusD;+9Bb73z1UNFY8kueAvf35?*#S8v_|3Ck4B(e0u-~Y~C@8=}F zlW=}k!b5+um1Z(2ul|jlEc)(ZL#dJUho>AnfJX^T)K09}@nYFUo57R}iY4gE-eBRK zw9k7Ogl{0(eJK~rNqFMkb}v}~RfN@~m#g)UPbc*`&Ee^LnV_gULoJFg#vN__?|0zXcD_&)G39s9ET0q)Cp zGKp1rr>9No?t-^WF4YsKvv2Da0#el{F>j>-0`I8TgXE-=9aSpZj>VbWyHiKWp){ux zgfF}qV&07ieBzzRKi}8MJ^NE#dPf-9646hcY)1X{ye;~v-|21&IiW*#f@<%lEi@L< z{@&lQYssJg{KpWOKD~C=Vo&CqJ8_3>U!Lqk02lSfpF+_G4NUY~lMhQ$LU`_n-AhV8Wk*&4w7T=E?&=+B=ZwnnzFU*8 zr<_9mo4pO26Dw+0A*KoSci+e-dX=2U{M&HAV~6Gm1o#f8ruJTMZPN>S-*!xn9&mJk zZq-1uWyj+5e>d-tTF+fw<`({ zL(dss0IyopYo1s|<&y4=Tm5vzJ8IX=E@y?w?)2l9xccc6vZ;9Q^1jnK`{Beyf}vhA z0Wxjg`(ALX*=pm_9^HBB;~%-N+m2Gc(HZgUpMJTcPfB}uo_@L~XK;E9CN7oCMdJ-$ z!SxDVW+jgt8{IQO-k#6Dh;=aFyV&i+uFX8C_vkD6Vb)ttJj|B0vVd`J8MvvPlKW-{ zs?T*Y{Js5dISGE5uwi+hAtrW2jE(gowQX3Y$`3o8j+OQm7#anFp3wegTzqwV?L+3< zq%^{}^K;WAO&fr9{-?J|=tx+h!SA^<>*uuJEWX$fAq$S(B$m#t3!M7vs?YnN4pX)X`%Y$F`9t&lB zDmWZ{tUI;lC73DSA=}6Fv5X)e!$t0Kuy-~`)@xBfK zYy8a$QgLZB((OAwb!qrNoS?}VsQhn892+DX9Lv;3Q~iXWProy^;h3iSV#?U06MmU} zeHa#%Sexve{+n`_r^Qzpqr7&B=<2I=V?~vbE*sc%NO8++*?l*pyp_JipOQ^>vH5zj zj+TS1HmV;@8y7g$sp0&M=c<-qIGk*_&uFma~d4e z0ony)h5lZ#Nh{!V@poQ3BJ&Q(ff%WMHu_gj3$M)&u9kQ0{lf!Nyn43 zU^`H<<)qi_pP5(CQ~ZYiMI5{{*_Dr}+=YGdznQNRKM22^r%pWiDPMA#Z#oeq>relR z{8qF{Z;!ur%}K2G96WG8j|=Guwtgt@Zes=HBe00-?zk2>x}6SVmSYF+cjcv?@8jOr zPjN5fD#bLs+w`i>PJK6ib3NPdjO+wqvBGM;$il-*+QptvabjMaCdDlAZ1yqUhyLwP zu=Q`_tG43jlsOs9*ZA{2$62AbowuYxV$V!{!SqoiE4A(2>}u7 zI1sgA(AV*}`lylH3;XlgwH{+;oA>xHcz}OLRJ>EU6|;bafoHCUxj(_dfA2Nx9F$xw0x7b-$^>Pf$3=NwpG8? z?jZNFJ*9%{Bi`_2&gB23bzr)C;BSgEF$M@5oVFPESx>ES7wqn^8#B(OSboqm@vwKA z(2iPgRBfm>dD5=7bYbee4gC3{Q&5=~yPQbt%U;|+?_n&WZ(f!d$!ol0ytm?Fl@C0x zKDAo>oa7FDLY_Cr5GGaydL^K2)lxJYP;3%0^@k=jl#uUM!Jm!{m6Ade}I{F z?0ShSA^-B57vLc#`&>BTNA*|7`d0r78R!@Z*XK0U&%2+Kt{+=VryO#5m2YPptnG-@ ziPSe>rKoXP^f53L#*;YDc~7jB`1v#L#Ij*!Co`_*`A-`>9lGxpqiFefC-oZ@xi2y9P4g|t zOc+ZJ$3TTIIu>HThWgo$>3g^2GITs=9sBF}T5~1U8*iCEIq6SqVIniq2d~_C zwf8B;Pp{YSa)s;Ie1C2{9^~G!5I=wI&kE8xF{jfP7v9ePoG*2Kk@lqBOqp;Cj@hE} zz1;>6=M7v3I@qrO>n#4*fzc+Wa_{*epBtmbh6gVH5dFl37{=uLnl}mk6pWKE3bxYw zlQ(sWDQ#dydUxx5$f>WOjqL^c=+Uz``8{`vKZoAb*k+?TuN`J^f_#w`TBUy`L0twxBMvM^cH@NzK3i`T*~VM8vWUh@fUN# zAAcP)&Lv)Rj{W&=#<7S$N-sKH>~G<}m^YczgDsx(p?D5D3ikQ@gF$jUjc{{e5YN7P z#`5O-i9`R*j!|m{ipvtM!&?Nj=q%~KgYRb zgHI<^hsumHPi?>WK`k%Kh-l-ny7r^v=&+?9Axlz^i%hW3i_G!U_{IF@BO7CGj5ohM zKh83me|8$DH8XGY)}?-G&FS|!DT=*HHG;{>J_!w*z1#GDMa@I@H8w#XR(tW@I-c3f z2hLpcy!@Se<@EX9j@EWK8`+{EBeu;IRv(SnhRbj9?cF!WuCZ>Tw)@g|Ef+C9HvUlO znCpCE%_Zo3h)Z%CA?Vux zTWz)WoeLeA_no;3o@dMjU`zn<^*VPYYi#8sUQQoI9~Cd}oR5@!ePgcJ{5Do>fc|SS zkRRe%_+8RN&MzlUHj?+5cbW}J-eg|t;yJHH{KP0M-FGJhid ztWlr2tVL_0*Ym(T{q%cq>l)4fA&z1Ne8%VRKO@3he4 zDWo?0-#KV`{yWPWiuo9xbd>j^c#jjhbpdUssRzpC=zIZTVMYOdGPYXtyit?D2h*>s zCgYy^CK+v2HxybOVD;Dd#(v_BxWoju3-IpGOVLsP{1rW^pUz4q6XBy}hvHN~%K_5@ zwoeb*PZt|Rf2}7A;@QoE_{?i*cckoJ;3`ds0jhs7fS zHX`fa%6*c**WMtEGGZ?q5o{;v{aR!)i6N_JKlW{Y<8D9N9eUrXO$cUKR=W(28|-N7 z^GF#Orz)NoKk#+m>q7nAl?eg7Cj-E42VS5%5u_log~>6O^J_d+Z>;mI7dv@GgNnJ}hRR@lc&_`-1*l7q`|XO}c1J>*Z1(6!qr{P~yy3wN z>LX`6LOg1`Oj|hR_P$pP|0(C6Wc}x)`D@#ZX#Teadxt@IwwKTEOceD%IQ`4D#{n_h zu<(xRY3-L zSnTZ%yT%4H={r?`StiEBGeGa`UMFkf_tScoccmvQ`TeE-_H?Db%A%~wG3@DH`)p9^ z{+%AW)1IC1$cAFWi34l--4C5?_fLKagKJSA5V>MsSVkrdcVI)MYbm$d`FTGm0bO)G zvBf|Cd(VMf`yt^($(a3n`A7US9>{|E>-E}78*(@&9{0F;>f*tEb&OX3(pR|+{;JJ} zYz}PZ|M(kxmv!i1K(AFQ95{>XkLf=mnrwpSB?C4Gu-5W-F#Ta;DK2{Jc}0#5UCDeh`wyKVP(glnnkM9%ekvCks9IP>vlg?n9D? zvKNy#JlTopOFGQgK8IcB-^O|{O7!b!6zw-x)w_Sc2HVGPoCvb!R-nK8*erirYVVc~ z-8caM1{QP5{|$ZX19}xBebGVIZ@wRq_L&;6wT+D7+e8cc<`$d`Sqih1yWORFxa!s6 z5=`N)Hv9D1NneGIg)X0ks!t6g0N3t=m*Wxg(IXMWeaf^&$l&<0LuzI|V5w3E+RIp90q_cv^u@=}X82UZI*Db(lR{5m$EvHfIJsXR0b13MPRnjN=74(QuDZ9^l#fk6 zrw=)Oxv`NuyA-jRKuA||KqkTc)&}1+Ve3GteWTxbEbLTg7z@W%&%r;=pLQO3<3;8j zfLCdwx)x(eJ+)cco%1E=rCInGV`n`md|}-Om^ImDy2Ca+?sw$xUSEImQzzawT)Vq` zZ`*M32BkmNxy4MsxaK#k^C?Q)r&eR^Y!`69>HpG1uYZ$Gt7kqo+ajK>Iz4Ui&X+$$ zTqz4?XWsSks95yqWV6#d9rU}}TYZ7=!eD#NI1kNn?{Bft;uB;M7>o2OH=B6W^gYmSGgQ~i|^i3-X+%<*35JAfbuiD zcBHPL4Qq!P=N`uIO@Wh!w%N7qFP4q$BlqT)E$Jbd+{nU`gK$gVxyaIdU+2p7F?h?# zpriWoRraktWi z;a!!VH;ti}-rA!7TR*#_8Sja&P(AtyL+Jv1wGqcSTJa6qYorrqKlr-CMQvsiLeyLG zbiReYY&1%liM3CH4LLgC*1A`EQ#jo}!A277g7HjawhbQ2MVtyjH=EFd=ul%T|!eY<|rYc3~9N3k#|WoZ(bCT-fr@3kip=X>ByMDKIk@CItJDQ}lE z5H-qM?B_?*qvg%laU_-q);1n?`EdW@AFS)!4}KtEcip ziv2s!QzzvdPuhDfm_O{^KEGxDRhCb(@VTzTSpE{Dn9!>WdaEH*f1}$WZJ+znXRU2u zAKf5xV2Uvo|7_9pzmph=WtI&dC(XM4sKr3{-Te&teFB>L|rc_?!Tkr4ukAa6TR#XKRktx+B_(b_CD0 zVxA`YQyZ=e6DCHPPx)4-xYe%s|CHt9e$na14CLK&K*vV}boDg%VH%w4qFoDSpC5J( zSB28P#jYY*kM(Qa#c2G&?h0u%XH=6$?z;MS$ur+7>4ac(%VomPgFtiFh6HU^ef7wQ zpLbkJC7$m-Z6L7PWFlpQL7|s(AmtoI>LgRz6YMorW z4t{ye|NZ+GXT2IzzV2*qmSj|Dcf?dz!S^sua@P)QQkHFu z^aNBs!5IW-?0$dGlk03IuIx#Eo6zA?FP~k+9KXt2co0e)_Jq&Z7z&0 z9`kcJgoSg1N`~gHAK2yE ztm@!NEFEg!wNrV&1Vspz zU=QYe#&vhjnyiiT85l5K*^jnf#S;Y5CwQhM7C1J_$N}yeW>tL5{QD#jXJ4=_M!Cz$SJURezh@G{uPtxd4pAQ*YyHXz zQ?LC=whG9zp37T(9cV|knag|nHHNRlsSY^t^F@muxo_DQ_|!9-`qy@^2L9zqN!anz zN)JchVdw9$Gx?{FV%kg$raIYww&6yY;^BGn(HG1zHsk0vwD6dv&OW<@nICNJlo6{P z&><6wh2DBvH=d^qS??G1kEcZ`TMKKgPx*c9$ad$c9OcL3b!8j^JAnA9^a;D*0*`1c*90 znlZA|j>Q$15_S_g9eNSXjz2rEO5Zn*PaEC*%xoVo7JJISdR)r!XxO^5ar#q9Qs4y4 z_ub=N@Z_Dl1oqS1_=G#RlDX!KjO2aFMCu288J#wn?MPc~Emq(h#NbQc`~xQfw4Jqq z$F_)$NxG7JQ_%LV(#WziG^qxaunX!$YyKNS-K}IfFum(R2 zeF?$I`EDNssFQ2EtxuC8SgsOUEVFbfV#?6)BW;5y>pPrBH6U$6ogVS3`0?Vz?p=9O z@!z^r=Yw6czsTlC<)N|-4Vn$|AbPd}0~+G1xyRMtpK{7oV0ncvAgR zjX=f(x##Olr9=I9#CdY55*gs02 z8!({q7-vI|;yGnv=V2 zo^i3YdO`+xi~Np-@ZqU^_Z~+_-hWA%h;e${JVJo774Xy0s?09lHx269?C1IIRj1&U zoo8a|--|6~UQwLexSIM@yEs2G0NKhmTb9Fp!+kwmg4kyC;bIf5eQzRbA(#xt3lyC& zSiU|Au^!)AVim-#9AiB1A#RxcfIg^QsYl^4{?lZp{Of$*c!KCP$8sp2t-Q*2d+c#} zokTtK-&)dV0o%?$BV0;GVZ88tUTG^(Jm)|&%8b} zJLa9UUc?Sr?fspesVCSB3_PpxwD}rhs_U|XS(O{qu?W^7_B%MO3p})0XPv||>@?!$ zVUueS_TA*QpZt+nZ`Q42bQ-6s40Q}tc`mhinv2iAM_vrrD0-}wn9ln+P{Vh8KYhda zkLInCQop`97*#x>-^+ezd)fR; zW3khuxWp02>D<+U17nVOmht<;BVaC)Iba&rQN|6Ut;kou$sg1>VayFlI6j)hn2}$9 z=u9~GaQW$^DJ7X(tTO84mM51;adg_8h=zy97@(D2U*jb0cb=$sQT?##H=8LlTlIFy zNl?G0?=kY<=qLE=cjuwzw`+rCjLWCJ4DpnQ`BPRn+Bk1?_04>sf6cZAVK1x8=l=@3WFv=MM~x*9-u8JP8Yibu3p2*k zfDx)+I$na4qV@SQ-aD^9aeS62iFW?2oL{Vcu*^X&LhrjW~f1#bZS+Wg(de6CQ9qUBT>v+!vF7HPy zn5xGnH5S(JY^-sx>f8J8_^wWx#-}{q%6NHx_a61a&sC1oW;t^_C{GT%)9(ToGi}Hh zZ|CF@#sGhjFG^gMO{QGL%&p%NgJ<4@%5HYwNS}iIEE->;mvwS3<(1>U7$3!a>5J+y z8pnh@@AXP`G-H{&%75DV?lu-!NaJojVej4gr*yN8*NUwf{R-izen9`a_k32;;(Zg+ z$CiF%;o?}sbB;^dfk_`>*sALjH^L^5`A|7Fkg>KgRNgu~E#sxTzeUs4_#$4=vY!VdE)oZQE6PUAJkF_^I*m0ar&HoUNfeYg2e<2esLeKp)uer=7-J|#Y5 zvscA~h(qU>>6>8-7kh2<6z}YZdyLo3u2BDL3%2Tc>{!}Lc`N$9J|Lv)L%J;9Jz%$O)?c{DSB? z+LgMUIJ^8WXdbw^=Ms7C$G|RE<5`Un&T_;LmQCz))Ai!qJzot!({+n)qLQ8>$~W{J zXZiCQJHIK11)FS?eX6DmhFzNj;;``#WP<(YEH*LFZoX6UK0i05Ouk2y0sUQ}z!I&Vvluar0B0>}G}z$bQOTfLvZ=nJO8mAOS4-v(We zAAQ!|&_)n*Zp|c&Fk0D>${E}_Zu4ZNDE?wvG)I?u&tq^T6L!})Ny7+Hm>8WEwr&P? z)F1Em33JtsYd$8ufB*h>(kq+bUUz%HWPM{>9$Pf$ImvwIcHmIVF)*{t>%DOw{RgbY z<6f=Jh)ZieU)l`tZuSRq&`(!y4#Pude}~ zf;wV4&cQv)(_#o5HLykW!13E5Nx^m2^Sv?c@6*43P(%)3KmEDxXddUn>76(Q#E0wj z{A9!%I2aA+yc~1RVsQfAjIu&plCoZ?f{Gj{?R813S^{ z^-793*AFLRJyEP+Iul@YeU(AbEi|^DsE>iY?RkX0%CZ+aK5cmKRdq*;!8lT4XyNg{ zyOux%`+Gnc5D~=`HhK?TEzp_u93(g=gc5(yeR+hYSXOB_`xZFUDSW4 zXJ(Yt^!AySd+I?y@Kp797DhI=%XEPm`+BvVSxt*y>r0t*|5tjly!-h%#)n&?ZEbt+ zU%K<7jcv)fQ@?KBKRq{Fm z2zvEXWWMnk0r==!!5fG7pJ&Y{$sn0o`cZfBb*X10GheQjh&5Xl7?vI2NlL|$Dro*s zKCP_@rLVS;^-+_W-*si*mqE!zmfI6gaub#0@ko9w*WxcL z;nQ9_efNW{riPTC#BYNg`1H}cJnw_&4}wlv0wVo(xp=#UXa1co?vEheftsWxYVy$T`=3tvUi{?v z$8oaVQb$w*S}2%ZH+uqpbrojYc$%bRkD)&HGGqXB-?k=?O`oYe(TgBV>8d+MGIH>v znPAgR7fw9BG4UZ9hS2xb_6&Pygqo^7Y`dOh4fjWI&fz;>-@RUk}?m>*J2q{``5h@ARs2s{JRqZ44~} zn;ls7{Z8!EFtk5TO6y(I{1CH{aJtV+^s2#m0g?K)7bk}uJ2le6&BmRW11TlV{FPae!aS_UU2v< zGwAs!p0J<`k5DZA@E>)n<9?SvBXUY_mWsL^4(a&7GO+PdRfjz>o2*_~G59ImDeAlP_lZJlXVf@36r3i$5Ht z?J-NRtr|DJw?%QX)WhW>t{nC6ZR@ByjPq_g%r+~x|C1|iEq+h_?%r#)0yjvWnC<`P zs!3dP&{}eRdTF05eps>BVT>Uc4w>*GiY}%D&ol4cHWJv;L%7GrB)KQ=l(Pdq&)9}} ze7V1Vko5(Z&-+)uzb$pr^!ZQ2wPrO2XM&OLTKN7AC$e5_F_l~M3G4S|8C8z2 zjSWqoN+yA}3X zCJ2d*T=MBt=9?dD{V#Td`h)LtT>R}?u+2&2(J0%zMs-w-b@lHSJtLly7^|(!f9Ird zymuYi^BD`cTP&pQefXV|YhrdeCRSO;*`IHuO---BtIxAHO?}%Qd&-;ILPJ%6jCGS{&vRJP?_Uil4 zo=+Y3kG5auPw3o^MyK-IIhSs;?1>-CZEP>au}9gEI&*>jT%e=+o$>X~22CyL7# zY}oycr!Kd#f**XSRCvBGvQ+q*-XqMX?Z{WM?W^C(MGX?ql^@*ACn35cL0r~V@8D1T zi20T)F&9XkCEvA?;e!Q%`A&Mhd4}>Ct1fxjpns$OY1fDE)8eMjx?Zczi(1soa`%&; z`t7B;ms9+ClC|cqA3%MtP9*dpu7!gXmjb|b1 z*qDZG4Q%Y7vwX{;&%NiXjBGb!G5+qi*T1(%od=4Q4C6i|LzN@=;M&)LMwB-hckt8v zHz|USa5=ePa^+#ZEk1tu#eIx5UT1-_jeM0XeR61@MGla;1uG@(Zm0I`YIk09UR}P zjBKRR0C0!fkp-@ctg7Fhr2zLH7Vs?#XLscqF97=9-r;tyzCmMDoClu@+jI!U*1qMw zlRCfs=92(J{PCb|`a?U^_sM0F+<|ye+q3uECf_ACGF$S$=lCevT+yWGC--r%U3fI=+xy*}-tOdWKG@r$ zAIj5s_@=Re5hKv|_V2GO{}w+T2i`Q9KkH4%KkDFxo&69ShWU++7renTl_|2g7VX>6 zeiswhxU6m4#W*1d2M@odd22JpV)tQOr|~{0{-b-}>{Yf0?G^o7{LpY(x~on7EPO@1^7wO#g_^#g&%zeJT700K#kSwQg<}M2RIS4?e0VExMe3trT4V! zHLkHze(t0Zwdxyvrn`jb>gv~@-R_*8yU^>dp4UrGeVR(zc3<<_Nfkj#6GyL|r$#%6 zH#>sQWGw5b09PZ~FiVhhd7ZeXMsvJ>mlL>Xr$}QNig{v5UntaeX!4%G_VRPivZ$8tK&Z3#Kq zZmTW9U7o;&`@8@*YI0oy;NTro`{@yR(&o*(j(C$(?kGHOr;(8i;obWXtmsZqxaxGM zXn(-#zyJMjD@S*f`_KRU&wSn&gW-anx+D>E$EmpkoXSAiWY2OD&=(jX!6UFcKEQ)+ ztJS`T8SPSCV5z>gMHb8}upRv`3C?MIxV@qGKL+OG7^bE?!&NiMqQFV+ocsEXY`uyfo+422&k8OCAjFJD%{-Jg__2~)&OFzi6 zKiz%Jg@7hLD(%BOH5CDK8!RLnTvgEkh}qWncW@ki7f`nrl#XV1-k`)=jj71q}g_CyHHb%ovtY1O& zH@rRRtHe=Zs(1FWk)7Q8eeXL>{qz1C-%FB0Z8~h-hi=BLV+Yk}zIb=Bja~3M zwG(~v=p*6l(SnKN=lhW9nylCL^rKH7T6u?I?z@tk$?GHLfxdTJyY7gN-NpJ&tf}v9 z!pE9qsYiv4M!WmPm?X<3KYLyKi5kJBg*9BtxG;A}55&f>rPXhYp_1-P6W3O9>Ab++ zO;4gg9Lx6@J27t*4-V=PkN#=>gk3N7WLxFUElI`HBQGD29i+Ulic@*lPPVOU&GRn# zxAM1LmV!<*KEf4$?!TVfd1Yy2%A@NVy0_CWPdyWjk8`C-QI*>@3rQH&L@TTX;A&BQvn zdp3wk_D#&?eUd9q(8I~~g^@-90^Lk87ifeG<=}(jUNgd8WzSEtkT%y!kD5RF=lS0^ zc&+)~&PzR&*sp${<4i8ci+RQuPUKd=n>5r{DqKcgc2IamFDmTAD{Zqdxj+aSpL3!n=SKxK} zV=mVjTiKM8iJ3OoA94iT@VWPvn54Ct^mE0d6Z7OQ*?kf_-v0~Us&(~!jD$-u6UVVn zebRSN&f;Dtqw%Dkh_c<;M5cEL?i3MEJIdu9ZFlS^G=OKf-_nt~-?1)i0CqcnPTulyLN07HpP0vS)goup{s-6a==_FtowyoQ8Wx_NHxR%MN z=FA{w$YD290U-)8s8+}Y_*xl zpPph3$O2CD>?drWPmw?=s^|JX>P23vaAzZ9#9Gd_zVjG)sC@s=EBj{1@|`w%(ckFv zr;zVwf0dX;PBjKCY0GDBqMr&kZNHTcH9RetiBB!%zJfpCTnf{niyk>I^ynR8t2q~k z$A{P^8~4rl$Kc(x8_Vf02RcsJXBiikvGq&vv+_D^F6VTuZ1gi;>Ru;tqh8qXKQEF) zGd;<#wV(W6#w?51w4#&W4>~c6-YJX}ZES4F*lX!`a``DEoPTOp@OTG*jWRlhD$Ld6 z;q`>unKzy%VQS8^=B42Kd7@EHxU4oJ2H-ZnCq~k|HRltUZngET?GX*1Ha~Xt+&{(+ z+IMDaIl*}=+uBRTd<`e3EX@k6wLFXEeTsF6f31Z#q%xbG_sQ+PBQJAOc(O zX`YAU$Q1bRLsU zy#r=f{xysfmB;8k1y!#_mK}>(waZsq0sS5I;2q4v=<(xn8k<)c%!9o%KY!E4TH$4+iMHoNeK z;?i+y>U-9AHQSxImwXBSk$&BfPmYymSK;3<^4mr{uvLaMt}P5{lP8;b#8zVfe=r_1 zzsBbH>aTGn4>^8zStJl)iXHQN!aR(r_?wvdD)wjUqu@_3lBt^WLVnpR-pxf>CiZ~t z4cU7que86}Y9{va9!nu7S$QU_KDY9_*I_(GPbK^*CwbFcnO31!y!t!`KHiPRQ9BUp zJSP!8ysq+gHp~dyXpBLfTjR8If$Sm!*#}Wg(2h4>G1~NloLA;@AuFYy!&U>^H@!u_ zPFs<7WtRCqoNiir+{bM+x8RDg&`!ZXCi>?xj+z@L>U&S$*Emz2Lb=ItHorXSjl{)& zY{9=opJGamS+;%@an!W?nV(`?kKYk3K0>|k8F!i@KPr!H6KuioKP3~Xm$O{Pa!((} zeom?4Q0`0an_D(+RDC}$-0SZ*9}#^~qxL<2m;Tm!OqyQ_e?ImKJOEBiOB{XPBKr3h z{Tldr$N+4pjyXWD6N6nBHHUnF+FZ2{A6a;am_L6)pGkL*vP$~LOXhNKKImp;2HFX>LhG4W84v=yk#y<&qa>; z#%?t}Q1dPGx%(2M6n3#@vpF_heL(r^mivg^{KSs^kTc2HWXbi7Oa0|dr-}0YGSc3@ zOJ8-5lK;${g<>DfV?qp5?Zo&F=C(LhUpSfRhPs6TRtfw*IuDdb^TAxPwr#$n)hAS--)gDjZNZf z#Nm;+L2Vy+g!X5QC2_D>*8Evj(_tdKcq{&|`e2{q%N&HpFo&^qo!i!rnAluPz-MNszy$;~_3T((*|(n)1^9% zW!Rj4do#52_I)=4;k$N{@%lf$zUUNaYm`KHxJ=jhd#@Hw>SK8wPJkSuG0z$$gqz4z zCun7|e(swS=(ew<$KKhrdmjVc6TkfZt}YB*-t$=TH!be`nWzn2-G3f0)qgEO0r-T*q*-sUgAF-2;tVS}Ef4)wD;vL&|gLLZKc7K^Z z+;6@uC~0rD0KKk*8~<$9gMTiEF84}M-+mwIEX+)Dk?87oHeCIl?&Nr~U#kqn)&?{B|vZUL<8Ab~9j z>S~ky!n<>&JD)ZgGBDp?xF70-6 z=MSONrAsJtK1^MOf1aF_!Ih`Ho019HKh-6B%(iJFz7OmAYHL5t4>Ez#N(sxD>7m0* z2UG@ky}hNinU8LB^|zL@=)1^lyT7TsB{zO^xMKq zW$`!qpyjbGDV^%Ja`eGn14yAhea1==$53pIBfAX;U*ph6Mgs=xA``Q%m3{y)%DKt* zobAU-C)4q%5B_5PmgRpLqz~JaXWRP6cXqh;4@%FL0<&Dk*E_qS7$_oiNyJXhg%xMC{UOw9^Vz*;NNoZbM9cdVRA?qK~+z`ZESZ zKe|~HCayWjyr`d?6&d~Jx32?k-O=d;&f=Fg_hc!O$MW06C!BbEtgWEuz*jP9oa;a5 zJ5Ob=ligOmnggx2&rdhIBseb!i^Yu59`4XY+RDK^rS&p*Hoa}butQ9TYh6_GJhpzqJ}QdlT{umk*j|4z?OVN#4|9BK3PznkTpX#4yx z7X*ku=D#(#PBw9)ALs+stEFZ69C9dnoPX`uZq&tpPd1opp1zNs`_86=_5MS7z1&3) zH@1E+zp>S8eIK^d{zZHlThIQYVqz_aY1C`z1L+%hM|l{f=ebQ|cB3Uj2k#AURG(p^A71TZ zj1_=T3^5ux79Gh(Pq5MRo8MeJ{bBB$f07bGm@9`ah7g5|yVPCN1AF@FtLe4f9E zwdXN%mb2enE;co7tYNI+ng^~|Z+<39+Kh3^4~y+&d%&^Z7h0l&kHv;BG#B{UmaH*M ztQGeA`2B3USr+G*<1oStUU&c16-rV~ge7 z)8%yWoAwL+;J)#SZv&eNTKQQcf7s%&+17=QS?*2x1l){&CmpEYj27;~f9}Uu{NyhW ze)#lzDK`z{=l^R`D6qd?7~{Jx%6l_bIpBl#ocmmJi%WeKZ!Y@8b^RdAM;~TmG2&Rj zK(ge$pZ%Ns$DChqenA!YxtB2zHsQN;Q-if0{(HKw_@vQcOa|#d=)`W4<7e=4Zwo;v z`_SQk?kuZqZ86K{KK5%p_~WN*@#C>LgNJ6--5`IGW zx{rBXn?+xwL*;?<%WZia+tc0S`~2N+cy`3?R=yuRik$-3U{?|jAX_Z9uGVYZ&X#4wO%r7<@X2SMYi`mS&4`urZBj?n@=RGW-e;daXya+B1 zn8?1-3=3I`xMfBy!qmZ26$;N5%%NPdrwTXw9Cw!~EI%9|G$@V_}o;JzU@?(*g zj-Bl9-R>XhYxg5J?+R>sp!I%nMGt=_&-+Q!&?(yZ$pl?WUvsR?dfVdLqj5=swl;60 z)^$VLQy8k~YOnb^?$7v}elFPJluugY_3`JH#g|KcDW|d4x1sAk%*V)0Ka$p%UD<$S z@+M`&Uk8>99b+Cot+=@cMZT@7P@*Xc3Ca9nM7`gV~peu{Z^^P^o7Ft`^7hk!a-5afPj{<1TwdG)nb zqIdw)S~(Agi_;L_f9Fnba-zXWm{66vygZFbcYgZ;Eb$3K?lt*P+s!-z--b#LTJJO% zZkjVdy}Z&Lj+dP+C&1=MS(noPdH>mk2<1|M?#kaO8`)-B`Q8i*zNwE}U$k9M%+{UW z@SZ4so=z;~EvFX0Hai?IV5ejV0{}=|79H2O6GbnP12iYMxY(MUM-BowU!u$;x<6X4LKkBZ1 z8BCGQtllM?({yplWSb}zWRpF==D;ZNY1&%L{^959CzB_le|iFmNj(X`-CN%+L4W}C z)9Epdj)=bdp&13_yz{E1p6Or#@4lz{*@C|o=$Bo_PRC>NOr2J&b`uaP_1wyLFy=E` zgFN5~B+${W?PNOA-^Guzp365+U&}-%^euKmUV`wYYTy;{`dvQA)*uWgh7^lxr#bi9 zO+I&WPXB%{xE6FZTRFdPIKjsvKa`O+-K^P6*w{fEY(C;IU+oC>2iu0Be|3MHCR4lk zwOzu9{+o8WF8x05ew#a{O5#fOzDu*MJDZE%;%Yu@SI%9#`1S8QR?`!RnvIQh!lde8 zx7n-TcE+RBSJ2ZuO*|+rO+6<25dDOnr4JTkU;Ty?Eg2&fRfK;KlB@m`*qCePKDzh&n~JwfES8OnlT<|1dxQGR~o6dB$r z`SHKgE&vyE%s1E~r=!i-D0kWQt8#ynj>N9)k0*&coxcTN!p8IDY!+b`yR5NJiw(%e zSFUs51|76J4GcksmXp0Cx3T@scwsHaCYw#d(q7ypmqxp7OMj^iQ@vB1%Kf*CJIDP| zb=lK7S;g1EAoyM7HBJ=Zb~W3-@pX@_zi<*kiFXcmiGG&+Tgn^XKfMoq&eK?A(Od3> zEGHJM13Ku-bN)IAGvR~+e0aN+G2g`98FErRsAgH)G^Hq1@Q~2bt(racKFv_QY-{dQJbCHW>hvLc|1_BPp z2?QTK8JOu!Jock}3|oo!N`D|23tpDK&GJr|Nc0!uK7alkPFDieGU2gp_+%S61B@cZDEKLf8pHVyRXAp0$+Q6PrVosc!g(HKQz7xtTvp5ZhIk&(BY*2XyW zQ%1)JICZ0MuCn7@!?$LMrP`^eq?f4?4eMIkgOrJ>_c!q#IS;mF%v09+q33@KBcZJq z4dm1K*A6%2Nm|n9xYTc+-dk*=RoiD}t-SK*eXLw_9F<1~R*b|n>1$>`J#8F~?!E{; z;p@WB>XS6aS>8=2L}z*T-SIBTV31FlWTdR1hqBK3eUpXjB0CgIE}s1<>`3oxkX7R& zPamdD^dy^OBj_V8J&7yp7kyJ3e~j-H(@}e#diaECulW>j#5h--E~7j*y+3{J=bzY| zQ*FPI3?xsOUXexqhT{_W$ds+*<+z72M(`3b&eQf8-wpk)GM1BSB{pGtxX+Vkhn#%& zxty@0ygB8gPCP7|4f@g}Px=`v;qBO8{HZbpfLVY;@V2+vk%MTuYWZ=)AV?E=0<uYZ#6+*xpRR9yQO>_MRAyV7CUtaZvoL7i@QL}7Ar5jg!jtQG z>55})u^s3e&dn4BCcIgBr}|jAi^%$(=kmLn-1Qr_<4yR$>%rn*x%~8_^giUn4){Cg zZOnIb43+tu7^nJ_=S8-@CR~oVcsH-1WOuZ;J!602jCV`t$D^z4iC2FjAG~0e9WUHz zj$60ECbrIn2SN1i>PwtUzT(jjwf!=mvW?N9;WM_#`|eBrIrCa`d^hKtMETW=;!c-& zQpEs?Jw@*m4frN@im;8=l|8{+JMsaE!SOEF!}3hL&K%0kISb0od13vB2b$l~(+c4S zB&Uc=ZFAnIQx}=HI!8wBL~ag>E|`7|dcmg|a}2q){nUpc{!M*v>Gj<V7s@Rs%GRX_(FM#k5wP5kH_^E{nJ=VF;!MB`mf_Q z`KsvYr~Dk_Hkz+IbCr6MSuFpK*3mqd=Q*KEWFh2z)?e<#Al~TQnUQ1kc1k1UjB$1w z*M%*O9*2Wwmd6!Kbz7MEV)3V^JQUuqIV+u49L;Y|9BovkJNJ&o z;ot-;Qd{y)q;KYHo;~DwHBIAE@l9=hWX&%&va`G{fKgEd{lnL>xHgv^xcMV9_uP!v zeU2^69HZn2?`gAh%ueQztL#8OONOn#-+J7793O&%$zM9(&+mLGadf?poFeIu$`)uT z+h>GdyI15mR&nm=TWhl6gdv(ej4;j(Imy&xV+qT!4`58DKI6G3V-fJLd6?5KmasW) z8gyDB=2e)=XU9lt7fzU}Xs!iy{C(Qw`5kQYBV*LZh))$8s!XLaOufnZ_#6Am^3djz zv+bSigG>b3O2%4sKXS3Nd*K92D!Y&3`q);bJb2};K6>@BmmfbH8=L)>c=eX?o2$v> z%G>ImP7f&7IpsONOnIeUxlaAAefD5P(R1T=O@EB88~s_OrfoHAx|#UZoe2Vuo+ zOYY)6E{FZGo+h62nuO;lROd%jY=m-pe2nt{Y+7ZzD~-@4V1u5IfIoF7)1FnB)|$} zdC}or2IfCWwhr`6;~m%BAiZ=bLmr9lpIPulr zZxtI7OnK|mx35=A&LyuR_WBj;Bofe8^n#b&Zawcma)+RQr4<3&;#cIIQKMBkCi?Y- zw@W!@(e`d{w9~IM5BBQ+{^;Ug71{KLy2nd)>FDE8RbjyyP=*{rNWYScI8Lcu*f> zkY0}+`PAAx%i_}|*mr#EbF@EZf7C+pdiJ@nGcisC&|HU3EZkJGw83mQuylXDkGMAJ zf_=QvxmEt6gCZyR=XiJ3+uvV9$A<0P>rc^PE#5@^pZKre+C==#v^0? z5}P7^l^4(@yd**{?n^t_>fiLs_jfc#+C5J{*Raq0_qA>?QSv?PCw7J3QsYC$8DX%T zr1rS)UzMYFq5PQOiM4>i+l<@$xX_xH8UwnR9L`vG zDs8jbs5_?JzZRJko>_^;!r{hCG0fh1(uD7zCpry_ZMs3cy)6t$$_I1>yfs@77-}jLY$QtKX z%FRt3pM8YLT1v=1havSmi?NP5N%bmDk^K|lYoJ@-G@>rZVifUyBCXGiz$`R_4E z=b;_Sqk{9Rp!#=ldAEyq(=(?3d1v+ z#pa}-SYxIx1K)EyD{r~2n{V8r_w z!{pl-FSdKWvFA*?ZDr^4FR~r(q{oY!ST4^#`Sz07=FKbYV>pk6w&}ZEuHJX?tGl|k z-)a0x_y;^1zEn2xq&Yaf&O@KXnt#f_s$&sHn{FFB7vYOv-;om$-|ZsFgVsB~6P}AL z=l4g|UC$~%JblEqUyNBeKy1wM0#54m`46&Ew${(3KF_hpWW-1C!^hYdb+O%Z_0zpx z@D}zFaE&q1$Vm=6Q?dOl3m780Q5*Vo9fxmrHVW+<-~T0Y>po%vU1)pa)qPkPR6OYm ze^d_9PMxG)c%%C1`QEx%u2gyRvpC!+^G-tb%INJ9%DgEuM4&Z?PreE1y`?!>+ zLHk@p(e7EtaW?gn%jf>0vauoipJZ^yM)xW9fbE8DbZhT9wdpq(`!D7ZKOcXu#Ibe< zEnq1B#Mj6@9OeO8Z8Y;6`qWo+3{?Hxa67*f*5dvh*2=UwTh@?j0rGSa{1=e2Hu#RHzqDj zHj3Z_4jR4KjQ-Gn-M#yzuw#2-5itFPTj0XFr87o-|C|h8qRGP zYgf+X<*?Bg^#`o2ZR!8*1zz5N|K>t?sK{VN=Y`tP&pWxuWG-aCG5`PD;R%F$Li(C* z$mh>}FG0^g4aj6RaEk`l5fWZlZsQ@5~N9f8>u7|H6O%Feb1q%h<*O^Vrg!Z{_J&fNq`} zKj_l(yx~UBL%vMkvBE!3=rSwESPSX^4qfud&>w8R5Xc6(&0wmvH`F$Rssc)x=e~Y8 zU7P!WWqB;7{N#_x{)0VV{M%A4#u!flGkAY^zVjWQ>%!)d7>oGfyYy@P&ZO_r^T`u% zGUvpY=Z0sIeO%+D&W6?~=a_i@JU$#>{B^?#V(T);hjD``GoSqOH5!{``Nody>+_>O zJjT_81LuwQye*{PzQ3=ha)PyCm!(ae?+xShr61jv+()#hSvJc)_x-M~j(tLy+{LD9 z9g~2KJ&eTKz{}%Mi}6fx)sD8C=1Di4oBnZ+ed55AO)c%Yj!$j%&d7Gy_p4-}({Wwj zb2k}F5w1_1X{+t5RBE@~zqwZ1yHEoP?B^D5Fw76{;kr0?r#6=8JL%W0@^omEuE)z0 zY<**x8evpnD(XM~`#X2A$ek^Cahg;d)Oav71$)+y9Wh>WF_sSW_Cm`*V^@Qqd+eZD z$Z^`!P|Tu%cmG6Nd9o|7yw9L3V%>>xuF}S?o`3)TckEC_yL_U)Y_qY+9m1wNl($`g ztp)+o4nP#+b@~e7*yU4#Ma+hkh>(!>=2x|i;Va3 zb2l$5`NE2P<_+&~F~C;s9>lVs*OMUgnh*)crb$)ZHB3);@n0Cj&!wldErviR603m_ z9%(;!y{F_Kp3{Vl&xMl*dce>P@{V3LOl(hL<9G-7?v508V=2q_;E{Jtu;x5!*PN6o zvt?J41gZq;&C1~*Ackz}ZU`r!p}UN!tf8F0e|4v+?)Wj##JkY9dfArK^RXi|fgBT= zBpt3co9#|C>}`Wh?z;l=4(hDOjpvhzsr5TYMs(pj1$vqE*wBhH%7)*x3rY{Nw9nga zLtZ;!uL`WIAxjb>+oqG$!xmXVUo$V^kKo70cXQXE2s-7r4>Gf7LH*BtlKa`h_M+M_ z-d!7g_3+3Q14Vo9mH}G$y_;++({-9Stu~Ms3PN|b@=lA#fUy9wjr5RDW5ePDer|`P zDR}evUh+4|GaEK5WhH9&pU;jk&Gyd05N9T9aW8@+Tlz`7JK z)5!u>HkWth++Cx+v3y@Rhh!%R536m9HK9}p$`*Ujak1cR)?c%Y9aUUjvVv3I@Lq{w z$=I^EV_rHjSWi&{Rb9{4U3Oi3$FgJjweI}X{t8yY4sE`{Fsy6npW1!CC+crGHHLRc z-s8bOumjtgcC838^yf#Kda^A1q%ShJY@nhvp;1KGK7Ni^ftlQun*74U|tK98m1xgS@wWeNBLKaJ)qB3 zPWQ)5oKv6hR1TJ=V8FbllIZHn-bSdTr_#u$g&}i*r&?%Ah5^ zc|wS^J=+_2uWt&nVvJTyK7Y|ftnqvd8oqP^E%f$a8}(GSlA#yF$@~X$fw(_xvDc}CI>FKc^UXsJF@d5X3MVG`hDhgKc_62FZ!wUa69lGFjAunafw`z zcecIh+oA@d>g0lcVh`I=R#Z>hI{JDPSNZ_G3ZjE;xf31O$+*P?vF4o^mu9SVZFa}C z)-|QahZA`8w6(=n&cErW#UCRUIhEJ&vg-g=l)s<6uJX!n54{@w-Et~kIoq%v^Aw(v zxZih}$*Qx&zv7f9U6I1b+fJrV<{V3kklkzG@KXV0B|Ni{v ze~L#`o=y^fOWf-eLpTR6@!}avMQgoj}dVu_Joj_JLx$#VVL+4FlmegCbS`=xer?977 z7hz=&_!tN#Wn@gPzB#)0wLL&%gdYHkf!k|Et)ke#C4_@iP0+d7!%biE(Q8x8pzH zA^LsRQh3c~UVBa)W`CXKBYsYKA>t2qo%7np|GG<_F8G%qEW&ZL`x)DyJi?Rtp{--+ zn)^%JD|-HtabHx3lV~~iVwo>L?AgxIJ@7%8?B_<#if z?4xmlre190TLaW*Q@k@tPTLF2#d+lqKNTluTO$~pE|}%s(8=Yne;L1f{Cl;&whg}S z`RdjeR+y?5`jf5s=l|Xf&wDKdw89w~^O>#lAMT!~y2($WJ&9S(8cxS1fNg>2e5b{= z`MdCRRWNB~ofS;c z@22|!SrJ)k*xU*eEf~jp-=<6mK3;N@^Y5i&gBRI}*(b%D&8bfBzuA{u{xXi-{4;Dj zpT;!4UUC-Xr;-lBr)+cUe`d)0WM4+v%Jv=lDD8t!I=D3@3p>0Enajzl_~!1X%9PEF z>TB}bdbq<$9~DzA<2Hh)cPC~B^ERTr&*Q6H-jl;?vfE{%x^6U}Do{8zK z>qEEo?NjS^!a8s9>a^h?%c*a6aTD6eSJJi2fkFF#h5D((JU+zFPbXWdtzIyh;B8mB zt?)P7q~!pV=zbbk>A#yvjwg&xpe9->oGL%ITye@N3TCp^H{FzX4#5anXBAlWSuJod zlDpkp*6~T%+WL0ok?Nr}8)r+ua|BXJm7TU*m(RfgPH`?>kcW=LM%{itG$6U3_KeM0F&Bt=?+~5Ds zcPf4v{c71qu(c@XQ^&J@0NAP;Y5C9jx5X&ULRh!qQob(ML^*@jDyQs=WgFNZCMNU3 zQ2nIH${*vx2Ii_iO%J^MD*E{|CkA%mdHe43ofiFLJ7y&V+KGIsd5c$_W10GZPgj3_ z%RGtsu~odubwrX^ti2|qP{rtp8Cfk*7>7sU)=jwVy|G?r8K)?lAH;v~pktgfMnivmc=Xt;>0k5U z0r%DiIzRZ*SO_*!c+UQsFPv}-4jyxsGOnt*&Q^Zda;kW1JLxILe-IaRTWfR7JQ_ba zW@0@q%r!9OGyiGYV8l+j-tLKo)_K4|bTV&8b--HiCH1?AHsiUYVbQQt_5tydF+l5k z@*`D$y{|kkH|y;^(7&!GXbnRPWWdV^Bq8{*UhoQUtT{xB>V#p03v{()w097#^&2G} zm4;tkF$8o>c(ztgNb<`L<+e7@c0Ie^Q5|EWPcV;}6Be5jwAdc#iJg|h(*f+Ui2~kQ zaBh7fy?iLY(KqC{ypnG1q(I^Ei6;KdgNgOG1FD#HdOCpE8c!_tGFAXlUcAd+`^G`+ zu2IIFJE8vc1!TU!kTr*gYe`&f>oq&?#@Ruuf}QX$2|y!t^L^dyBzqbB%t%(w{i(bI z7;kL}fsOO`sa%)xTV0zz9f4f+IR}4z;F%Rtjp=)-Z+EHj*88!c`}vLcWiUOTtDVwv z$%gjt?5Ll!fU;>u{NI2$48|F?A=HlZ`#ag_%v*pr(|xkVMzXU7dfPtw2NcA9@{H2Y z0q67Wbv0Uc6G_(kYzdy0=LcT?#x~6Y4!rf|=PsHo(FWz{{fS_Yv{jW9e9_;44vRj1 z?W>3tyfal#***awl@q=%Ytr+LZal4xGUmia@sHXMOTS#cEq|TRJo+{R2_#*vz8Qc+ zmz4euZ=dpjl)qeT5B=(kboTGtzq;VN_cnfGALME$^~9>jZK1pEY((d&UOW8p{rb*( z*p>_uZ1q3zZ|XPu-)v;!JR!7rx4}Jb-S&O6m7OnUBauW4hQux`Ju-p98u;17mFO2h z^%)S}ygTlhCY76Iw>{&e!Kckp_s2ilm4olU9N<}aY%?anXD}<5EL=h&*JzhLigEH? z>+QY^FHAR_a=C-*&xfr$8XBK`b4Vi z^4RDJ->(m~)L%MX3o;$!z?A1@bSsn3-=^M~j$C^=xIWr2R`V^0F^FvRno^!c}I z=redhyt9q1cJHQwbOhK7SL6M664F*DmJ@7^@)kQ`W?LNbi%ZL~Q_ewU+ysQ(BEif<&-1OWOPF9_6*HMoX#|BR_<;f}k zJHBrC*NE4?s~-Mb$M4;JkBw}~QVhMjuQ5iz@hrD{DR-@iFwhSI;kGURN316PC?`g} zeu$x9fYFZYd;Tcv56`$RWrJe}&;k9##Ahk1Vuzm<uscGYP z)3)>2T3tC=PA048=kS~V*-xxeoLjr;_F=w|f2AylU#?d=rd;9#af~e{A*?hXj)7pr zvW?cYmV-^X1adTxzNEwNb+f+wwL`zhCH zR^v*2(skGw-?*u*E5G_|g!1H}UQa2RQ{3f`BGySR^vv3;vHh!;Vy8IRD%Q_M54`v7 zuHKB_&71tC9teH@OFW1P7JQPA?PLP-1Cd&sky)D%H7B+1a+n-@dC~&jc$T-#RY)x4 zZa@1!YU}gfGQmlBKmRVd#;R2c7EBg0#+vl4i%<%qcrV>+V!xgajxxWuR!QtO{C@{i z6@42$6?xIP^P7LRFaG_f7-K6V|Dul7=5*W7<^Dv=e6jf{sV(J|Jjk$RGzqZsQdRek z-j*K{T774K<-2W}{2#UZR(44Bxs|ij?Ob}k%ahVSm)dUV`=#;d53>8)=Rd~9Xp3AY zI#S23OU6yU+v3z09b24U7EW{E$`DulvrMuqZD|qAiE=TCuE|H@TE-mr6W?v?&b}VM zv4G}fuWjAA7~6VZG}-!6J~g1}Mai|khWEnwmE<24&i=1`k3R8FF0nQ_3R7FZkvG!C zdf!)KH@9X*LXhQRhh1B_ZNR&1qxJXa!q{B#hO8Iah(&+!{b8O{YuluK`~0Vi;*zb+ zOHwC(;`@x1gK%r?$7lC#sDj%4DH~i4cwF&q**uriYVBw@yv0k4jxZgfH@M&CMLqY& zd%r&Q`v)FveS&rU+Fl!aIVN&0pYhDJxm-+0O;4W_&$$JNbzawNOY?#grfp1GGKL&s+9 z%-y%NK;L#Yb$+?J+*rpFeXa009b3P9XrqPaPS|R8h}GQk?-M+7j(Ki|uz#;|5u`_E z3l87+Z8Km^FVa^1KEE*i2)iP6KT2=V!%V7Su=4$MoY+(k<8te0;zE z`{>Z0c{1j`b3P`09kDLVV~j)fti&Ab!wQh+f5lHLUfu9B`-GmAKfEa)Ygxx`#!%wv z4QXe|@OmK#OHmuuE+7u8MV1>nY_0PcA6CK7AKoA){mW0~`S-Du{q@s(-v0h%8@DwC zqx(G;%{cVc{h!u@ckw*)#lD;O)To#_$^D$A-^A75Bq*$81oHo!eCv~!zOT2n=a-kt zLfF6iUdz#Vb$M?4zv)xF=5v>yDu8f;V7y3mK86R+2W>GdA-I_q~`!y~r1{q73` zhk0(mIyXKZ*T_Y*xLn$SjiHX0|89Qc`dPQ3yK;BeV%rZ_+G80%`rIFjb9;Hp+a0}I zp2-*6_!9L`AMjll>zm5??H3uJVxr$(no~?{nffs=O;>%v5Byho?1%R zKhmZP9HZ;HKc3eR?4ygIk$ad6cAFk8`n{#7&)>)87^@c>|3$VNu1%XiiA|DZUYPlc zO=bgs!l?@lcVC;ScCAcPFDDO&u}z~sSDlJch4p{Uf!z8b*^?}NOCY%;$0J|}L z7RwrcZ%bbjmnV>NCs37ML)z%x>>BhTtm?-k85Hoy!~_6OqR_2m!@JHVtS27oA_V+} zqxDJCRK}`TzQNN)zk|R@*e2oJZU2t0ChMZ>KMnAzjc@(Ed5+?VCR6`XsIYB=ZxTe03Zn?hc723{; zaRg8N{$R^`N@>zFUqZl|$ucj06458rxF&dfQH^ms7bXaH(mu~*#+ z@10%r%w02g{ucDQnf22bWAmN0KELJy171+P3oOwGiFd7RmMwTo`Z8??tR(R=WeoL} zz13Zl@fW<&os01<{B6E}z%p94?udxsHx|7_eO+%)o0jOQ$7)lnVA!kL5l-8{JjO0g zutCt@rxy^_vF!GJdJz$@bC?c1Hen+C0PE zsl#n|Z|nX1BAYfozk45NY(@SV{b`Z9eDX&|{f0Id|2>n3dQt`t9<#6DI^r_{$O%Jv zSqqMNxDUAoOt8eoiF-e!P5Rs-?`hiT&9`t z*KU0Wdggb!L-HwZUhv`Jss%aw_glGXt9p`=7ymy`n_>3FR#vwaZ-IAl!rnMBkvEX& z7%ORukdr2?`TX?vQ4_v+H)y8hv|DbzBYiq-x1Fz(9~Zn`IGKG(d$%Ll%YFLUzC zjh3{T&c#mqNAdxi?bdKw+B92jRcoH+7|1^v+aRaYOd}e-srTHV>aeN{baCw@7u~lP zHfQ<=iP|3U5;l83n4YyXyt?+&CA`I@db-Hkg7G>TPP=TfkA{!ozH9O2oizAJ$jgB6_%QIJ!UcIIZZs+j&uK?=pe= z>UWno**l(FP7|Jb);6%4bbQ7P7;kV}#=SwdFKEIBa6ZV z$j}Z`jhMIdq89#)Yt08+dr$qVA9%F*ajU$R4O|L@QOuqGS8U4~2hbSpe6+QFPqAHZ z^^`Ot`!@RKJ4RaVMCYlVcBnaoe1G~h#o($h4m)*q*&L5+!#gSgEwSxIeTmbJ(AUq7 zCgZgcYBg|Ht zx{kqZY^4z|=~S0pdF`YhaY(KI1lKOULowKVH}hH3KDW3UdJ9|T*CGMx&z~~r%m!C8}wUcx>c|W(s^~$C$>^!8y7tc z*Z11%)kfjzB{*5@<$GD2JJ}8K3Bci8=k#H$TihP_&f;OW^+9w*`orquMkn|``4I~~ zu;oVVZ1K}qwRx8_Z+Rh4{tnAAF7fZYXz|pqyKA-8dp{g^$NTtm2^On8JF6VdNw~;% z(<`&Z-@?{;>Z-MO(-y`)w=h_w_o=Ua#jpIkVeHhmqD}32>1(9XQU76ND_K^W|BI;8 z2w$&eFD}78+BWt@&)+47-#%OQQL)v6#iTyQMuZh(vE5Y;%S3&j6z^po&^Iy8 z{F|7Ia9EI@^J%_8Ml|1xo;PNTgBWPnhsZg%`|M*xPq7IDe8?rIb1&t~Z_O!ce0lVT zhfT*ux_+mR*2=>|{?rqlJ3FzB+TxP@EO7pY>|snS3R^pWRhSZ+LGsD)%sbGFe!qOp zKRd~Zjz2DRvtF@H$#%@~smWuUj_QhmYvrES6dOr}4wWPG&hf~VMKHxeXaKiIL zKi{r6JIFk_FgX_gnHyK79r(P_=W0FAqUKP!dmEpHjZ7XTHtPQ4bY;wN*BD@_66K#U z|M>A09h0qvZu**R3)gG0*HayzEezLVsKi!!a=h5&%qphYc3xB zwD?gktWppe0x~w9X?$gAH-h{o=66&dkNH5?&hL}{C&q#vy*k#4gY8eA<)&b# zyz#aD{+5&bPW3HuweXPre)_{n#-~rpUTJJ=6G}z;04#dH#^BK85fd+TkzN}xP`xl| zEZJ}K0GsV4Klz+~d6zEvo(EO@{6~{pv3avE7X5Rg^=bc0p09ePbZp;`J(jvP_bA_o zD$ML#&GX(ePr0?{^5sA_oO<}->mw)Vv-EdP^B%nTy0)0~bH73JBG0#+LcCdMm-!Ow zxwWUyFjr=i<7D4&607i9Cgw$mO+9Upu2^TuUm+IKQ^h$)>AuFprushTQ7nGHUp#K+ z_=jDsFZ1#-AJWrgblcZ3so3uHv#2X8i#FCA-O;zQfQ2kE+M2^-Ji&$~c|Wmr*Zfh} zb?rBw$5p&u`+5{{nCC?O(yG)=Qq(T&eEzKGS&Yul$R-vZoJ(B2zC zSo^MMta9ADegYq&KR%Bur%rhY>O01KFYogUyW6}84_*uHpZZ=eOQCU@yEyo5iRJM3 zDO>vdGyj3-z7C$v@ra}?%+>Fk*-2m+OS#xSYpbUf^U?cuz+Bd4_>VFzSKiKDvhQ4g zO4L0iqTmU1#JT9ij64$hbs5>iWO631G~l1ck0*vdzpq!PXKCnsHUVxfh@2H;a=w3p#Tk^oykq`%}~A^NT;Ud}Wp;LnK&8YnN0bRfl2*!dogj`klCN|@-c zi$wB00ZrOh$4RS4rx2@Y-KD{Ms|bp5j9ENdhnyc z()sE@I0u}r&E&aY!{pod&;dQzJ0$4SC*O}OGB|fD{n*i(;HT|8Gwj09-)m_mAH6=l zsX@Gy$=TOCP?%ur)t$-vzT5ZtC{KwXy`{f!ggE&UbUi2iL=A+#{>X^}I;clB^C?zr zYltIXY!kJQ|Dt^@;c6U6uzss^DIor_OCR}3S)aE2x?T%^0ba&{?Wb&HVbc*XWtBjVI zdGramaF+EKlQQwYi<6JSW8e3`_I=R5Q_m)5NFU3$(#LT_%YD~Z!CjpHfyK-QT8kF|trb(weJxAXn7Aijm+x?P0 zn!KT8AGas<^e^;ec#&nJ9h1JdDM#$5BDOvv2xDQ<$0Pfkz?rehDrzXVHn_TJLf{ZB zUu?Ary<^ed-R;9Q@wC`t6M5dni;w*Jy?o=dPntgojX@Nb-dma%3^QNTfgUZdPK~12 z#;gr)KJ-tSOAbci`O)^W50747*H=1qH|=q1%$@qIgAQr`5D&|#ZmdU>kf-gOaOC&Y zA21Kt7BePfzk$Ae-kTF0KYjI~AGZ5-^o!MZqwM+Xhg`!l*=_!Pzq{Xt-|K?{k(0-< zF`6In^g<`>lWQzx3-)?mf7Pjprh1NkjEZaX-mJ^TE~0Gs#(Zw?k@&nm`s$0{YrH0& z!v7{Vi+bNk4<0Nwc{qN9Azdze-^HG1e5%{hi?dMXg$(>akN^DVf7;j3H(mJ8e&3yP zgc&=QZ`=7x?95pc8EbM2zqj*$+w0R;^Mu8L-CoW2^NC)czIxhqzX=nC?UK&i){-?h zU)(180NyAb3^e4Zqn4Co!~~7EUXx`O+YBr<-b3q_P5khk#JBs+{elMhgDazfA@4Dd zb1V~&9a`+8nXU2O^o=(7(fY)?U(cAwpbM6A=w{7k<3upa-iey%tL0p@@XWfpB>q0x z2V*@Ozwaj79kaDQpYPx_({g`ZFRO2XpT}z%6A8Y~I8to@_M}_Ullc{o={Ln_xjS;)PfyH(KoFsf>XapZ;z# z&~kRvGxPmcH_;3m`^i0i`sRaEMlNF7_ep#8$B0+Qcd;^q^z?cD{QtYrkvt_^|A@s4b03KyBN{>~Zo&j*mJ1Az`#bW4-#+&)wn_{4h<3Hm;q7OPLr7+q4{)rcP9X9jI zNiaW*?=);$1i1D(uAP^VhW>hiwy^ zjQwoKR>+;Cjds}pw#8ggeGt?N@3G*?{-fK>_V_n|rP%L6&KWa3c=%7f6E$gObbHA{ z>p%Dc2fN=%^OJXCdO3D6#z4H_rH{Rv$XENfw3DAN`gItC*K%(u2bc1gH_YgE<3lrz zfyDef=gU;NuyvFEYDn|5mUfge+Ze|kV{)XIR0jG4&rIfJq~D}E*p}`#Uu0YCM0_n= z!yjOeE_2Ix;2b(=b4`Sv!IL}dr>^4$KQ~`<;n3goTUYDrR_cA-CUge; zIOXyPD~@rU3+_Q=V{NmLWQ?<8mif@m<2n)9C&-)exDVoHjzbGauXD)QuZ2}!tI;?A zdXATX6v&$3GvVECVej)?$BWW-|7XxO<5BRC{V~_i^v1kDzWdYgNBS}ydp9E+eINQD za_-E|7LIna-dXC7Vi=zDwr-?0t-*}z;K!4SC?Q$w=+m}X%4OU9UN(Bz>t*Wk8w(7g zeYWt}yKT1DmmEh>e%HKpH7|J2a$BEMtg|V5yjF1p$4aeSD~!Z8;mI4%MI?ET^t{Ry z{YJYcEf?9%vK!E|juVTgv9x!GH!>gf>YE?5J~p!>Mj?Gid7tY=V-Q@9+GyYOeXrY> z*!1a>tM}=Gt**W(Ms4weJLYT9OXwE*ko!FAow<+4PDU&nGci717uS;Bqn>LsN6u`? zABTOzP&5{GVe_H=JgDf&nC$6VRDt}K=wZJN z7xVI^mzWib8sjD?UdLu~X1@hs{RdkYz2okN>){$gUVgTH=!ho#St=}&|1aomf! zC6@lN$4>q7=9ebPgN|441Dy+ZFS%F5uX9}h?#p}E4{l&Q;RbIjp+s z@Ah1C{Bh7Xp68L3(%*I7vBX9bLt!mQ)+cc^+i>t;KA7)eEFZEpuouR6b~gO^JOBMe zGhV!X?BZQ>wD}w9n9{=;m>g{`=a)CORQ(2Wh~_nJqkWy2P0CYQNSW~(7fGJ;;woP^ zGx3?TsJZD`=%hm0F@NVepFjUu`s}eo8*E?`!_0q<=bN!~)Hl`v{Aq1Rzu>S5wYk@y z8dI1iaQMS(-E0EywPueRtc?Xy;Nuc=1<43}@=gAid+~i^K4Z^iZ`Xd#bVA2>5J%5Z)^W9$LGm+wwwlkBlIXfW?r~p6FkS9 z8rTEoL2TN#;&GpP42tUSP5LtQb*}li|F%AWTt~yDE_2m3wrDdJ$A8nWrEUL?l|Tc_ zY0(c+q`?2)(^pO0y^K8&#?iQ}5}4i+480CJs^b1>qVO^?lj$RxR3 zoI9T{yOu<>01d`GOk{!jeFRSvbmRSqHu;nqTF!nRzmyK*IxqG}BOrbDJfq}Bf)qTr zwJ$Yb{WgJu>$_w})t@e%%xY5xPm|$b*lMSPgOQg$azmfiy?S-_0dHS0@85IsO%RW; z2xJgil%a2tC;`tcjAW;D^O6&OYCxvi1xJB)mtOB>z?vAb!zMeSDy&ID@Atn3gSOFU zaisL(^Jkd^(Cpd&$Jx86OOE2qqLOpXe*fqFyV9JtQAnWxR`qv0)0HcoHW#5wNPt-1 z)8HWk%1ILmep05`Nds?yY#O%_#`Rj{yG#PI2O5=IZAs@4yb;b0+XV(G^O1|X%=*I0 zgpAR^#E5{%7-chZQTJ46Jxh|=qVLbTbWnTNs~p_4Qt#*W%R=k-c>-Zfj|KG1!q@u5 zb~L`W;%m?}0l5{8Jmj9`a>4>%>c9lki1+oaI~Q&!OVj9Td85vV{+>b!D}zJTvh z*TttSdOc$WY~A`8`Y62|9#*!K0Xk>BW!_DmyJI0&+TYG2*c@`owx?t0El5yT3jl8h zy5mr?-^+wO&b-E8&I5n2e>|-{ikti_G&vG^+*tSrUyo;W(v{Qved> zOlj+s;rGb^XO%2pZ4^%zAnHVtpvSYD$n&SE!=S!si#5BLD`I-vV`JO%|`%ogmGbd6^5 z7&CoVojc1cJ4r-KUVGnY?>AcWcbPQM#qUk`KmT3(iCuQAee=7@XH8;?J~+^RPQ-Y_ z4^7TPzrv4w^`iP9)UUQ+23pXKY{lNLK^nv8p%+ynhzm+#`p_Slck=L5g zx|jC#a`y6%s}_Z;Kh81+y+-d5p5{sCRmU?Xy3-E&G`NYa;CH^U3mgM%CaTxBIRBDG zT_A#Fe zy6e_DKqIC77_GmtgFRtR)1=AkyUr{M(Bev7VIIl&_d)M2l~5i{e3J~|Ge|S5~~P4G#QiKqMOOr ztjnzZHp{bC4{#;$c1!vvi$9h2xaT6rZ@D*}HeqLMk+yX7*zojUzl#akUAIh@H+xBR zYa4XkmyPYZ{x|L1uN&Qao7;DtytA<_pWkgX6#bEY;{4H?|JvRc4D&1I@E1SfWB}mc zjA486V2!Dz&fj4Zmh&a~hRA)R(Ppq0d~nriaMey<{n4sn_Ca*)8s9}fdc0ZZg?8h_ z1Wzn>*-H`{{)CPV;RRMuofxG@NMMb>K=@f6*l!y2 z3~*feW_ABMU>@{XydqB@}Av$kf{9Y

$=x=`eCV!ejmT; zx?X;qv|_|d*#=9f!+fANK~E)L+av8D-bqXreSgad-{*2)^_S?8=eotWxN|Xij~|V- zai;XywRtQ$d?d!J_b4_oZzfH2BLNne+@y0M%TssDBJ~>>Y8X2f@L`;2wBki?I)vNN zd0@QbV%!I%O_S67A)XJd&Usy2wNT+@=)1+v#rKPK1<^h?_>4h5uW$SPma}Y(?Z4}% z+U-RAW51y=8qoi_0E5>r&wxAx^*HvHWrDITXEOB3XKHuN24I+8Ib>l(VV_*-~UulQ)B*4Kc z+YTxAaM7_p=hl*&joBYInR#a*#Nd)>qVp=kAxmhsW5Nj8XbRrSn;C zv+`^MN*@bNbfImWsb4(7WJKR znQdi>=9Ys-&)=B$Imw-_C)9XT_QTKp;6F+aeD?M1+To>T3d{Gpc6teTSo@I}r0Hsu z5i%Zho+Dm--La!dU&U@a&&O7KdTe3k1GcMZbM`Idk7H9#I>TDgqwd?PGeOCoROIoY zFz*k$2b_Af@0`qgUVGh6E!y6#gvytxnd*I^v6Xq3dd8}Qpq16rGc0zUXc=q9 z1^-^M3_1HJ_FFfPpq})#0{^0nA!Q=|#v2A-pW*5W;F|9fkG6SA!ZgD+x|MV%KVN+1 zO>Wum_ofpk9<$Y?qqc6h-{1Fq-`aa_4>COKC74m-SCF)`_7&YmRdfZ54y5 zUCjf?hzEu-=9~Skq>RsdSMW`rS5+D`8iwD<_IpyV_6v9gw{l!_4G!slKCDRTHt5M2 zV<#E*X-f)+&UxDv^9a@fe;?)sdhJFD$~$(!bsgr58YbZ1AKc>Ij>KbT3S!t!lC15< zgcJ7^?(K9f_y;>&e2t{}sDte!=pBeGStMf-py|~UBsHIF^kf}QV9Z_T?x~%|N&N2O zXW#icR0`W+9+Ms3gIN1tFq8OB*<5XBT;=~#jFHD9+TIHu0Sdz z@x2Zw!8(oE!5146F5bo>0_FJULKaVT*MLtS zYwsD*DKH6&PXOJs%p=oG14-sB+k(4qH!Z%{8e>n3e71dGXgv)RK~eP3c4KhNxQcp? zlXOvf3mlUpD@H*x#^?!MQTSR1r($wG3~(QVl_wUt?q+a9<9=1pQta!8 z7(#2^D?r>(%)OZzw>=vgTGW|E;3gPI&uw!fXuAJ!dT+dYHw z+-gjpx=43n9LQ{EZ|~%(HOuBJ2a*8}??nUO)61XVe>khAJ2^MM+kdCJ_|xQmUZRik zG#6boi+Ta5m+ZYW;C)@A$(3TT@CWiwCp3+xa7vRAcvW5a7Q~a zwO1~jddJ4f&d*FYPk{GN@@eV^;_WAMwZhT^5558S6!#L`gVdFE=zM zmO}eNUd5Rjo50@t+)tOE%2FL!<1vOY4(R}F^!cwBc{pV&4!X0w=J`v?r*+<*_WWuI zg*_TS$EiCXO^+C1A{U+Lp!qk;TyWj{$NXo(S~nYky2__fyDZLBo;F^=n&;g`=ef0V z=GgN_7jHVyZErg~@$^W&Fy;C!-OO|YW;Bl%+i|c_akW>SEd!iOU}cQdt(PoxOg#D8 zOUwSabs98!+nk(x%bOkTIKav`nI})5H(L~MSo^*{*B8aq2?ddH{SG;fOy+<7`DfC+ z3P$Iw{_tgCBjgjo7i8>Ghr4`6%dDFzb%Qg(O`FdB<%M?_Ew0O~oUkjjL8ML-h(Uk8 z59nuaeS?qF5;(ax-O262sisMJ>KjWNYy|G+0)61~AKhrzX>~6fY&Q$EHrHZ@FYv&h z)O~2L4GzlovArl@{@7ypHu<{*WA4CAoQ1yZa%JaxgF&~q0I^=Wpsx8kjW@on-v>Bq ziowwL``%}{&y7k87K?gxvW|lI{JHova=%aFlWr6_ZvC*rPKl#s!36C2C$JMQuE7FR zeCOZEs?K_7!*p+d$G_0E)xDUcBKyq&WK6Q*JzfY6+7x!E{%P`{l6P!$ zpZBjrvXmtNEj)PggY^gKpPDrM)3DWjk7i?YLFe;5FwSW8%ZVb=hHa)*#-nskV~FrY z?)E$uON<_{=Q@%mq@%PA#_{gpl^FZ?lqbKI4S6d)XFYj}jKmg9bg=gSeE({nur(_W z+&NC%Uu$E(W?VPO6R1e|)Z%;jlZ3ZOrw-`ySH7lh$El{-7r{^(>%{$ggKJ+*7tKmJ zB;SQ~AM1&~oxs6!1Ml-~g0|?UG}B4Coqa|5&-FRHr|;uB#iwuqQ?7E|>5v;JNSBx2 z=~LeCo8)?yk+hzbby>a#VWOv;F~^)U^m{gRzU$T#`NeOLbGM51q`f`qHnV1bZS%Y8 z;K%pHrmnGiA+z}`pHI|;55hE>d_V2& zPOj9K`TTsWd=m@ZdROACdb{av#+tWarg*&R@|QLP8}9d+lrfI!`+3bVa2pq12qpzi zp8w6EdU!}N&2F*F{NBf&=fwEZ?DRwIdA@%YPcVMujrZ)kEH=QqJokDi#wh$hWp7q=dO@gpK zUp@?fU;I|NpK}8`M#4i_thcibjV2^du#0V6%~qOlJ=sn)E9wnDc+NTWxuW*s5bQK) zZZF1)PYp)9qec7sFDvwU+viGbL~S*0q)j8FC1gl z*(uLC2T-wy=l7qV)qic$Ks4E57#rowysGnaEqDa-!+INIZ0*s>Z-|dw*H7qhI_2IK zKUw2V-^l4_gL6|g(R=sCrvgp5>~?Ae@m^vp5nw;q$1IO+gq6I*|9te;Ao}ZuB@^8X z`g$Y-ZnE(_Lq1otMT6#9seLR{FFz&AZ2V2=9P8L>>jw*6tM64VaOMzvP-risd=(iH`*NezB$#Hj6cHgZgVk3nZQYk@XV0 zbxhvoW4y^0Y=TkiM|9vFgU@Cx-Acza9WV>LHtT|#Uq>gzPg?eqg)qO&6i=Ks$`8H{ z>!H-%Fr`bKBO})G3DP^66nl*2Kcxch+Z|+>&D;_dVzIu4}K0 zkrYTzBmTbI&+H$3rPO5EhZXf2*~D+trCj6Q@BL|wa@+XJ z?AL0X+Dmn@ZcXg;*xwH&^O_Ij%R4-iV-fSSupup81iT=ajsMQELbVM^?QMvb$e@h*vdz>5y6)GQ&&-W ztk}?!(dU2oz!T+#S7tehfv>*BX|8>~+s8Wjn6OT>bA%5P`@GGbcnobGGU#pH>=;XP znmtA5jCh26ANc9Boqc_T_PzT+6~h2Q`q~>yEVkoKZdVCv=+jJuCH12Dci)(V*gs;D zMG>`oh4m^9a;HvS64Y7AtLn;IVrAfqIhX(Nz=tpxWIfiP|6BjZIJpLFgjZ=a=8T=% z7@}X*!H(~7KZidlT|VGdYnS%XvdZtB4KJ=dguM`2&E?<+KCIg8~FFn_aD;DR`c3e_oRpdm>*_4`~du@$vqPfm~H)DjNO9IwhOuazG1iw_SU?4Bh*)TNup`E)}Gq zB>{A^mbuy2_k69O0}&`LJTDssQHDA;nE}H=qzI7QWGH>IPT@q-pa9I#CPP3dZsu=N zFB~-pW88S3TY??IxnN*sR&EalzfS(Lqyb;oCfLWcUa~I<6DQD4qYK(}Fz93yOu$WV z`v?qHi&C3nL|tN7-@p*suwnX_hISXPkC8ONhS{h+0M+Ox1PtbZsYu$`n{R2Fip0!X zMk#}HkPS3GP0)C}7K257Fd9>O&V8Mv*C6A%P@^mHRO-14HYNLAna*d(i2JJKvpvMW%9}>-Xy6;C&(s92 zC}9P{pZ)KsLr*1Ea5at~r%&v9wy!S|Gv+C`&a<2H%c#XBp3s>*wq0gt?a+zub93iR z(Uiv$ZHF8}*E%_BZarWT?WvQhtWG^1qx1QOUYW6q?lCXJM!=ck=gQVRzjyvG{=^OI zbsKc$x`5&(%SVDB*2g>p#d1LxHC}P2EGK2~=Y)6PppmD^`gE!oxPYb(;2mOo%(#M< z)AuIt5$NO%o6QceZgKu@*%r1l(XE$KH_=D2$smw8izw%Tv4g4VN1a0BR=I8DR2HN1 zWL);o&bpeNbuPb>6pW>R4RBIhvfT+(=<_9B4?OGG?P*T+%UGa-OBV9T1BTNK;NWRJ z9{;Oqx_zK^0TswFPaVSVJy+sLXPq`{nm6#Bb@WJ{;<0J(Nj>^~h>pc|>sVW_2llUq zYNN{ti=8IVPr&~po@|WuqFJw%8Otp)@zMsdOtpHnT*%5 zTNV^kP!sKTdarz)+K}YVc6#K^!bFz(d`Np!cjrR^%{Fc2_b^T)>@(|wW(Q^`bK=IS zPA&7k@8v$8ci|QI1USv$?K0^y)C=7-YwwF%ats1WByAx7*SeVw@^}lLYqWa;`=9ukbu^ESl@4Z}g1_DPB*)uZeQ!G$ zgMf!^h>qlm)mZe#ncq?;tUP5Ky93(t{lZSReSW!8U5w?YN#j;MB_*Q8>s*I-T*{bi za5*vNGgBod&a98!g$7m(W08H>>|v%!q3FTHMB~s`=u?)<)ZsBcm1w5(L=!z?ip~HQI-G6^)Iev#C_%?Ay^p|xq^^NIZyM_J-+<+7L z27#l7Y3LoMam6BsH9M>A^NpVjT3tB3H2hMZ<<2BKqqUoPIC&x4)p=pnf!9)&JYYhc z?S0(@y*u&acsaMrb1V^rf9dg*$ASA?RAbFvzc@(Bj#4L%yvhHK#VRnss+-&{(F36T zXwPR=JO-ot!Sj2ZYAR!u`eA&z$*ISuUFsMt|2DJ2dfnc2zNbsZdfDU=k7@Fv)=%r0 z2H)L%S-ju}UQx`K8k6+lq-DisQrCM|n;GXBBXzLG9-jvhTja5txW-CnqdyU2q>fZV z1|<#4wC!~o+L~C($}Z2VF;1NiXW5$td_{}C81bzcaVjrt7mbZJ`W8PgJ@%g1 zr10m*80%wV7xqCD#?*T*-}`gw<7hdW5#3JhP9Lam^h?ZE%$4=HkJX-;(f5(hwz?eg z{GvIMC@gr_%6>ym%`0}GoH@q2Fb%qwZ3J)=X^@RB9@JODNH(#_B3IG8xzNH>u1_Zk zsP5E6aNLLI(xe92=ZtfqydLAwIJL^5UNx5R11#w<>jUoW7{t8CoD};wo}s$72@m5N zXwJXm^cGHx+W5vj>kL-urCx~j*NO16omcwfbH3Wcz6U-S(>6Vu6`OrfySALP6(o{a zqKwtkT|t9Zwt7pF>@Ycf;y+dG}iEivdab zqJA(hHu<3b&xNmOCB^a+W0js@-s8Gon)3W9+GO1h^Hp>2A&1Wxk5#U6{-!Ez_s#a0 zsC4z!A3KbFvxE6OuQ{kX-FzLpNB4dr@sIVZ>6W*gzDQ||T7cx#fFf`CtD zKF{^xBm$y8?4X~}mS|#+m9T9gU@%R{-!PQ@f@P?V&3kGG7woi}im*+dV+34MZFcP8 zN_y<#*(3E-JzI9$+Wpemwp`Gyuz_9PN4Ae~bQGNS60s1)pp%yZdo6PVD*F{<0j5h` z5m;%APHVPBr?GAAvGZ8F`XplK%D3N_!=xR=lX=Qji?j8y%l0*$NH+AkI<`fBNp6B{ zArDmMvnbrXy*I36l-oRrj?V+UPGOI^X3rBNjaAnvHe;EAO@-E8#zw}h)}C3>(sx*f z7HS*WUnzGidY^0-9&>CAq&`$dmH@(5|GWCy$2?;@qijU-Gx3YYEVw+@$vq~BE|&ao zTqdtGd?&hY z*-(__^d#Qpv;S@zv_D7;pD{nSe|S0IXKz3&-Abhw4^BNm_{p!X(?=8}G=#RvO)KE1 zn7Y6m^+oeMuUz=vKQ47Ml6I{tQBJ6j&ol9RllXaN!%jEzP$VR5_jJy>9f(KA8x{Jm5^NV zFy0HGYYUbV91nS%c)8+K#4;tP_9D?o2Wa;zwI`v9BjuYX8#u5v>~5QT{z$#NY47 zC3E&;zaH60_o7#5-y4hg-YJWw_BX5bW{20r1f`d4*DwDC2W!P%r-WC01${+(U`wu$ z!|zf*%Pai3i%xljTmr4Ij@8RuA0U^zzDXRT)J` zZdZ;+;1I~dTgufj&Y*n)h)>}Y^EzesVr-lI)|?ab2%pqmaiDEa?$uz zLWv=d+`kr*e(E84-``@DQ)gM?NYJ*D*zRMG&~fi`*sShYpS`JX&|Dnfvt6=ivClEq zkdcoh&10YD7J0%mL)yZ9skuV7-HXnyVGhxG}6U-kn?Iot1JBp$ZrbTGbDt_WL1x)9^_Vk^-z zW9+mU@JYQp1)6y^FdF<~de_?+tU9pKff|FcO1*9@&wKm#u1y#fzv4^R_X41FEU=3y zT+v>J7 zeSiUd9>%Qta?cdIo-i514%{$0gzzUnUJ&Gx4shyZYKs3s7Zb&aM9$A+Np!B z;OLai{yt;_%iq)4A%RTg!jtHheL)8YF{Mr*V~k&?XpEVyj~l?W;eIZPvbXsjb@GRk zLDcMF{M$EpDO7gn!_nJQ<>{mkH+`1=m5l~@G7)D;CgR=Og-X&MTic_7=SvLqeb}^x zEP2m~T+fB<2en{xubgxNg`b=&s&9;&CiVK5KJ>t8653|~>$v-tm8Zfz^t@{U6#&sw z*33piV{S5LW^Md9+wL5ro}Fv=UZbrsc$_C-ab`Fj!^(2a+4X3Q#o+$IiCzmJO$$En zFDLt?1Ww9J21hH3H$#{k_XuF{*o@J2FK7oH%(Tlo#;{#BlKlOq6ZJ4AhOzrJ-Qi?h zaW8`t(5)97zMkQ&T>*rrZoQk4u1DsW-uIvOUh#K~sfj~6);4O{==b}%ERNex1aU^X zv}v~T1U3{`Ce%4ra6IsRT-|=w2_m&2l64-wzo)Q$;}n=pHq=f(Z~c8w==zrzuTdLy zbfKsb=q@^RBU^l#RyXd0C+gHSwd+c&=J;W9a0k%514gc2)(AVfJ;UA{1e znZXT78YH7Q#vGFYdZI@H#nI)cU8Jj2Ui0*|>#`HbUW+UHyR{L~#~Q0olYgd9f3@qG zO9ES5|LigXHL(a!X#c(Y7*(Km)njixu%l}KQim@sruT=<*E(%^ta05$pH@%3+3x2= z&{d27xb4fSI0nZwGLok*uT$PQ$X|V^x^eHd$BkzSE5Jc+W8ISCSmNy^o0X7}Pp~() zexfFB+A5Fb9C!K6jBj!3FuL{mTZTrd53QK(;f;1ZGwMZwu$>&~rd8IvsQ>MYW={1L zmzJHlL$8z`ovzTm+T}4?R!-=Yw&AQA*WU{~eMwu8p=ofrUWp%o%ilJRL8m0{`*mH1 z09CeWLkC;4UEAWHVr;(sd+6TJ=2WTK_TCn@B|BX_1Y3FfuOl~ZaZrxOUoX(psqVzC z{7lfs>9grtdha(KteY$m97nws5bJ#M{ub|h1n1aC;<|!7v#mtS`A5;2JE1#=Jg?*bcJ|P9ANH@`N8JejYeQ(c7k|KK|JV+g%lW+}m5d7UYNL4ih_SKQD<@ zK!%23Hz#>{%Nd*7lXTC&bL_9c5UXxoe4WGh)1o;}0L9OJba8q3su@$DMSM@go>RwD{>JEw5gHa) zaZu85oa0Qh3D8N?w>GoI2Ka31Qf??go8#W=X)%TNZpiIjn@4PvUwb-9GRvZIoqE6Y zO>3X@Q^!zTt>vocI_>fli62S!hyGss1(de5XEs6?LjHF0EMFLtSMK?K(C49No+7cx z@#b@}2NTP7S{I&Uo%toK^t|`y&zE$xi5-xOFdCm$&o&_21l@Lbyt@_&-Y%NVc7EG? zMY%mbK9yS&NcVAU=JR*cm03o}J>pgE_eYN6v|uWTXi#k_9Xw-&PfU^f>uM9CtT{Q< zN5^F2ypWvj2;xyrIGHgZ+lrn3_=s)=g%=!6r;h%1offt0>5AEoQ5*i8 zZI+Sz0LPhiT}{uo`H{d==nHIS%4@W%o@bmod0>q}uKsDuOuX@VMydQJ&*T1X^+J<> zqp==^t=PVE7Hwckv(lA!>h6k}gH}8ypAD|&azL}pTu!{Zd$0IUFqB-Ncb(kRFWvZq zvCn!ShbX7vV_SV1qdB;s^$|CcJYGzbSzvablkvdj@Uw$9aW3-gzR2Ii1LO5U-noI0 z>yCJ;UWcv?9?*rwtmB_cPr}vb7{7Cc3&s&_wro~mp?&_j`oyxvG*Zv_VNSrhJvFhf z>oslVj^@Cy5C4BC)B4?TbuE%;rPA0xaiG^OUq4x9Hji*L%6oL(JFj)k#8uzBHWr}F z*Nz@^EOh;HF0Xm<3Knyt-dJ1VaT{HJo;exi-eqI=1g~#&Z?J3S@<@ z3Yu$q>~rCS`Q{siE^p6`S_H>>ps-i>v2rY~UGkpJL-1eU_a6Tkb6{SJ`H*BF=gRa1 zFDkEHqFaynTCUnm4g1#1?_*awwfS09wo80LdF9HD$Q#{ESgYBkc=u`RkN+&Tl9QT) zhhX!eLr2Id{M{*k7>k-S2S!@3q4l;93wHXOQM_p^x_#2DC;b_t+gGQ$w0@?kH6O8f z<|pvx5{n$&ccM}1?eK1Ywf~6SKRi5R6`fwXcBbjtoAkS2oDs3?OorrLhoel7KBU|t z2I@W52M9Rh;W4k+#u|NR9%Z}d4e#-3H}CojBi(5SxvP>I&HYzwLkpTu2`l2`Sy$2C zk59`pU(e{0x?Hi0?Ck)$ned8ftZ(m7q=T+fxi`qp>#!ytIA z!z{;g%yaV-$|qmI8S`+=f-vqo?~`*DGr_+LuR*7>tiJ7Ra~7WR&Y0@DdTcYk)bGT1 z&##>PWYVhUdCWVudRlQud<(vc>gF25K4yB|%e)W9#u_bd@r58?{e`i_E=_C%egi#| zHk?qzR(+K3J@>^PD(10Gxg~~_BY^PXPuHY#wBh4|@9BihvD#zXuqOMiW*raP z7%kBRbnfHb@U^@m~5$7E>R{$9sV=Ok^##m{WI;`ScZ;TT<4`am}kj7{+b|*ZSaV3$NvfC!) z^-X)Mmt)q}0=&2Lg zcDNF4l#f&|T4JTgFK540@kFzud@AvEWdf;p{^!|H^x+dV-P&g4!R>`j=rldyT_xt8 zw^lotuS;<{wrXESw3ScBWUS^(QbEl7+@)(<6GrLCs6ge0$I^{yG}iaCR5L#8Yiqk+ z`M9^33w?!-eaG%g^FQ=_>Vdn*tsu9Eb=7HyA^>QUL4L4dru(OgjbP`m?OZ}(u_e*s z;o?M%ljc}=aW|X=Y`67g%yJVaU!!4OFn4^=`ok#_x3z<1tTxvU(!Fk$x;|+c&BQz` zDUj05W5z5Vx_qu5+ncC*)~w_wES0eHv@N)6SL8G~fF@G0h!oV$@I7c(Tg5 zQyvgkqbq z{$UP5;hxD;@x`p^4)meg(&JA_AA`Q=a=q?a z=!fJvtTnS{f0yfNyVsoIZhYFBwSiMfH${d0EnZ-GKVu@4mAXB~q~?W!hvkHN|9pNg zSMH70r&^<}^F5&DMdQHF!**#5F!eCxncFhznM?d-eINSa#YwbYE!!<8*FNpzc+HEQ zHvNx3!pEA8>hnZqe7I3PN2XwG<_wN^ktf1#M|*y*h=q*4rVX3D zYyUt}!C24jVssWZ5am42v#&ModmlG$CUDLHJo7=|v2HgcCPDTY4Q5O=*T(c1H*>Q$ zjC3`$D&_J8o-1F>Tf= zs*2x#tpGGB<#@ib)jkE!q5y$Cv*Hfp==tlQlClAVq;cg8|< zPQ}vBn} z2Yz-?6kr6PB-=MAfRzA$% zr2)>9ePTS9MJdA$W75Y)$3(M^uz_g>Ly1FC$)udhmo?{-uitqkyTh64(kNl9=(+oD z!EN3&pP9kE>c#tPbm!Q=h2^u)Gc9NVqjEWAegcT9pjzG^U4A=lm@Z-T2~ZmY(F1+5 zUG%rgA+E|CA??v?wfyf#&!jPy$~A)=XOem8i?XBqtMTf;tr7$OYo7@eWi!&?d(jVo z?z#}dO#p;oCOb=LKc8^ReMFOx;muSJn6uR66 zG2W$LwSYp#7~NLg1ieY^P{$z*r)?d+5&SnQu#9$GS8XC=d!{sKV{4W=e#(7}t3wx; z(JtLfykcg`WonNC&A*$88RT_a0D$UkV>s*+U%F_`7wj_cFIo2v_P7Gk0PyWG|z z8-Bw?R7s<+G$7xzpg}7SG+!28&9biRutA>mW8)#w)uqp@@dBEJzSme&{nw{c^Pn@E zE+w3BIW}#Pj;1TWr{3sxGUZjX<;obY85zggE~{W^v->WK&xoF|W|>ka7piEEch$asn;;&HJYL3c0=X$~dx_04wV+*igFsdsGU@%>`(5kWg&c&_Yb zuWzA^@Z2`3!BVfaI`z5T*rHeNn}siQA9}UA!6%Q*N!C|Khr`U|%GPWaX}!PaB>153 zT@RuC`3c%PEu0A30ej91Gst4hQ!}V>z|-8n-E~@E!S?*EMHlUi-%7QbbdXcWFOpNf zZ#$l8e1m%9alDgQbN*O%JIbI;mpb{|+k2;dKKpCy<+BrgGi~@Ty*)eou7Q?XI8l1U z5?e#1uZvx~d;t$GncBo=nA+1Su|L;)yOm$~c2jl=FL2#%XFBTTP4?H{t_TR3vrYmX zt??KZs1DpWh(__U6E0gY)TkkZz52-Je2h1r$TM}$JXO)D9*t=vEuApi=%?~tI(B(Q zA2>*F=P_3uta4E9V&{#;&gN#7*>A>NXqWHw58IakovUp;Bp?~1XPPCsGWfe*V>nGH zpTyZ?P5e51(28r#GRu|}aX66N+quTFde_~W2#DPrDf{yMWMizo&dqo)wXZ7<@G8e6 zK+N(=`t>ajV{g4rxd>ev#4$p|@}QgEAo?iZ3iM_C%xy+_)t88MT@_=5?MA0q*RsD@ z_GHMUIQ0Q`_k$S4(5 z1`@DM*>JL7<-@=q?}DGXylLbMA4B)^f&m-G*>IE#)a~#s8xYPu49Y{y zW5s=MdAr351^{S4m%kfVeeN-e9w)LbZ7mm%H~BHu#e|>D+WR;GsQ94zF-_!XyvQ`D zcG_|!kI_8Fj^$OJa&BPA1hl-D7JhWu*4W|69``G#q9#ryi5%Js z%GUYa>Y-wL*j^+bc(D%Av-1Gy>J3(Kd>=*o!Y$kqv2aRCm)~_YrS;G zMYLt?)AV$7_8s$klbFg@-PPL@jkc9H%tRj19>u$3uQPFtjqk?qe)Nxo0r%;(N8t4=2Dx}!C(Q>tNfH5sk%O+Q~( z!~kH2E$LV%W*933W4z*Kx$XgVcpERlOZlGXcz-^h&3nDw*?zM+jV5cI4Og6tMW)wj zZ9iGHCu9+&taNVd3M51G6uQ`R@Y-- zUW;Rc{K>R$^*hbgZLVd^FFHv&-fLqU@65P$#n)M1u&y2hgTHH|UGc=uCu(+dbo~Oo06BbVc4JK|pWZv{ZwbHW3V-yZB;uY4b8|=fnmE}O=IBjmAHM@_2(ime}@@?Bo6Ro<${)eoETaxdA zEHi*=%UU?8uZ@{u=t>7-E-;gUIi1E$7Djb{(wAb1&tl0F?_`_BmMj>;eXEPzN`^Io zVVBFSjMgs(8vBd9Zh6&g&r7|kc|Sh4r?T2PW?1;qjsG3q+v!`GblXWV+b_k2&8}JL z*0E8_JAC%?otLi<`dY)+6~|>gtm|(_@LaCHI9yF`0;8qOzdB{MVM#iIdc`i`;usgV zZ^cx$y-qx(JaTRHf;S$YwJvcav8zknm?I(k27BCM5MjSyu#?|N&WjhSe2nb-o#I%~ zKRJIhdV9M)=CuPODiZ85c;4O{J=;8!_8$e?DxW7G=~f)A^RQGm`VIQb+Qwpwsa5M3 zQhDqXytKJ0E?==oTgtvRxQ{Ux4yaJvy6X?GW30`3Tz=_hNXPx{iQ&LkiSu<%-B)qW zSOw7zJW3DE{(cUdxlHAuYyjWKubOOA^^nFWbiIV{49oMLf1&7X`ic+TD~5h=Xy4*C zR=n<8ofVjqY&YJ7O?z*=Pbf>^Y89EyS2r*9YH&%6EB}@#`>KqG7_H zYNr-Fyv!YloGxqO=EX6_W&fpDF%G2;6`_O9$Bg2Gq1Fqib7L>5j+K)}P05}Fj&!>%eemI8wIxV7Go>Rk~Hp?b>>dF|` zvN0E*k)h%z1MGEj*n2uDIX~?buQ4){5okQfXyTN$%4XC7%p<@ms4VyZ$DEB5*$Dh2 zfOhn;o*M&Th%6^~-*T)@1p07>3GYJB_cX}RGAa_NLspYKhf6b#Q~CKmjfDo3VMza` z^iReke~*Pq#XH^{g$(A5k&9=bD&8@~;)o=wycZ|lIt3Q$w6&?IYa{JQ-uX~_Yto*N`93B_lKKp|U8Eg8&ihJ}$K4Ywleu}*HOlCA5b-MX0-`M0x3$oajRbcniD75|! z+Jp}NLT8({D$4EIhfIPZ$SMX9`0IkKhX$f=mP|AGBJt|bNfwd~ud=yadYTN|4nE;B z%du$>{2C2wp&Z}X79=@Hr#afY%TNrPrE>g??Zj5#wW-_Oka3DK*L?fwOp2v4ag1Om zjM+CQ?*q8|YOf|ui{IaV1}5PRO>Vr{K7t%FA(dmsx{iqw<*dOMlrhrInQaV^Gk&EB zTAyGd4^6UFZ)||581v!ubZ>U4ORnX|J7cu zz7O$)mF~sH1oWe9!q*tPVKSgj!0bA_FDCcar!A+(jXbgXM{+-TAA=>xckl6SVlN3a zYmgJyb;8}ez}TuU?1Q-%vg6;_uD+**M?2fIR`wM2-!%5|q@8ejUcgzfGoowR&ZkcW zxhEeUJ`eiNx}YXXktz8H9m%$@f?PbZOvK8w>n1DEaX)67H4Hi)S#$H0S6TR2#Sf~* z7F=m^fB6J|Lxx{_?8N@1gYP_1WcBOR4#U<#R_i{RJYH<^W`^U_xv3l-w?AlJ;z7Z0 zsQ2n8WO7#fw?Cp=)mPC|oLVvtv*X6U{IqIczc3NqC-I?6!JB!SOzQ054J2LSNkR8a z_LI7tk~OjXCao}D8N=wOPBOlS?lp=>&3;t>xR*?e^qtK(?^Koz-8^;f=9IPIl|^l& z4fSok*^hh{_dQRb)ePlX4*4ehdtx$)RV)juL{HT1vTyCZyPqn7QxJ6#U84I@F%94g zkM{;;m1g-FW2{(+<&|Wnctx`(+OojWoP*V(o3rsnC*XC&vxe;_KA0ZuzQh8Gxc%L4 zo>;&q?^)KjoRlfaxmf<(eOW*WeUhiOVuO(A=A6|XpYQ*@ zpK6!0{V_H;wK(ysB%oV$I)15%>sb*No|KRGbg@n-sPdGb)lO=?&nbj?k}coA%NJQ( z|1tUUL)o}721aq*luF{6JT(G3C+f(t4PEm-HyZ_tto<_YI=IO(_^pq9_0f#~P+gwc zu-#jEi%ykm)$z8J-*n`VSjFM_j-iMz;#uhO)U9u)M=jnk#!hwG3o;+SV@dHyJjXhs z<6p*FC7Mu7;W@hf|DZYHw zhB?dUxm~Ouv;ACF=v&75umP3$#5(pcRq?*u&w5@xS|@2bB^cATSzs;WGS&_+v}!c< zYUPL%JWQZT%>!a{WKdpojA&GRC~Vg`q=v#Z12l<)@zzc zJx`3j_id5DzNuF zS&#a&(FYh;=;oyLCC^j&_ZPaqb13An>~O?`?|ad!lZPkmGU20j`7LbK?fp_#((B&- z{yoTLj*ZUAsXhW-b+In#wda37A6iF2{C*2gy@l65Jg5HjHDe^Ii=9k)tyjQM=6$c2 zB=8$}Y1-(*|9==4kFm^ySdRJEaEcS!nL0uEWZ|_ZDty4hn(zXrRn!Jy{M^SRvCiG) zP5o`y>3{wS91Xc!7W3?R=jIrr_jZ&$GopFe*wD$l#rx3TD1+^k@}ASbBM36*XRn-J znCe4p#UOtX$wlD1XtIHLp6llg!aY7+KF~t1p<}d{FA)8d@c1GgpS_PdBF5q0vg5tW z(4oHE=e911rmWNc4M&ZUHq*W9BV1`O#g1k?dGvCzu7VR?=I>!gE$lhZOEi3IohRnF z1^@b--+ATx>O7}*iRD(vICb{7=5e3vo4C2kd_TiqMDLemoTER_rxc=pFU>HYqWGEg zB43J(oOpHef%ZzD$LF+Bd6Loirkr3rUY?@)Yun*b{XPmumH%p1al-fCluO8H8xzr^ z(78KI^n85Tx8Zg$HlufzQ(uIZU)eN$Uwi*Vj8LfC>+I5xTW>1TaL<2&2=M@~CKw~`0E z;{Star%8TJ@!Mu&tnA^BlfAc9r&qhXU##m7-t~u1-#^!{JcM-;?+KVUpDrHSPjyy~ z6)@3^Te+4!5DOvV4Qq0w{%Oh?#ll>80PRie&9o-Wgy-2NG#N&}#%w*ycA~%Jvtiq7 z0`Kw}o;5k{|9OKgu4P_Gs~J7E-^yXR9W|%U&uNnUnFzO@Px&##p|8Z1&wn_DE#uf0 zbMl`bZRl)g=)aT`niCkY7NlLQb2IKc>wmC1^t$TSbP*K+(CQ`>EWX ziRqSenA&^jQ^qhfejLwh{Hpyv`bG>cr?6SCyZdB>R!INA-sOGw(zW?swQ|-~zF(fa z2%K%}1)0tFNj~c#!Z3Nu$+zf!r^Ya{-!_`Ao^uV>Y;Cret3Rwes^kUzy`}weWlVC3 zQ|;E)34YvMt38)F0=ZcJ)6Y~IjUgke{>nnueEyw}x~}Are1YxvGOst9Ty@&@IJIy3 z|0KV9<^5kdd+qO^e@y3PCok;hS)gCOU)eVxa``zVWIbX_`JLAaaXlBWU$Wl!{%KoX ze!5z``QEK(iUe#Xc8z%?<_-q+XBoQ-r#*)K@aUV`&w7jOt<1mD^Nn^`H<3DM*nh#d zxn9Ic4_Wt%=g-%+oO^@i_;*c|e&=b#`*~%x*I6FoP>ccHGRFAu_)e#!o!rnu?Llk1 zyDheqFhFjuz1FdKpEJZ5?H%W*ou8(AqnF;}C#@W%0sa2g{n^t{*O*-gIaqaLr%Rnk z-N#<%g+HIEn{@rZoysSB#=mF0`0n#VN%KuRe;e2I9~-W|TT9}>t$Y=R^SaOTv{e7J z_cTTsj4N6&t_GY~Hn@u1rk(w59>~2;A%*-T5A;~2@`CzMAW5z%=hJ~Ld@#V;4W_Dn zSJ?wwFPB*RXmfZwJJ#&&82bYl2oK{qwFPK*8;elwlm800v(23>Q1L03x-8m$;>lSK zja^`@{BAor?7l_f;CqjSn4a(ZS05X1V^sFF{+&3)^+2VJOH+BN!=Bedo)g1(D?i(1 zChLYD`c0qZwX?EUByGME?)@bukv>pdSC#|WXWT6M$MC z)ga*O0;Boa!D?G{#O3DXzkspp9I%^XI)#(LCB}`%$h;QfcRhS%u#3lH{`TntG7F3$ z4xTb^$~S4VyjZumPw6a2UtY&6loBr{YeqN5K3gzW@b|W3adczBuh3RAAs0_{rQEWV znswle|2E}i_S*#BgNpTL1fFHmDgSs#c43e3L=5y6%rA6K7pt^KvHl-Q<-dyfC z>xVMFs%LV%uRfttj_mJ&sFEjuu)g45<(14*kY>l5_56n>_q(m~<=JLmb;5VU*U$m4 zZFt7zZa?%sGi^tm$e2M2&^Y>pAhTiyEpvojbt}F$(F?pl8GUNJhuRBi_V$b2%<5$k zoCYtP<;<+vrsq0kj&znceh(ne$Dtkq?!h3FW>wD9#(P8Ce1BB`<0b1?1U4=Hi=dS9 z5NC=pvs}Eob6Tq2(!oZ}7_3Kx2MWCVtE-WjwefdVRPV`xDQ(qBo=RTPFR^cNUndW0 z410O1V|^z(|K-}qO6NCnmYd;?XRDa}X)7OOSKV9!3iC-GBegl`+ZZOcD8|^!;Z!~T zA>LqJ{yA)d#Kj3Q-gg8$ZLyZIy!SE9e%yEKW0Q05KEbS4>~qkagE?=aCohf2?Pxm7 zec|gT$a;AX(C%#Az&j9R(!j<}dz!ty9n@>qS-#Y;bpgYq5jJ_%hIlOIzzHKuKuZ^=?8VV%+`Z$lRIz;%uE@x0-(ELRp1r<|p{?rEO^;A?MhaplP))^$cb z&kGtu@sa-F&Dbob7+1Elt(_@bo@0soQ^rg0J$=PSz84oc)4;pkh%)afAjzYQf2QwU zJ`~2-UHA{(Mw_F2-_Y`%m?AsJe69BCJsHqOAG5}fT~15&3g+_mu>_>k&Ki$lRF!gQ zTLF80KRJ=Uf|Uri-qPN}G0qiA`Mi+XNk_X0e|nuNYON*l+%-=$;Duaer!l6MzRJ|h zH6}ZpU%C~2veviRUyE|f&*F_ZO>bfhNIy&(>=!O`QjytXF}ZuY%vM{J z&ksxN$p|j(UGiD+xHVlm@g&Rt+vmVQX2t)&NEquHn_|vuqqC-ZEc=>4Xk#5#?R+@!&tV;i!Q`8d`1Ip^?F$#yZ2(!X;&q5Ijcf@-tPg9~W!kezh(q(XB4pexK)`RnDK z?<{x&#I+s7!_S7eP z)=JGe?1*oDQ=ec=pHJv)yx&ANo*8UAEanluqj=p`ns2jUlkTchB`}74teQPD9;1HUxSG&<=*ry`-Ja^ zrwq^E?|UqE1rPW6%}3^Dc^6@%cdVLD?QKpSGG+po{-fuBD^!QmbL_i#fwB3_HL2plgYcc&JJxwDH}WlU7Jv8HeK+Pb7d?BWKGZh0 zzR=j2VxYF}C}?&gUYt@iV*!Dib<8_%rC8uV8!5&SCHA#4z);kMt2Ql`&9I61Mm3lh zcModMZWN)z=f{3-pm6hkF5O68>g|^FN8Dc#SK`j)^VJxj(`)GXYSNBzWT~k9D0b35mv3#1nIkJMkLF z+=nr5bp69vUH#fVR+Emrk>7}iYQ3b@{SE!rx%ibnNmHhKVk%&+p5(qBoF7d$k3R3n z*IpOvJQr|`;!JFE`jotR`Mej=YRpbtFJ>1TcGppFY#s|Ug z!3&E&=`xq*qaVx_*Vwc{{o!ucWTVxn(NufRG#;tLMlyiLjVC{QpRe*W#?Z0LD0a+U z*w?oGx@C-Toz^dYzq8#XzXzTX+cx2N z;!@BDu%D}~@SX(6%ub2-_4ky|&_5^_dS=zJdmVVmJP!J?jE$_RIVHN`Js>iC!Z>Mo%1V9Ig!(o zTnTd+#jC#9lv%&n*Mogqe1BjtPNHwDgMZftX8Waqe(=zs$OuuXF zuy0ZmojS<(^!+*u*!Cv-`kmT}7|F3b{vk?PiM4%Q_V}G4GS0 zx|CODrhKwrFYnK1c~^fQ?fGeqw$;$pLh7ktQQ&ssSlaRa6dNVkpWfBb0D}G|GZM>mnv0P;<-Tb3Hwh%dhOYq?AL6 zGTeB+x6>vXN%p}m1+kF+SETOI!5i`FTh=DH-W?%tJT@zdG2nJ>CfVJ+gL^0pRSITH z_L7#-o%;RF38B5h$#P{vtlHlVFitVNs6B7nk;xI8qm2#jFg*>?WW3ZsG7x|aF+ zA1i})kb`{J%MiB8VzWvl}o39^7!Uhf`7=MFYmcH z_(q`Zu(&*dgn%eDGT5l_^V3iKsKwyXI?if8D(LJ__LF$NPW*AUI;IzZ2Rnx@AT0m3 zRj0jWXQ18_2vp$InqxhvEwf&nR5h$C{YjtGsc0ytPJ3c~Q1n&vx^ocFjn=*mowo0b z9@0$9cz1EO?$JK|f0IUk{`qI>QpsdJIcwQb|V(rUZ1T#K%00>xu2M9nB|Yw&q>R>uyvFzyVCF%AoK=^dQBK3TN)91JQPFjqh13O7gUsGEf z&Khe16@HGh3aMk3-`yn`;7j@Z&b;5pVC-l*|A-g+?|O<1bn$h_0+{9A-C4RM;I+$W zzFyTw#mgUYyc4rD8*?5TKYX7U$!(==6Z2@@Y~MDh7~{i;oKGO)3-`4?T)Pv%vaM#O zCx-pR;=6BTutE|7WO~a}i9bD1bscnaoj5&8UK%f>9bLykjzB9PNa``_9St7k#XiKh(0QNbgkG;8 z9HBC?{ylFrT#)aF__c`_mw*{zp$u3#a5OLyZK(I!Jm#?w z^bd4zg)3V-d9mlLx8wJ9vXA`d4W_v+nfSf$Mb`nVGL~wKdaW>88*8ywvszj#LG>h- z@-820w|V1{+FQnCwsA8`j^dLYNdlZV;K{`&+Qkd)e%fc3 z_FMNyd9$3+6L<&zecK}CvXbi*xp z1emN}(PC;iFx6sT*gn6XY2&g5>J!G6QjSN(8AGuj z1D*T&JcDdG`bN6J2zU1l68D00b!>AqM#UQW-md+lfO0Qa5@)pd@#E|8X@|~Rs_ zU%p=L9(TRZb>CyO#54Ij z*%a`VCTer&3#8_=QCH=d8$*5b>fRB_WJ5MMeVsxu|+>%rNk8cou0>- zDi$jORA1)pI-Ox0O;`c$i8uB;15c+qE%!_~9b`(RsBW9wKf zb`N7Kr&y>?UFK(hxe(8JZKacvu@!e;|FOJNyHgH`#)UKQ)X}+4>K*HfT{v{HyU34V zuHX&O^nQ7u@Hmgv7=2FAn~tXVTDYBCO!DfeuUTsmx(>SMzIt^x_ zw~eIPbLlCKjH_S26tRaitk&!!W1(zulN)a|Gm#q}|5v_$$losIoMS&}-qmB1hqiXc znjOE#Ewa^hpt0Sj_TxA9jj~>qXSLs`+^p89KrUm$uZ~<#G(qDFf;`-XT`+k`&KKWn`5v{9BMb$^p}iPY#UUfy=Je@@_Rw3mzL9FzupDX%Gh9wX)kq<+K(^2Fyi#xP`U;4_Zj z#N7-3@|u-V8%rkEiMe+AeF%23YN@f0#WsIxXKTt{vCG=``PQ1C)sm(=dM{asMju(?eH|(Q*4EZspVVynSa3 z7wkS-JHZ>T#3gT;ZFqM4;@jl7(>neEJl}l}=o`i=yK;G*l0cH`^DxsGX~iUEgHV?H z&33$>nY3WlVchPr`*Tb*5u_#$g)Uo9sK0HDdzI_?Qj3SRLsr}>Ua_%LT<@a`C*8#F zdp`Ko)0n5xjonUbH`~}iZgR}5+Bs-0PxKxV_(Ml4ZBwAaZecxSo*a*#B{9va8}IfU z`^P+HY5yaJ@gZH;%JcnZI@{pn_j$-M>^rrg;=k2*PG0!V{n4J0T+jaA4`1kM|2;Rx zRuY1PouzBg*ueL|I-zk-x_qvyFp?GCe&W~ZYtfiPp=c5w_H%86r}H_{sTkuWCMo^u zwqpGqxW#jw6yfe+%Nm-+oeXTK8xPa&CfbN1Q}Ukm$&S3 zYx6$z9M(N1E@u75K2f*#$~!-_!7yHZKe1*mF;NZ?&9T#b4&?5QZPJ{2;^pf~9nb5V z3OubCD{hj{-X)>dd2}D=jTuCTUb)V--*Vz~_;dH4$qS#)eofdAEVRh?62nFLSl=+D zoWcjazFuBoI9uuIg}7=B>|BSe{>$#-viQIx*1g$gl|$-3^8%Wh_pOhm>TY1Ll24w4 zz6lpt@nDoUq&y6c&imBQ&{NtK-+tl(@BFN%MRWnaH$bJHI#)2_fBF6HnIqT;G{xw( zKq(pG6})(|fgSJlVS~@rGp)4=SNHbY`^IKLM(as1s%QIp-6w{}X-+wa8%ELl?|YJ+ ztql?xf&a z0Q6OWH-3=%;xpRT7y5>Uq$k=fI|n`UG?}Qg@z7WoJmh`w)OFRS2BN_XBE9gfc;J<# z3J^hIvN3?tMo{W$SZ$m?%MAmJ4CYI@;3cI&UXTI)eJ`Tf_aJV&e;rO3VZHUzRfam- z;~{ICcBYf$T^26^l6)=w%(3a3Z>Q7Js8QSMeXT3T_CVh`hI|@v`*mrr_B+9Zm0ZoL zhT)_Qe*U@I!sF*jS&*^xR~%Fnstd3*qw=yLzV)3J>xlk3IYTJ}l4)zuyQ%xkQa)a% z^$k!}@CkvMVOStc;5z&07+Nzq`J?(X8o+@)ExpiXW-e&5;1^5Y**QMkKeZWG*ofui z9_!bdtl)$Rq~5W=fBt-QTFKz5Q-$y6LxpP=`-p%-@gifWmnK-y=Cn~gO&Vu{YaLlO z0iJYTwPW%EbpAc=U&o6bSper}fjlE)-UMvD0tv zyUkp>(Z83cv}l2@dYsC;7QR$H-NwKx!&J(sLx$;7fDc&|<=w&Vq-WztA=XFo-?x~10=lvwPGjCp)su>b`9(&x8&B56YW z9Ss9!8fHg$0EhMRburT`Uw*Zh71w6@VNX-eLM~aB6mMraw&%5{MKj3YiQ#+Vn6WIT zdxQ4F7H3{*r>9Dsd>OW5eEls5vCxPET0x)pySxXV#^{u}{`)~D=gkZPas7?=0H6QOAce<@$AvLnYY{&az zQ`JG5NwsvWnJ9>QhHxWK)UwZpcQ_CV9PwNq9>XD@R+DsPpM!4q9xvaAOnTX zn5Vt`bddO>31il0X5Ej>vVYU*M5D#GFhv}FtQm`DX5oCA?Qe|xqcJ{&9U}8G#un9A z3}v*1JX0xqjwdkROOp>LyRs(dZ*A9ZVZ=xbq0i}+mI5 z&is7f>Fl48++J6Ezv|s5uqxgc{iyzM>ksMhCYSv`l>1^=_&|gcXFYDIgcaY?b3^J; zU5&yOZy`|v_zN}$3!}N+pj(c`ruWsn!Ub~ym9`kRh~4jU{t$x_uY+Rgqm+=_zxQ%g)|K?&B;8Mj}LAc5WZ|(Wzgi*GDl-GYOQHo#rv$ zootu$NIB+r;h}$@$ATKxLu%)|6RzrrGB33&#E*D?-r2_r>NLgJ2w>GWzS3{ixjXS+ zTU^{$9js%!wij}KS2;a&sP_JS|i-_7TnP3YyJK6g5)uX<2EHQ|OO zLFyQ-f1Y}TDzy4m{Eu!xaQVJ#w=MXTWBkvRb~U?kbrBc6^Zx$v z+U#=IsY{@Vi+=D5s5Ck^J5K)cuM6YpUBntq`7|HxwiaV|$DDh&7qZENRm@5ElFoj= zQ(w>zeqZgYmU~*Xs=U*5Z0J8Tk~?RAb1y&dXJAUmMb*>$&a`XggNNv3gnE7>e_S3C z3PyVdq2Ni%)k^I)8F$;z zX)%8v*~eyMf_I0R4cpUl9~0f2J}TGP$swuxd$EhQ)W_v?f42A#V{v(>SL#Tom(8~H z-q~C8jctJKcUjZoU=#H9ig?%EHi%R`)kn8YyQ8XY5_9bzeP8VIRf$e^{e_)EzoGB^ zuu*TnXxukrB{qcWR!-FPF>O?ii@2fXRe&M$}!4*pK` z6Ed}H>iE(xI_8`>NuriH#&3(3K5y*x7%Q%g2I?5xZ9~D|$FSy!V1IqB$JUMQS}tgC z3+C{Tx8Hk`o^`IW;SwXgFsOYPN_SH~BS-qG1jEgqvAyPYK0ear-PiKqg_it!)&SmN zY=kzq#>9Q-6^}N&I{%%U7hFN6^z)aK-Szvj@lVFiHg)h95VctGWIk$01FiRV}s z1JCwN;iEmrI(OG6uCH)**?(;Go^o;zPtty)BKwF@f3D-80GJw73{8Ed> zQ-9XAXGSy-KJQQT=RosMk0Vootsd6BD5v=mbf4d^e#}4#bm#dT}4FE$p-8Xvm;=8u9m^q>+= z^mf7y>I=E`vD{)(et&6a$j=piMaWjo88DAm8;XZ}d0YQ>l-#4fc}vzs}le zb&ZtgrH`q5%~pIix=w3jx+|w>P^Syy{XUlcfHEG7{$1xfs=~Pm6f&jrzj#{bar1S- zqqz>!1Roe^|McHyQV~}_6Ysdk(8)eJ?FaMyTmQu9mn$Zr;u#mJ zkE7V-fT=P;@x8}ZCiW87^%wijI(9xUa}81Ej^AgTZrI#(@A)3%%=g|!>zB~y0Xkb7 z7k+B{|X1lVFPkGY4dD7X&RTVJ61Uwx2`WF-AKRxR~I) z@5q-8KG?h(abdOroPZk ze1?ATsmW}Y6M~J69WrZu=YEfIn7g3<*H`_nb~pH0)~e#YAKf^h%;V`8`t~_wZq!Si znlbwB{nIhX6{LyhA8fc z$>+QrlQyP!HjMK_)1No9+x0GT=gci_A!vXX<^_~71C9VyBaHjpaL5M3l;$*s*sSpR zz~SA~TCvXOvM>MfS`1>iW3sjrSR z8>K;G(XNnP*F}({hxbd~Dzj?#YopuE@Shu;^5XBVSDEjX=`0`l^XtTQX0M3Th6L@yup)ce^|Fna7yj%Z6Qy zEi4jFq}Mv<%?OGJ{fFwBF(M1++~|Xid`t)5(R_?W_kyq0$zHCV{?Q4c1ff}TJbSm_ z)q&RQ$^{oD<$Hk9A=UJ;pV@bxF`C)DzW7ehJ%2yQ?WR-GDg*jAvsFFxg^o5G_M79A zj)MXLi~MH0Nd}s(9p!A5%&t6~DCil}C*#^rjL|@VnCc=R&;lGIetmhS7RY2K zR-?(ufA9VI{s}B3PVZPZaDsM>!E|D?*|U)Q`F!7`^^KE=u>YtswEkIW+Gyx|UP18U zBV(FvJ50LQ7y%2FeVh;2q%p}|>bbGD6E}frla?ZbPHovsQMcE4-hW+G@zCOm&65?3 z){OvY-$lCl{f<*6f+utV2cARLb^L}5sU~B9OE&^)@}Zp^Ri{@1F{#<+=;@-%NdtKH znlB^MKQ2dA2U~$tjJ2)hw|WMii*LU#oi8bqCu&_62R!9vM!0TgGehI&YCMLrzbWVQ zx&_;0HtTC4>8(rUGpWJKm|Q zd#7w|2W=#6_LH8`u})ka$tHHsnRU9f=g6mz&Il(OdHwJvDK5ZRE*1y-78x<7UnNy4bbMpt@4VK!5nt z^IefY_hs`jPq@rCs9pTuJ&ZH8{&_RCqMiTB>rc<1s`gg1-s+{v`82MzVx;*zVibqv z7S=J5WW6&2#J(U&HrM+mwA8wHU_6SaE!ByiF}i?TmI^q7xJ= z0ncU}?D^l2=a&i7u!o-?V~qF4H*GT}(VjY;N&HQbGmT4?J;Z$!TD}+m&bFrAC%nPW zX~y%Lv*FSOyOnw@>@&yqXT@={*5@a6i61b)X*^k;e!I}l=Idl1LG!D!qDP%<|FQ){ z7d~nFxex>CCs4PyqdoTP<=*`Q#o5>A+P(+*1+8;2>D4jQ)QlvPrt;>7VtV}SVdt0wWMZhq|MF!m#7IoGD#-{?5sIoWU4TY^Rj&;HmP)6sOk z_5*VO@NYeyyF@O>(#HO~`olRFC>h4TIFSqUv0-qEuCun!rxMU|d&~QQ4lDi0&-VUx zys}~yvgcPn4F-7J?KE~ZC&w7+u>~BfpIFF=kkmJ_m-(D|!*Gagb9>=~^%D)sF77rW z@%_`K@|a^6<$eZqe8)&b_M49GJ`R8p6wpizzs?w zpM8+eg9;hss%5z9aNG^tg*hTpv&Ue-;Rl%w+cUv;(quHRQ(Vhy*! zF5`rqi^kAM7iHq(pDWpZ_W8!hqoA>3PK8I`ZGo0>1$V=|xJnTeH0@zO`u zGnP#deL-}3|BHTHVS9L!$w(~4v*UZpdpI|FomtYBBPG4eOYD??@W02S>POhy4QJpVy zU1qF5+^r#)r=(>)L*d zCDA73(>lgsJDTw`=25G-)3O$ZY%IYc4%9hv?esZMOHY&sbx_b|u@B zwtU)OPR@%ls#wPAgPgEb*-^~*AV#QT*q=}7_Pq~)5m)>>NFTlRb*dFU22YT^&i6@2 zThPa-JxtfqrL#Qf=6V6|ZTc{1T?X@5VuR9w9D6|6rQvz10M9?`p}H>=8<%Kp+&k8y zk{nnJ#4Vm*hRi0aje8vL+5G1Q#$`e*pl8imgfz&xXl*5+_8`JdGz@jU7x}j zjO)p{_dM-1))T&)dTf0@<@PASG` zwZ>-hPSBX-{|=t=S9ji4r=X6cwY4#wItR3LnP2HT`T2cfhVxuptc{EB_ko8u#GlV2 zo^1Q;t1*g0a)^|3t;_rTYQ;8UO^tIoUidr4HtiYpC;l?CTE~FcfCcU91o$;}H-wKA zM?*fEyu(y@*QYO*8Y-98eVvB}BXko%(}t&?PhK0hxm4$3J=I6%(7(D5s5<^6u;1oG^Q zgRe%7!DOt}P7}^6-WoX%Jg%~}%p=(N%j*|esIVR==NOWQ${9;t=yifLu9QPbw5l{t zpXPtvuHOImf9?78>evc&&0p_I+LZmVich6(zGIw!5NpL=9M~$@s97hdIYTkDo*!*6 z+hUD(9BEGkKj-oOm|vPLsXlScBJ4=wD+qcYt9#tdrVQ6Loz~=c#huh%uOvpPgT3sh zlg_WXy*;)m9_-%{H_kc3<WH9+a*I|JJap1kxvq|ye`68C1?0O z?eVj|i4!MJVq|$0UUDm5GB5yPK%T!%_|YTz0c8NQVGIgC*ZWJXgLJc7Upv#}#Qxi* z_E7KRQ?b;K3sa~-rt!M>lZ(3zgzxv)(d>pWL9M4arEs?Fp{$6rO@rR^405J$drWq_ z0_n0lu4ZwAw; zuN=H;<31anjuhT28R|M8s_RY6<1$nsm8xqufQ8`l{n+_D^n4l=~(q^rf9kvY}|oC31yLUMkN^9GE6J`O=L9 ziL>vHd1~>@Yq@S|=M!GY;u+CZr2v`VTiPsx#TsDvd?MKSfZGGy=ny;aDjQ!~A zfUy{JWK4x*KifOZF!2klW#X%=9+~BDVv?J7=)%I&?~1z@p9l+$NzMoB7S;!3Uv@Fd zHkL_a#MMP7x>p>hJ?{&x^POgU%dTIa7(c6azhg-8=fV>rx5L`0E~&#uYH|#3^-E~n z+qnC_y=f<0%s%`3_3qE>bsA%?ufrZs{rKVoSzw`?yk06mw?6;H2A>(1;`ub#El)XP z99I}`+W3q|lFq8^($n9<7%I(Ldx>65Q}$!gBc8D3`%2rZZ4&G{4zjRbv;lX^yVm%V zzpEV{gj>0j*$>D+&53ZiS1wW$c|2S=5jT^AjnVl&WI^ZLs!om#wvNnasIRlMk$zj@ zR>bUSF{v5FG)a%V|1V4domz1xY9GaG-FU1K+x#ZBvV)AhG!ksIj#*!5ahek>yV&ux zwN}!cJW=ia_ul)*Rer>i1d9x5r|R@MbWXUpx4HXWYoE$r9^3mKI_DMV`pd6<2GJnH-P4cqLmvCR)_C8098S`f2Ys>CT9UOOn8-|rmUa_F{_QZXi zhf$rKm)c>JD{-ny%GYC?DzAg_(ffYL#QQO*-BZ@F$&E48^B12o4#~S4ma{Y{9o6ewh97yU@{ps>!QBR|3 z*1zf^_+%N#iefoVx!5G9xIia~>6ohh)92Q>mFQkPFY`32+tsJS0^-z5jGbE9#fvZR zvhTIgLwcnj8m$>(+ktg}WsGF4`2jPL20=h8JXi$6-V;m;~(rJ@vPuUnU|@xaDAg|`yFv8@W2=ut5Y1d z{4MgApLfT@Ch~?W*FE8W4pGNgLv>`%yIPOgk)CpDN9v%vCllJ~Pt~nvXS>SZ)2@av zzGDTuDRK_lHvPgp5*>pXXz~c&LjADMsuPX*D>jl*UqFYCoM^d?om08DB&Gr5FY#yj zzWQFG^Cf0cywdG^VywGkDZh#b#%y4YNfzMZ3(-12#Ypu@c9zz?rXC-Ye{+q+bF0~} zRj+YfW9-(P7f-mUF5TOi=Z?muYAw$1mu{HH^QX0@f3tI0?h@<3=P2A@>__+Vb#5)O z1@X*lGoRlcd?_0z$`)8Ay?k*r*~H1I{HnqS{FVCwlb37 z9px||9L0pLwr2Ymn`462=(p?ICr7Aucb&VGC*PTN{QE`s+WXSZOk%xDa>y^l#cLk; zkQB_FOm3NRp0sPDu*qyj`ERfVZ_KvgGOb%|+ZbEgsC?(AV7~c0bi2%hdB+j3_iA5t zj81cQCpj%U-N*K{rbf$Qxxx!=KAPX#$ZhH{?{vZMZ*0Q5ZZ?z=)@?V5cnv4aS{wuWzEGvD(DKvqg*YnIP+{HB0*)apThc@%&}Y?yKCgovP(D7DIm5;48k@Zq%mmrLB&J{Zt!T#e9phHAu0rEZKg*!V<`LcqG#&aL*#FXE z9$%EL7?&|xhY+-S3%haZ>8C(0gwZ-E1W3y4U0|L|9p}3#^$vJF8N`^8MhGAQ)VVp! zLg84J*+8{>3q<=eIFS{=JAIhe`S zWaE~_NSaxrnn?8%2q~c-O(@zJJ^`nzjOR2=cP(t7D^H0bo?~8ZykOW!c-byH;Z3JK zO=Zwe?$Zp&ytrfXVh5i1aXE<#024-Obi<8P*`CZ3W+k|}2u1*QW$)Z?>`6J_fjyrS zrA;x$=d}%%Y>Z*hI5WoG^F*x=pCl9tShJd>96!M7%`Q~*<;B6TE(#!)v>qc39k(U_ z9GcOwFQ#L|eKKtG3DR-m+^xhABHM@s!&f>)t*%jvvv%w`53W$6$V6 z7h=7%`1m5j!)DezBmKtxNqLTPD@&Lqt2Bo^`ZMMGT69&{2Q^N}gv>PQU=@oMtqd+b z=f@2G^U{rbdR6vI%6vmt&){f=lM9gb1bPAQ{S%pLCi_)(dCjCcvb|w9c@ZF8%{lWv zc>?=A>+56wX0q{bfx#q5*U8K)_stvNOHAN+b0FpI*IhukwR!YKtO>e9PtcRxvN}~F z0#TfKx$y{iEXr(Ii;Ol&iKC0UGpqg8`L}d!Kc($91>9W^B$o0G=(Tb<%HHmEb(fFA zRyffX*^1s%%HPdB9y&EzrHd&HxGU_d*TnN6tTgTHx4(br4;378ITqfsr46=Xvv~LW z=TD9Kpi?Fe_Rfm1ts4IuHnMJ?b<;?msTyO{7D!oPD#gW1vjRu%lAk~(3I_u#y~5hU zLl55|h>YL{#+oMvk`~v@u=?;ePFG9)y|II;?~UjN{#!O9DyAcvPkk2wRB|x;bJogr zaU?DAb3cjF5BPbp>l>YB+RtCE-VSoehvf$J_!^iO*l5oa@Ay4-^Ru^4sjJN>0KhVb zK(sj2P|gFVQy@?QUWvEwk-iTw_ocz`tB*D6{eCIAiCY_MRN+<*u$~6dG0I9~-{6DU z=016lKHKQ08UJmA1jZ=&nkFH23>eGc_sk4O&#|@Q`dIh#cgvP^U5c{mIp~3Cm*7tL zJc?^uAFTTlX@9vrQs&GqSmoA+a<1RW7aChW*LxXjxcbSO3og!0B>g&#tp+_#yrp)N zo-k{ph)Hk8W#gR`nYL}7)`FldGP~uoFV4Ejep?2($~W4dTg{rP*ZG zH{H+cn8`zy>z&M?2pSyhv2L*a-_QSx_azw#+G73cCmmQD1K7#;Jz4z5{wDV;&2Pxj zCpPCK-QZjO{Os*X8LE&oYcWg3*&1;F7mbYm@rHc_K)3>2HaiQtqvvAb^u?;S1$rfT-KrMntQ=frfaG z6M#tl4Zm(C^-uN*9h{5Ktl@a{p~@``#{J7Sjd?Qs#8eYIwQSe#_^j=i_IOQ9!8*N8 zF&yppZ)COqq)rB=iMC$rBDUSNEP9Pko*UpXw9Q0Mj?w&K{*Ll)&^GR0wVBIc=eT_$ zM+?m&4%qD9O@6D`Z+<<;?7A9%PByJxwqqxJLo{l0tFYvrXj*FcTb&6b1S znV+i;-TnUk&J*`^@y!Ui&SVBMH;~^WdoFB8Zlc!suCy<&JZ)0>{V6}>jr_>%0uE!k zhAvF|k1@O@K1K2wc$MXpb+YQfG0LxoyieMV#1ONb{TTGC@B-T_?i;Sej>FpT6*vCb zzOTO3t#bqhKZo$WIW3eb-bX(tZ7YU0{Slll^HZ3JQ#;7^JJFv*pPmJj*-+gg8 z>gYP3vy{D6-1Uiu57cXXcj z()kv`I3_x&_gUI=ykAT*Ok)@E>p&dpdKXD?eD!)4Y=j?cgg?FJ)n82Y?{kT9;$J=8 z`0`Usdip)km9&+_xGyTVrGs$_)QnMl55A1bUq1K0Pov={#snu=Zkqf4!*W083i^VV zi`Q9z7sjxPV>RVldOJz1819>M2i1%&KirS>kCU7}lY#QQ&Ar(~gg%W`9x8S(<0xee zwP^<(eoSo4^SJLH;HuEciia^4@m)^@TQCmw6Yb}A)du>Xtqsa?Zo1ZzXWA)kcWnT8 zu&eeB^2cL2b)GNvu|(7u&wjJ+=dsH;vK1~+-tryqL_y#0SH{+ew|4SeePWq>b+xTA#Klke<@ed5Id5^4YtsvDwCz*;gWIr;taV>iCxpIN>xN~y{>IeSaeOH}_#j;nN8V>o7(&*p$ z{LUuU7_YJPVWsObJ|=Sxd?L@ZixOA%9ydvxare1@#Z1>i^N@>J7o`|T-y15Id8*Cy zH8aL2ytmNBN0Y0>TEhE!jTQ$s(#?TG1EbbjHSe|&GD!S2HzU-h-1Ld^w8O%Pc<+6d zbO_!>dkRlKbL&5|9zJc+y(KA_?Sr3eqTl;wvu~d4u0F_IuTgeBKCjY2s1I$}j*aka zVlC)k@a*Wkg)(zYDaJSN-=sr5*Qj3CdivooYxlLCg%xJJ4`UCU`u-Na)F;=#R>CVz z@ICFwY!mCls(aXUz z&Gk*{+sFU3oI!p$uoqvv?&-D5aVjG)-#GL&t7=X<=a?7r`|p?Ai252rl_ZoVik4W01v4BFu3m#UA& zJThqP*|%Z-v{AHcIyPz4=QLI4KxgQBCDsiXgT}+Qmygr?YIjY>I^%iJO@{b;*yC%i zUz{5q&5Vjq-vs3m?O0EM%1q;=+f$$Sbrq9$x^2a;56-^7atfMFxdui^oNiq=&iW}v z8O{;nta-nYmYAI7IOIQlCc@8}V9i^yg7p+dj{Ec%6+i2kcir0)wyu}rZ_IhR#O@#Z z&UJ|!`?4#yt)uu7{(VmG9wooI*8EHIF}b7W+I_VJLGP-NDA4$uW%X`zK`Ga%DTd@;sSF_W$ZtAoR?r+~Qw??=<%kecy2{0w} zN^OefUPFH0hS}{Bk0;s37-RiE$2xD8pJrce;dM}ZpbtL3t2|@ACmTsc-7*)4`Q6Ja z#s{Cq?JPH?8#ggS_hsF0o^W~pDf;|Uu3|K$1nX|d*~CtpM3LPy7)MR393F%9nHS+BHN+I*uKF(ejdFo=8I5Oyn8RF zgJUq_Ir8zIE0ZN0k#)zxEBb-eVaiW6buouPGn7xmpi@;d!GM zS9`akwLf;nxlxnQIOgclsC1rewC^s1QyrNM_-PA~tyAy0|LuiNvOc9MckAnsTz#3TT+d-ih zQ4S{a9(sQK11U?phAf}cdA(b9A`g%=$Jeu;i4Eu!M0Q>>D`#Yj%<(1Q1zrKop+6R< zAvdTvv!+kN|!nDd=cSJFfpPI)AAC z@HL2lO;uAq@!b4;adPq(=>RjqpF#@)Es(o6w#D{*j1BLA*8&%h(KcI7{H!{>-m9_l zHFI(3;L-5%FZ2^S;ZrB!OnBqY=lf%f3;OG#YfYLVb~XS#EYGdj zrt{6%zv-6tIOQuUPP=V|r)sl8yvv)1#~KD|ZJ_eYCNND12j=?{IM!fceCpyF-y|F8 z^~uD~Vey$R=rAd#ve_H;(-wI;CbqH7<(4v&x;5=w_)((I`|D*h##rs^40?`?No2d( zYZ&!bKgFENbMid|qXBPwV$D?->UB%j!m3lqVOn?l%Kc{hpLWpd_aV6Nt;aVuj%5q&8ssA4aQ5*xqnDMx({&b`Ec=Z{2nr$!2OneZ!enP>~`mP&+^7NIl%HdPy zM@}U^$^Q^sq8sDz4Es3z-9$$*UDB_7WEdp5Dzm)OJj?O@m^WW!jE()p=M}WKrjrW; zX{-^-hq?p3^B2s(m=T*75kEGORcu(*zMXLF)i5R7iXr_jo_>F&{-BTTIdsf@+o!fU z+J=pTs)x?1I!5A?c`wRi8QPT7Vro+LoVR<52SQq8$3-+>IKOkrCmN>3p_g%dgI)O_O-;T?m%NM+>eHblCFIr-k7*1Zx`?T4DpHrNVd-Wb(D;}D^$D9iD|ESa0l6RVXL<#OI zuUhd~*Xf{3$ro=lO-Ui$9_W?&Lkrx)Hn3jfa%P+RLLcaT;0{dGYVrWq<4iLp`nB(vDT=8y3)Fhq%hT57YYjv&9_7>KAYAV77Ya$99b6Qcm);&I#yTM7&(Fl&;&0 z?p!MUMPtXJE^`;w<+(QMfR_8%qb37W-aW~6 zr@t+KTlzY}BZJzz(;cjv`95epMxBI<7~qf%`Z~8)C8pgQW^LnHK83L}Zf;>5-h8g| zo+BLe5skIjRkhQ9yZrDT>;LB}94)#Y^S9*VFdpW`c5Y=aZ}K%}-(zf_U&m-0+VXeE zl-uup61l~RT>Sfv1_^phc#M)!KNrt&@8}Gj%wx!MHM+V;ot^%n$Vci>O#(CutMGHH zeAU{3_qn^Tantu2?cDR^TJ{07zwwtXSJ+YJdG;0cVd%6eGDGfLmjTk1WAHq{SonHA zGZWGD4V)h32VZ=wu-~Ydw!?P`eesd8O1`I<;Yiw#?qr8?^t8XlCh$3C??)>azcY?)NoM1p#LL8! zA38{Y;XrOIm&MlWx(4aPDb}z_*w2+}yKz5t@3*gMJL!oXx43Wa|zery&U!poz^`uhUo3K#QfFXlKtcJ^dzFE2JzV&w#{l>bnH()O>tY@07hkRg6Y>i!a-=pZs>xh$6!ve;oR0-OPn2ljlk<&o`aRt{9@*@-ShrOsHgf zReNWfx}98-X3ALYg=jP9j`wNJY-?@_05{9Fwsef{+qlt~>{w>%$IEMcZrYd}LZ830 z4K}rFR4{b>d92oc!K6hx2#g*HLR5CY&41CeM${ zbnSXHH+4bB!etMvx|SPjw|L&n*2Ji^_lvj$@BjUPpPfBf*Eil0qgZgUAIcXye!|0C z?!-oldTU&82oLV#56Cuf@5GddzZd_rZf;|3*2jq3N1!{<9%0$}IdwI6$;ocpVnetM zuRXo`{7$oH%F4!TN&8i6M57()n?aYU&aO43e7~*Bv{i?fuXVuDM6>*0jA(d_!HM7{ zF4Ln;2OXPoMVoMy$DH1GX|u|wmJ7Y{w=3-?8JE^avKc)}KD60PB4rR87Lq_v$po=3I?6;KwKPMMbkN7(p;QffaU?R1ljm zlIF}n!IN?0$zYKuy*w7Yo(IponJ|9lc)kA*r)yYEGQc<(0dUYdftcCm1cEyz?1~0Y zVP863v5jds-1i^K(8@Z25osG0>thGy{rTN#0vNeAr}WO}yIiZ{xM^eSb0PasX6}gb zLE9l0Y~D?VQ~?c6U3?O@mgP z(X^FKMzVOvUy*jF){RcRwkhi^mKHF2->hinz1=Q=@BQ2d1&f!A$}>~Pw)9!o!N^MT z{b!z7tBYwAY(3cpXIrmEXQsuV2BicBEk0sT6*zqV+%0n>+TQK$ej(DUPagYytqZ07 z1xbf-FS`U8%gV z`<;VxcTRTnF+wJ`ZD5=2AqC?5#e5x$jLiwNfF5_tLX^7ny4vsQRA#?=pWKWBD>cq< zQ#rHShAy1B`J`uB&j@QMZGZc|ZsO|oT!%3;+n1y5IoX2D)(OnA@JKEEw9z->4qNdp zCO7BrB|v4{s{fh|8tsSk#B%#Qnntz+tbDbJo9@{c&*0>>op&Tc&_M%fHi!qE_czPsl!HhO5Ilb z#ow{eDY_Bu>0@tRxcKG2Q48zdDYD3NYnd>kZ0XB^Z$MN6OruT`Sx#dVJU;}bmYbajuh3gpOM2Y!eyK?72gJ=Y@^04#s8|kz2geo+HVbH|jZMcAPv~L<@Z=Zx_48TE>d#xWt3Q9T zzwpV_j@G8ojXt60@4&;n*l&BqAOkz)sc!c?**5X3 zeInl6>{Jgjnd3Axlv{XVQfv&{@}`MgrJwm1`<=WvPImnCzVHsc2c7b^W8sN-Ulx|6 zUA6wZ$AnX2B9@(-V;o&>`xtpVPZ?K}Nvd3DoNA32(LTbb#2dhf8Dj{ng?cbq<<7eM zDWV76bzIx`L8mT#Hg?c`IaO^df7t;mpX9S<=YD_IjX?6Amb>E-V5-q8*xSj(_kNzPR0-zXdVK2ToRfW%`)YeY zrAs#078Wykzi+VDjSE9w-Zo~?3GG>m?qH4y1V{M~9w>Fsd=)GdAq`8GoMNho* z+8dvZp;}J2`}gLbb_#?oI^0MqG{lEVw_jf$Paz_iIS!Wz@D}0|^=#qLv z?x(ShK3_%uJFr(ROfa&SQRYS$)c3$%_n>Uoz5MiBLzkyr1>dM`h8_2rReiE}jPb#) zC2xM}K2Ij{37XIKIZWC^C;#(*5lhS;4)a0zNB6OG>~wO!UhDE`*l-mK$_gfi{R+SL z8bjo9_VHTeNEaQ~X0W1N@zeFGle(HNA6D3m>=WBtS4`W@l z?m8N6T{l&SUwY8pc97?j{FQzh%X^T8_qD4p;?4GXw@U-Gy__&+*h?QYr*MZn#r%tu z+prVb#2AM#)jM{~LmU3C=k>J0(#4(Db)x(wr>wnmwe;+p@X@QCS;F11j*d;v{l$qJ zP}=Y}FFTwzmD^X07l2dAd7BegZGISR{>Q#}m-WBk5c^c7&N8Ie&o|X4C0} zQ<9^kUcI{SGOSeC;9dz09^FkR7(_kqM{b0R+prB+oea6VlqVLS3GyFfobA^{$;$iD z{!0>Upj%f=cFyOkZA1LvD!*eW7YyW~yXr1&T&6KXnNN9-JYF>IU=Y zTG*^}2J&2vz4iBK9ip+kT)pkOfiU~1y$<$H`#S$f+|l}Pg`_55)F#-AXy1yLGBRFu zt(XRJ5k6t6=n}2JR@!4;7Z1AGRz6W5$B#Vu$#QP+Lvsg>mN?BR#_kVJ-ikQ&IYC7q zlcLSuXHwd+3}$I#Z0tzYH+CQ^e4gQ}ua%nUUH|u!`nLI9EdOHn7-whwBpS;YdBrUf zXPYm09P2kek=V8M>(M#i?h_>*W_yNaxzO6{l*H!8nNe&87zuW;gL@CLc&~>-*hid1uflM_212Y;S|=l?aVVq zcH&@nrSbWy>c)x>*J*9#2~<4}1j?Ai=TLpeP`KLqu79tePk(OJM}(7~|2`GJ zZS_SN98-Kp3@2C~aMK;{CTiT$dBNv#U_lAYo%GvJ?4F0TaOdht#>Qq zmsHloW+QOzr`h`5+O|nU#2hwj#*BF*FwUpjQ#1kzuk7>tm?v*px92Auo>)rcaM2^) z9^X7ycCmaPBfAu1`}$HwSm)~Yqm4Pw4R~!1x$jkHqwdeA4O?Pv8*RQA`g&r3EXizx z*~Z33sm*_7;9wUQJkI_t>G(f?{&_!Dr{+Ab_q8)F>k_v~LT80@OqMk}9m8o~Ti@tC zAASCZ%WQ89#3bsUN2k7P*>t^=S;{>8k{Gr3-8v=se#@`9G&WJvZl#B>SXsv=$mSa=V6|WpEI6h zsc**^zpwdZxgm^{nCO*Fw-e5NX+X*5)8|qw^p-upmwz|EPfTVR>v-jfX(B$yEpg=W zAI9jp6mQo$sGs)SvcWd$K%8mb-X+TEI><;~-f|DI#&+W&-KU=*>QQIfTUk4o<%}Nt zueNxqQ^cLsS8wyVS+3%OtB;>`-TvxIv2z)x@`};%`^y~rV$W1J&+i}6mAa-a+k9QW zmP4Iu?dC)~{Cw)->ux%h?V!0Yc5GPb;vCy}|IwX4FUF!V@pZ2SerqRBXZx*ixKI6F zd$h!E<}2|(I!U!-xWe)87=C2lXK9<6#zrTtAgA+dmm6QO%s1@phxLJxeN}l9ojaoc z+CELptat!%(@XH|Vk3nAQ^t@u+WyXOuWmgYa8lUkeQ}kygN>MDGS{GQ>)*B;-z%n> zSYlM%?8EC9tn1*!e$n3OM0N%JeXeyMz#jMhoDAmp%VfLK2HC6uaJ0PDQ3U8D#R!J7 zz7c8~M+m(z22|NFJ7s<-?R%-zKtjs{s^w zKFH_tzRIJ#cU^lqYqajSqd~TRuNu6_scZdy$R6gk2oYmD0nOC|lQCv27XWMR_s8LK z?_+H>Zq0$BP8J1VOp8{1tXEz)-x=2ZrDL;v|I5VcVxzKaclE-34ZKPHtKNyizzZVB zOZIl}ld!#=HI`+&hP96|dQghxmG7G`_ay(o?~0wc!sG>Q=kR?0Z+d8_ z@msqGJ?OU8#asHg1nZ>MVJq)!ZGhPtP&)NR~*4$NL`g)Uj38mz&=9 zc2n`q4hJaiajuJWIk%U~?)6>A-+4jN$$!Cn2?u_;j+x(-Cqy@|ZT`KY9iGK~-(maw zZpE)=-QK#N+aq->0_4R%<@$QZ!OhO47 zHRx}@zNgn(4uKK#qn`L{Iqps8?#6(52)Mg`r~ZdMn;Ff+X1e-1u$^@u|LIt9JCx3+ z=Vt8Ft9+xeGVA`ai)`3RqXQY`{pwqPU!S9=ocvm8k9&U(i)Q$@wcOwNmfxw*O<4KF7j)%&+W9do;y=7$&tZ`f)cxDFjLpF=`+xLjlapnP?1WRbF3byMd2Wmwm*?rZmsVaA zZe>=nU>%>{d4psmV;_QBwcaLg3qC_%SDNiGSX-?93$On!M;m;}PPy%Tp5D&V3)bGV z^N`ige%7&b5)*cf?42n=6;^2XPpWLo|FZ*p<9@*jSBdthJ zo9*#2f8UMG_I`ff>#Kauywi=#WsEp<(QDAuPO(BjQNZQI*sW_$fP>6`phxP`5I(B)PRfE`N~kPLjnhu*1B} zP7jW;)sNgiZkx$i{bqyy%YEg6W)pl{K<8DnWo%pdkr2+a?7co1C`{U_b`YQ-%M zdsXhRUcjmcPP#NVHw7=}j(Dl(DDT7U)UMt0f79K^c5bkIujh)!^f`q1%k*;kx0O#A z%3v3~K6g5`wMFEA(Ni?WSoA$Mn-v#~WWs~u*JeAs;!#VVLCda)`^Gri&|La<;zfPF z62GnQ%=E>!?e6(|{{adftyb!{wF?PQKjq4P!PimJg57dLxphvb%YM z>Ovb5jagXrV_OX^^gf4}2An&@f5%vI%wWXtV>7nE1dX1%SjR#4rvG^YHR%5VH}^&L ztLc$p^DwQw#-c7dKja3O7RT z4|8xPg5uWf`S0tdf9J(&SCy|D22SPPhcyGoi}dK<-bq@6ej%ss>j{qdUEim{-2WaI z&?|ps5tGVMoYMs?}o%`Cp zLp|{`-KX!W5BU2p`r_!jjl+6JYQ%r#k$fLz|Hrj54V!J-ad`e*qV4Re+Ve(}Y{DK_ z>e%Odvq15G>sR1mw!*9rWi=7l*-r_3%Mea<>kAIHu`SvGnZ`v)^4W!B^&7U#8^5$Oelz%mh__5Wu zs#eP`RK2MF^^a!(N4_kb=tp~#K9rqxur|t$nXFj-$Aufn&N$J1x5ZU_R#%lHh?$4qC zM`Z~CO_t0wR~K~1<&qsxc%}Nc&xWFbt~!zAPmc96`86ub^mT>8GM%8l-z-}#i->_Y z<^r6abz{(pIz%JNCYAsv-nnDa$dHwf7EnC&e6q^EZH#yIn!wH%x>Oc03tAvMeb3~L z^0UrpM~T%`=$FW6W_FZ}GS$Q~Ry-za`>TD=_2DeQRvX$-c=l1o{7!kS%;yWB7^CZ# zfB$<0R8YB9C}mWEX(i7T?T?J`@kPJPGb?kDwF@MrSarzb){ zU=3|gn-V1LXKAKeJ*&&OUUySsSN1q4uF?KmDxa{~KfFoAE-u#S?Yv!__u*bUV#< zyLYd~GO@(y6B#WFKFM!p>$^M6FlKPNufwT^Sw~Jr3h3JOzc;;uJY<5)=aI=c#%^iH zBVQJn>E#V@eAUMoD;S0roFR*kRe6*N5%QGnd5QBi+d^E3uVOKK^>k%GUsdwk%aFV8 zSQlB&BBmVFDG+p06g^*A$!5F1Eu$M@E0i0*f8!LYbbbz*X#Rd}0Te^NbIlqKK2fAg|odr;Z<-p7`i-&ej=Y1X^B9+n@`| z%m4zl|J4_x2Pk-qUOr5o8%d+L?gEfq-Xgg`9|&uGnoXQE$&-Cb0P6QKB12<6cO6ba zMVmjL(*#rKnaF;vQKJ8kw69T+UPZNqRPXct&wHjT-ifkcfmqf1TxY&rox~_A{~B<5 z@U^@P?;aE1ojyy{%XBd)tJ}|u=u3S~{hkJV&o$(9)vXkI?OKjB_WAdnv$-+9PIEx( zhRCX(g=q=#(2woko}DoC_%-KbFPfg2bdXa7)hp8{?A9wnE6*Q9536e*@R*HQ=n?km zf-f9KrvMy`U%76v*E91>{nk!zrDAGbMrU8kytkZkOFke^dKG(Bz% zYRAUpa#!}bs!?a>D>9sy1AZ-fcsQK)O-+7&-@U`?KmS1lIJ}?NKHAB2jZ*Dd*JCu> z1l(`6ZLOj#NBa6>>SV4<1s_kg#i6h*A&J*Z*3HU$vz`U5&@{(9X4ZF&p1>D~o}PDp z|2wx+zW)5|@|W6Ok+$Vnf}Rnj?>CPZ5zLF7&Y3J1%q5y%v14ng@)nWl9={cIq{Lpw zNVFKyt7$Do8=Wuvj?|ed=q32^@;%_iRge2ww#j)uxo_}dwrN;kuniD+T6HqWuea;h z2B?iK&vDK2^m;P=DElndfs^0g-o8yb&HN(|wAQN!EGjP^GLp`O@^XKZjdd8^%I9M2 zc(%+@)~9bnhHz%E8+xLM`#2CCdjSu6?LRJ0`nVP7UfS3)VFMLjTLu+b+Aj0S1TUW$ zLOwU$Uw0mOTU1Yv=qQN5o-+_gIV=-?tREi(#x~1O=Cz@#RUQ7B>#!<(PAU%h+)!5H zHRx1t@q_!A&B=>RO3k=6*M{(H>a?#|Gq0a`Wkjuq&cnQWc>mP*d~wYA297K`BAEZXE$(Wk?w|CX+-Y7L&-0hLPMmu4NS56ZCYW2Slb zTXpgk_1)KSTNctMGaf}ShraugwYEu(BK>&1|IQoOBu^b)`p{{u9cK=Sxt_m8&vsj? z_>p<9V2v%?U>@Pv72e_XVh*FYo?ZOUy>=~G=V?mH)F38dR5#v^!oCc)YaiNo`MDIx z)NRb&!(+*h<+hHvm(%NOwjny*0XliuP)kl;SLPR>GrMEF8dqt;9QUyH(5)_(=dyTn zw$DD>o%Lf$;9kvei{~dFr1*Ta-6bCex4YE?9X-5iyqAwqujM1WZ;I{>pJjfRZ+b-V ztI#LuOj76_@(lDgcLze6UKgL#?=>Pc3fW4`HH7SV-=UAkym|Er*TY*L8I`iT z4&%A>za6eGW%Z_ojc_y@54?z6#z;dtplB=4^@1Uoh1gdatl9 zGI8zK+vBxI0o`HVYQ`Ur{BObr8ASg1r(_S`>{ChCuV&vDJ~)gKyb5#f{c9XHbz3!Y zP~t~QH~`)}>fYaNIH5l0ioJj_3a=-S&ENAjU1iRdhTY9sheNJv()W^W^ym`8vM+dD z@}C$DyC3*jv!rHc{S*(S6?FdLe19p61JD0%zfrlyw>@V`Z3u} z{LUmC%~QaA58me)bN-)MntOXs_K30%kNFGvxqN@?LGXy-YjmYOv}z+^tV+IC@MrWB zc%QRL%sp`;xZyfgk)!0>-|Q2D082o$zoTYzVc!K`V}Ija?lYdO?rg2zB~vYQvEnPq zdTNHx{ZbP2iZ#Bf4hWxY9%j@TRj)@|VmKAP6wY*cU7oLPxf~ zt_xv*Lo(esoH04nPyFqBdpOTK8B;gQ!m%Wz$fO~nymSC`J8=`TQRum-a_Tw zJU{GX6q`Tz!>fG}eyy0>)IH4s=ri?a`tLI@n_q}v#(vQBQCwG=XWpxqN+5GV?W3MYdvNio>+CG#WYLJXb zwomo1!slml_Fd@N=X{JE7bNpO_@A`FvAdj|3E#f0v1W(ZeM5)Jx>3!T6uU#{?1$EpVG8}(GVJ+>oaTRR=3Gp- zt$XEzAm(p)rr zBH28qE4|2H3%z(++mwcO6EzVjX)XXF~xPt8(V zGjnZo1|Cj+=HTnG7pAL`B&+f{i*ly>%4Z63-@7e({UHC+!`ov2DC}3KueJDY13kV1 zAJvF6H_WS(jwadfh4cIHxmTaWY0vIO=Y!Yv-`4VK&RZ=ykbEC-T_?FaT!v2D$LP-Y ziyygp-)WC2$zOH;84gRUhF9zAuVQ&Q=;B$-v zzOy^l8gNMA31WI0-^ahoWBFX-;A7x*WFe zgT+(-kBC1Ren$1#gHYF5M$+L1`KyFlnDFRT`0qV+2JFE*U-5UspUGHr{`>{WvORS&R=UMu?q;_hCTK1t#cp=Y= zZ}KWWiOlnZb5*}F>pCKX&fdh?q0pMSsS$g}R3W~{TKcEAGj^Nhc^~^qOi!<(kGY-v zz-)W@*(Xutt&PujQMbK;HQqsbHSoqYU5z>SZ@QrS*c$$tUcJsKMlg+6@gMK!9oY^I zIfwI(>_2AzEefA`8=DV93eQqn;>`PS9j_U`)x75DkL~BBH}l?o&{aBDDw5s}8$R=F z_?!9c`qTxXOPLR2^543)?^?Byh?(Igzp&c_|`9oU)Lg(n2fhkFDt|+e5&v5{boZn z4tiz${|f(u|2gdBk=8pp&E!SVON4NsGpI%}Xhv+@r$ZT~UmS*5e~VOL=h~05CY5)P zVufEC*?G=Q`+z{ASJw0E^IUK39TX97_Jjjv&V#4sc7hHhU#mzcEWwMCupZeN&uhll zaF~HQpP#cX||ztUb=t5}Omx+!4i zL2ib4ti(F)Qu!=D7yWTP;*Dc8e1hnyyp>?)F*^@E!Lc5tj}!2q&MDDjT3hM)BM!g^ z&SUPwvBUF$en)GBeCM?UdThqpP-$9egM8qlR~PbLN%AWh{>`(W}_H+cOv@ z0aoSZM87;&g-$rYN#zUPr*DMBd))8F1EYg{{|g;nUk^N%H9p{%G`Qe+d1yDw56So| zpuQn3{ObjJ?{=LC@Hme>(1#ZOP}jbfGlTvS+y>K;5`a5{#!s!pJdJokKEd&w?y^3t zI}b1I?G0qQC*W(v*}g-JIUI+zQ*G%o@dJ@`I1$~fp_EPV=y<&ggIDs}cpt`JH~m}6 z+(K59?iD(MI3MCDr$N_cOldCrc?m#v*`QzOdaF0`T7Boya;(Sv^{5+`_eY`aY`bLp zkm-`!$Tkd~twyrENBu{>nH~$e7wPp~)2#V+=XGXr1`Lr?v2Y z@BTS}DsX?Q_l@p$_{*mB!KZO-r~LZ-%V+*^ga>dGJvix^WvuWmgfC&QkG1GfJ?Uez z2d!a#glnhMLYp7QIL1-GNcFD%unGV_uX&jlr!zDg2l%Oarq33pOs^Z=&fpBa&#-SR z>%CaJMQ*xfAPD-ZZS95o9+lT<=3N~hf}G|k+*du=K}_QlnS5UB?AJ{js$+jQ{82r9 zp0dDHx@71K03Rpajanx;S>%k;oUC@Rrn((Moxik!ARWx~cQ+=cYXHtNv+CJQtM2bm zrFqRh#(muJehosP%^Z&pI#rE;{Ec_}`;{-OhsSr;M>3LiQT*CJ{m|d3UFqy&){iHN z?EK%?pzx(*pN+n}e)9(-+&}`fU}k=Td`)gy0*V}qNwfRbRzQ(M z=hEB{hxN1ut)D5$oYm&@4~N;%bfv49^AX_6C%QX*jB%=0b*;UgQiOg~I_bOGJi|CX z(UGr_(j3Ww#}F^XM}9;4Id`9+z&>gA{NjZSf1z98RJvFCL$!B#{j9h-~{@sY0dG%*cI%qeqSfe;IuzRPY}#SnZ}|g)CfGix^`m{%U(on{*sb8l zg;r8qjlPulgKE+VmD?97c24wfi=PfArFKe20N7G&Zv&>)$4Kwh@r=f9eg3K+6m>FU zUem$bb*(#mv*d$Z^+2*WGD0@3OW@d|6~qvfIyP51;@fvQObAr+m*}>fG%-VKig?I@dJT`rd%g!@w17WQtz@Ut_Fdosj8UI- zlfya0a~VF46P#T;+kVfXza$Gjv|n+i<+abhE0Vv|{x*3{{CIp}RlxU_2WmOTIB0At zTi>;RoQYwZsqPO;rz;82ynOuYC=$L$?tPPDh9kAa+THoRFSxMXxAP9)5){B!-|0wN z=eV@5O#eiO2yRn=d532kd>X$C{`gLy!_{wcbh|d7uIoCy zKmJv__5SHMb0q4m%u(8371E7Xg{U`(vP{kadjB|Hs_!xCxsN2lhOS_1$bHSB>A%-`#9W+n%k%fIqLxg3SQ<-oh8 z8zHr=(sbBD?5XI$CkY=Yy^-ugqFrdj@0p2|47`MDaN%KGp} z{2z^dec-j<`rQQS*Rtz*ZTp3wE1Zk&)^EtE1FWhoE@U1ETohrS0=J_Lth`6Mmc7y8 zjMkDZWbiH-vBu>AMn$sCBW14;^TWTg&r#Sm4PPkZ$W7-+C#*PpUBv?IkgTc)QQRhQ37xBJ7bSfVKuj?2Jxl*Viqf! zLNv;e#+mtD98F#+I(1=Gr|eBAHIfCsn)c^gw$wF0i1avq^Jm+U70n`9j9$R|SL$~} zs96z=?-_{# zNLT)0@8t^D^A4iaYqPn@?X*S=;o8sZAGB=bbg zo^*zYRu%=}J{%@M1Q?Lmb-gx$2d20yT18P}Bb}7Uw?#TaR0^TU6ux$}?#$ScWp!A@ zDO@ugHA^7FxuOoP2sb~kAESSZ;z-%hjTp3H_;L33uW>FmJ^x}fX|k0if|72lY3(% zrz`Vnk=*~H%T+IBLLhwg>~Kcv&fB@kMtD}QK`4^L74IQk&g zpnE6Z{xmmNVB^~WvnVi-$=u|PUiEfF%;yLJ-`R9s8^j@^ZtnA8i zbkdXuA_+y4WiX^KGA(;%fDv-5_C4F9NUTEh0^CJ52F^r@x#Zthi9!T4t(Ui9DDRTBxuQbpInI_)<~0+r%`4pv@thsJ;K`UI@IgRkz74$ z(TEJz^~3Y!)QIfb;OQ(6G1rh0=nrc%l8tX>Ywq1^&Ur*(?sioZ5x{>KS(?V(O(?!^Qd4WXBw%QM`Y|q{CdxDtwvOozC@P8 zevP;GYXnH}SdZKYo_&)JMYGs@PLDK>jm$wZKqQ4UmxrI z1{rM&^eSD5N@&2zS8>+z0 z9Rf$>l(&U`pE*Fp^W>{2x`5k}G#^P9`>b zRKef&_3Q2;0_`x{sOo5oPO=`c<|b46rZ)q}T<6Mk!gdeK?vAeJIE_xV*nS=b|G(ov zHg4e2O&JM>@tNgQTz5TEtM@58eGB;-3H}Mw$nw%7sG83Mek{&<_}~X*#>@KfHU2HU z*6BF&#BPHwUMyqB(w*KCzSqR}ioLSv zBJhC6&Dn@0#GYpWL5ZwFOSZq~8eBXx<1=e%TUhb?yzoe(|Fdv2;4nIa9l^F0>3^Gl8}vuETB7ELH?v#?{X=%H00mXfisVcN zx5Eow%J$@duJ_K-sGZJU)egNk*j2(@M4p*NyBs_6j`fMZpP?sw0t%9An#i@C>)MR*x@dW})CYREqth#AT%GM)m%)y^V`k=Hd~o^o?(J0{U(t)j z>9P8gbG`rk=YOr9=KA;Ygt1H@_0RZ^|aYCGiv1k4HY3e)1c+U8*sMTp}Z1_%@$X{Zlo= z!A92)ua!l|ycR)UxA|uRcbEQZvOz|A4nBs%2P3n7NdXagJeED?v3+L7j1hLP6kaHr zby3fDO!V&KhdlTGb-DIQP71XplCwAhhj^{L?Xsq)4DRkPcKD5+{Bk{cCqML%$TnfR zkHi?da`IC_2daLjS}wA+p0=Kh1{cre9ob-_ti6u_IIBSigxt;UydN!>*S!A88T4wF zrJ51M_c)5&jjR;e=MeVrJMqrQULN-8FnKAa+d!UPbd6oSmHEeXAU^jH15a5WSOyH@ z3!D6!axrK1cE8F^x*E%H$!oXTj~AERrG4k5i>XxKUHGkYVDKtusnay)TQEL<&v>l8 z4!ZpL2euaI-PYW3gL(DX;N64&k^L&_*+-F?GO{;OW?S9qV31Da^)H+6Vf#77zvSZ` z@qu;6SGYdY71odUf9wStnK%!?HDm(oQg|n2%uM53eJvCJ#Q8{WmbKq>u5v%7qR56K zcf-f=Yxbz7dMOLj;4Dp&+Tk(H`*+z}xFhQf=GZe{+L@Mj$(YyKu@6s&%`@fXwd~Nu z2c#*QX~;D=(uI6a5MzUXdtGh%D*~lVJCN7f-ti2%$iC)wb#LQTz8?FzFYeZH&;3g8 ztUFcq;QpkapNt=PzwrJH*8n+f<)*VXYu^-E2eIE8`UL3zqJ4~Y{OK09HR4Pi?W>me zR@GaucaUrw&@bC23VE-=%grY^HE7SaY@cxC+#AU;?*S*#-pDlOY9(;>@;fi(%KE~h0qGErCpF6Ch-@oC^&RlAS zu6mB5o{fR~dCQ7kY#ur2c{twyurKn*-JYRMgYRI^>~*E~*Brt&A)Sa5W!=Pk-3Gd1 zFVW^Y>Bn^Lg6&rL7%?ZT=W+m~r>W(4dU)*O<;Ya&b5-}^k-^e3(8n5O9Jo!^gdUsy z(G@4+Yz+2ye$t$Kw(;Tz#u(jSbK=D&f46;Q=DFi0eM;S?Ko<-T-kJW^@tkS<5$G`? zAH!Cv`afiz?*UZ(8hd}Vf6V(i&=XqRbs4}uk~o`sx$DjJVf&lU;Z8UT9XbA28wEa$ z!&w;LBQJq79JB-PuK_T8?ylZ;O1$g7Hyg=qm0=@QahhD?y_4+&UOVqIJ>M%U>H6k` z&RuB!2=;cHD9hP}6R?%sXvuR&K8>ed-JgA3Rc`Ni%{T{LYg?l-r|}&S^Wc4Nux2;L zIVxb>KmX+KfI1tB?NG=k>>1P#bThrj_XXFL*XWhL%>oXPZlYO#O}0##Q%PrP2%o{r zN5;9gwF9~WGnusRppSjeU^GTtL)WfjrMlH z+ZFz*e|%1Jd#ra1N0OTT)aw@?h1*V7*dw#8E9?QLYps2geU<#l=Buc%g6@DDQE=yFBe62o}`tM_5xlA^m3ZH{|Z~gGQah4#TmqIyZQC(xA zeS*>J(?MU*zc14b-)YPj$%gRf&{;Bqzsk#c=KCJE^IVp{+Rz*0>(bw7E$I9WzU@M$ zX}rfc348U@Jd5w&d!dKFm+fly{Vn}3pQDKLjQLE=X6M4jd1adjymS#NoPg>W2@!&;K?K&P24TX>+SG?QT3y zY$F8bR;L&}wQVhgT0ihPF^P)oy4BYTY?>s@VP$-${-&a0MA!)dFg~BtL7Szhay4J3 zkKNJ9Fbu$0VH@=e__2?7{jnK{TIL}XgS<&4W9;q9F3d4bJYDTKLcp&N3bB+m)ck&` z387Tskf3uZLS}zXopfcCXaiD|S;l|HM+m{fSD5b88k51J9n9r=(0g3xG?F+BK;Ubg zllszu{xsUm)%P``W;Wxi7OY9o#d??d!(bXFK@WQ3xm!vt<2n8w`2W5ZOixAN6QJ>1 zQGy70SJZHKJ?U^Et-Wf$QLo*>dQET~@jydK+3ye8hiYpk#|A|{^p)l{wVUN~z@=^b ziEjD69DBE=7=;&M?w>#J&8ZvkSrhcPc?OmbHnc=)&KR8<#Bb4T~}`rN*-oQ4de7c@L;sogQa z*Rp(Cui6L7oH3r(jK|~eV=nz}=sG-R-dN=KeGFAz+nDC2j`X^LSMO{Emh)FL=S9cl zK2zH^2MOMT9$O90oeo1@_RmYtL_>VN*Jb_mY^-N_OXFkt+|Wr~^STz5*J3@QPjw!> z)>9m>&`)Z=lcf@LJu=cZGm`ZQ<{zN5oRR4NUXDEWfCC%->t_cG=IUhgjBJe11CgXR znv81Y6pe))C`&M7&Cl-vj?7E*ha=iJFi#(TGW-k=^!q$Wh6`=&hj3Co=R3Q61}v$5 z(PjQxPI{^Sr5!CAvCqxULr1x`HzeDwJDmo`0avQj(lo#894>dM6%wp!JiZS}Jdi8mV*8^+ui0*itQpOO!+1{1pvtXW#ZaaIJX?C;2W#LA? zZuCK`x8blfyttNXZ=TkwypKabO7Dtbj1JVslSWZOw(iRK>WBI4=W~CGzsi)j)3e)B z+UsJFZs4hLn3^^bifr(?8N0vxyS`e7uF~mMT44SgJw?6K#}EYRuJ_p!0o^!!`&#=r zSEW`p?C^Ws`M`8t%dx$m=}4>GL;ptmIIxp}Bp&7P6g=d$9@gJW8u}bOOR3a3uR#)2 zGCi-j~rnWt>_6)`v#Bd^?w(H<|wlJ_7DX@p!o&RoW z=oqb?=5Vy_i)5chXA>qoTW=)zsA6j`Z1j8J$*u46L)q4p@LGI|EAJ9Xc7TsL`mFw) zZJdRt`nc^`Oh?0$HLrQ#=6aarS?2?ha;>e7rG+0Q9HQ$QXs3fcz5k_bxT5{x)QSUN z^==_P@okQK$OMEsn)+YcQNlN>7xrfLM+biKm?v&ko?QDSdZ~LR6X&qT1oIf9hdb%l z(w49ETJDc8_57gb)_=t*Iz+a?H2>=t{!u$D5u-b*9BY9&qWiArZ1f$}$l#rDDUF#> z+2u1@B%VCbugJkAx368x!y6o}{$ih!v@gtjq+hed6F(I1*9JQ5FzrUyK2Mhg{L1GZ zj`W5-0gb~eT(9zFhrY<)jb}@yCuznRfrGNlHI3`PVs{-V>;evVJ?Frh_2k5h8(L#} zm4Ztw+bfTb{ue=@9q4!0Owu?9q zj_VMGy76Yf5^!d`Kk-m$c>Sl+>3Y^fz-HG0N7rxLx`-U~K^wpGM#27y&5N%Qd=zVc z*ZHUL^DE7f5|7?`KKLAx-C57V(VA^~@K$!eQ|-S}OvlUl`rp%QZg-rXgSQ%7lI+vM ze^e8FdOd2d)%|G=h^)4c75DdqRpK;9w#wXb==rI{M_P#oqrEW2T>iKX4W4tcZdC*M zitND;N@2bv%#yO){U$Vk87CK6G7DS zxhye$&pca&^>O1<#^bz~vF|T`EPt5)6P<2r{G}b{o9**vuHu?FB+c=6Ig;sn>0Fpk z75JX^-GrZtCFfx;9?bMkbc=D@>n1ar zK&6FO{d--g26&KdT>RVmyACDEQ4!JfSJHNT92~eS@i38AzH$>xBOA_8J#=3`v`#ds zL4V-Is+}KM5}mFQjx?3p;3!q6!gEq>9{FB~w>w-Sf5z?8TFYt8wb{F1L_d}TjdI)JyoU*_=C z&)uBu>FP4P-*kcuw@4(?up7eF#*VMN#~}R}^&lg1zuMLnv<$o8;s6*mIOV?9HOUhK z_jk|JTr}fYpxRiA4pb|bH;{DrP%-)sNL5gF+VT>EnV{ht-hx_&AD zEusZ~MZTVMHpKvTMvhSuRb+JJXtCl^^=N9==!)j|>k-DURIf&C^hvU*$Jf<0Dm|vRMo>mXa%8f- zuAccIl7J&kfy1-F{aO@Viw1@@_I94gP9h%RqOyiAIO%GBMr zLF3vAt?{qXIkI(Nx-W{{%ux{{8;s!!j6;gL&_%hNNiJV&66kzr&k0FogYNvxko`U7+*B6 z9FeZh17t!dH}RaK1vxLL`@siv$sI)ZYxvAslhyu9u6?aWL`=P2nVze%RU^YyoC`xB zqHu9R6vQWDxsPAEh{-V*&%gU^bEt7Y!7)no+!4`H77S~BfGag~7qT;{)#Hd&96jDM zi&S`3iC!!dt^)qcabeMG%%!vP|E|MJ_Nck6NZp`Rc%=`yQ>c@aP)Rcx;i7 zx40$gxr~TlJmtQ+E3BO2#?FKyRk8|wASw$6mY)wJQ!`+!S7bjZ|kOd}dLoF{JA zI$bOp@ioC(+53-fv(_}Ss?Ieu-3@Ecx||Kt$I9~vzHxU!!)Q&@M%N(c4;|2lUC3+h zhPc6?LL2$jE+tsBzzaIcdbAHK*$K~_Mh1i1ab(G_9I@QTWMk}n6395<2lq7m7f)?i zJ~eW2_$=1^yk4I(5eUhwHKzPgXpC9Y;A{5cYbfbD++Vgo9CrvOk%^dXms;*SN2#B> z7xCu`A0A8_$s#YV8PU{t?JI5UV(nKbztEefgMwE<5-;^^jn>Dn`y#ThByhy!^?%+G z?1IL#(TTMI8|tUfVdc4wr}v%e0p`%Pa%6P(+=BKfOL3kvEtAm8Y0&E;<2&gKgU2ka zlaFMxy=2+%_q#;jyjCEYH=^O*p-&_Fb?^snAOA+d9dUkPV8k2_;wO+X_tMXqSM%Eb z7JK)RJ=|Z-zEtP<Rgr<>duPyINB{)^|Xb1~c&rGDwWU$Rg^o;;CL zDf8Fe$hpb4Xl~koBIJ(}@_&1jTIOYir`CB`@AbU@%{rE3`KPQ^4d!h`&xMZOCG(zV zPqY1-+vRSh*Aa7>2VnKr-y7cBfkoz(kUxNx+woTK93@-q9R&Caoyq(M=3CqS+M)X- zdj)GT#(wBSLgz)@s_V=;O7^p|@4@s3vCMeMw}6ZUfIsg^fH$n{Qh6W2Gt0uKj-W$_ zOqkmN&ayVuHgX-WWad-m=?2?+UUjq3rCeuf##XZyPk*v5+izu23Hio$rpj(tCch0P zST)sSxv0fA!C8#4Kuc=wfLC36i?)Cw$2H)Uv+5;St z-&^;V&*&*NJ1Q~|AWH;zBGYYWA770hn%54`)*MLK8W@}Lz*cv9=FGCfObkqWz~t|` zvacUmhc1(^zrWCrcl_M+5D9sU`CFNQL{1r)u}C#LYGx>ViT&N6tEW7f^5!*sjX#;k zvOT=UusYih-P(Ms(Zr;s7wyklhROmLXwEZBQ&u+j$s(&R=8!yIbWRoA4_(?h$t>URz54S{ zzScEsn|YDuxrZd50vA1l``VaxdyUIw8Qysg;NN54Vc2M6=h1a-Ah#v+{^%RLeI%WF z+7xCxfoHRQTj~CKee#Ee{|V>3whYs-kBcAaDsnmLb|M*Gp39PT`2G7IsUo+Q+v&f8_&C^j|L_2-mB8GhK*GVY$Wf8^y4exUG#}yN=Z9Y_u1D89pps>n*%S zuMc#Gxmj?g9()dCe+P0k^h7+LbNjmT996oE$&#+{nSupZ&g|uD3tOn@G;EvQBj)*s z@Ra${4f*;CdcJv0O_r*|hX?Tk-U)jb=c!yi1~YO0!bLVxwzopBW*^|?KFZtmYWFYQ z>+H>xH@fQ-;QhjO;|PBi^xnm@b+?nteu_w=`+0ln8M~JLt{$u?bjCf1N?U+?MelX{ zpXykH4)22P^6~JTPLN;AXE5;#dVukr38%XbM$GXm_VJMgmFLO#P-j2CnFfk(k8>A7 zatS=2b?dByjOk<1gQB|RgSeje)Z%^FxkmTztaF#FilDP`*iT{I#>XW4Uc&twy4h2% z|A}*5KF2(w5kA~#&*qE9{(@dwamnb{>-{X<>OJ?^<38^dfKSi;8@E#;+i%Ao`J5O0 zO9DL`cz(rsSP_<^c1`rMg5HoHReCDp>{{@RchQGYGcs`X`?8#|OftmlM~e+p z&NX6n&_2$f*FAOROw^=rpankj&iL-EzP=BPi%Sn1!-Ll!+b>t3`0A|(j&qNOI z(^P%5`UE&bHsmZl6_NhEn&mW~o09#z1RrC6maY1w@VuT;1y8DL54#sWwPZ^XU0frt zVOkG6-@mRg{w$Z44zldid4Gg$6Z99~|J1#Ncuwek!3Uac9)Abzh$NhW-ad*BS-&}R z`K_9D2r1{2N0w)jAP|?Q^&5}$ZJPwo-gx;T6ZP^rMBpaqP~cbKNWyYE@knHl{%8A^ zBEhM7t-wnir)-a)o=4y*;*b zY47lq5TMd$Jsv3PNz$X2@93I7HnhRnl<}Qil_73p6uA&*Zmz=f zCEH=(>7cW;7q8oz>UA~s_I;K5-p~HQOTN5{li^%gm}pi)p8I!n5Q{43y$$qfO0IKM zzZN%^-5Y0VqZjXs6lH@qiOPGL1;)vgs0wT_ zX-W43mO3|tv?PqHl8XYzA?h(hmOh`|Iz3#dd04z*FzhhxAID!(3qEVMADo z+dfX6N2gN-_Vto6Kgg_3~=VjfAM z;=XMiZi;Z1rgtjlcp^&}#zVhwC%wOAEfSa=fH;85aGdBd7{ai&*S!0q`&Epj*}zC}2I zJ`-H&4b&W|UZtsV;7Om$Xcvsf-~Fcd<^2BXevLF<9JIq-?v1`*t*dq~Vh)%WlV17$TJZOL<^U*+94&P|SG-K**_ zCmpIf(2}f^U1vJB2V;KI`JT-{-SlvGejIRv=@p}6-iK?Z13?|anI*DD$US<$?f1hN zr5%H8JU;5hVbf7$3a`&T_wupChoh+8<3^?D7XC5Xv3~|YH(nU+5;JSYsg>6NK8+2t ztslXffe)bDj4R$8wM(<^ZEiXu%~S1fA9~i!D;+sJ081(l)TDdt8>aWxU-#R=mCE?P z=~{)-0=_AiFR8jw#rwP@!{svQQnazHB<6vk##*BuE-pR@Aeo+aU8)q)x3@WOaB~ox zJix5e*~`rHnb-#re~2fA8AbG+5?@Hx|LrfdfycR z*~&&|-nci@!E>V9uI^JV@W+b|p2%8*1?ZZMd62E~NkhKE|J=c#zQ(%Y%39lOFLrQJ zkMVxuh5Q(Nx0&{1lJt)>*JKHW5#AU*>FjQ{7n!3CO>IrHdj9?*wwAL(r8$tQjHE1g!jsP9kp@liGU@dGfa-@Lx{UZ*D&vfInS#_={Z z^xk-!<@%s?ued-f7rcPmm&0K$?L8H9JcVw&{rke0Oo`stOw|HhsDpcik82{mO(ab}{QgO<{Tu$)-%qo<*35$YB!!jU<2gt)3!O!S ztk&~Oj-}|K<3M*#XTb;nP;Lu!NsG69iIOKv!%oig5p6;DQoOL+X@~w0ud(ZfT>d_L>efvYgzh%7? zeY&ECG@3#O&q;o>Xvlg3)P(48qgOe|!!Nw{w#7;J3C4|PaFTONceL~ z0S}!he=`ryxU=YYHMH^KRe>3YpS!Jah~(gUJl0x&Nd9=I!o9%BADIFEew@+aw>3G@ z)3M!hz2T`yXb#QzSCD^hquLyW*ZW->^B7tGr2d$m)?DE{Mzrg^dMN=#$CFtf?JX4G z4-J3<<1^iP`+00xf5`g8p!3PFu|Dy>P47MM{F8ll(#4|v8dz!{>Nw}$&NZ{&q zomDOCTB~2}SfFN!;G~2(E`+11}t&+P>_C@!$I&ALM3!`M9RFe3P59`SQ!P z)j#eLe(A41+x=hb3{84R`D~jw+(~yT?S-zD=@swF7|oh?uxq)_&l7z!-QCci%N!V= z806WKYWHd{ll&d~+1B8zhFr!`_|BjCLOF*_4TtVZ*IU1}6lG?V`@UX>5B4j)V@(s? zk$x*>ZZ{a88~09=s~xRMpLB)Cn&mA%9(u{A((+XOzP_L6?J1itu&!}wr`}^+RQW#k zZS8!`Y&fdh8LtHI7(0xMs3de63HlrRS$J=U;9L54@CN56QuTl|vK=lZUx@j=KF!Bp zO69fRc=>ieDjez=UoyQSQ%yWaIqgy8Za5f9&|k<~YgdGL1QF5@dzZ#G=h$kcAq2!} zpR@8zx~>7oTD-UZX1iDT;<{4T2>dJb$is{EeO${4*8u00eya|J`TevPkNaI_=*kZQ zoU)eGxn||9@#s6()uu+@cW`!Run@!p%(LNxks0r@k4B(WEZ96lUdfVJ zqX&sdaRT7)On_U~B||hf4By5q?6t0+HLUgJJTe1u6crR^JRYIZqJ?3u-X1D}+g7c%LsDD><7 zr*>p0Sdq{Bx!kf07KPHIg;_?R4Ucer6()bhhX`D1wkDMN#r$0kNT-P8w3di&pjWKN z96iy)Y^E^(_dBBKa^$_+GTN?a36ufkiCTY4M6w_u>DkvPdf&;7uOxhcoHDiW3<3XVel2{`mBs3$agb=IMl{BpA=)*f@N!nki9crWdlXLR5C84E5M8W;Wvy@{WVo`% zb?p!9?{;}Ks~dk=y3j4QqhWKh{?7a%929pl0wN00%Eqd`I5nFw=KAL7g@hAT8LNu- z7KsY-64C3Su9Wu>Q4#d&5slv?HboRpd~vzB8DT|!;)7+#r7e4@6rM-V>e^#rIEr@k zca=VGkC4+D09}F8ct&DXQkw4^txqTIZ9wL_(565{MG z+`j8jJcj2zlZSJTi;m=Q1j@SnRrB&O-QKMU3tdq>Tc|tZ#_%-*4W+^?Pop(%SCT$& z?OZvl(V*(psl~Vvk>C1{mc@D7in{BWXEg&C(Q|Dx|7yl2EUyuj(;`G#yZ>0$Cm%6X zmuxfnA9s=ezsM+mLC)nUf5>S2@P{X2Dx!u#cVZajrmU!h|CpDQfq-=wRo{#OJwq;g zq_{gWkD$*Kd9{;+1jjJCnz|chRkdnqO%Y-FeMdB1Hbxh(WS*OOXz*T1ytx*S!h2`E z`du>oc(!y~t2)lR*gC+q7e&jTANYu*j6W;8i^g0(Q}xP`sxvIKCO0B?5g)iLi?IZM zST>5;RtD>3I8OuFJ{{!w)#VJD4-tzz7Qbdou%-ZAPeI#uJv7I{t7<(^*Q3|ecr@>N_{9Q-_G z4MHZV)%VV`5CskyfRa7<(Bxpf_x3D_5n-A9HqOvw%XoN$_xTt;O~$u7?fG>sq?OWDyCO0wk_31B-Fb^ zBKIue+fcIp85w}It%p)+m!3Q)~eC%PekX$ zeVd?Z!^py!CmJgSq@wfLaVQWEt4wC0u{>9j`p9iwyN?BdV9x!;BUyM;Qh0t8w zhdFY3ELjli`w1Q@;ddhXPSbDp?hi*^6^U#xFS848nWDkFa=K6 zU1CkO@Ke`MCChf!VR#K#rwg7Cz8G%*(Jz=xzF6y@AMA0c zYf6Y5&e_7JjCkh$zKd^uWy(|A@7Z)Y5t6St`${~&3ol;&BVKzRqsw*Z8&BKr6Do39 zX#cnBx5dV(h4sBPN0{SX{$j1g^@y-pn7)&=vx^5e9=XJaj0zyG(@eOxEI6=7|LgPk z34hYex;PL)J>FUSL?J(Ut%c}crccvsDfhA6KF6+uY4{!>Yd-Q_)hrJOWdf1mblw%{ z)iqghh>C)&ovP1m$>McnRoBf-=CkA9P(e3V? zK7!W`zL|Iv^L)tInUPapuFuv?i);%eIZgD+Fx;e1Jf-7}iASk~OeuA`vS;$jdctqX z+Efqg)wSOI2?d#<`>!m_kuApQG{5cov)gFX$Meo`Ox}n+H?xB^KGvDxnD|EZe>$CwY#-RS72d=%)nrM6*?a^e?-hWaG3QoQ${(pLo+#e`WqxJe16*Sg z*DuwZ8<{?}v5y;B!~F&>XnM|>ujkla!C$!E_HhPmMUp}5eVmcG+o@Q%mCvX!jVj$= z4Vg|xx*vQatP?$F>>{X4IYc}{r>c7E#6;*cKR;=oma}jvjWe!EzgBhGY^E2TVGUk# zRUFhkLmu1st4sKeGM!c1MauL09$Q~)4SL-1br6$(Gf=g*xW)7c9=-Xe$yTV6VTf!Q zG+7_WV`IJe*YD5s&IDhakqN)`t7O6D{UEjZKIz8cd+ygI)h3&~+-#9>&;pdO37z*6@4p*ei{JB1 zc=yuvt`eN+eq&Q$r1yb~t}|)Yp{nnZeIn3L{66Fxk0*;d-^+Z@bH?wq*SE%T6}e#h ztC9nhiH%U-|6yo6f362{>53P2Iw#;!Qq|*&*9R z^d9V6j2H5=>PUQseyvG9r|j?D#TEiil>P2{wymBW55BVgQ+*{d6r-PePlB;2+ zbCvJlpFg$-5InHwjSIe;b`*jAeGKJ|HD z2maqzxwi9Bn;uPVZflCM6HmI}Uy5CpR8M6eOI+t~pWu)BF@SGWju3`ULAI0?2ll)SJ?{(5_13R{P4QJefx3Z2Zl@I z&h{~{nOuB!G44a>hkRr`9`)D$ZT9Q5XJdFxRZWlnO>oyat{G?Frt2W!haLj-2Cv4q zAX(mq8jx+JnCo(OJCMQT%lbRM(^>1q=N5s(_^t=EB*dGS9{+aV;9&Vmst$CUs!L(t zmG>SZJ8#CvL^sslyX@QY85-74Suf!BMmbM`v#HqYd;B@sR+79H_N<TKePFxetUC06;Q55h?qi?#dWAmxT>mut)ybD3 zq05I(rDW5EJ$sdNNi46Q@xA}^5ea2xXDGCjV zMa@Q``qL5HI?Q-g(|ayr6H;X7FBrBv!@Ryk`+q2_-Se|@!}bdFYJ3KWLLD# zo$98%#Pcujf4Z;hFe2kZ;F2l9sOzX=j*aN$q@spB)>Hiz%uS z46wL&I-C}Q@>F`dV^~vrZV=#co)b6ww;>xI-}@#D3)b~$e;y5nLrrCO066Xn=m)n6 z&e0gz&3Icp9HiWVpF*i<*DBibahAS9X^gs+-|g^>0$ATp0v`&r8=%rYuLV4-@?tG? zI}&W#@(d|8KlSbH62F&iPT2tkXqUs8c|XtL))T=A!FyercyR~k{&(i#bu4VS$Bg}r zkHuUbcw~JKzxQaL$L7G{ee|huD0KDCI1qel$YBky9PK*ME81)L0iFe4K)o!7i&*xt zV`g3Hz3C$c?P(JYc`v#v-HAU4BKDLuDTZGLROBS*jy#z96WQfYrOQw4WnQY82RL8+ z3`bNW+RHVl&VGDg}dOuly!nT4^t`mHd!f^3Av@9~&>-DpU5n9kN3JYM?4ux3?uvRCK- z|5y6r(n&52Cis79_p}jIb*QiKe|WBS4eWj!eBiPJa-B@<;Ih6)alqrg5Zyq|&TFkQ z^!ZPC=~CwD(y!0O6~Q>7ktG}8#IAFJHemF3bo+76Kdx)Yi}aozc=5G93TM8in(e`3 zpL)<)iVWkwN8zzv-T%4DGBDr@5`c(Srt8SvJPp_blZ*X8>@M=I{C(5;P;<~8V( zQAf8i4AtX7R_+75yZfkclT+4zDh0OM{)B03o9J|$*QCyIy?^4dr*_;PFVC|*N%X8r zAJ6V|+R0(3TUwy_2tI2!o33-jAJWCBZi3%_;jj(eWo&eZe}kTfJR-Yta6coBFYBNc zUODP0n~&pEPxD$Gb)NLR!N02iG5;1J{Z-{(aT4cg-g=QcyBrFdKyT#RkZA5icg(xd zP7B(7lZ<-)3r8>O0)!)a72fx`Y(az$K9K#z&uh;0GCV*=T#-CXGN9N(cFpw2ErGAs z(%Jr!-tmeF=Agp`myrA%xX*OkSUXr_4}4VU+{c6K2Cho~qk+F>C#`J#8y%m@XZqZq z@AjFtaI#a~H1j9c&o}%{-QL75Omcq#GFwIGnhA3Q@3WH0T2uh3+CEX1WkbGE^Gg!#+Rg zBwODfyBiI!rsvYkon7zry}g2+1RKOk|5;zVnj8&ElGUcZGQ3_Ei;wy*4EEg z7GtWkD)~D4uQpAV>+|QTAD#w}!*yDd^1ghb*W&?-6R-Yq&H6Au^EqN2f^gf%Kzf05 z&~^!}#iEn!y3N|>L3Wwp@I3dk>}I|@8hM;}Hm!XMxH^XH`wj(i=Y4s8yg!jmud0jH ziC3deqXY5WvTW<-uFh5RQSw}kGOngvAAFXd-ji+ZvyZ6yyXw9X(`oIY&d1j87nnY- ztzyka@P1#zk@(AS9V>j0zSdIskjNKVvDTxm)qJmfJXL_+*;c8?dq~@OWi%i9eCEMY zc<2rizRH0eU(JP>mW`{`7+=^NsHinTUz)+X^x>o!<*_8ZTUQV>h* zNmqKWfUrL+i-$9x=*N}$1^<4vZT@($@q`=ChlOd+U{%UGn$1{$lxDYaH z*_*Uj8n7feE0TC};;A3Temb08+g1N7zt6lB^_bu9K8r#>TH(5=wf{re=sZ8}cop>1 zzPT)Cq2G2q`NU(kbx3r%bgNiXlebD!Lm%M+7q|X3>oIw6t{bzrw#g7*!$bMTQ~%98 zaM|_P(ZaXAKXO0Gr*|fSXhtN_Q=(~yjm|H~aQ%9&)uA8f8;AQm4%T;lk8jv{sKwNG z{aQ#y@I-vYO+C_|zu&&M%RPDtEq{5hFP>H0aV7WRyf_%hI%nRWoURDpg(Qs)%)T;HX1YB&@8VNu;<1~ zza)e7pj*{B-sTo9XF9Cs0|MN-R);g>wV#47@lnk%bVk1+M+)ajaJp_W3h(N8zOuDG z+%Bz4n`|8#PwY#K&3}cf-QO(2wo-`9(3jbsb-uC;pLl=c*_r1<@88DE*IqRTlE|`p zZ|BtBsa{?Ct!!{=c|2kXNA~4(JdXL9V+hCrd*hhXG6u91FG$!<1!mlzt=I>F;IZ9U z|6+Hf@i6X;mR1PiEbtM0l&{a z0$;mgKSKVBYFUfhTkdT4kdLzIEIAXr#QGiR={R;@!_V}#&EH?!k2@dVb8dEeUU+PR zlm8W->aXxw^CbR?oJ)nzlxDw_H=t!Ng6`Kf;XC!+vt85;>=aXo|kwR%2JE}!@DU`~Z}V8F)mJ7o=bDDC?kl|;X2 z8)sED2E474%hbYit-ALl@_}yy)-jH2@YfGxztZ)gTwi!{++V#^oT_ZZEaYducV6_!>{FttTlS{3xvr8T-(Z|j66vOA=nL>OV?rbuk797=D84guLF!K( zuKAuv(8y88cuq0CXVzb@&y3@fAw3Os)vaCrf_*c%pSc^F+5mnba@wj6L9m$U%A&g3 zVAe>^G2${`zgo|rM2)_qMMY2sN>hE>P;8WqL5nHiV9{uDH zAp>9Pqo4m+G%@vPW+T0aQv18gm-&Frvn$RB7e*^Xj8Tpaepay77_Rj3?&Huvh7Ha( zoTK#Z%nLlh1#@A_Q;D(QMT3Q`;{!#6BAj5Hc_LPz%xEQ^l{@I`sf#F{)mRyI&OM^B z3764tY;=*q*PJ3!2Gc1;6GIlJ{BoP6Vy>lS)pB|*(e(ZPAVECN1`_xX-e)>^Sw`{o z9Q42LEqV(DxPA=au+a5wQNR!pl6guee8*~Bux4y{4HNX6tf292Q9zM>tz^>jHKOdm z^QX*LjS%-9dlvD&WW~WV8zB3s@ouH)C{M;p$ZI!H%0?DvH^X?CCro;$`3gK+Jb238 z`;KV6_u|=OZV7=WGZ~URH9o)O>Q%B6Q-4)k^WJBJZG<;AZ14u6o;B>AWq73DXKpxHS4!$zmD^Zs^#d(ZS9zB{E>nK##_3*>K92Jb~aK-^&3y{aZBK zv1gUQ92*u0GEre1SBX}X=FVh?NXQRFmAyTR*i~4!I-IjDigM(>7- zGCyKYEaLJ@NC&thqx>_MgLJJbpA%nEJ+9@6K5OYR9dPk>fn)Ey#;-%BFkv|%t#hlnCUmQe7O`_;y{Jqx;SFZqD43Gx1?9Ibv#x4ENyH9ob*FO~A==7C3r0 z*`9(3Vh*0De3J(Y^te}=cgEE`$E(h}M8&NURVxngAqFl!{<}mlH+V7Ep3#TtL5wfX z`*|McT8QDS7Trlg?#7rc8sCd#GUGqthG$xUoq74@I~}qOvbKlC3CxF!`p)s%xwd4qBFC)r1pE|9%zync7_fWa&J=mi2T-NWDF>`8_1R zFS|Z8`+VojvgrUq%agPJDCBA{cda@_t1mvo;&Ws_Gjy3%FK07#*V2fD@DGJks}?eTS7 z8a$ZC#`Nj(wem6%_u+*N^!9bKmnF>;$)%+izrxm;{zFOq&if`WLbu6uJexMX5P0dl zaKIkI$BGR^daR05}Y4k?ump%^Ki*)^y4xzBFB&16{ZCtPHTfA%y*v4YtLS$*lfyV$> ztX0k=&w9y{&pCsE)2;0TdGu@Mp}I#l7sfd%+aWjTi0_)I^Ec^}(~ql>eaHP-s>z>= zwdXw(WQ_OBAN+>x(^S1W6Pfs);EZ&BoA08r3oEZ&YxZP@zrtt#!1Cy7unlfx^vL*y zJ$Kl1gZ-!XO}3J)u?3nL)W)2nXKhA~f{(f4x#TI~;p->=uD`L9Zvn`bMh+S@Kk<&OEQ%l{G&wi=lbmhF6 z^x%oxyx&VY#*6mmmG<(Swj|^t?)&rBKWhA3*W9qq$@`+>I?`IR+unO=DpkHR?m3PWlqYsM*)y1Li@|ThF7=p)w7wTI7HB_t#m1 zwf}TY{A4>1@^oFQcg=i-0b#l6xX|!sZSXtU{$;IhoOdebL_H7X!Sdj;ymNwri+mbW zb{2hFEqm#9xK&B=m@X>BYr(t2Mj;zRLRKdIn&>F9%iPIkQj>k7@M_=$({9z>IisHY zot`z;Y=5&(qt@x9D`bIr&dM2X%&|UjNXZEF-+InV(XM5giL5fe@jlg$z4q*1c0DqS z;Z47+`Yh=1=ZEz7WV?hc;Wzn^KlWXicPIWpYmfEW>_U^Xli%`MUsnmdx<0anKiPGx z>ngTr@LJB^2%n$x>c%OC^ImV`z0AAjTE5@X*?v_AJoyf=w{ZOw9jfzn$j;O6Lcdi9 z@-s2!FUB5yWQgy1`5=3c;aE7b{8PyA0z;=Eq=g#-?`PonAt#3Pn%ggLJI@!QvqZJ)sN{@g^(cv<)GYN_CL*6rqa}?1Q>)^lz_+8**xI9Cb?F;G1 zIAUi<9!)LuV_9Be)wIv@{N-@iQtbOQ;$!DuyX*3k=Zt@y?)_X<*0F#Kuupt#$|BDC zqwhPNUquGTsKjedC9V+7nwC=F{nVVJs!^@AlKagMzOFm8WoYmSoR@Ik z3tPs|QLMViXnBFJRR4sHn=`q>c4C;Er%I&*5iLF%W`}FdxV@~~R6kVmGd*je`P;8o zV|zjOneZR<{;Au(#dS#6STs0&I&V>Qu*6RZo_u~WY(wbB&|ihdse}hfk2Tuj{Ti10 z!Bf@Ym7>Ql_-@AmDRwc-)s4P^!_b$@p7|*gweP=vUh zTE52I!;V$|mLqJG7ug&ROIfp3FVpDUGqW{D->`jNFFP}Xey*G$7fUgHgOW4XvQH3v zDENfZw}+u$FB|GVc6|{}g`YdlBj&xltDJSiSmNAojG0T__xa(;;<5{+P{`LKl~4R% zI}KEf=_uchLxlXsAOl*|$==&u4#?Hw{4bD6wJ1K4`gMazL-A!nQrL&rufMy2Cf>fi zDa&Xpbj9#(^Tz`1WGqqhG#^hnZQhmUYi}+PL#fmPbgxj4gYs7Y=K7e!z1aF+nTab4 z;So-2?icl{@tcGJ!!xkfLv{ya9_wni8ILJvFbFS?THCByGu|`3>G7TJy?Wmd)xDNd zn?&Cyd^)rjYisxA)CN7#Hf791(}G2->l@G14+?HPyVTHs-x7tN0SIge#Ph)IIQGw0!b zkqw)a#=*R{@^p1xE(x_Nyr*A(VZeOrY2?pq`p2@r*W=JAii`(@sPDl*fOQuyg{`TF zO&!!D9_x;Hz7IvLwxa}FLCshrfHmwoujeQ{efD!*67rL91^qYl+{u=4a2&U|(3EkY z?=7mI#C&ks`Hs{c5}e-0h!=QFe;voJyCv@IG(JA?G-dp;`qYDwc^vevbC0&B9;=L*ILR@{>JN%rPGnRb`NmHdwOhtNZu^SvJmb0 z3(o)0k4x2N4viXZO~R3r^k8mh;2_Z-i^=zq`URwh=a=ROU+B2%r}BkfHjoZ-JFgAl z@_|k}x?p&ExJU3jFE9>AmRL;`S;wDf1d_@Y%RO=|r&s8gRKr-00D@1P+&vq8Wy+zf!g!V70#w zyt3*@OgDbOilQXe_fPGjJwH@~jZl{1^UsT9ZISP2Z#A0fka)Z6?@tD(k$H*tR}WE@ zb*(s?Wdi^rolxs4<#svK0hf(OZ}28@zuF z+pr&d-=QPn-$-z`hAqM4Yo2sqb(UVox6wA)tl#L9Ub6aVx983L3*7(zDV3LQ@K)Yh zWFpH*%(gV`bw%+%nseO0CHt4Z(J3`5$XJA=nTWqrWe(+#4PX~Y8|18q)5z3iuT}LJm!9G6D>V$lJ2IpKH=hge(hO{UDs>g z3;C4;Mt&>bbf=Br;!VkDq>0BlP1W{$rAkgp*(X`k(NC?De2k2*7e+BFR6sZtQic?0}xjFm&fRv|Ec0^cZU`##c_yKd)J>Uv-;}M|-Dz;r$f= zsJVi`Kb355*Hd@8L%TBKqp-@;(jJ=Za<;-S7#s~-##)T`%Dk-m7oq3yb>bj)X}H?Y z+gEz3=bYM)$&0*b?kDa6Y{^^=l zJ8$H4hx$VO^?1tqDgoZ}Ad>}`W?L%Y9n0`>E=USN})YmQcTLWj%UzJaFEDTp2FL*-Y1A;Xla+32493J~9 zRYSj>XV(hP4jdf&bkTTNj@LEK@Er7XDw_^g@B1|ZPmI()&E|w6>9O*iuTxY#u(J>|Mo&9!mXX9?Wt_HryG^GYbrOALF|G zBhCiyAx_6iA87!WI-dIN`Ww&P>YsS7!#MJMFzo10D<6}dKhXK_rXyioppi>bslM>$ z7JiZBSNirI%TZz%QfC*>u}7yT`jm$MY;dH8*U#0j{M1EsP?xxZii*V}8gzq-a< z9SJ=q$r{2p_(-0|D-fIcb4K9yxeF zYk#88LZ=(uj%J)6+BrQxl{5WW_XR&Ud9>+f<6|2lSw7|VrIFJk%Q?Sqdd>h`#lKec z*Th3U$+$+puJZpn(8<@iE;ys#>V3ICj`T;yg>{tV7gy6iz$?Vd(C&w^ulc@qnACV! znNR-{{~7qmH-^#AiCW#e(07y+EC66@y#H_YOQA7-x~}(6boytUsW?gSW%(#k-*{bj z?Q&kmE|138csBPbMQ2g^-zczGRM~i{M8IC>v3TG2NmkukMxx=5bJyS~!^OWovXk5_ z@14r&`MyWr(=p~!NUxl=uh0F?xvREe(Up3l45~T{aBf)o^&Jji!XQwsV<-K_I$sQ z2TJ=!4NX+tD14s7=@)u3aAduA(_9yxGR8r#Eqa6NgAD&Cx<)^lp0@h`pS<=5qGyki zy(-)kHJ@%<1LRC3L!CQFhf~Jb-y4y^k_qnlMRc%5Y%-N+e2MHdN|Af&qTKu?`|FA* zMt4LQ9|pTKWLJh`ChmJACZVtRsyg*+!^aox!iF0)cx}-JO2kHu$fZ2DwVp?s`Ny)E zdgNq_?)i%^d7m3Z0sLUF4hcG_(Y;QJZH=aY zr!`V5vJ#?Rjbt&SU*D1SrN$uIA~xR?_1dEPJot}nlNBD>J~r#i;(?Lfp+*c@M$Hmn z5lxmwQr)D{rjNx`XApqviik$4JMKx$Jx3T+-8Xo-{^VX1owI8vBBY{;!b_`y>k$`o zH2x^O$WTU z=uSqr9u3A|eKmZ7*NcUoXH%FwH*mwVlfyWsJ{Vuo&Wj`a%b+#1tg1hI#2q}(a}VCU zc>P`EUX2Rqzs?ISqsY6|v$=kAMv!Ox7U7k7;hdwND=AapHP!iw^_E7F;q^iUrII2vVr|&4dCGEn<;ZEg)>DZSNwB{y+K^hr!nlv9Uuzs3k>+Xh z_cv!0RnHlwt-S3M%WVcKe>)yOFFPSK{JP_FCC z_5ep~7~kFIv(d$EnSzi#aYhBRh^rT6_>dyg7mZ$3e4EM>at>=FtSj03uPths;eut- z!cRH!k~boWPZdsB65{bBpY6nQ*_)~B3o1FEOV_&<~^3*$uQJvbdW3?vLZWk zof(y}G1?Hd=vjNhg*e18oCi$4XgI$jR*6Km)RM^uS!1e!Vo)xe%8{;z!8xP*S;WUR z*DDI=ic+m;%%gaMhCk_i=yxr;ZB`c@3nik#4*66f8;$YqJJX{cqHx|t@6h5bdEXJa zb<*W8=rpp5JKbIpK^W0@H#uE!fn|-;Wr~OtA2@FY9{Mu*j>zG297Y$=jX{@l?-?wc zY#`R5$K7P4#++!5WXyE!8M8{%-c#A4hnZX)nsqB5x37t1B>2fTQ*C$8Kyat==pj-i z)^0^mSF;nIIr%YLZ`lqW0dA8ikzFO*6gvBSm(04JG1Icb02iLc3Mv&_@7w8>ariEo zeByfb4|&az*qD#G^Gbo9q(`aDDD^_)sF`mur>|nGq)4fRQ;3%K$US~<)7t75B*eJc0F@^`vE4`so^Q4wSiAz zjNnHr$~|W;P|y761#;UiZ)8lqvlEPUlvG$Pf!p2qaFY^2L=nmGrzlI$1P<-}yk`%PIhg!KSPyuI43 z5$!KWOy;@c_rfogI9Nn#EPk%Ies3^Mo#^y2HsqJ_P|q+z{9*CxYuRrDAIsUM3`N(R zV>5rz56SZ+S4B2BmaHA*v!j$6nzKd$CalrK$vev>j}(l#B_9CWv!ghZx9GL+hF?hL zTmIeyBk4L;VLgZ3bW;nulC|UgNA^Y5k2#9wQ(yym77Ch|aYwZIVR|t0uGv26EW6)k zI8H2{dPfk7f$S1L4%_V4==7<_Hc<4p^L&2Dv+2n&2Nq+3PqOY8_;`Q3~`!$!@_vgPOmPzY+k&0V;{3w@6JWsiG_zl(c?r48w&+$y9r8%{ihC(CvXU&7 zz#aD`k_{uI-}y%K%qYFGCL$7cL`vQ`e3I*xcg99x=J6g?dns{S37pC8x=)TX+{rE{ zU2iTCkUg{Qo&CnuMuF})ZJkHw!SxLv@VK!m^b0f&5NuPB=H$+U|Q+aso19H0c)6xYFNM{7lRjd``KLteEd117GnuhFzLv zjN<}j4`2Q4K1R1+#_)NndwxD@&n83m-=LirmRs)gr@aJ{(+p<}JGUFp)jgr>@WXx> zZCzJQTEafX`>qR_kK@tZG~NS_YUO3*Ykayw1``~}jEq5mC+l>2@GWHccmEP_=Rg1Z zzv;UAr)tFV_xR0n67_6u-(`Oo*~NtqOQ@3k&axLcICaW{Y+v(sZ&@1HU*wr1B&$A3 zKI4TGYj5%C_fqmtU72?Y1P5YXKJNQNV5;F+k)j=c=#-P}NZomE+Q*@NB9yG_ycd6T-XHcf z`jrBY+eK!Bf$+RlqOtoue2sk88d=PlN0i3H`oSDCd`57zuqi8Q+>RRQ@1!sAP&Pn=hdTWev>Ammy4%6RFy3#cW zcX(g8_#T%%cw2_N{i7f3^&#`d$;P<8_$HR^=d&38Wx^>gccJH6>i$oat9qi(JD){i znXrN;o4lq>BA05)NGNW{itAFoUbfG}Z9fG*3zxeRxWxY8)m~(nMmra>O%#4G-{XBq z33%WO^lUMjeT<^y4=$>&ft0m{J~FTM%Kh0G zLO;IUPq^$QoBO$sdl{a`+;0c8uiYOs`}vK1SQV+=R~I5D5#HY zO>vfEf%hu*Eob$bc<=lm@3GhHrrw|V)3HX&cNp)vy?W<;+AU+=)$7$Rhwq%-t)9aO zJDl6tbuAxv84G7Z#F-JuBImv3os`8?B-Km4hh(pm{xKgK`WASl$c{sk_x`RdF;AA6 zK?XZ`(hc~XZkCPa_M+KpY~Q9X#B?|8-&mHzQO+;AU(4*{pJKDnV5QC*w-e_bb7sBB zOiT17q5pcun``;HF{g1(F!F>!gjUAyQLzQ&u+H3{qA`Fs>goc%3(cdJvkd#|!Tgnj3?tpTzpuIqQ$&)3T6 zeve6ZbLe`;9{wns}@$?!VYxH~TWi`j+H@;lb&oa~bgPO)NSlza072(O=A6tX1;$!>^mN zB;Ir%ur>oyb=kptZ4rQkz&1Yprac4DWricpJGu==?Oa!;8vu7Y_rLMVb|AE$Q_j}y zYufbR^ou?BE>IQw*3u6Wxzc6d5CI-XDULdP!Wh0QOi;UG-wufoU!75&Q_}nnGUR1t(y$X@Wg# z#n7F?ck<(Nsi7~MO~vomET@ir1qXQST+ey+JMY5=t{Kk!=CkKMcZJTd)>7z*_22b< z%|8is9o|wO^3w#|;<4{rwr{kEr_T1N?{T1$$_x1$jJ57YC&*MQv9B~BKg+tV-*Q$3 z_NwjO!TycpEf~bQ*fU5=ne!q)t3IIpoYwLa%1BH?dZD~{y1xUK9rz$Z20SsgT-%?A zLN?mPKKF0$i>uCQe3fxlqca}shNKlixj#5g%LDmb`u4V3TfdDkpxb+U!8EyCx)cY| z&wZ;CV64gFuVJ*HZU$@YYYon=)P8g(90A-n2&6Div2THD+}r(8K7dPeC(&@mvo#dx0mJ`=u7Je$G(pVI8_`G zTcP)PZMeO9a3T!C5%8p;^>lsW(c{}%f@fWOCbg%y^F}1`r~^Am{d4_J$znQpd5nAI z{fP!nr;>i9$nAw=vYd!E*MopgxC6NW=;6dZ@K5xE1Lo@xLdZGh<&~bOG3m-_v;E}M z;JM`A;BQ4~+uGRI#`$i=XU%Y^>@ubDavDHzSXCn9SnGf$zsEeb(=XgW6ZJ7a)zc8ow~ zL2s(;n2q~sEV9$7jNHG|*9gaB-O#D5j%kkJtvISg6HCV<&1&k=buBRGlEz^T$Wi~) z&ubI!<#uDO?S92UraPCJ4Uc!4inYO*yZ#~zQ$r`#PReEym4bGS#`DSpML=+3Qorzg z+35vs>SFvpZ==-r{+KSSyjB`(G@jeJvQ4qkc3qOZ1qvL@iy;*gvBdr+ylh~Hl zR^xVyZRIt5WA+Y^s9Z;12GdJhfvZU+hRS=LcWJiw!BgjRw&(5e+1XZG?ePcAN<3}Q zrUv+Yq8;MtrD50cK!>60?d#5J%IYTL@N?~lqiCbFw;wdInbg1Rw6D2x`&>Wp%WuAk zs2KHC&mXshE~kkv?d`9z@@8s}&mpU>gM5;MPV;Hpc&?@1?9C3|EeK7o;sccSt3s$r z^K%tHHutxx4q<)x+ZxsPPuI1K?Vxer-sVF9Jtcd$>p>Ikvy^M$>GWjc5iT7I-6ea0 z*P!%Q>6F_;JIn`^a1QsSyH;)NSYG>`mtTzz#=qZe5IM-pzvA{@+$i8HZ_DQh@`*o) zSe4438S!~(cnmSmnIC>y!)Nstwo2Yt*(>sx7t?dV?f~vitN@v2+WIuPTITD z@HeIV&wp9>3I4!ySJx`Tk%AvkKV1-8ku&{{=73bi-#qpaYel6V`q|o(?5}cu6n{#m zZ*6NSgadp42W{$(1Kc!x_e;;clJCc)vcKPrUlPt8;AQ%u0WuEkCu_Y==PO%Zb*<qJOT~uM8l2^G&x`Z?<^JFk!2OJu2c5zAWYq6r>iI+u zBlO!V(c##1x}@7A+|tD7^}1UAALGMe%$KlVew22#@HXq|yas5$ydS$K{I55I^(KI6y76{e*iRj`G}eI@DR-)-sN33!akYFT;`E*IuV`Se#|mwUoA90%g1ww$Y0}-{f|cX+?I#(j*=i^Goz#G?L*INw$*nFg#fMFs^&$*VaGMn=5i9+lJ$G!)c-fy0L;@#?%x3w&5_pMZUF0Rj% zdf<=c-EVr*ZXd4o-|(6Vp6(~P*FBf9je~h+STUM(vBg8yZ~Zum;TE#7(zvDiFk?Q_ z_(j@zLw_n~9=NZyY;gAV7%~4q=NoS>&&N2dX?~|(gU)7f5o$L{%{o`qciIml7@2%o z_fPGUzU=(N-rI0;WSe1>adJP>@WfrGi}#P>wAxBvc)5@M+w-Uxu*sl3jq1X}XkWxbX8LOm31%#D=*sk2NYCv_($pCup`(G8c5 zbn~Zi{-GRr_!iV2wThjosSR$n+$*{ZbV8;BseD{^-b&0c_W_>)_t(HZwqDlRH#T>f z*VZw0G6j4nS_EG@%e!&1>6-e%Yhhy-x&hhV*~XDS;zr`-W7mWK%uvZRG|!3k zF>GJF!=*Gg+V8b7Z>;(xx2C0C{ulSJ4xNuOLW$>8zcoWxkl3VA#BGqv5=qURom(*1)D0~miQL)oHqy0UYphPI3v=6I_cOUVJR7U}JNdvr05 zfP;Um5UvTS5eQ`=z!ihZjL^QU7cmFY`iJ&CJL-+7pSSR4BuBP+elCg}g*pbr{4XML zAe+KVD5}7}C`aYT#(!y!j_sL&N+g*YIkoC**LBX;^h6G*U+_yN?YTaPXtLT{n81@D6{Ux(;_HCkZMY2eD!){F*2 zf@FX(dOI3Q&#)*#4PG+6`Ubg(@JBd&P{1QQmZmN`tcJ)(_n-)Hqlw63j5CDo5hp=pd<@TBs}8krR}D^JE+ z{^;wo&@4i4j)@{3y5q*9`9-uZz>SED9&JxX5|W6V*dNS=WA9<2KZ5Luv%bEzD4cVC z-zzdI7M9K9`3MFfVM~e9enYwaD z5ziKG5gYZOByHJ{Sw0F!GOZDuv+^0)*OnYc#9d@d<#!W4j&l^txjOfrNhJ6o&}cY} zYy2AYcHf@qG9okH&g)TTyVup?IijDuosNz7SA7BWY?n0?PtA&sv3RyMWD7UBUb9Hl z{vykhtqC$A-PzcQO!b-1RA=b?*qV8&#`qs1M8?diTXAL_#)ZN2h79pI>@BV&*J#IV z+&b?h*|O%4=v;EN>UW_NZfDK&%jti@VdI3{1w0pL10E3x$6=E!C&9zsBhw#h?{r>x zyRVg`H3Kam`-Dg5!W>9G)HbuWk**T*Sq!e{J|9>Ln&Hgzb3PH}mgv*x-Xc4qE@xv~ z|77Z6Auk03GgyP~bGtRm)ml?q8|YS+ePZccYX*1?(?p6y09in$zs8YgO-Ic2TXL4Q zILKviA!=vYaIL%-a&*gB;s$Vz^yXP%H4?-m{duZbai6JHInEWzIw5y;tZ$m&HYqeu{vy;&cRV5#9=;NW;_`! z?{|vmhVdYRG58boB#%nZbgG)8tz+J7Zbd`ang2!{ZmKkOH^C?%1DF@@V_ng_gm8#U z7j;lYHvPbHvgpm2XQxNz3$p9CHR7XZTl36;0T;%|_jAix<}>~<^R zl;6i3R9}LIB$`t>H0hajGbOq5Y_0vnD~#RxK-MVt4oR^ql{RgN_K}swSK#5-FVfXU zj&hAPsQROj?ip*vhh;*hAlhHWvwH3D*9edG!@q*AgKQI;&h&hc%~K=PJ+ceY`JTqB z?Se?j7yE-A`|-cyeO;leIK82L5W32KJ%n(C>}Jalfbqg<9X5^>*dq%KW6^hp)5{YEH!Ydqr!Pt=`pk_7o4;yZA*@F9S z#~Qw(Kc@$?S*G2b_*)}q&0!z1uks9mt;2xXFD3M_dfFg8w8odoW5Ds z$iAWUtR2f;uSs)&Ipp#xHcp2{|iNZ2k)vivR|TJyhDjCZ_?kE6=REdnxUfx51ZFZf2D+07}F zE$MQnID)Zb?Xb7NcF6{_^U@_l5}g|T!-taAkv902z4r1xmrYXmKJ;5er=OdV!}WJm zt-g;zxH*S_ti_fUVzVXwSlB1Y*IVXVpRWZ&wU61h!Q9X1B~wZ4@2n}W{_#YcL(+aw z&c;xDO=F}02@BSd)*4Sdlff|G#u(Dg9Q&Ep++4+#5W(`-h)@$e8K%eE+l#oAgu-{G0U3 zI-9Ngjk$(C{M@HNV!M3_pH=KlXrT}06}VnF_T&0>FshJuHQTWJqh5$;p6%hlXULys zk8X^k?epul&g$>?H~XJ4Ch)P}k~!#RTaOC-bSQOSmvxB5SADMH8PmJ#S7S)$8xbMi zO#4BcH7~zc)=YByVS9#6$$N(?Qr4loPkg1?IGDNVIWM28jvxsG5fcl zf_)!k{<)!V|GZK=r};(Uai#mu++SDHgV$P60H`sV{bblklHPS&OKDFq?Tf&#^_udK zeSc!_ow7lM4OBD3!+u-xIWqn9wteO0bxzoyo8XY*bFuf_#@A?{zm8Q1BI41D}~N1h~9s(gUcGby=%O= z!g3oAt$TVg{>XsHbICfD+bFX1WSk3wpKh1^c~?C)a&> zWIbE}jK-!JP@H)5Ywz!ljF>zx@J$T&Rj$#6Ke*cKMQ#}zyAHNYJ-ZfJPs2~c?O~0d ztV?TdvcEan&HYs#j`i@2m^ZSoEgz%XKrdux`3T!< zy}I6txwm~9m-n@da;}#3+p>RyI_&S|xjFG%Tvz&xy|nCSs&;zp$%hXi*|k=?X08Pf zd)M=j@0@YIuI-KUjF$aWtqx*o$C_SAcc}qCm~YMBdu34yJK5~wNx!jQ^UTjWUx5tr z3kTL(hfl&9^*&sVEB0LCe1?py8%A4hgt$Kf{$reLYay@oVxn`oGC9Q^L&?U z1N%Lp-^95a%S1i>-dET}vTU5^UHJTUgdM!}w%A8n{Nr{UVEMV`pLnp640z!7jF;v! zusQQHF|G%Kp1^y(nN&91fGtwa$UM5we0)_s0(=`efr zIV*y`Y|@GpVKEgcKl)<6&FdhzUuAEqBjRrVXb1M|rQ|Oc$pPYIm&a^30v4{n%Vjl(5hAa*XSD`_ur8IHnw zzvI}o)+p!}Jd)^{+r2*R0c4$M2p^VEGF(1oA*u|Cx{2$_Tr7=)s;XdNTVYX13HDXYpKlSlHOd;B*3=%$LXu`HQ|YSS zdJzxr^kwh{oXdcnyUEL9%fxjr2JP`l;kEp0cg>f<{!C4C zxvd+mt)Dp)aX)pEqY}8qXU}|`7kE4N>TN%V#$mOitcz{$o zqbdzA4_Hl?!rpydQ}`~b@?JM!E3)k+FVapd`5@T(Q`2+%zbifbC^x0$&(Bc=MDpQ6 zD6tsm5*vx!PHor6qR}2d*HV91 zR>iN;&UFx6iQcqI>4ka7u+15)73v(I zkdgg@4m*sw;GLBQGP+^B3)9L6KruMU4wF3RJI~Z;+r|#Z%BOO|b$|XxdOwwHbY(di z_eR4nu0uP7uM+gm_14_LfQibz{9`(cF=?R-tYOS~))Ve=a572xxWMZy#AA6HPPg+M zZ-0N(7wq~9BddLWs2`3eNA~``O5e^$G`~iKka+1qK>ONiZRZo-MZ`6#zUdBZyxO28 zu|Kc|t$Kz^2W(5j<+;N%^5MyWaZ)+)?s4Ey%y-Vu_ch!4TL609KhyuIYp~=gkP02_ z)mF_bwJ)ypKxHqipMDK(vz7|Az-^P;O-71}N06*wc3mj{lXQ^IG>rCuy8{^>{ zw7dq|AJFgmVO`-bvR9QS{X1eC2&fU zV%5Wv=$6;Qb-Zfz6}amAMJ9dfC!XgIU8;`8dPMsx{o02BlJ@!B09Tb-{Tsf2y4L7q z!*jOR(=veeNw8MAq@A3%cdI;p{-r}%fKx+{pU%+@=ShdsI8amj^(dyr4w(HNqRH2u zzVl*fV3Xro`t1+0L8ZZsTCICl?YA1mGC9R}JmMxGBZ7;KGC4|9+sL26c%SLn)puh)V3BW<8<+%jf31_ z7*&~0Mnc(7?;#^S-uG$uN+Nn}A;S!cJlUyfVv?sD>0FX^{LOtku z+N_fn#Q;40R5l#_fd5>-^4g=1LiTaSsDdYJm5qtV?*6EbCwB7kbIJB>Yx6MQ*6<(k zMm#o^7tba=R$}cpo;>&<-Hs!RgvtM;fg_NWiGFEJa+nv@Gam5s4xhXCcRkvlwDtMD zq=$kZwRoy6EA04uyXLHSkWI4bD8e{yKoLLSF%D`A^aUJ9bMcJP4|%H`_Z&3#46A*b zWWuLHIG5W0B4_#a^v8jKKEaXJw0S4-^7$b2)D0)F?qhG~&^hUilJs03PvH-&f39V0 zcsjk1#?j4nej~w_csRy6B-u!{J?6PwulkR-?hd|6l#_fPh1XeYo4$~IdZe$7*z~gd z%m?W3u+djG5txGoU#NO<<~h3*SoI7AR5q1-y_WeK`+u`-Y&PGOWh(akt6re|UV@Y6 zj_PxNTIsG{9&qGz9l-TC68kcve_#J(F|@o%Sx%0;KO>Uo0sV|buSQ?-z}r>HurjVj zu=Rkg!Wr`{oBY&-vrGPZJ3L>79s-u{bnK1GS-yteT-FZlT>Z*`u6T^y*f%<-X%|{5 zx0h{x#z&r~&Hd`9(quOd!coQ#3Lp5pJm-Ba$I^Hgx@K!G97I?NEu69 zW*cdqwK1DD!RojGtO>ZnN3#A^xVhd?YIlh9gRK;}|Gc&_$aVjVZnf(c7>2gbD-F>F zAZh#hq-W>%hs%XjugFzyH{nLrkp`csxi?frU-e-81~2J|^&>1HInVHHLG3I49_6Y2 ztNY&GUB>>$@_lV2kA-a>Zbyg?_6E29SSB0*^FPyvpd!vIg1a>MnVO>KHa|(E5^t<) z*|mA@nM z8wGtP{6xL>T$8l=V5g_ok^?Fp&NDS|Bpem_*YdVre>!(Ef3MvBE*ou?%OLe|J`1Jl zFzlzPKB`T>EqLF-HV$i%0I)w6T8!hFvb7d*KYdKr;aWRa1OMO3c?}Qyx_Vd>=;g(? zqfLF5OPfx?@_meUJn3)1RA{TM+wmgDp(WQ?-lq4I_8b@oGE*i?YS_n+bshS%=BMA} zcUDcHF`X{{an^Yl$9kTA_H|S^PpZu}zh&)$S9krR-4E-9d28-_5)sY5|8Mk}==)eu zA6*+gjf0(eXfN@FMlV=!em=trl~=#*%Y6BE(q{wQK)j+&I&X`p* z13YW{#EC*iwI`3cQe#Bta(cG5u2@W)Pej6qXeS)m zL<#3+1PS2o6_m1M#ce$K@@TmpMd-Tx`D$#vhE1S{wq?Vk;gOhEmQh5U3Eu3PFh{({ zN;j@wP3G7I#%Bd?&v=*D5CwF&MXIDMrkG>q$5%bHgQdAckq^anMFW5Se%AV;4K&XR zWVq8taGQq8o~b2e5OKJSH%mmusq@N_VsMSQ&W6pW!$mp5czvJcvm|FmRm7|Tk&=x~ zT+gW46Klj}mxqX=YkVUj!x^1Z6tP&-=)WF%t>vyV!*nC?=$M;mPYZlcG#q3S+WX3D z1pa!ZHOV^8a9Schjc7(&W}&_;{6NIGJ*z6j!Bdb)L`O4M8c~S4%ks3({Sv~f+0=v~S%Nrdd+g#{eCXa!0CO?74DH^7=>F|(KX7T3i;Ni$> zRd-DCcEkZXuX{%Zc-T3Jz!*AFM46tt(d#FkNukGCYei6GxQ56U^=nAzRKAA(L{{Wh z?X#+}jum=w#`AiZt!4rV^;&)Hc9E$WNA-ivH8Kv=kJpl(RCKYG zrSx*1hdMIYStaX$8={pGJ!2l+SE9Pv`PQgZyA*vbTo^tVPrdhO4jM?TWsUlW19+hy z$6VFY`8tpt@pb*g98%#3k@NZMgZu^0#N^2yfv$ZI#zfrRcslFnkn79ObcZfQ{Za>M zE|l%sjepwlHnOt^^jFJ-kPfnraNx2ohG(1wk^4x|B#EbAB_m&b-}%gob+NH$PaJtZ zvz-@m*Y#11gZklXmrKr9e%)5*`gPO7Beb$JR^y|Zb^q~Kj5+V%&Ahhn`w+NEFzv;Ag4S7HPQ+Mdiqv~c)eBoF2OV%tckS(`m(tZ8xcs|$ozw$FObwxR44)Cb* zm~&)dD>_j2P3As%Eojo#^ZQP;0hXq8R2~mN8Sj*T>Z!V!YJ^*NIW>Vc0sy_P+JAsMe#cV1fO1iq9@i;Z?i;4;?pTz|d} z*~{+xs6&CypR)LdMbD=-bzg+F|53lD!oCm2Z_dKZ?}INPDz*~eP4o2NEc6MH6rJAZ zl*Whkg?;hxqZQ4zJM1vrUed(#mwn9{*)MuO>9xdz!k*Plw?oOg(1PprBHO>p*CIdG z`xHn=L+&MCBFmH*?W%_?;-nuioWTpVyqR^TQT7nnpS9#u$coJG78Ns}fUS=)i3-_9 zF?Xwek;CvCUxrJr8{Kjz9|hfiS9vQ72hhI+9{^8{HD9<}c}CS=W34$$Md-N;7Slyw zhaPw*-qWJDqP&YwvD2?-yYQ(}o4zEn^ZZM??5BJkK1$|?kh7kN(=z0_?^SnvXPTZg zsC%UHq~i>`rtA!%JM|IH0m~q{IwP6iH)a0Ffm)&YAiLVe!$+o%w`ZshJ#+p|`<~#@ zj5Af23V1VpZPB>FYwh`e{*&c$$_zhtKW@NjKDnRE{dmH%)c7v;YuyJz{^B*v7-!XW z9twM1kx|6QnDppIhf=1qtKci`0}+pAU!rGYLLGm03t19d#(|6Wf@h5bUaDj|dHjdH1dVkf%S=l+?#G9uartFBWFE%_HnG2@PlX&r}>SMg~{;cXJ zA3(@;*Nd(Cb^VX6MLEZDM;4l=Amd)m7N=TlEo5O6=vA3Ns`tCj$iOGaJnt!yIa|CR zrG378eh3hA8g{C^gtfm`_9xgbsD}(c(AY6=7$e(6&=K#FeF^j$xW;>VvCnfM!%v~} zEz2+Q5uRI~zo(twEo1yHkLUY`JwB`{=o>uwRd~G+4Z&}e+UxpbUD@8leh%*OS(ia_ zwc4SH-c*Eb96tB3>Cd2vDHn_H(C+Zrk*9iO?8;f5BIsZ2!8@O7Xb)#=ZnAeLUEA}j zOQB4jOY~pmcs=)Yk^JUTZJCQ~q&1fYC(c{_L_3?#WABHqJ1C$)jQ#od#<`2SN5*rd zN_zn0_ow;B`3>*?%2`RncaOEZg!Sx8+sths?M6no`8g9_;46~hqjMV4=t>T^h^X$i^5#qY zr9D9jAHNn}UK51WzVPJty?F8E`t$mMFQOLgv%`;cn;mc!xa&UBedjZSdIBGj8%q8_?jJ(w&oT$mYlSmzHNYU*f~F@Cnivj!Q_=)chQIvCj>ivD=t zHnNw(x0&|_VLy)h^O@3f8R=)qD{;Bo!tAnWy~y)?RT|Lx?z$NnY8iw<*_Sa6%5KcM z{}72xUqrjSzk7h4fAs@d9 zOrGEOW<#w9IMX(HvINidb~l|+qn#msZt?M(J$4n&0*3FzaNl@6_!qJj->SZM^vuyZ zL!)Fnsqf)poEPa@^Y0(*!7u%L`o}R!JNFp0X4j8z(e=~!Hg1;RzyZvG`#w2qs?~=M zWrN2Qq~i9jm72ji_yP3X*gy8Q(&hu#ME~SJ7D*cVO?oifv5>#;S3%#u?Rx;5a-O7Z zPa7Xizul%X6-Lx`CB~_@WysBZ#Ya@mD37Fj$y~$ze16D~(1kERo*B>VTWx%3URQZv z6u&X{4Cy9W=YK)>Ki7ViZZ^aIr~JTd5>5Rt{xQM_na;xGJv^1rXMTTk{e+aHCnpfx zwu$S?W0#FWu+!W_hSd3G8y|XJwqLVOII4|dIwH@=eLz?y<|Zrzb`4jUg4@ zj7+$;U;MWHpVupRUewo=L4MM&>3;45w0E9%=e2)V1KzsU)H6PlzhWf#))1x-8>jT=neA~P* z#dqSiGtn#B3%gAue8zV=yK<%M#@SDX^R_XD;1%_w+{v3DD=?Sllk~Yv`$CPc&&GHa zUJBf(^140`8_DSX%JlAgG&C1(+r(|>iF_6i@FpLI+xU6z(|k$r=(I0A;+vDHTTS}^ zNwRZPJ$(%MbY}da9qjqd?`{mf^^FI0{ogkHT+`L~0O|Ms&HFi!C3P(IJk-+ZcAo-D zJ#UOszw^_w-&*zJdhP8H-KKtVX7%BnB57O+exoPYGT0wFotbkwoELE~;Cz|wN$(Un z8xO?grTZu>vo-hE`7)T^xL!KDL%u`QiT?9iZa6aHd`QLj_Kc#0IOBP}R1y8ue>11eSe&t;i#nI5Ibepbv|1!o^LxXD zN(dy^+!lbam~8Eux#qE1eZV(}sa5zigOv@xPdL!^D`&bpDLMOlJB~of#9Z-@uW2;s zaHXDf1IXV~f)S2%rUxDaKv8dFx)QC6cwYMmYZ-Mb%*Ix6MG05^w+K_7E8%({$39${s|IQ6doX+pa-}sOhLF}O)3fyO zC3qx_pQrZ|e@gtO)UOASs#9YBa5fty-^!V%`d{J%6)zFpGW}?qme69 zxs!@lpx-PHr4b-eKd#e9Zzj*ypLXzO1H7llLAcYEPX_ey{(&d|mG1ZXTXPG#+SWK4 zXxlsWBh5N_t0!2{#zi0Fx}4N>&2msxlUQB7l>SKe@q0ZC@%~i8mnLpb#U1``9Y67C zALqa1;d+qEM_ubUzEZE=7ja!kgs?#4YM0>!){U3%yuIq9EEm^$5#8bkYbU#$ukF(X z2Apum@1cI;VF7n)N)GbtIG1MZ=yldDo8t5JMF%qiPBMw%q>;=v(qUq%>2jO(NN=KU z(q_Grb?Hve2ihb$l{_Z&ukrK2$0x>q!pUgo`tqDx zA>6z!`8TD?FWvyoHj5p25Ss&`Ii$H*bF;7ArmIvsmLk8LKZ&n-8mnZTg&mmt;ZUXi zhOzGPRgVoG>NVp2UvS`5M(7H&{-%2|T$+{>*zTuJD|7u+;iT`*@QPI~?p&OZsvntAid!h(P^=Usfc^ zH7WdJP#*(_cApZLBKkMXwbx=QO#es;V+wfC*xFV~xV zFB`M}|E0HCTo!$Z>Z?o$Xs!4fqCMleO7DS34#UK;t*|WKyAGW$ycE){>L^5bQ#ShD zVgKYqEG=RbME3_BWbDxM^Kp{5TG|O9`+lV3FZ-BOci(Wp*B8g<=KgkF7s1v_rSgBV zibWqiw9oW!OnMv3+RWV#;-pP}m*;Tb#UN0{^BlH zPdtzMM!k;alRPwCME-(XoeovxEc=Oh`7hU87{H-1aImb6Q{7zg@>KMjBW*uQ~bgd;4H1Yo-L2vwF zIrQkKoFo6AP$>7v8+>Ny^q` z;xT9^Y@1GIn0(>uA+C>Q-M`q2l@DA0T|wV|Ab%Two#T=2e_PWN{hr?0Y_T%;v5zFX ze?@hx$IqVoccX_U{P#IiC}W@D&oFuJ zc!iH!RztEgtbh|XocGztfK%Xqf3ErZJnqlW$Jo~wbn%pn15#AD|Ij|SQT?|@xd=T^7)N zsw>@ErNPx&^h$WVwCWDiC{WI;PC23XL&8@{`Ggp|im$tdq zz5PYQQdziE`vU!(`#XI{Q_D|{40l~S^5qHU zY%mmg!y-$d)UUCJ6rnWeUs-f)d_VOsi-7Y?bek=OzpQ`0%Ad`=lVY=w0qCy+sLZ#Y1^e&4BHAGH76=d#m$3MV zju4ULa#XR4vL-&S)F|~11pc~9Ru{~<%`udg+t%u3bLf$hflD?|g0%@MErJ2p3l1e{ z(07WATo^Xm8zx9Q#)c>>5hV!gLlMiBm48VJ9A{&kYva*$uXb%6K5GLJ(LJJ!4KOl( z91d21Avn(1d+(gd3+4S@hf~qMuQei}a}*ShfOzl988OjJ&x0Zs6$Z=BMCJL7v5Y|x zrrbdo(MaSIt%gKcct+6&{4FgX5v-OIoSf}q;|*hM(T3`p)@VYU4eBYV{w{nB(Q)@o zM7vTye@kRJ|5)zIhm)#u!x>Fh=8iSj6<0i4?ARkpfL`wVot(HFku~TfB2zrf*Q4{TjGNPxryaO*T z5p6g-%e?%5ti6kZUi-)uN$v-5<1c zQ|2FqQF`uH9VJWk-7 zsQ*OdryALaqxjV|L}Z*AJxqHR;m9&BF0X5($5?Z3AJOZ< zn>owFtXDG&l&IF4&YH+-8FW+eI&>65f{-K z^VG2p6seTof4dmx2dsWFLKVxyz~g)J%HZV!x_t+na%w#jW=5)-Jj0^?N*C55H;U^# zD%DHuax!Y=7)I2-(CNyo2`*J0kF@}=MFi0HaTxSz&})y>_}h)27)_Ih?*`lZfUDhk zd40-|JIu$b2M=5wG+sYSL1ahRNHwFqXE=ClBahgKzN$UxnM6X@s?qeIw>~<=LtBpy z0^JJbll?z9kh&3I0=?Xbp6z`LXVkp!nuP-Gjm#r5Bf|0cFW9@@ch69Zpc-9g(x&?@ z2QU&U-fqo``p-ZAS4zEG#+``bsj!P{M0PlqIg`oUOaL9fA~N_`tGi{`yYFhV@@na- z6Q#~{C!cd$?CnwguEO6fXpys_6&nj&&#c&H8AVcp$1q;<*kaT!gTPa#KFk@dS2{&) z)}e-v!XuX>I0D-XyQ^o;1P*ajddOMzHLLVf=Mx#`$2v&J<@n&&qZ39%R`)k3$?Zf^m|_`=q(&^m7`Z**XsWQ-6Wl*{11PJ!wEe6HR$UeSxS*{06@5|gYQSy zh^gwO?lX|Yn)xC2%>1)0wybqzaY7Vq_f2l2>XOX4fwyfqJ<4_9J^3~- z(z}_a^531Azl{7+O6sw}UWT99@!^r9VotB*ha&wreCK3b!S~0u&H|h8DYio?{x?>( z>$Spi(s}+|tJFii5!qc!=B-AT??07pJAGDp)8wTpwU<$T$Fsm`6W;zzIqUT2Hc3FfN5Z>FNRBYNT^q8F9HrVDEPDdDhhj$#Qn|>w2$~++xF&Ia}R4t3E`@az38| z3$$a7RX6*gB-%#SCA&2;^f8Zz3=kSejMKD`Qs*=8?)&q8Z_?4Co=m!Wu>F1ee5FRE z=lz?&p~g2xdEE!r>KUuw@9x7~>37fx^kE;Dz2-c^M{=)OXJ#K&kKy;l{vC75Jul{E zs1N^-Qag~r%hh1k+X_D8I`izW`Zal9hxJ^0Pur$MK9+Gmp!WVtxQ(bbXYI`%zwA{i!1yIydNn2N}RylCJabM6dtUu z7vCkbv`BGL#Cjl`X$A@CHi!*ef5|I&EYBnNRnu-`T(oYJgdL0hQnz0@(m&zo&6#+V zBAVa(%pYM-czb#iuZ$CVt5x6QV#kp@!9U(> z$2>*`A+0`MVAoAP(N|>Dtl1uzmU+CaGl^LEsS90E`89(UGX=MqnFRS?EhTJljDpH_HS`9Tqg3Q-fI@N;>_-nnQ)%xFZRXH7e(*B z4tvr!+ux1@0-t2K!N@n*$7*ToE5nYaH88%N1vmv2Nj=kfBJIUL7kKtkuRAlE?bLaE z(EGcdZ9~SM$aLFeUfTZ><23gp%Lccj?maW|#C}yAcy{?2zI`3%+y?zvm4l1CkH30{ z5_29nVAB`<>~joT>Rst*Btso*{BP7B`?cOzW;Hi3@zM``s(>kUDE2dpQ6@h2wT^O4 zCuwpNod1;dnAardO#=iiI6Qycckm`13FjDsURBE4^LSY%J^x;yXGwaR_E7o)7k$=l zNgt8R3aeRJVxPd+ZcREHeq!wVxNk4_bvL>mt*iOmBYV@U+73C62BVGXgXgMi)+e-s zH3M#-x$D*Bvg1bGueIeYOkjWW&GS5<&u)inB!|aZz8AeU%F@}li~L>TZ+4y>yw-z$ zz2CVfpxJTo9KbZrN+9FTvfpqQ`hWUNUY#IeUXD33Kj!SGvwZav^|Ld$Ry?|d5#il@ zj$OwrcIkYO^OcmNktz07b-9JZHU0p4cpJ_ey^0=@dN0|xM)u*o_XP$W!M8&8H+0^z z#y6jxTYX(dJh04TGp~Mzh0oMHzdd_Xtb_0SzW-D@gU*I?PM7bI{JG)VbKU4q^;@x= zoa2}xdF_I{ zu|A!;tNDJ$DC0iJ%bxeCLoGf--?Quf7V&um3K3tbdkA^%P-q{C%duZ)xtIsPKcB7b zzQeBP#+v?AT*Mg0zN&0^EXv7-k0=EtVLv+7N1*3kQ@%P6pSV3`9QHgDx!vFIOSt&^_qV*0bJ`VcPNR&2mp<_3;tz z?5@y*Usd0Zy}oFl)=$#!1RiQOKR^U*VDkhnkz6yMJL|>lhol9GGphQ^aud%;&RXs# z-QhF50v@c(fNvB!bKd;E=b5|9>9L<_2khsbz@*#B2V}j>79A@3Bl$OMqs=!^SgQ$} z-F|G!|DT`kFVbbrM?0WXw}0=J>GsKd3m?D)QPshM|Gh1I=pvi*mp*r70gf{@4*Q*7 zexVmjpF`iPkj}HIU-*M?PX3tQyo^xV7Gxl*`dCsZe{y{&AZ>{Le z4EruKBYl-)9k)(CMcXo6}nTkgQq;RK~D@PV>%S_HC}aJk-tNLPBi>lyr-wyqKZ@2diiFXlIgFYpUx({e#o*J!tlFsWd*@yQw)juilQ zP#AF{)&6BaZAw{pj$w@4GYf0W`Wqq5zY8o}=}S$f0#%jSS~Ctd?Fl;tbk|M{Y*EJJ z`Qcd{Zd9IYtae%ZG8(M{g2yz3|HdGjd;{&fqNRFfKC*VqxRs8Ne#p^e8&yPgb6*Ls z6Qb%K2XtBI5asf53Y}T*XsOIZsuO{g9NqU7^wZWh=%dXkl-@?KplOkWxta!pE#qwT zy1X;qh@1*K_k%fYmDGF9*s*7m67%CRbqMvV!=%$=na8HR6*pWF7AQ?@;GRYy#IqZ} zAcG#fmJNB`;s}DeL&Toc%D*XEd*{ zYz?k-bD{~|*TO109m^d1CRJ{) zaL?Kn87jT#GS=N%&S|ze9oD+z{Rvim?*0Ag{&eY=@$7Iic`Y|I=c=Mr9?G6>7ubrV zLFDiEau{oBg;(tiu8_}CW#VqFlJ4)JIXgl)lOdXFE`Y6 zT7O98wT_4TSZI#qFi)%V%ziakF@0=xmZsA!^c>^M_KA6BAL46mZT`fUShrfn(eBOo zxs{()hp{rh#SVy}|BkNZgRaKoSdd7%zAuYmw_gK{N0#xj+zD6~y=j93*+5X+)6Tui z{KafQ2q#Lp2cEZYNI-T}m~#32NP_0khIaaBXr*hs$hNrL7WN{GomzN`G|1_PHEiQj z+0nnsVmA?q?3y2s+8TvpL$$Ev;I&G2uj@KPmvZ@yjg9dha8W+A_=~j=DTkL;cO?#M zqu+RCt9Q_Uy*AqE2fseF$@fM$IPXb!65^|b5`9eZn(0fQvvgOMCtAPA zX_mT{->-^q(CLYXWd$l<1&hd+^-z(6tol;_102800@_@cz3$F+Pdq=@SPD-S)?i4! z4EnP4DV+RQ*^bOs+A_@XQiO4W8MhaOWiv0{=+`DcwE8&o%Xp$qSvN-Iu&$?z9je=L zpYFBOA#8`LvvhtEZ73YDsNQXx+TWa7UHI+T476oJ=#X=5S08WKmt==((+^p`q8vkS zz_JB_tNQ&ct)JwlvR&{yUP_($*yi8eXK1_rHurks4}_as?h2W;t0PU1-OPn)VBvXd z`H-K1GR2=t#Ishv(=2yyOXWeoyzX0h z+pgznw{_}!jWsHC@Ttu<{;+3#19`PU{`P9PM8C{KJ8U`~GLQS#6|b>w`s;mgKeB;2 z>d)U*H!HmQ`Olq!6czoL9q^X<)+&cB>JzNQ%bRX>)ZfzIa(w~uVn^@Aot#ibH!p+F zO~K{$b&CtNk0vjCjRkAti?6YWbtD{I4*Cby+Gwl@7PRZX(<)%Weyy|zn~#F%4*k#j zE9#d1u03yz{TN-xSKDd4cG2lpoZ-O9a-gms`a&pjJ_`dV*-MqNo-|EpuYbl%gP=(Y>z=w(UxBCBqH&mW4$2LTgZmq$5 z>vLgb8vTnP_{_NF52ZyHnos#ibKt+*y?%j7wzIa!_uI7-`P%;OdGNe!OuF7-zBWto1y`ug9^7Zq&aLG>BJn_UTD;mELv_tfI@Ne}i zVcB1NE5D9!`E5L8*G4~!w!^`AyIHIBk>s!s970aI%A%L@m|ec#R`u@=3kasg%#0mW*x1Te zeUQy#@;jV~vCRQw4`y2!aCzqW>~oL?3u!2Ll9vHXspVF=jIq?QX&ZkTgUAL4SDs&3 z@Kkn$*PPqh;r*=Uyj>c9)K*XT{+)$>9S2Hz+n<95Zi)Zv!L--$>Q?T5<9(-V4c_;e zj`biLPOx3tK_j6LTYXL*rP@TNh;=_?jw5wa$Voik(Ky=;L07Ws$vlBox3Z)^&5srq z`E&ITO?vxD1KM!SxE=Wn+oLW-c+Btb9%y|9=H_;#(?yRypx$;|9hPRlt6K-PoMq|b zT6nM~Jc31>$O`0zE3`s=i)!k z;n2@X&IWGmg0=A+5A#jFu-1$F)|ax6VUZ`3RwFng&9~F%e0+c9p}qfaSDxdq&(AhY z$!!>4?g(}w0&d^xgGry zFP@}sq5JfG0u%X&!?8v@&JSgGSO4JuBtL(9t#Y3AUMwZaQ-}GHUPS}YN=yr|E&Qgz zXcsNMt@u>4Bc$&z^`tm`h zl{cx{_#E`uUhr&!`L=%sGP*Iwp$+VaFMP)L5AE_>*s%?c!Hb?TP{5YXccKlcvTCfu zwVscLFK4!LZl~1SwBs*iH^<+~f{r7xM?mj(Rjo}GM#;B9-|sn|ehOPIez zuLPrcv5wPuX|$;rZ=W_J1zHi}7pYy1H-zifY^ohkkd6P~8@=QDIWe2400tIFfv?V6 zL|3mLStUH%5+Y_sB#L`Rl6f*5Jc{lUHR6fzGWn;{LVA`8WRZBi7Uud)9?`OYT1KEc z;gA4jZk*{yqzZ!3wnt6K%u!O>&#W$203K_^!t71i-$p;OX8fDwJc79^c0Hq3&$yM* z4eCcI(qQ^JM7w8#h~W`&K~IXv%z>01326LBBIC}8&Sf>jE&9Pfk=8z~KrsE$DM$Fu z4R{Ftj5yIVPx<~wfy|TKH*w3;O0F? zf*9>JdgAiWh3sfON?0<6`TP1w`ZUW(ZxQ7L>)NA^U=B2w4TJ<)AEshM4tb;!*Zx5= z-Hm8gHOmAdMUE&WrlIUohYbNMf8NC3#BHMBo@H-a*Gg zk^h;e%?G3GpB9z6D;u%qJqiLMuJ+74J<4?xz;}yg^nPcg)CWeGZ_jFRwTiMtbqePiY_qu?!5L82~LF~smdC`>h@?vc^G!~f>sdKFxFEj z15hXunwjygYk>pv>+#PcE*Jhx<$C53i+@hbH!H(e<%LpV$MiXQ6pUSRY~auwMfqVl z%<$16S0(1pSIonskG{L&t0C~}no`z^nDA4)MZ0I+qFz?YMda1yV7eI>Rq6*9GI{Zc z6e8d)GVdXip8nH5yre8KCnFW( zwWbGiRCgn}`Sd;X3mO+-&e6V@m)eN5Tq7GJg0_*|g$yio7W&hb{h%F@l`eUXk~-VO z6LHCL)EKA!SaLpMN{oBDZCh#H#1wV!e6ZBU9e~5N!16zkiTTmF0~{i#XTyS6O&R$|o)D510vX zL3Zj;$lr_k>-}~){7M<+^c3R@x|Uo!r^`nNS38Ozs{TJe|M2Kno=mhNwtlQ0*;7$o@{qycrO*0J z4Q=v)i?g%cGK0EIp9V*0>{;CAhs?>}%X7%*u2Y4o0q3qb++IAvaA<}cW?rmdGQ0OV zmVz7N{WQC_+Zd>ydT5Q58a107XG|X`5*Go;XXE>O^W;-8AC``gI}lbLT08}lZehaGwt0=7M9bMG>!6z z`u8W~X;~9XzY_QW%N_FI&Yx4X>SkvK?lgV2>sT~!U;FfTjdITGI8zv4Xa(03cgFkX zpUaFS?*SWRb%`u>uxX$VJ3mE6Bj_t^+s!EIckun-<(Fr*AfB9bmiK8-QRG&dO=Kx; zSC8!2=_;4B`Z(lDd+Qn4pO&#_(Q`TaF6mIXjP&w=m8^O*=63QyjCT)xfaf+{2@%QD z=C}r51rEd43EgL+xn{pHy({l*XZOvI(1T70FJLP%-uCGELxx|edrZ9-zBO3C8$M<8 z{qEyh&V&xV8EZUXiFs%p_n!t6==XnG7V#qgB=H?|)uU4X`=9@m=Upzazv*c)eVCUR zoB$uLk_{$iEip#+S#qX4@ND?}Im2gUL%g(k*Gb>Tuj{OUdEgvnn~uoIYy(Nx?R!5} z?@oOkayE6PtI6JsbUvRgHczwL`^IyReEvoR<2QJ0`UJ*%sr^W_JMpUrx(J>dxVDe7 zJyop#meuNy=73quv!3q4Mj=_rYlwzHpM0M_52=@V#-58ZUrHXFnb06uUDu*BbQq6$ zKIN{evxNQZS7zOPFLj@5%3qDB(QG%eKK;}5fPQEdbZXJ>X+t;XiM5$Op3RB$y;?6S zmdL~r-MZ064pf~t)9Bhh3~++=UciLsoY|aGhD0~foff_^ef)_xWnALWw`?Epp10Lc zm3s1!R|?F@b~q3WUy(tGcsGw9fs){`w!81OdAWB+t$r@}5@Ij#t~kavp?6s4*{;Z( zhqV*t7wR~I3<9$1P|om`^$Wv?9#tn2OZmO%xaOJWg&$ebeTwhI`vR=ew_=pNiRgXk zfz1vE|8PDZnG9NHOvs3ohsoP=&Fh--6}(XXWN@E7TaB9y7X*Z%g5T=+gd^x_x!eI@tSGO${uo2=)}wSAovox!ii_rnh% z*!%xy^0wjAApULX!5ZUZ|MJjfwCIMAtE@Y*&4IemyvaF4Juo^sga)tKRS@vb~{x)uYk=kMroa`=8#f zclYxiW!#$d_GA#9<9P?Yb=i4yhP!sb77JfPj2F|XI^5)=ca^uG)2n9bx>?6?`nieyQ=K=Q!=79@WrB`oYv3G;t-MIqe7BGKZ$MK9Nn~oG&66rnbFl-02 z|EBCwX!`sEXWp=Hlc!06M>~8jRX+qYS?)nvCc~ghg*?F;N#!fB5oeQx@ARI} z*gaL*|0J5{##kSn?d154WOcyCNX}~dfI|-sUGE<9B$Aed?xu;OpbOs5C7vs`?mdq3 zEn_X8FBm!$M%{Ft^fCV1bS$@B?wW}{{kN6wBa^jX@1{rdnb%=+yt-bn@+7`+Cbh$c z&)!s7Iw>*EAN&4nyd_(O#im2Bl)p7q~u7yrR|$90xomUN$?U%!@e zbMBRAcOM_F#g_cqMV^xhAK~i?ordKyc=57d>g!;9Zc$d> ze$Rx7_d%E5*8ZG>N^WCRzmjN`b7FhHQ`eVYysvAX=EthN7xRDCe&erW|6J$2w^>~y z*i^pH!#up}jfIDjJYLQ}2*L72nXHNT4tw-Y*l@d-R_bE4JNY1o?_mQg)^pzT zu6=KrY`zBn>F1PRS39HT^bvOY(3dgD9B~ksp?b{YTA9ii*sfjcz z#(aPDB0W2OjnfbHF0c%>kYVU!$R)>t$bKr#M!Vk-`~g#bf3j`T z{)HR`%rSsEo;)*CzwhZ+*R^1q$9ua0q|iABuZ9ov`YAX#Z3ht~K8rJ~e&)RM4Xl;l zWFNTS*+N=d6=9T6l^#%thsWPyq)sg3JZ)aNXND`zI|0TU-vsPi zk=4FkGF98&NBLu!F3cR3cLzkAt4w-6m7 zLLV=cLm9HP-w(Ge<#yu~7~oRg2{RFGYp93y(*1jDW7R`Da(r$gw2{@_xZ8Hj7KZS# zys%=mIuj({Z2PKfX;BS)eE!n>T}WCt#6YdKpza)@!wJSSO)4>_3?`M1x$GKMo)!|7C6&A0HcjQ@75%fjiD9jqF}t^(d4bvHF#U2R zd~JaV!~U0Jrhb@yzKsJsvyoHsa>Aug{TErZ8P~4dr>n#MI&2IxJw)en=G{G5LT&Fm z{ziGU(P1xrYzGs)+LPS5nSIMp_5wX9t` zuy{o2g(u{J%}?zo8*n<>*iOuYWrK@z>FV6I^OfB?9O$akf7GG12pnNg3&F^AzqZDc zCLN4VZMgs3rd72fy-?!7P6@6UoRF8YvF4svUuy^a1FW7f4_f@RD{XX{AOPyFRa<$A9!Aui~V`;N3Uy( zFGqUy^-DjHEc83-^PzQ>!fTgtHvF#i*80|(MV#9U-0(Fz@zOq4-h5zQvs|PnOn#Cd z7I!`AH@YQ%P#EJPJ)|G7Jl1bGbS%HnLcG}4w^ny+kG8e+7bW0Jc2y5vIED-8$VeUr z?E2i8M+$xH)99G{1`Vfu>(B0coe#~0=W|>m@ak@}$QPa%^mw&XJ1*l%B=f_+ClifAi-bv8^$}x|0SNMs@%9}sKWT#*M&2^Nc zyMAQVbvhzKha5B-Z5h?a6iFv6{j78U=x69KZR4d%a?)dQ&pbDI?H)(Q=$qVF=t(v> zE|oWbx_0u8pZE7Cd-+rQtQ%-sqXZx5Yu%StW}dsgL7yaltn>VJV1;)}_bG1H63=_^ zy}~Pv{bL(C^uEjUu956McvUU()no@-$ZwLv_6e51gT2sPchA?0bbhJ(HoJa!A7u-( zuo)zEmDYyr@Sob`07dgKCFw5D7)@6F9ep=lXtCX_`p2heuCOj^XVt&V^7-4x%g5_j zJbB_McJ2Mfq2us-v)0OfTukGqfEOXtNN<_w+0MSWeA7i|fwI(jEPl<)kj+8`p8sCB z-{E(I|Evc4*dJ16+Z_&`czL#Ye#ckZG?mw%%6)qd`pexD$-OIjFP%Rr9cJXRlIyU- zD0--CM`I(AE!%w%zzA)dly-pw0Sm&v%G15pV$10sRvX^Ex;?_|;+5T$ z`@lc(UU%d1`_9{xz4bt{bZZGB=v__!| zto=!!kBEG<{Y0eb)4#YXpW7BFWBG(b{nbtfUwr9u-~)kU&SP!Y54{(u7#X@$qi?Ba zRr*JJ-2e6E{1KP$zRG%qM%tPoSU3K_ZHK(o&%fVPHt^=&|LXse1@9ow(9kCy-PeTM zX$5Qh^t==kS-8!hM|`k{0uL&`_hYHl*Bji^pKivZE0W_ydB1$5b>Pik??v|geX)b} zfY-Wjb)yqinX|m#T-8P)-Aq+F-bD}>8UWi=S0WM{JexG)HnD#u~6$O+HMuOq47O7nRzzbkT>oAPoA zLlN1?U7m-($VOBbGG^Fp_2f=BvZt5zJmdMC#O`^2zufERa=1D#W}X_&eC>OK@6kc? z@3=m)SUipI?EJTQ9_OzbZ%@3^El=%wK**dL@V-3+}e~m!cx2MiOwxlf~-TSX3;Hl+!#ktu`^;XGe^BjTdW^6HA!%Og^ZFWsdQ$7q8I&GHL) zTv%H;SYAK;Wx7RFOy@rI#r=$Wc*+2B9WsdUSe^@C%%lGLl{Vl(AEj7s!geIWI?c$a zUQeY&2`l5Zj6T9}de-wzQENE@9S+uzOpB-rxS;%T9l$7z*LcU-U1sE{nJwn0EW`c2 zmn;=#89iZ_apJk~MY~0$RxM-XaucT-46F*$jOGhGt6#)#qXd?EwOmA*U&>G1`MENB z*(e8;iVp@~h4Dj{B2vane|)K{aGB(cs9<3FtbCFoKy*DAq*Z4wBE!7f93@+bF*BX# zSb)DZg3L+aA*z9G1Zm}6^YG~1qV?g5Xhbh$7TQO-&d3!1#ymbR}#pL1tu=%Xw~BD3Ae&9r6`68C7aV+pYZ2SaH5IBG(N1f4|c}lH7z*iqyvIoqx}E z-+w5Bw5|%pNs;RcF-K_Gu4#)P^=eT|O4JjPCA!}?LEPo-_}lw=-gPHQ=Lc`kXbTvc zM^2vdR3aPjPEkmC`ryo7p}1NUn69Mqdm|$j+yI*#qG{Ch$ZnWFc(ZWyI%>PD1;fgJ z?lR(;pa1*682fzQA~{ORAl8o%VJ5DN=0wleOe&r+ zHrB_pNl?U^=K(TZBI2XA1LH7UdNx|twMxGp;pUP5|E1h2&ppd2N5zKjHt00QZV7Yl z!*Xs|8|J0VyW{?uz0FM-me*|1ls?Ti{6Jc?NxXkvOpUB$J2c9QCMZ5}05ItN za+FQ)X#Svof8L`|8yGCeC+^G25vk!Or#`8b_{>N)n8>M*Jh4f*}GGqa4#MGN_ zTcdHNS-T}fV4GZ4To zT45M+*J&8~df^Y=f0r&(##bHa9ntoBHkeAEq2o8RpzF^)dVR=WkWXq$l4squzv7 zx4m?UxQbDt#H-sx3teY_0ZWqS`s(zqi`;_UDb9QOV`OC3gnkx08aU*3F6e}_K_D|z z&0t;m1L$(@31mdonZ^9iXs`GvB=yyN)^(+86wCuzDemP|&iLsWKEl6@ zc9B`EWqs-N8QF-%qtU-=2F&P|WSjp{t_EtMM{9ju3?JD0We9HK+rG&g*_TEIddjIL_*$mK$3PrV- z%oJ@z6Hz|wN%u?nK3dNf&OVHXURkc1`zv@IgZIAN#%Z#fZNOr`o%oPh$xxuPa*W9* z5qcZjK^%R4tcj(6N}N~A#tt4CgGPItEiT{Rv4&E0my7nqrAO62+d!S}O7>suL;caFF!t?OkxDFPu@Qef)OX7(5I4Ikx<-V>zto3|-!MWz%U9RJ{pL=HLdbtk8 zzQCR(!U-`(H`k8nyGM)nEA|SOtcO*;LSC@$A(D1o;e9GA?>Kw}DY2H&BPwr3mPPhE z`E2KV>+`AEsd8_G>`iff9L52B*WF~1J4}2ZWvx^SK^3mtkeS*Wk9U14RodFws(#@Dv z_#{|<0p@*8`P=~xHJVhqAGBsZUb45IzcPz>`rf;IAM3ZXYYE1e`>A8U)z|Lw^HtEL zx<6?-4BPZu&ipY8OlrG(=C6Z%Th8{-+^0NiS;2{Cg9jGh!d0`utV^N=_AHar^=QFE zmDZ2tYxdzh2>o3>Yc2Wo9mYMoFT+m2JPlKMn0D}dGF>-+hZHOb{X_m9SB$7J1FCxFJ`%xVLE&k&9_nKL2_G& z=jxg%lX({UdDj2uXX?7a+nP>WbTZdfm$mf2VdK>KPX2}L-^hm8?b(8R0=+%`O2Icq z-_r&OKUVRhrCof}KJK7cs}d> z3A=Jmz1cuU{^AXv-swz`i9oe1W3whQCIum%~I+BOprf({3 zn+ePJJ9#*=o0?aVPJf|8$)YpmMKZ?mC3&*7bBEdfMSfP%%=85r06Vq&5>HtUL)XGG ztJdRNn?WLp z_fF?Dydvv(HS22o^%+Ea&)Sh(ifUT@U0AE}j{H4Cj~{fq%HO^|(tHe8+ZV#c_BG$5 zd}b#H9j^4xaxIpOc(zix7oRhnlaJsZo%R9yY3tOpqQeFXU5n{Vgum@j!P?LL*+S1m zZ$(F!`RskSGcosWZ_Wb0SjXb4pQ&-IKEm*7Hq7gwixuAW;hH@BIVcH!(%20Ei>T2hn#)P^L9dg%s|E0Odhp`m;MKvMbU-*K>d%Oco zI{zD*)qs_R&V`Jb@Pma7MZW!9Z}Jt=p2B#?`;l!888=S*L5uDL`Uf1m9OyE9f5jGC z_pM^?#9xX}!uNH;9w6LOAzbsb!P6J$=aH2%LSvlwo#%(WZf5CqJ6Cnp56A}MIkB#J zliygIem(W}JNz1*w~l__Q)bP5X(?yRhHmD6v;Mn-U0+)zou13}v#_#&Wo>*lQF&za&(W z_ZW=$A)kX}U4(fcpMRhFw#zl4{cy{Swa~lwCUDm)7qLFpO_An! zU8<#Wj1BW(Z1Q0Qs=^M$j)e2QPUpAfd$h~q#%RpG4O7}N=QM#pt{Ci?)akw>*Qq>4 zbBtPqQdW(Tbn?l^{;2^uG%TMk&Qz$1eyI;;e#Df_+n%qBMKSNanUi6&9g8L`0*b`Y zse_nX7^kA^_)2MpZ4!61Bb)IM%wkx5yr+5m#nlz&-i{q$*xze|l{qXBmA)m(7_hjs(Q8?A$33UV!gd_C+)pZ_?V>hM%0`aRoz%d&17@CJBdwpW<>c>h zV&SpzpS2$?ywFNtea-p>Lm2#Tt|2RIjz?{N^WcY9^}o0HtGU4nNY?RqJ2!pwUI!Sw zhLwKCxo^DkbRGH7LAl~Far>!6?)yK=l&+Na_o4;=JBngWyPVc>>M<)62S{5(Zg%0- zRuv{|&jW8ThRu3^g@IPyZb`sZ*T6IHH*rF?WB#?Agz|Ne&&Tn%HBiEH)WbjSXVbw) z&JgpIHNe0QuL^9wwL2=UylICUc+T}f%hKdF)2B&Yi*UrW{``*u^CW{6cgtLkyw^UK zmlLj>)(*pzO7}Zh#G14Qc&TKkBar*tYLeWxRGrIF8I8y zbl&F?&2F!&eROfU7MRf-U@-=O!;d|?&$G=A0c z5x^{fA1k^THBifiP9{|>sBZB;+qJUhlhjDdf!|J{da}MUN`zCN4XpJ`0eJaZT$WR z^)9RZYP2q z?Scbu&OUhwI$dYm)U=e!o9m?8EWF_$gCJkwM_^sxQ$Gcs{u47+^eWd+A#R`#ZMPy~dhr2436E0d&8-CBj?uNFImN048Buo}ce`SBL%SK=LVI zMQhO+M}FN|jf=Uhsy&axKW>#M?^W&cjo$wc;!4KAL3te6Uo)pJZFz zN*A1(hd0(W?mAn6aWAi*Vf>M&?rWC!i@p4T?s?Am<#r(dcG_U)okzaoe2>KL(tl|~ zYJaTLpkJY9MHcDr=qLMSzt|it+OpQ4ZQ3*WcJ1}x1;)P|cYl}dX=!Gi@1)<~^6LKV zX#ZLNm_QcYd2QPY>n{8Q^1kWoWgISp6W=Br=b=`c0cvEu>Ol?IIqR)BD$L0`9p{@qcJ?*G z#?s}zBP~3EMXt)B-9FAfo?aevWtp(R<~qO%_wD(KPU3*!VT_-6b1xHr>;61N;;DRq zWxvR(a(WIh$SN(TTF?=YT+-^}~$dtW^x<}%K%li>X_uFrJ1 z@R`5Ru|DDHp08}iVBhNX=fCqW+eSa#&dETVb-l)+#CTsvUvxu%zK&a09N&x+*McjX zYvH+}&;EucHvOjgh!?Ft`P_b^*X0nq^ToLq)L((+j<>Gok@VACEYB@e-6Q9rJb*Sx z@Cmf>{mKzBJ*Eu={Tcg6|KEL#-FD&edx32`s(NlmC6x%>zUsSIws>V|Hyr_wo`WDUZYRe1=x2m$Ln~y%%eVsPN*VH*V1C+?5@H; zPBKGkU%Th0^53sOidyeb-%j$~VWj#^UUGec8@-+|In!sUD|`7^_w=~?4Lu1D#cgxa zm2%vg7U(H#DI((;m?0jm)=RVvO2KLczuXNPgKb})WTVHtZ@!o&0 z&Dqxq0^8z0x3P?icrNQM-1klo7L;|mnP_gUo&Ek#wBzN>>c>IH`B2?5#yJA1ZjSch zQ0EtiHhURs?`M0-f4=eVW1k;&E#_|~J9!o5XQd-f1`mus>s~p_RUQ+sJewJG9etmA~CnjmalncT)X|dm`j_*3`My zQf;gbtge@bUfUUvIqwzPm*FvQ=JAP_nlzc9eNVxb@urT}8f!4LFTAzNjC>C|{7G%A z3h;5u7)-h#N^4o8lD{vpz_+_#*fK+onwEPM2Je?d`G$~d__ zFT6ypM!PQHBkDo4VZk)Ucqv*58@oLljMBfS%!uHs$tBWJHJ|vlWj&wRoWCNu=jUmT}0MMbB-G$Vuc|xjcl?@RD$i1 z96M|xLPdNzpHa%5E3zk&kx#3+TsTzJGX^Y?=dP-7CR-$fgmHyD+k1HHRiliiK<4!#CxK_&O#F924H%Z_ z4-ye7Cf(bb`5~hF-VwbT8KrwHM=Hcv`28s&)O*R!;?aYy z7Cp#+JCE&A{1E9mamuqt-JJ(xtd~1{X7-kh+~`s4ykj|^-LFs|&LLjo{LRf47{5SLBRgnh z9jC0Pbe~|H`MceIB$Ln`%#g03TrIADqBK~E{-(YQj7^bg)yZ=4an z-YH+DW~He5=!_P|5h8nZu&#rM)q|%f!%+ZVo(Wr=H;plPrb=r#Yz2lhyQxT(RRUNF zGUC{h4g7QkPi_&zJI=mab>0Pi%uMn3%$%8% znR<%bUV~1pZlJL4^i;%$lk@!{Y9+xsaLE5B@o!FUa!c_18TpZ&&)xQ69EgkqoOw1_ ze69_md?Albz+&h0ki?(&U18fZ>8;VNV_9cAKKC9e6ItYz#ROTBrn5dxsh%+eD-Ua!xQRF~|g6m5`y zm1Oq771tw{tZSb26mw?2Bf?G!Uy}#~x$=xztsY#=EaMsFm)pAzk?4B1#3c(cYz)XL z5h?bCaXBH?CGEiZw(`{1hEFh0j!f{l?wP@QWZHW{Z+?f(1AUg;fqjJR#K`2sHiTA> z@vOm7e?^MT&U72qn%>oUVUJ)Q^2N(X{{HjM4 zWSD1+tr@^P!Js6;0X}UThE|PCHU?2p8u#FmT?omEZHeg~+=j(<_dWUpI`AURQj&+^;&!%h)U0WL}YV{2(0bbHDrNK#qZfBVVEzOcd#aUNqNxL z)>^b`^woK3iDbOF`p0419`h5>@gqA}H(?(Az~<%kmPpP1KhA^{@4y#b&O`3sg{~}k z-k>MOncJirm-l^FU!m(dBP0BO=K!8N+HN*CGSX(0UgxbW_a(C)U6kDjI^%42f3Q9I zinkSZZ?)g=hF|ILn*ILc{;BY7+&yzhjbQ%RpNKL&c%arrTX5i67i%B8s0Odh4+w|1 zU#3q)OM6P0o*{QZr@^DaYiYi)iHAQag8d`Yw1!^1=t30HbwLV;4a-dUU63ie;_b{H z0XaTlP%{v4#CF!Fs~o2m8}DNq?zwvAz3S7+tJ}?-MP+y41Am=`c#5He4!ZuywH334 z=RdLpQK&h9Ubl51C$HB}p?74?1D%B2bv)VeDUNb|5stzK2l`~WR{Cr_EHjHtdl~*? z=wRK(>AaOM_Fr|mxny)_zpn^I!>>Ncu}-l=hSaywi?J)hUGbA$kU`$1m}W zmHk;A|2i+5^U&O%^Z6pn+OTs;2ZJ9fZ6XrWmRTJzpOS4{lE;SZVZAaNiVX2T@U=DH z#bS5H5Rhr8>O?*Aaq$sK%HvZ&$JIvK!!EN<%&etJ=WowE0NzXOPp4q&wW?cO#rQg1 ztTuSv@MoX5AhaV77r^ojAj%3eI{i_lH0t%PwR;y>}d6WW!!uv&vjlVE6iA?^ei$t*VLzT^0Lt3-GbvSne+M?1-F}# z?dfe+;0Zs#MSFL6H+7?_qdYR;eZRx^pnk}3%3I036!5~pkx6%PmS*&sycRUP_-`-f zl_~FrK6L#Q`xN%IJ|mD2 z9Sxs|`z8~;)L~X_osK&_^B2QSM2h}7%I|!RQsr>yxt-675kIMR`B)#zeL9|}Ny@$+lH|fhtYd_ZXz888lk>zZS-FMMTVBb2TWv0spo3yR2Q8f1Enx5PB ziO`?Puf)8(`x^V1neLOw_G&-j4vW1(r%z;c(x1Y=gVuvryFSf&FyRmTd6Q4vlb?$m zWo5@DwtM>_(V#=xx0(HB-O^sj1}!kcJI**LT3O`FPH}AES1I)|$3nTp(AUR}> z30!bn2kWq80JOU2j)no1OPjp*EXJ+^N4=RvE9axl$0L&Z7O!!vRSNP+KadIT=N|ll z_P*gaMz&Mt+1vAy#8al6T;*wuCk2?W4a0lytUu3vq!nh}N01rd_c{`69lH+uykAyS3p(ryK>|5}^?mL6dJowVH-gnI`iSgn*Z};V~ zZz2H9=h*nU%970x>wW)$?eYrU3~R^u44%wq0g4XAFwuH8cEE;tlC1Qb{HNjy+Zq^i zsnzV`*mDdzGw(moF^&7H?LW2t@D%Ml^&eQg$=A*@QKcn2FMbb7LRrhKlMGw;pb-)uH{=9~j;>$UtOXK(k}i>IcTr;F?Bqy2vl=SP}; z+jS|{N!ZSe^TF3Y3%_K%VmX+!Vg)atS3LK-^H6191S%<9}`D zm;URqGx4UgspR8NJ<@q>+e?o%C^itCpK`w3Z6s@F*z}N@FXXe!itzpYRC&Aj_)jqQ z^4(AMv_EB8)tiCXi_e{G332%H^Eemgd+=d5Fiykfa9YEDEcE6nHvpH+e0^QK=j-zE zN%JYBJOaohIeHNfhkec|+huuU@C`QthjT;;4E$8$-!ceTCq@C&{0-0Q#Uz7TAk z-FUei&lPK*>tjuSUe6^#4zpf7=+@T*{$kL7j$`hv__4_eW7P%rFFYqW!`Fy2#m46= zblt~c-o7r#^#AhwUw%FVuu8g^eiwyaFR4eyy6o1t3n=P))Zd*UC;Aq$#dh@;ztl$G z4ttWGueK5UcrDJbgsC89!;Bsbi@Ai4=|5;y4+jsYEN1T@oxp##=-RB%#6j|YXRS14J zeRSLC4DFb$_hzkMupp1gR;V9N-P$*b9_ zEKcr7$d|@18*$5kC5egqK^y6STMxPo#hTiIQq$L{6RS1>DE!{gufQcNZQ$Ga^f^tZ znSo|EbK4mq@q!TVb3ZT|_<1OP2SVMi_5NbmtOJpwp2Bm(8fV{$FN#IJw2YTw1{_=3 z*Je1zFXNys>i{Rx9LX$G3{)R)U#}boVMol5E2kldzjp>F-f|nB*sraz|ooU z0-pwt@@#W~ITgB6jwo@!4FQZK>5hlr#?n zYZ-sQ(MXwSV=Ay^KE-rz^&_MC9Q~fxu=Lk(=o|fl#&&DK;}B_h-uq=N^fm50jnOs^ zFBsEe?Nzt@lRKA62ZiTakT#EtHz}gtb)9kh!~4$nH0XXUCuT=j=r3W`58=dRdl=b< zr&TgC>5{yXJn`pJQE;w8u;lwOTfxgk?yEMskYJf};q^QIveGVN&tVh!F8gq!#I0apEOaz%B)$=+Y5uisur{?cLgm+gMi zd1}9nR}-BU8|1(Tf~SRG&2kaor1#t8@t}F?yUe52jg5Y?Lx5w!rI=@nttzIh? z2bJi9ab#ET+jXSZ1AU+Fw`(fITfI!ze{y9~F)`NB&GL;((UC|1c@rjE+h;R2z^v0* zT%DdmJnz>F^ocg-MuiW}s%2GlpAT^QD(6q~tJnMgiw`g?MdYLvmoW+P^wxHco8LEj zVY(FC;w#ovsqgLDsvg(e+T3_;Z@}_zE}v7!^1r^C9=mkIvPHh*j2&=+_2AmZUT+>H z+y>B1`#V0pj;(UWffMbpZMS7uw@H3qeI8+Zepn0WbUfKaAFZ>wT03>cJ#-V_^Hbt!>IU!Z5A2(I=e} zau?6{HUVwi_A!wzvN0J-KfUkW^$jK``!vV;xgA`64Ya}RL(NZ(PMPNAc6bzg^|V+7 z>yUvWX*22CAMff059UJ_jYsO92cG6x zb(H^|x1Q;I58EAdf{uM&Q_NZ5dZ+XFSXV{5&o6xtR(f2=rDg4Bzm>=E-<>Z5=lpId zzq_KpsRj1kMCnOTc&e&ayuhQ0hUm*ro+28Z%B(nmT^Uy}oqeT~H zrYwIQsS*dJ=`y{aJxrhRhX2Rm+i|Z^(1 zhcj9I8z@h{%$<29xQ%|>0s1oMu9t7hal06c&!VxzqkGSyb{m7gKc@H4h%E( z7%eol!ot@15v>64XFo1ayAW`^uoxrN)8zdjZ?*X>KJY$_gJ)P}()?@hyWh#a4K75> zYyaP2dggPb{K@wia!%%4h*zD;PJi#L^&4J0;XZ1v?S{;`}jt>+?CXu z8P}BbU#V+S=(XYBQ7aC*m9KJhw?5Y7BwlBR5Io<1-1Ti-r|ZP)_j-AQft=gN+J{_i zZ6-?D7PcaKlpV1rPB1M#4L#5E`JI6ub?Fb4k94MW@@pWp{ngj#I(?vbcpu|A(O^E< zK4;K&|7+Hj>YGvhh&v1$+@H$*&GQ@!%|*GtcJ4}KtNud|VBA~T*dE8CUks*=t@rcS z^OG|VU)q_4HUO)Bfs zF%CD}jUw?YY zG}-X1_(JCB;L}@mvpk1^i705>>Ru7+O^a^S=UR~^`ZGt)I^QaX*Q>(xc=oNWlYNuF z+g{ddfn6hr&bzJK$$iY0``o&rvo6C6&sEZ8Ed5-c&I>Wl@<;VMz1B|qHB48QdxITq zzwyQ$T|VRJI@F2IKk2Qz=iT=2xU@sP&I?o+_vf7J{x~(Xqkol359p_z;hyv%w6=Y2 zjb=jZZPuK1F5>lNJ)S=7%+q*WJh#8)t;hD-SijNl-}ChG-=%!lYeA|`HDKFhvNezlVg$a*>B#Q$<-zo6H9UoMfg{zAS%{f}B2VG}}Ham45G_F$dKk(JhM*;^JC_5Q|`LUedjfLeLCx>JG)7m&z zylsB#4_C;7gB=@mbE3akm;N!TE%%r|VBs%9j*7_Ej;-zRw9e;mgPw`^RyhpVT4`tX zxoYKoO(%oCo3MWV-J+ZM0BJy$zja=F`VNktg>B?*nfyYx+0CJ?&+d7DkLw4(TAiQs z_g*skwMbFe&~Sy6ze*mz9`#@{!2IeNS@Wg?USviQA}0_4XJpv;#1YwIES^V2fI`d@ zymt{w;qV6o7CM~R7N5V0Hp|Ekh|C~&Dojr!89BYuXGVZYhxTl5X1qiNcJ|NrEqZ~& z=ZRAAyzh}2|NQ$OFH;TVzL~&Laf`%pA~3V95*cf_K{_UYST97Dd(B90p$wLQ0c$@> z5iJs?6;C-U%*4NWIQ&iHFXMBE1fqs!G=#cI8__(Z9+E1GE8(LdG7V*Is*1VS^Qa`4 zQ%0(ivYt!yT%ShI9`Uck`X7&Yk&(|gQ4JVgV3=PcP~9H=wnnt+8E|tW5Y1;)p&9j- z=uK?F@%a0m*<(g*2G4+TH^IZ%#a@n61Gl|yM2sWe1d)vTPXveSs!A8r?Q?Zl_RIu` z{F1b9xfZm}O7)&G^vG5mxs8Uo8c7|OupSh7CdMN(+Q?3LW`yHZU?XaYN>%!%ge`qd zI!HRa!g(@bjA-H+Wri}2Fb~Gu&4jh{fgv94ma`>3eH9pKM%yb9qm{Qqc}X^~2sMkBG^*PJ$m%OR%IIQN|aoT&aZ4{}$e_Qj|gPyt#(a zg0z9TQ7OWX#X*XQ{)OjP&0IX%S7g9m6~E5=GwOV1kl(8@bDSj-x$X}7Siy-NRVeAD zMOe(Km-|!J3A7X0qFMyFtM$`m1LzfzY5KK98>2{bEMK4Kg>(H7#rGv_97i43Ul8Gu z-^1{c7J#DS=j82(a5V#+Xc^N@5pt$HM7Gn6_BYz;^yks9?;C5Rt0TnqzH+f%KxKP& z@Ke;?%d-DbPOex(Zl`BwTpV04@CE36E*oB-v$MGh8IIJ*o`Z28aHBgez!#PH?N}?q znauv8)A%DD2${JM<$8_GEItlv_Y@72BDjL*q>;YC?}(27D(xh^F;|MRsn}?$Yf&y= zz@C--6#40Ng*;`4!FC>$wZmkI4hCL~$i^}5>*aLkxP%Y#rACI!X<0;YtdaWe!J81- zZMW8JtUluz(ff$Lcx|-ktJ6`z5tvba*Uu@_4rd)E)roYNNg7+y0HU7g37p_ZoCjGhG?+@M)JK0wYl7^6at0UT}Fe>ff0)G59XSsAU-+{GB2$ zmP1M1mXjKhedo9tuMidc-+!GKi}#cEDde$`eD7;-O$Xx5r%^5rfeKEi-ko*yviO(zxT9iYx~Yv6hEy59MPBNxEen=ee#H-S4DBb(GEs$W4D| z*&r<9f0ztTTx=a?)}`ivd-B+uCXWSmfK2hL)Rlh(tBMcEe%O@tzv zYcwNGYOyO|yG)};iVR>J8s*$JP|}4v@4Q?t{Xqoechze}>e`=dn9d*GEo1GeeBp7D za(L3c4t~Y-iVO2*`cT&y;q!TZ2mSWL`xj+rlF74v22bC}Gw4qE74c1;gbiTMFlE|V z^jL4}6uI1$y~WP$I@4`+&HK0!1S06|+Q<-*lKFst6Lt>MKQ&Vc#?hl!$84JYoDo+k zg1LIOm^*dh9*I8ufB7Kb$NvCprjxA=-(`_hzZ0^*iB@08^ao4Kom*l0m$1hr_=GKT z+p5ju?IELI_iJIC#K8-WWc2IXpI3P*WIK#CejhgbHaZ>j&Zl!k&*iA}OrPOD2VKx! z0o#}z=VuToizvFeCac_4;;F>kwzQ-qcZ>YHrmyImMl9W`mD|Mn6?XabHG#rHy74>fSoa{ zC0Qu4Mm+Qezl;*z-ohV{QoEsN?qM1kA5AeF79A6=S$-aL6-~C14ZLdS7kdjSeFqApp$UObpWM?Co#Xgbqr-y!aYJ#pnCa?75ik~sJqf^=Ge+-psD5!7-M!=YquuJC>ae+N&JlDAU2w@Z z)vjv0Ny^#g?+P1=Y%aEEaRC-X|AdYd8Z+xt;IG+9$jR_Mde9F4x0^#IAxK*&{iRd4 zdXdjVi|lXuF84#c_99(j)~{=d47GzNUp15M-1Fb-W_QcfB^zG(T$#D2A5`4S?bW9O zej>8d!>`7>vF2}UdkoqX=xBbH2X8Ejh>_31=Dz6gUlREMgNeI;!=IJii?BFAuc&}BCn~eROo?&mxTYX+H zNjhWvfo}rkd*(ZqRgeLGQ_6LEho9=?ldS#c)eqa|^G(*K;nSc@)VF7SYVD*>WXnFw z>!+S!gN+1vc#$v1$lyyHmY|oNEX0%Bvo6LSpQZ1*^I&UP+VY&^6?!km3tp>bZQ#F^ z(4)7$4)XKFoS3(0EvK;grTU4&Z{@h~bIPjNvbc4+zrSQpe!r*f1G>ANZl3vHn)d9% z!ehP__h!3OUK{Bci#;P1e<0IY2k%!o2dI=4k@~-gh9bk>Yi6f^7yVl0v@er#+SmM= z^Lgygi5vfv@vy9z!|Qr$rRO-8>}TA<5A}1%xaGgO@7isd&fn_3NouW1a!6zS&0j^v zTKIaNUx(M!lm7%ywfHzl1ZQD~&Q`JncAZO?ndRC^=tj_o*%pFbZi}}0kFtjN8)WVXJW|99cN?>l_`LORpv_vwdhs)-BTZ>`(2R8fA&-^q(F z_FLU`Uv~8M;DkuS9XeM`Yuas}9#A=aYwZk7r(axgW)*`vH@Ie{>e$ zeHVXw_rZB1xkqryFxhOKZj0ppuEcnr>(zXgu}ARFKilUQ{ODGMDs~@EMu8r&=>l-%V!`srxrEW=o$R2W`N5=9w6LTlKCy_U3cR+&=Fq+LBQ^ z&+m)#cfWnt^A2rkLypH;wPsd#oPGZxx|db=S^P-d*B^V2b6>QdYkXVse6^fE+m~ra zq|D&8a6y#ic?{O=^=oMxw#@a)Z#VKgBOZ%{4_Q2`DRkm^FS4AG3!C?nzybDa4Y?tF zPC56`V}A1KToTT}_`dG-o=cc<^-oBYqGoxjlJ3LbKuRaznkl=kh>(%qTDvXDt!0tn=G6$ znR{=Z#W>dLDNi5p>Y7nnm>28%?T9u#G3P{UNDqEa$Pmm+*=T7Bwr)1FP1?Q5@gl}* zy&l@qbuwUvVC6+QrT$bmk)f6`tk1f$s}K6q)IiKe3>D)YLJk$Je!Ljv`aCz|J-t5x zU*rJe)*b<&tkq752wr<)CT%=`#THgprB8>Mh;E-ddSrF&!gZ%UkFb>e^?TT3xaPdm=pHOMKuY^Xv_1{z>RMS*qO#mN`eU?MU6nr- z&`l~UeU27%lnNYh;505-92hD)#jXs5$4OAv18lRaRlzUMnLp6|THi|j?K;SgZnCzM zhlnK4sq~xpMy+^#5{Au~?`t*r2Cb>o6)$|?DGS7lfhy6K#TYoMUO8;2`v^M0gQb1U zFehKiW#=F0vf-SZ=xt#W-YyK=4;x|J9%I>DtM=Z$;9lb&mEKQLX4i4YTEW2ZHAUaa zgG~+tDLkAy$o|WieQi(kT3VODft-(&d7R}KH^Pl-;VVm@U!H%97T9s_)Mlkm8n%%^ z((qx|*0RQpU;?L6cT>O4LrMd?zE$!=sw^j^+(MTk#qrwP!}FaSU+88>x4*cyx(+=* zMb63oSDv3uCO7;_$4&R0EXVeGvasH1OTTgGTvA`gheAg39~*;3Z`-WJ=>qQ`s{me3 zRiS^d{=RGT$b)|g!*A`y^DOYOoV0RdYE3Ufi^O8*wXvOkGsbR1l)4}FWsGo@@dLID zV{7jmF4RzTC!|YTUbN_ z7QK#*6?&h#*_83x=w_B%BQ{3&UjH*4*=E>>@-$?j1BMvmsb0YWsk|`9@tKal=`$0ow4OiOZv0MtPz61P|4HMSj|N8{<^4=4IB z$Mc(V`}=R}W!vYx(WMK0vb?Q&EsuHEXCA1kFyd!>9dFfh*ZNz%yvt|(!jHc2rYk??; zi;MnY)hAK;|Crcc)6;jk+dd>ZmEZ6TzE51(*AIXBe7L+{^nE$mv=i3hb5#8(PtvC- zsS{y7fjfS*{nhz~^bv6L zOIzC798Z=H&DJsUp@i9vZreBN2W>EnCn%HNNBN*bht+j8ew^+1{_31l{%6rWUFUje zX@~vX-+1c@#^2=iB73A=y+41ptEXjZtK8y%W(y8lUqj!2LH(QQ=W0Dmu`i3yTysCi z|9`fH&HgtVOX@lU$M7zL5N1ES_CICA*xlP^JbZDWSh3{4d)RH5h%+^YOW~CVy>ol% zexDqC@~L<4vZtk@y3%3OV@)eRu$|ltUX^rJ0+dNzr-BRiJ6~Ls_c3mtAIjSoo9I{` z0!XW0f8hhv2HW$tX?KS!QI~!v{GPkL?>*>F@q7(Fk#bkod6i-sA8PWxL!s*i$2xFZ zWGnM{S$Otu_`v5qxvo{)Hi0t%c-0OB4`|`U>+Xr#Sa(#`hK96$p zS@*J8=-9rT+U;wk{al>O8WzGLMW6i$e${feC3yWbZsK|OAw>UH&!Kg(3may>Pr2BA z5V!)v%=;C~;b<@4*Esn@8N}f_)9wEGxBFk|bO4r#+pAfZ^^eX6rVX-Z(N)Gv!bBNI zez$+p2ApjN4E@zd9$a-l=9gO@YKcJ%<4@yVY@jwiYw~N6QLSE|!*6lnI}XvWN!6uz zeok-DZ9;dWewgk+p0$4yHhJo$AJ=l_&6^g8p9G8}p@S?R7KZF-`l~?qcAwSMpA%P4 zbi2}hw-e_5b+m)^W4kBPIN96hYn7Ay4zS(%yO>`6(ZrkU#ACbw^&9Qm4!w8!<4MkP z`>y*D4hCPa)D4B&E2Gp3vwY6;Sj&H3`_%im!6T%)9P7N++X$Z9bfZEeLVWwcs}?^N z{8GA?Bh`+)Bz=ulM_hF?jA_c0i}>C0fu`2IidDzhj7R2pYBMR0G5+&Vy-I7dg@Ih3rI(d7TlLU+zE2K|R+$UB|ry);~6v z_Hwk=+(wrXQ$Jn(0Aa5X4ls)fIlJK-E4`EnZp%emV8&6N>iK)$S*!CZI+||y$oX7G zUo#OtYkNLp9Xj2YZ#e$;TKJIvT#fhIV%$^l!}|BOR~utX@bSCVsW$Bo7--vr*|p5} z$cL-TO=_U{wV2MsrV$Cyry@1OUl=p+53j#C8G!Wl)D>=-@T7teYAB6{x6mS8!% zD|eYwv+~R7nkM4mv9jPu<=TR5@S$ZWV&%6@tqW_N#t}B{GK&+8zFDV7 z3tOUZmS`et=FAj$mSdJRJ0dQQ#6R!%@0X}$z?l{?j%mY+!Z?4Qs3?ej%h}g@1jaX_ znzT(HR+ci-Ol3koV3D1%`mD9-vVjFUMn(ce4eAQmj=dui#;rB-Bd_IvCCbanx1M$* zLxA~5lghAhSX*X?0fT%0X>|Rn(S!n4cg;X>M-(AMviYadfa7*V2W#zt4lqwd73xZ( z<^m?K_4!YpnmE>t0z^#Im*sn+XQq3OUNqN2P`%2y!-xj3R$E zftit|u5w=^y=9aW;3*=>2oOih8|MU?bZ*lrg8jPR|VU zxyC=EsoSH+a3nX-;J{lm;m9tCNQa0sLSy2nJN%J*{K_F}wc|$|kh!$zQXCbs7}b1X z>_l&O$mt5(B^y(V($@{;US5_cLN(e?v;(?BMAydSd45b6vsnFL!yEE);Mo}s_rYsq zON{7bn({9qIgy|SZ3YZnXBs%&Wb@961xH`-c5c_vbMTS(A*=8c{crMPe-8RwqT|=>rorc!XL~g3 zryMd7nA3gFzQ%3)gd=l7$B~GF`DE0QIzEO?(Tnezxnwau3VcJw0sR5jDtTsJp7T@ zPnoxQHsLxPJ;;u^R-3iIuEG;ldG#?x3p)w09MP+}ed)_$3$Mg=l9wS*Z^%!gUu{k~ zrHE=?KQf7sTozrU)^8SPmiK6zKmYun&tZ-1hPm-?*MpbCvDd5EF5QstHckAyVEbqp zI@^_ylXZQdbGe+oJ(KinX7oa4>CDvQ8M{O>{E71&=zy?`tdGN^mUSm{W*n(mWY%T3 zvJP;jaP%@C(jJ$P5!16iL61(`r`fwfk9#|~!!R;Vmq=~ZX7v}|?jh17$;d%RtiQ^h z2L}D!_mZJjh+a{)eCT;m)LxQTO3?^=gvG$4t7c~$kRA)-`=0Dre11fJ_0%mWX>(EA`9abj*u*IBb@e!zc6; z;{7v%_#N_W=+|a7JA>2f#LcAV%=F_MZ-Boz?_*z$!mp6}f=T5qF^RBkHM7Eq5O1!w zd7_dUPe79^c!0RQG?fWja z40sqah{OS%z(=fsxAzD7Z|Xw3Yk@K3BdrPdkE`22e9bkT&tGIKpuOUwkc4sc@A&XU z0_RNerJRrPa^5y0m)C3#K5&8wXYkngLfl7gf8IfN3==acd_>CzLE^y6ZF62rJtlOBtG0Vre{$$3c85KyM6Yw6E1y8t(`gT1 zpiR9DaNtbepDyw;+f;M&^TsxIOxA_x4JzLnFCK?tQX@0W)cS ztg3gn{S)dZvL?4_n)ADUFcUEA6=Dysl@(qe)q)?$rZ{x7o3e;&`XY8bbol#VgFSGD zywKMFof$TYY;G_Qx^k`z`BU`z$M-4V$$!e+wavHNrQC)WEah>nnL@78PG*flJ5x`+ zIoo2$rf2P5r9J3KvprjMN6@PnXLP>;RxH1n9w(kpd;0A#ed@hO7PWWqvY8>M+g(%Q z4*iVASTYgOx(*-Vy=IyYd(!WfB#*0#1e zxhgmN`KZa;O}b#}`gNDjfeYp^`nmG8+icKN=XmG)iF3`i(fp7`iH2e>?!UObj1=7@ z+d)QW^c`~C{|5hf{Z#!nmuljp-HAImAnlY(r8TmFiSDGjy{ zoS$o1bt{&GjIXI{rB1`o``!Z9wzMVK6VL9DjjQklU%N@q63>D62})N;4Yq2+jFGV0 z_L;$6%K~>D4%ubW&U_cUq1Z&+e&dxNFS5n{{Mpw#`Pjq1`%~%pb?{kq98Eg(p&-bR zT zQzgALTIjuJeT!em!>UuwfjqAwb5GkN2i@nM-qedhm#6H+oK^L?{`tTE^Lj3)n-8S# z%PzdSty8yo_&mqh&+%+%*e{v^rdNK%{KTyL&T57q@J{H(eQ%m=cIK(YUnRL**K73; zv5nKOl$$Akm6(O(4Ag&4U~Ay!T+&kxdfxIdm>7bQykEI_EUYUj>GLJY(%o>{C=*MVL3p zsxx()rf1Z%1AU&Ji|lc7U)7Pl+ zSghHyHwV48?O&yA(0zI5N3Sk-B>l3GZ4)k5vyNW5mx^|omuH7`=KIbJv(qk2T@gbM zP0;+@1^iD83#eW+rv;Za_ttABOo{o0{ClUrn0fNR*J%V#ylH1|aIKkS>yVUj z=h1z?>|2@o?rV%KdAtbl&&JWBMKGDxEj$g4N zliz;k{IxkRPmmae;|#i`p3CQQivQ*CT-q9je%j?tqsP9FqutriuKukF`p)kI!1L=F zyB_oiba{DT+Q?)J-z4#mphHP{EJAYH>3-)k7=8fOyWM8$^cM2|?dK?bOivle}C`eL2zCLSB-sz^sE7vZ|Oya>J3arD}VHMVU8 z^3?whf3m|0@@OtK?GJfY(;XcH2B?pFfuC3<&%8Ce_5_pQE3IDWiHkpKUS$v6EY4SG zZ8mu{t>0|7={mGl+?_W64&+|v!9h>$0-X+dP4|60Zl_zEVcqgETYZxlSMd4J7xMfQ zuKbRto*~CL@ohxTmuwi~JM8P{d(`~*KmQrO@m+wg)%ccE(gyn3F+6Sv1EV{FQ~j!) z%NsA&<~kzd?7@ZMinx4$dfSF7F}}~^X=2{-u2Hp_9L>QKVQJ1|sk14+w6hVsyYhB; zP7g|ZUoYK@?&wc`+e}p;;F!b}LYEj1_lx`feAjj`AaMms^kco#SOMqSzBSz2;N$^~ zv)+Pbt^OAnQr}X>CvqtGvAreRM2EQwNdo&wr?Wj&`c$UEtUUKIU~LWMY#+%5bPUIZ z(OAFX=ZW#}%5_J_;`r$8jxosg`7$#7#W<-PAhc9tUX8i+Ht0S0b(H5{IpFuEz4K+; zyY8S|>C?hNgg2}xt=;5`Dr)cei^z7Zna*+jZhjwlKK1>Za=+-P!1dEuX1@&5b?${u zgCA>a-Uvpv$ggmYC^g#XH(Qdzi?;7&1BV=JsVg+ebxo6ZZ*hxZK?`-1t4AJcAIp_- zN|i0#mYtb5O0{;geQ<(R)bHj*&QFy^(Jwp`?>8`FI#xYL|H^K%X7Xs0UT`O;#Xhfb ztY61<+25a@FFf{3y}#uTDMwGZl*M?>dEUBtUT9A?IOp%mvhkYgIu`yf!+e8Db^Mj- z(wslQB#gUtqv|VN^>H8gMCXHFdGZ$=`dip18P$33c-wCLXe%}dWR>S&WvEwqoFsjn z)`%M8-L|n-8z1fANzIuP_Br$z5G!1 zql3>{sVp$afn=SDLbl+eiEVjz_S>mnc_{gYbh^$<|AuaUV_S7PuH)NOXnn-5a&av@ z$vfKC4Z?2l>pXa=6MdCN7oJ^sXeDrwMo+)Oa{_ADeNGqJXGb3Ec!|Wv2IO1&AD`kPBO-{V7@e8=+Y-1dH4)y~uneuExG*0u^AZEypAF1+^7K~{N5xMV&r`oTyY z-g6VlvXyq&qQXwvDJIfTc=z!mNo*u?m=OZy@QT@QPFwQe=eZn>VJ#vNvuFSc%GN1a9 zJub}A+ji}lXX=Jm21T2s58|*+N#*J5sAI)JCfVW?{8O>oOvmy&y7^z}sjuN8ClCD` z`|G@0RCcyvK9DTe9}`X62Rz6+J9^BG(eVmx`}3237UjyXzyBub`grG%0CQ?EMp!iC z+Lj#Fp2o4zL8B{MmF;D`{M(7Qc)-N#n_UwGI?ws{!mWPTf;jlN|es@9}u`k;-;z`+iR4R=ZXA{eM#| zr1r`6bt(#?-~H;r|w8|CM*opD7sXW{W0FAmmYB8 zEXLFV!1~U?2q*DSw8jRF29)Wwmx@}@DruYGyO$0 zgeWN@N86~_*&^HV?#9vAy@%M`DtowWUA*qm7*p6#r(NpRR)Kq%%zc zDMd~iRdSDGJ}+Z&N?l-YGg!T4Yhe>vmXpS#itXclEj-Bbqq8k6RkvDo%6I(y9bKQ8 zZhxP+;s4crodtFuK*{HE>=(SW%gKc2r}D{Ln0}W!sxkh+p_48$-W}*rBsjD-xn0Kp zalAvAt^FR>@>6@;_a{A})sMY^;A^(DgOOs)!N)gvyvR)ehjbkDQ_imH$}e_2l$BYl+Ri_>W01nLckla{r^@8;ZfnhaCC06KY}XFYqx_-|e}ie&z4EdBvcAOJ zCV5PHTh^oKpSIDVDjlulQFWrQ14Ng#>~aRZexlPItP79dT;J&BEGPHvARuuzAlv#~ z=lMqWy`TL{`K&W++Dab=jeAGKU1y56o2{Z6&&_Jx`JQ+uwF9|vrVZN+iEyrcJl^Md zsyp@UJ%&WRFFY|vnD|`YpOLSWFS{~k|1(Z3v&luRG=gU_&pCz%hnKNb zZm%0v8)&!pz`uCj+xd1s+HG|Bx3)&_KXC6uzaOtgr}eU9d)?=F?3eiYq8m|JhF8$1 zkiN@wLOKuRoHaR+wv^;Jq}p7Hdu!*5e+x^mf9(P>$p%J$37g~lgB`}tI!x^wZ`s^W z813a*4V7fL9hL}(skY{^^vcWHr>biw-_sqSq^3y@0PDnzsFr$v+!kg zx&$l=9hRzldds05p8N0pO62 z-KxcxWHjZ|XN2<(vME>nEa&wKb272Q3n#QU;T!QGCJv z_NWHeF4Kr_{y<<^kF09+l{_Z)iE&#-HyHKr%*4mp4vPTs=+@8I-j_$FF zs8(V{kc{%KSX|}nX{#ASSd!DYpZklWa03}hm|)zIB08ev?JsMdqAg&vs7Lw3)w3zyEfNjBj7OBe z8xfdW-=_#R2}>`>^m}EbI%K0Lk)bG(8~$;|+_}^owM2xY^_$E{0UWJQDSD|ntS4UG zBWud+HzPCq8x&$h;NA-Wo@_TDq! zh(gpNQ6UOnWbFFW+8cBw6om}*TQdeN*(E%3W6HP62cS5t+1z;ZzM-5^WT@a{{2B_5 zJD;s?($pwB#M>`D@P3cPLec6wtaWoFc@ z(T3~~B24b1`GMa+??KPty_qFOd>n{k-;9I1XC;23uw0&5e9dZ+Q*rvbYGx76D!~!Q zM})d}-7w7zv=VIy(J@E)XaO`Qy6Q!yCsKpDd&_l(b0_ z|3`fv$90f%B|@oCR3T)QaGrUBZSdB(Uo#gNjYBd5QE(BVY@0!#*(~hXcwM9uiPR`nI-_4> zji$O(BX-#8*|Dg!ifiWZSwxB zMNu5l@qAqniLqp&9{!>!hp$1OlLx$=XS3ZnhJz@$8#**ez4)dGsPjJc=Nw>--j_IM zONPtTQ!Vs&?mujgW{-x>C3^=?x1F^`lRriK11>>c1D06Ut3}i7JpAo^59=FnRn&JI z$nD~sN3%T~wvnCOZIvK5(o<>Sr(WqYHKJS7JtFCXe?}DFs4vByU7Po{g&(HK^UaWi zB9wbnx`?!FYXrMk3|;l&PLKWS`ZjQ*M{@k*nc*`lsg(ASQR&HSz%bnMI>VYL{5riN zV|>EQitT^BUW;DDwnxy5tDg^L6@98jdd*C-FVb(KYcKYq~7kVy@OK5HSeZL~RDarEzb7}kpFo(J6^oR>G3~-IT zkkRhLLtWl$C|6Q^5QaU3%irBox6)0<;Ic)$;(PE7YxiCwVPxff_?Jj;cuMpPTxj?G z=4=zTWafGw?BISyW@oEBo3m2P^%uYY<9Z=QyVuM_AX;%p9HzHN#m;Pzxjw8vGwmbu z^qfPEVV0Y-ov=!u{H1P(5>E*|_8F7gV(2T|gCDEuDhi&dg8i9UHrI3UA1Un8e+5}h z8H-L?(t5T>z_e#K?N??9sh4i{Hqp-1k1I}f`d)cG;R;|R7CflR(I+d`+x4xxJXeuL z?(zsjhq*J0L@IH!jgg_Y$?Y-bJMB`~vj%%LCnCFba^RQopuOPHxrn(Ixw0Z{tqU&{ z-czW0EbLL0ZURC_M3-z&Q_m7YN4tXjr1xGu?doiEKmdWV$$oP@{kGW{|f2DkF zc8;Vz%y61n={ES;be*}^FzsAq_+Z^?`aJ&R7&Y)TDovd(XR+!^R_4Co0L^o( z<*Q{909}F&c}?uk7L*o|Jg9wd+XvmjuC@6vMpSGf%gh7p8--o`JRd$p%G`B1ALh&p z%tt#PMAjILEoH%5IJ4BEUrXwzrNU<{*Ya&s-tICLV2&cB!4*C6 zxhB3x=C0t8O(y~_wCqixYeoCs>dAg3{Tp;S>J=T#NC#W>^(m{=>%0AFo*Cql4KKaJ zXUp<&*gl>y39Erj@M7-6cyX3^#y<_?#oWiJlIL$&|4sQhA9O$Kl3Bj-L zyp8U{H~$$oa35!9+MYeGghASBpodXDd@R0y`>y)Ji+%Z$dN6z$SjXiuD|1U3Af+w% zm7%BIyvH6s!6`c)`oZ&A{ub=<&vxeXdG4uZ-~t}azH+|;@5b5;e^Hi4Rv2*`=I5to z5D8nv=LVf8eeAxrkVii5KRsJ`gK5tc)UzoDZuq(-e~{ANtND>>=H>u)+6QgOlWuk+#7 zG52Nd_gR=ipZ}?QhIu}*HEt${PUq`pe@7{Zr&-%*kMT<+)=7!76@V%kkR=uh_n3pB$dCzYg@pXB`;^ zv8NyjTc4EMum1kJ_Vnh3!!PFgb)1`SnYO}Kc;AH=@i}EBy6^m?!#e#>QpyFd4gNph zN2boZo;%F;s$7>8oWKz*7Lu+?FGE1vJ~ybIjREFd(owSC^IK$ z+gx_woI{xaWXrYjEkXzIa#!DfA)N<43SMu!TSh%gpB|5~WXKdb+A@nhO1{U=7x?Nr zl(0OP#MiDz?_}2gs<)2Sq(X}-r!H_XI*`6CRX@StbOz8vyb$--u>*UzyJAxysrKy zl<)hnWq(KN9$)nmNhue6;&L5@{L`%W-hCgJ=68`!70;o^81{N4&aCSO_Ch?m^XY6i z`8)hXx{($5Uf@Oc<0$XGIIIhP2VEJTrAfaQ#sF9hoPwTBI@y3h`{3@~^xo7R<~=g) zfv!(`etDihVY8#z`>q+ct1t47v#GF60=L6Hy^AfQ?Mw=<$Ge}85-I#GbgQ>jeHQ3X zbL2BQJAX3x1$>)IYrxr)h4{+7oF%uWgMlZla*%DNvG>kAUMg?vnQP5?;Lkt*7yZ`u z-Dbi$4B$j$z^=ASx_^{kR~cy7hY7Cp-{)^XGnTquAIo$1avdq2x$Y9xA!MsinV-A8VFi8dESx<1P?0D1t?^@ zo{9dy>BB;6HmBhkXb<()jMlCXzuflFg#GaU&|U!e9OLnPw;Rx(kWItq<2rDBD>erm zdNR)$G^14R)4ZY2zPvu@G;JjN-@|T8;jAT+kbztDmpv`?P_x(A$Zpv%ZgW{|`Ut@J%1S{|i-u)~M;8;Pv>na<>N1 zfgU-O@)nCKarU&x{b!%`RpoX1dGlOO;&0OLyU}}`5eKfdjL_Ko;`4;#p8dg^KFsUY z&cJyy-RJltG~ijTDt%pn=BqG6<QE<9o+06HUdH(HPd$E>1mT$y6Y+GB_h6_{yyBVLu zZmw|}GEj)PJR7T}9b!0TZNibN#JJ77v^r1kU!*Eloo-~iuAlIzDp#lL*YG;k(`pd$ z_!m=YGp0W0&I?r6wogKP!U86mJ3wqdZqqz~R$*tQQ`~+t?E7X8;LLr>xBCOkbYp1w zi;wLt&cj1JvPRHQz5j9r&;A9@^||J{QQgiP0w#1Ak$Lusw`%-ngIn}*Uq`g|o*Jul z`bD^-U)C_|+n4)&z2(E&EKtjKm>#aecLr;zhXs_@veW#D4Ke;%z)rX2V0@vxFn^&n zwX9T>B>BbMcKxdNVOHs+<4dns+g<65+oOu}y`1R3-G7-&(K8Akys|O*PQ$FTshsgH z#5e3V}JJ@9$A5zl|ue__THF z?w~LD%l-n$Y-7ijwRhV{=Zh_G*uzYZuv~XBxLgz~L9s5e4 zCeYY;2R_qj-b>E_M~zp})i+9m_gyZBz0tnW)Oke59pGT)>9W-)_qZ>|tK(zLHfSaB z-8O<0?^O3R%X4D6$``Nwah#%6PX#==y$>{CO&1r!sprq6&srxaTtCs-28PZ{_quu= z+uuC@q;vi+{nU3!=y6D2Y~}sGXp3#5pldp$m~!s<<63nY-ShEdzfYg4j2=#Jt8UV9 z3H%1IzOLlGXv{v$bvO6&Jm_CHZOBo_XNu}PA#j-6=}Q=N-0Dg4y?*}*UsEmBL-fSHCyD4Ficl|7xJ0r%JR1B-u!X$T#t)K?d{G34UiXw2Cnn|5s!V)>0IDw z-$*uM?kRUGZGmQ(CuJW`o%%tZG!21aua0DMs!UgW&{Oqxm#JW!G%sOv4)y< zVb>kEdj+%>jH@C|Hv4+scct6dYiztZaD(c{B52dSMLzPN+76Aj=|Njv*T?<-gF~@8 zvz^JRTchQiila6qiLUvNR`unGAM86NYO)_TK(<~VJg zdKU`di3QXQPwJccQ#sqWO1v@`r7VvWT#fot?@_1VRleys5VAuzvZIZYs~urZW9Ih= z%(H2@;RLrLffv#!AmFNJIofM=`3X9g_B-VhQIMW(rY2anyiz{ssXZjM6Ev%0FDy`mb)k0sA?aR{M+U{pqF70d%m4CX9^J+M_mO0GU5@u-Q ztNaj#beHL=KSKj9JX%&<;Xi^O{DP-q$bDX0`C4p{R_=h~{l2XA=6#(1Jjmg~gXA;K z!d7VyR|x9CH?YM8D?h6*(Mr{2Z@}rI(zg|Tdca2Y3!g~d%{+nMf1`uHy-xB@4|H>+ z0r}Rx9_tsF>Z!gsPnLpb@m}iwOwllHgQxA__K^pW{;`u4;12`VWDAu3sGp;*wRGL+ z+&1NY!H;4d@`*P`LA0W7IFI zaC-}kte%TnVMu16+jW0kRX_6YkNiP(&!go#Og}xZz6RO) zRC>RQpS6{bdFrYw7kTKf)-~<6415kN{qUaF(Pwv%WA+!%mv-BI%CIT}PHXp3?#h|| zj<7%Izb9P_yqo>XyRuuItkcr23^f86$_JiwTJh@N-s5k_Am$^ury6u`W!ZLf1dj3h zg-&(Xk9^hDehc$&*HV8zs>p+jPhy4Q6DBrq=yy>>1*7pl9-Cedh1Lb|k-=XWw zo5UHz|FbTwNtu^Xy);l|tK-Od+zWo`X0Nf!;Vy$Vyg$kOGhKlS*7tju_kNc9Uy^UZ ziNhS`Fe-f{Ppr6Ut?fypUaYql1rxVUy4+4bpFEcL3M&`Zj^`&_{ea)pp~J}H4CY_M zFF-T?dwZrId_lkcl7Fk5_KcbH@0yJ(jnC&DqWoPRK{=xcR3kNnv!>8~p4}dK zm7`^%T_%2%ca9hdn z%yWi~a==>7$Oz=eux2y^j6pIwiCOvDKMsm6kyDOvzNa+v+giP?=9N(MU0f` z_nGI2BB`~%C1a1n=9B@bU&xfw=>^wZJ^Yn@_vmiVxNoOXJR9$Em~f76{0m%ju{?26 z1<`qduRU{h_LWfzM!oCWj(veyi}u+gH6p6X$>@p57C$v=XQ5LPMHzvrW)#WDRv8U& zDiB1snl?MrT`~GFZx?{KN6E&OnWU4)bA$?QStBA+BP(5PT_>&E$neCGqELR9L2755 zKA8rdzej|(Dxmxhx)4_kBmikGXb;D3$&16oHIP{@~7x7WndrPXnhmu;FN880SS9^~PFq zR9r7Nqo-tK^6{)imxe?(krK5NeIeqpZlV!Q7}h9(Sr1YE{u!YL;_=o@e~ zQfOzt9?^UvNYQ=xLbOz4Bi6^wYdq_}0~aGYprkxS`y5ef=wkPzJLXAcEv!c0TXnO! zpb=R)qW;b6pMOA?H3~1To>|X)3^$ioU7{C-!N`&3bd{qKVcq#@I`=AUh2;HB{Q8pi zfsaQ{PW1H8O>T! z7&{l_jNyPO_y{7D-_YBI4(n)jOrU;dx%bG(_spt{D4a7w9BNEF3#o2K5x!?+FX#_A z?DeeS7!LwTJdvJUUwNwC{x{<6^pCU9e$Sk%y2{4^gPv8KqF{<7z9Ygbf7Ci)@lL#B zSiCn`ta$#sjy$f^fYNR%b}AyhU90{AT%3BR#ynOBMPi7NVlofc+;P}*;)FPCZ>YsF z-aK%Q%!*Rz8e_-Wz*gd{OivxG?YP&OfgN&s!sb@dCk}HDJ9D*LA*ylsw&-_~{wDCDz^|r1U=2s~O|js`d8l`;?~4wM zhfez7$eo!D29NM4o{9FUFHYyho$XG2dJ5&U^24K~3hS%PQ?l?d&c3n1X$-omygms=9 zK8CwyKZ6{4+NjwFs?1_Nq452ivO7%mdg97M2gHBH`M`_pF_tTK*NBTT55Iy3JHME` zcG}oab3gz5#5$FWbeh4H{&-}@e_oT$kuCgHKi=+{=OO=7cX0ij{m9{`N!ZTuJ>vu~ zyJMWWmRj_#uum<0fspI5X79;A$O-1rudhLm_l+!luCtp|SqK?~j3s6iu~@_QVK@o+ zYK&CE_wd{yy63#F{_Vs8E&a{8`kG!-_byRHRhO(RSUZlu{M19{50*Pm*^6`z;8^Hh zX0iTVcEE0avL4Q%B%DU(fjeaY>r`eLID^-mY3L&Q9B^c0*QpB)U*?_J!=e91TUaY< zd(4687P?2b6LT#|f0VS_Qe4mXkjr6Xz=t8krk--1spPu;q4_52OuJb}=Gw_RE6)Wi z{@niwd*Hcdxg68v#WvO&ItS)l=ego==n0b9%6W`a&vhE`IZj&xa`leL=kZaw>uVhO zJm6&MUjrRyW)=&k1>5SuOU}YJ|A|yzKrXyXn;{P$Js3JjwUMRZ2c~757WD;q6 z5?DnmI4C6>xi!W+@kxW{&GzPKp_7H(cgTYNYW^eeZuo0Mc3o#*YT1H|0{EXJbdgk@Q2XbXpy>J#`cebXPL#GUZ+i-+u&c}^Hj12 z(!U(_hTN2x`}_T`s9z{_;mlfjsunwnY-q)J>$5A z@8Jvc&-O3yw5(Bsf&e)>2Q z#-eO%P{tL@%(#;_ZejlqpLgi6$Zo7;V2|=f8SjXfCqJ09gXSP-u%_T~sF$-6-yg~h zBj>EesT+*Fy;slZuHG+rcFUA0vXsa80E6ech+mA~2E+GV{m9{aOeL_)Q#q6Fkl$?- z(2*Zq$k_LAMgLl0dq?IT^aEJ1y~6qy>@b{bFba%0`lj-O_r9T9)O}XSBKX6uwohwD z_H)p!rJq`)tW9RTtoyOpZ$-NWPgR!o-kj}>)>Pg#tFh7^Cd000Va;<8&Ch(;n`fAn zdEN}m#LWe_=TduH612(zf*^AS9PgGbYQP4lhfE^xL4)kS1$~Qzrk}XuJQdlRra#Jx zP7V8Wj?MkP;lFw^w<~u*ZB?f{K~ug z{*nH3EjY}yb8?Xv_X` zHJmcqo1g8y%J^~d*&d_yUgao_StQ^yf7tJ`#{uT)Qh54RGkiVsAbSvVggngwfPTRj zJj0&R{%5Rt+Wxrvs5f#OK! zUjA;nQ~I$|-j)pU0M%XPX+NXWpR<3BW*@jMT6HVHgwGL=HGI8F`Pj!{{FkJeBFjYL zYyqzUZ2#Fs@&`UMj3A?c`LsDEzhoR3`#1L;SrvD5kY{M7ehMC5_DxAn3>tJfI_R+T z6l4aZ@lL*9af)&4nGF2VK%u+o-QR4Vq7Q4$a*j1ayJJkRJzn;#R)F zqHC05Ez7uV7sQNX$9__#2V%utDPZZZ1t@^9xZC!}D4 zVZWAg@L?b$ru!xY=OM0z$Kl^i<@LZLCHy&ct&aMFpH-c>{|fwqoQ8cm*LOpQsmMov z@Ymk|y1y)Vw3KqmJJWt1F!R0p$VN(jQc~; zF&msEU-TmXc@^J?$%);tEv4AEu{9HI4+Nd^6FQR#&bg<~;^R_{y$P>eWJ4LaRGtby z7W+*2yi~V4C;sI<)?n20{adVI$WPa=Yi4=PbCGvF_aFB3I|C!~xVeqC+U2=kjs9eR zCB4mlwVh#~zZyOZ@%z`SosVK&E976*D^+ySnO1#z`Yr~}3_N6?2l+TuQy-;$n{FG; z{bKS_LO-~!IR6J6%It`V-|&@Syt9ed#uiFCk25$r` zjmS3KY-w{{>W%s&_pzv@9oWh4TddzV)Nwr533hkerwVy`S6{@-btmj|URr%1W^13^ zPF*zS1Jx$L9!dCqJDrg2gfr+VkCRph?1S%8pQs=A^Jeiymhsx2R($^R$koc5Idd{! z{d_*wO)o9ueHY(|kiYBSLf@FrU3?O(E7h#vi_fuL(7D3bafj!v&WrTT(f(aC*OtMH z#QO4iCVx@-haUX&J9H+88_rCE4u9C5HTD(VC95~|Zk#K`yu*hmlDQu6f;RyfU>MDNK*O=B^F8+5OsFM4h$op#HM;9;6CTdcxg=Z zx2@9>Y~o9EN)$zJcUe_}PD)cafDeLIzA9U?jO*h%$2)?NM$KPb3VtfsOsCe+N$)iO zE<%HwIl(RoV+vFreqCcIy{9#(isT%F_5N~rgirL4FI)RBzlZ+&{Sh}dbhIjaIlje7 zIVU07#%;v3_0;a)UPM1TMOu#I?rXx+)u8{boSfDy>9z8t)9(paztY)X!cxEC#F2+f z#rxP@C-^qr#)?m3dTCtx0huf{pYt>-&p;h%<4A#9>apV2@Brm&y@nH1=kpqqELg_f z?s+==N0)cMq~mygcxaeMZDbvvKVR;(uGONT1J6@@mVVIxZv9GIhjm`*Xm(VFQ3-d} zqw)3r%J1MEXL^fyM?GD6@6v0%Ryu=D)9KTezGpc}dfLHgS4WllkqUF=17Qc8(%NRO zRnAF2$hmYRHhTJ0zt64rzq>kr?>NZ1Ra?(8UK-a9jGZn`KGW%`-s#eBdK3Qj_FFmd z<*8a(S;*abZ=_)2`DPx_S%TbImDARb<%{i_6OW!odyb3y-NA@?_legY*R+q5`r_Xc z&rgLw($TP~w___9b2#aBou@5}3K?Ui|6FI@w$!yfFB5ol-);TyJu6^bu_D){&SBz; zE$cQpYNbig`#5mr^H*@*1bop4OjuvU!CINEx3xXNj-M^>EyuacVbdP3cf8Z4$2NY% zwq)mdTfBCIerMkm`~aVedBA~FWyvxR8ee{##Y3L>*5&rl+O&XbIupE0I6R-WN_Hh} zc+scT@Sf?T)A3HGdjXLSV}c|0z@^B&`HXdoP74qj z;Eg5>pF8zbtv1mZUmOsSN|$YYw9ymRtIvPZc`ODOEqX%5*~CGnI>wV74;Np>u6OOq zGcGB?Kw4iywwJbdlMd^;%%EZ`&9w)z2q#{H&T7iKO&%L4FZCnfz||c-!yZSo*bGE- zu{kJ>PUo1r%ujtk1{1i+yg`B3k_Uq5MQu-n4rtT6YlY={;iD;&GEp9jB(LxNX8YnY zN`o(I(?fR`^rSK;shdx;AgwRaCk}8I8%%`YS^Js8sk~erP7^nIY?b#kPzD`JeH?RO znwsh%!It>XiS|_Lc+n>C!2*}&l`>}aftIyY$+c2hbTt$?>1?v$+eMal zv9Vn5I750y7i*=MtaayD9e~hdq{;$}v*MG<&K5xzMZV679dYJ)cCkO#q|mGe`Bi-G zGN4b7ad^-(cx=#rmS_HwnPtTBsPgi}!MZlw4yIn7naL+TyFSZtaGi^FOszIcl}i(@ zQ#{OxI@hdg<1(U2nKEA>Q=cPm2J$?r{!IP(#FmfEq~e;jVPLIe9t60M`?k(&C*vh& zLwt@4T_ffN||5Lnmr&ge?1NY&@j;y|dF5^nD)3?*4RrtGA<{&%^7o zW-m(#TM8^hM1D2$4Q!RM#a4SYpM&x^M7kdiXjZo_1lYo!}H-DsCgotS+0dFe(%oP8ux>h9j#U+AK! z|LOUW-g^DN>i3K{r5`)fuj_E$^??l4}npR&^rY^mN8>(#w|^jSG9zu(X8w2aBK zxIWfOj_sYtx5Dz9U3_Z)bT1p;yz_lAUA6`!Usbwf`4sZdvfFv~CChKeClyvA>z*X@ zR3hRsE|m{F<3Oh=e|O_a`P*^t#0NS}ebV`OoLzo)Ts@7?nk^H&E}ls8{V|99#ruzV zwy}poFYav|vB zkxy-SIcxG#KiIqcJmj##f3@-ef$Y_d9v;0$$)r&;Is0by%+ofsx`VC$k`CqQKap+u zU%||IS)Gz@|27}P@_msnwlZJqJj`1FkCM$C8P>AlzbSh4!*nXHoOtJN>7&rGo!c+v zZDU7&fn5Y~{xY7FZ=Yei<+)p(&tXq;Z^wfc9aqz)tbBKH_P`aBGd_bymwBPhE%&T6 zjeSkjE-)s(V@%y2aNrwG{B{puyY}XAOsRA&c8muhmD`z!m);y7pWf%j2+#mJ)e8Q-PDWHS!_mHI2Pw|Ra#^UBNv zH9FYaqmXo{l&`8c1B=X=7osId&flzLE_vP~iWt5&ADJ1R^|>gE;-ud z>hX`F86dLpjLNx*irE=UQ-o@#v#*;lW+GXQ1A;Hsd);@7b{7#AarTEIuVOr*>{I>g zRio(QdM}wY+ZXc`nS%)iQ4SF4Ewf5h0vZvhMwA00JhWG*O3Yr%SLR^4#fh8L7X*$n zBhq<`28L{4teh`~p?{Qcw@5Tg7DQczOO$O~>ABA+yqN`Zz~pB}RheJLb7V$D`JOn_ zGvsMRh5y&bJsXTDn-0@|I?Sz>yFDTe)?pj&)jZguUY@>8TYM|PKS|3q2%lMz-YTx-Tlj#N6| zUt30=(Ml?=C9Iro+aYq{`BR$_O(oW1quBbdnNdXJ8Wp8yJuUUknvl>~*N7~`yt0iI z{i!6M5OU%qEI5MlJ+h-*6p3c8ZH>OElFFPfK+O3~*;e?fbYC=*p~NEc1+qlEDXM(7 zr-CdpnB_&$qIZ{hRu-n8ao?hvbe`Cwopejj8jbX5C(_1;3mLcvmYFS?wtFH~5R3F_m1X+owMf|QuoGe#ES422ORFlX)2;SuVPCgeoTHzcvPembPNG85!S=)Myt&UKcrWqS(LP}4^|~(f@Q(q@7HR7LW$#UtWXW|b zF~B|V>o1ULv61QjKT)qT94aSqfCG>onbkd}(a3_`_40-mk1gCL=4SAd6tlEL!A)q;U>;5{{SF!%(Q)SF0}NDtDD6@B8Purz2F_ z?XtC3q`j-T6#d<7r>keN4}SLhP45D?J?n0-(7D4Q>q*e~3)yrbhp76?Vqb|Ynbc?B z3FmGX-)~)RTZfY^5`2w}ZkTgs@vnk znnjk!SUB;3G?-qV!F`4|td@c7O8W z)L|ArfT%{LKF(+tqS^H(+qK8B%E`!nE2+!CpZ9_3@gZ!>^g6PQx$iTwXS$y5x@5vh zqz8!ke%e6yKvZeRs~%;xO|SMce2JKiWOebc@L`N-II`k8zjgg+p8a0j{tkHnee96! zve}4lSkB#8<{XArB(7>NR!genF^T9XaPfBJR^tjVW6*U>=&=u3q911M-^}UXnRr@Hm@1a@M zBH|&}6>AaK^S5k_Z1+^DrRY8J_=8APiBQUr7?~iCHDm9vi4LziamOsUf`~|~KAPCO zVF3LZd^x7=K2Xui8W>OcC!xQ91GGt#Z28rS(?QG3YgT=?ybNEJVivO6`<(gIyYsOp zPHpI>S5)ld06nUe@!Vs*9>ZW?CwMY+>m2a=hUqcmmiQ>0_0^;in^m3;RD!Q|;NZdY zbc5N79u?9_=J#%lLUxu)LaL!FP^}Fg397@#T!wX-cTmRH!7o?pxoM+i<%IF~+bb71 z?kp;sXy88Z?(-0#WDssJ_X>GKmR>sc zoqav}5e-|e#=CAGXv$1vtB(x)J_lqP4}UZm33Hr)20zW`wdiE{CQJkOI?t2*G>Ti} z`GJcoWd!@O2gSpuT>OrzqQE6|`JjROUSva7qD8{t>ngZ_9~#L6_~WFpz9~EIn8D%p zw*zbR`{&OYGE?17WO@(VhAV~Xrb^m1s{)^#f!OKqZtz>D$!F<5JB~+H3Q0bW__N!a z;Qv8OmNXgifcAOrhRnoY=O4mZR*wbGKt73OoB`_^a;)u*2=_0tR4T}r$U(H8@hCA1 z*K)r44QRVnMV}K^Px20}Rt5n&;eirKt$WAeEhNYg=^lheICfVb} z$3EiSAls*`<1G2Gi>U>D=*;rXI?m?@{f`);o;B!N32zVa(Ak}C@FGynd#S2I4RoqErE z#)DC*uEv${epckmsxT+PAna;n^S)-ahQa^W%1`(k5gLkh%q!~uJMFJY_h%%1GuPB3 z?uEFS$EzWuf+ipn2LE28GA_p~PPd`pD=Edj+5SAeVtd$BzE^!+@R2CCkV^@f3Nqpf zA4xOKR+ci^e!e!<-hiY>~z)@i5G z`4{Z-%Zh8XK4*+yDt}>4p?9zcaYO~JNu&3DiVKP7grL5U2mf$32-tNGy;m>*U&Z-~ zkhgVR+x=B)-S_Ex{C)qm$f%nSo6U2f55}`di4QYwVbfrUuMsm^_tGa$P&Fd$DAvJ3 zv>1j7^%L>DMr+XTL)MOS72hF~;V%Ftu*X$WpPqgH2EG*YFY!L?i0@WmB=!8BpG(zJ zzHYXC9`@!)Bw|+g4hat5ZW94qLG!R%JU$gMSBAO&Wf};b1NmXOS0IEZjjDIH@F#5a z5%<-m3($wqJPzH?tHZ-+4F2C?*HVAl<97TFDlB7qqWKtb#p)@B)e$&IC8&b_mX!U~aI_Q9XvMzl`<3w~e)=y@&WHY{OY; zFJtwW@3%}p)@k85{2X1{+`B5JX_HbcBKGXR!Zrg8*hb3r@A>Sa_;kQtRvFy&?CZPj z-#STy&$^9s`!sx={YdT?`YtL25)BN$+N;lTg&)|9m&b@@W8<(6g5Qp1!;CKeq;LWn zs(|Tp6!P_|Y)`oidwEnXY&ISKcd)78EQms4}a^Ps^ z79RM$SGbJpv={r)5N-~z6G zt`U2A9y<6N&PgA;Giq#4@mW*8p9$pZd5eGt!IEY5R>qnw6>no7^@W)Ie6&}njXicB z5HZItt8*yl#lS_KdzT+kZTQB~>uUYLzsyQ`xgR+>XbwkbYbb6I{K@+mnlO3sb%)W6 z-ooC=w*as;w0kU(jX>f7e#``)# zCz|BBo@0@nbN?py0$4YLCMFzJxH{jx?(eR@qGRavi|AEiujJCI7dd_k7>`~WjA?+F z)2@}u@^j$vC*oc1KLoCZOy)CcXBi6>Z}~j(fN`U5zeMtMHOdBsg2g$ZnIX{sN{1)et<$c5Q`g054dV`Gv z`viKE&(;-~xIr2;{Hosp@pF59lKSdmfA^TlcyF5K_zmLFIG+ePsvG**`Vd5uEQ?t` z<6IQ)w_34nR@kYyU42Y@7e2wLF#YwlU$<5|e>oo?e(oY`IachQ?M!-nqt$$}IKL$+ zUq=7!8xh#amz5#7RSO*0kxl8B@$Eq|l$S0L#4z=<$WGhK(el zPw^_-Y?WtWA0MG_5Hmz&cp=&CuVAoveh$5-wYi_Uo*75WiqKUy|1CLul-bYgMdu)R z$)Q)UAM1Mp$L_pU@-Jj{*#i*%wrhB>^L&NQO7I-3;4`JX{)Mx=t1He)yPj?_7WAb4 z51c=Qk5jq}y_08WVWY)a1g-Jo80XeC7s)cRtwIa2ZKtVW*YikjlYO0S!BX^Jp8IEg zn)i>EtozmCOpwV-1zTwfF%=&s(uqZ+JMg_dDGpr(H6b31^~5Wf6Yd8>91x-So#1ty zH8FoGq~GYbCtw zuJ`s1KV88r?>x}Iwl(9~;1^nlSRMr8_xo@9QTmHUNO^+6xF+^%93a^8)AJb1?aybN zF7x@J-;8FI`;R#Lf$x&G#GRHVcT_33`kr1`_C4ZCR-R@VJTE(pMG1v@pmImY+hEf} zs|J#UaU=RhCii|f>wDnNx8ra7|3Nk{zXOirf90PvUaxr&Ddkt*6ByKa$1gY8BN74q z@|)g-gjOzUy{V>9651MY^M6LoaXi668|7u&&28vi_g8pJeH8b;RRy8@TiR z9c*?oC+Itk&Z(Daj3+wY&6V}ku7%Ebr?zjV7QSWK?|OVB1{pU!nD&6Hcl6jM^p<{} zuJQFPu82N+qKK5W+*iBsFmAB^{g4%pZGy}wwKQJtts0PN)bLJL@f_l@=R%3Ol$)L#Vp%+~&i4+7e3j~^;!Bj2mRjps1- z8+#$g6SBKj`Q3j9jD+bCe1#4EE?bo3hQ#`w_&V3h@?rM#lg?MCx9BVU4Urz`Ee9jQ z99aD$_;)cU-tY-HUgX;N2PgDC|4sVEAHri^E^?@gh6(46OQJ3D4V?SmFLTJn z)jJf>Wtr||8zw;ih6Labeua!D$aj3qIX)E3QHtK(U{w(86WI4A&Gt8f%_>KgVlMap z#)pW;JaKGgbO3Klr~DX#r1+@>r?y7se}7j%uUe#ben`22OP_GH)mZLRkJnXSV?N=z z_$$1o`7u|OjYDU=u9Sn&E22#fRQXZnP0Jc^ku`w|Hp>?IMs**2=vm>+UBUFxu&y}>&`q9ca9j=xNWo+m@>Fe3Y6(7d&eb$NEKa7&jcPsoHD%)|n z^^cx%>>ZpF21fLfvOBayzNZ>KYxqUYzvq7Cjm~E}>$X1dQuzO(k83f7`{4Be*%0qLU7(ZvrdhY)lhc}d;-E?ZzUIq`uw^)H^QU4*1_`FHYEMOM{AWKK?jEEXocmXf2{Qv|H}R) z^}&?+(7|<`o$iKQW%@6=U5nhGQ?{+l>+sJTkmVj5@iu9B<=Jue;*zGP_A;o)iB=m3 z@%2^KqhE9S+^u7!vwS9eEl<3)#H=JNo%t`|I>@Etl;9^xC!nvuZ_J0^8=iAM-|*fO zTBYodWeR+PxXw4JP5b{^;IWgL$@1i@EiyLcJkOQ;Ud92>xm-G0pBM}Jzst^D-&MEF z>(^!5e&hXoJAM@?K+lMfEt8M0^eQPUH!Tu68qr(B!{Avzu(R&>WMvRi){(3SGni zAiJ#Ft>EtsR=Pef*9#r`jDEn$PdNUGCZ6E?7|i*DGxB+thdhdcf8Ew_umU2NyQChXtA#g zy!@%AZ7SXoc>^1#Q{_K*@UQR+u% zynWl;Xtq$od)0j+Z)p8TJuKV%PjW+=>@0FdReDS#aMK$j!SXpqoi21#altS){xCw{ zoXIh9dr3BOctg|iu3x?1kEK1+MEHQ1ll)%x_ST<&lDWUJq5AblAC2y7`#1C8b{--G zx8zG9elgk0mHECk0^IL?r~8yPw91O}9lTb(-DGc>PkoQC{Zrf}KeqQi`cW6ZYpNB;Qu(;YIUs`o4WyHzWRP*nWRqH=9+ONd~BEV zv&Vkq_p|fs&wN&XYwPI0!ds=I*+TDb`hJw(4^t>K6}qtUBpFZTJ=O_6CE?_o#ZuHZ zpEiCzNwj2p7|-FXSVNd~x1WD%*?;A&N8e>@U(;WC1oT_FervOJ87aQzjjUkbMY;yN zyBZnke;Avu?-)|Ozuj~9Fo#Brtn^Q|)|1WgPEW7v`(^uqN7mT4Uk{w(LVqGU*!Bxt zb-g?7P6@xK(_YbQ?5l_c{dXCwF;-nk@nN*t$(T&=nU?irFH&H*;I8TYwe4l{F6P|( z={D0_J->Nhevu_g+xbXcYxVIgW1#wu>&F9y2GG~;+YBR{nPqQ^?l*QXh(?9< z^eU@&(AwES%X}^G{npMX_V>KNe`2Ur7O(x3IX%ee-odl1&-W%S-mhtEhYHgQD^6MU zno89hn)|LHKgxjUzmBtvjd8T;_X6kD-$v&qO*V2&hH$s~YQ!({yY^NG{o+027zyF8 z(-3T@(8mSVE3A6|>w=VIb^dRkV~pE=GlejJr)<}iPqy@(iaKaEr?@s>uaQpXb-bhb z-`Yk`ZLyQReRa-WvkX;6?@TuE9X9ue=to=ybO@+YOV)5mBW>&Cb=&))~KhwFxun&Z8AP zwFQ`!Dt=1YAFPZoMX2tw6`?v);PSePA{0^(g)g-VRxng#75ud)?^A~dC?yRIZ^2#vwJa~Rh}wQcG&j} zZ&BrqGmVQh{?BSlC*}d1qheXh;(2)$rpOiogTYnX%o_9e{~yQJSl~*!L&kd6PQVq_ znF`EROQxCwIDii42K^g9DNCU6M+$Dhd6m_0ni~(yIVVqB&W(^7&)s)c}A9{ga zZ~YEfylR$Dz~Z}APs_?&Dbw-(xZg6!WCrD{yw|H31Lh$^Nrz2a<}7wuI>sq$%<-|v zP)Rue)Ar7$KjE2~odzZOhe)uAOe)`hIsaas5vt6`<^H6Rl@I5^;#ZNWpt~`iXC`EO zLL`m+ypE4Qu41G4L(%^(*goef1@=n@`0F97P=jfwiO%1B{EPH9Y@D&CP1c`24mRYA z4EAhH2hj?u6*I4Bv$gIS%?bd=!H8qkWW^p~LWx!^N{-!+4tVLh5kBc{2@PwWX=a22-vjUdk10!nkEj2L%)#FmviDBgvR9P~dD5!1 zfq(9dbN99Hs6sA;Lz01*i_Z<2CE;_S!op%tj(?wpSMPRLL^7u}J}enNo%7aHrgiWU zaEeVGqfOA`i~YM=^$?lsr#vCQmk;kdE%N-PJug`ihI9^$oo>@WAO7W)q0!IGq&DZO zc+MoMl*QV~eubO?|6shN_k?rE4OERfGCL^S5U@j#ReXNHXkIa4R_=o>p)TW?mWRx} zu324)f`_RtB4MJ_>G9&mX=v(EazYNrmkJol}@qr{*=lAO53`%3ZTUpj}qzO^QC2nQuEnclVV4Kj}>x-4LIKYwQczeZ-&zr0eyJz>{H6L1oLNWYq2WEqUAs9ZhjiNB#s z`-g*f#pnS`zn&RbozJ|oI-c(pb<vjvc<+jNabMj&51%LOp{eJQ z@pks-&)%|3-S2o^MW=$FU3?42fO_THgd4@Kkd5DY_J-3Ki&*ilf_l^57iGJQD&)`s z$PTQT**kowRskR~G7IbZTmvU2z&eMXpXCW7h7d4=ZRj>sz}@5S_?Qs(HDaCM*ITaa zbPvX!F$#-Jtk}R{{Hj)ap8XQ|LdZr9`1DG-eJ>08pT`)_-{X4!#r_*$0&O6>b*?9~ zVUsOqZc{lQDhpCyw8%#0f7Zug z$9w;%{`BY1zp@`8Uj+Q`F;Y}*jCcU_HQ{{NG!(PMrrzW=-}h-BC}FM8hs!*~+?Mg& z;$s~(F1qtcI;^{{g)B{3;uW7fMsxEuDr>#G`lo2hHuz+tzXNpS{-{?ez4aX``HkOE zIcKi(FI0uF@6ZL@IPQcwPgtErW`ZtHTF>x($c|23o4B8axn^Yn$X14B(zpxOqgF8= zGSg_|l4VcA zpI7>UJdOi8TK!m#RbmeF-&8rs@&NRx?tNvI#u@Ks(PqNcZNC0wm8Xfz)L$I8i@5Ps zt2{u4{q@(sUB+fCaq??c`nbEw3Px#*fzRi^CG5n>H>*!#WFw8aURR0ZnB~E?>&m^w zd%eT&M3tk)U+i-Mhek4eto`;?pf``|pU=6xvVs&<5$0#g9{G_rL-=;2TbcG5Hv)Mt zunQ0~k&uP(O}bu!J{novozKC~z#Y>b@4aCzcf&qyRGENnd!@g^w1exh=g{NVKG%$4 zYLSgGe?3Bm0nXjN<0=MPVg@8Pj%pVQ*^8O5SAu_sz5M4-${MRaz@&+F4~XvvY{UPK zyN)x0l_qW@(OSS@E(LlN^ZNF<71K@hC+q%euO5sRG^}f49sb?-3_>SFWuKZ51GX!0 z6F9qx>F~%M@ioJVO z%#`d6w^AF-TrMhX8)A;XhSy|fk zqaNW~U$jp;->H@FhCGmzl}dJL=wa8}gGW4e{W25weY{6>T6Rjs zMM_1!5+9lm2aK_2VQh~q<7IW!l;sX1B|g1zeEY|*D|CpuE*;Nb_$a@|uzBG7e|rUZ z(9l=dT;CC&0zNSzBbysBMcB7pUqsjmeC0TNd4F+U0u$kwi^wWxT(`uYKF*+)3Vjy- z;>%+RlfEmT?r;m;R&>m9R6ZLC#jp4sxY4wKm0}lw2hWl1P~M|g!u1_*f=yK_!)x{3 zuowPvdlq&e&iNTt(&PsFx>kbE^ARknjbId2*{~n;UH6Z2esw(12rAk3vv^^nUG;2Q ztstghL!sf!0DPj3-x1rpuB;9Tn%MZX-8Z^Cjy%SRXCS99;j^G!@3KA>%uQ04GHt<@ zI-GB?mW*$U+iNCr)3ksJnch!Tu;HL!x_(1UpChe-xFv;bDov)_!D0byZJ0K5o4GA7UBMUugLpD z6}3rA89zSsD7Imo6}2hjOBH3wn8SntS5=*VzrM}|MiVsHzx7zlRqf@lp)T@|EzftK z?R;Z^^{UAtJAd*X7@iULZMHZ+`1^^Lu-fm(nP%6&y(R9CC8iPaf5CSJQ-+%FK@7Xs zD@Tvm9Qj@)Mo%)G6SDDhO8ftFjWvdKS&a(?Tvf|uZLrpJZ!@8N?R+&^&#Gd)EB4~2 zt<%5fk!D*Up2{)LuCs8)s>~xJ5as<6hqj9AaWwQ;&o^?i>|vK4$%kP}MMoNO60G%d zS`o%a`rSEv4e=T4$uh(xsx($ccza7E*wOS*` zxsnEkU+Vi*fCuy8&6iQh*7-N|skfu((rT-W`+e`@!oKjAD8&RoE3r2yRYn76Beoh=UtFuKT`Eh*+#Qzjy+Ne` ziTkZ;xxb$QR^>nbZU}qulb7f3u^!;ar16p4E@V@g ze>Z^mRPnW_B0Ol3R_6Eec{ITAYWgW+jS;Iu)qbg5}$MA z_p$i+&ZjeA6%xy8-)@fV8aw&BzF{=;p^UgreRKo*X{-oxcn<)ol7XTReZ)Ab!p?Rd zpI#8zT(9%UYkizhzSe|c|J~uXnMxmjc4NPKt`kR}>#je*iJ=H0?_)f|dUiD4OhT1p z&=4e!Nho|jnC#w)kRGLVXxtZjv-aKfa*HYPxh?%Y;PB~rGy8d7Z~ne}XE(3@jQw!^ z2@1w#~%Pd3oD_zw2fEsl!((1k@(Au@wE8Y$xwk@op;uXUWH zy2LMgln2dTfK8#&Xu*EXZ`}WX<^FG3q@OardAPujo)39+(c|{2k5| z*5-D@fsek`*R`2T4HhR)?&NYVKmxz;gM^1{A z2&biQ3#q@G$9?6X4Hng$U!RKEdp)&VuQh#-mK*$YEClW1y?CDN4XN^dioGtUt9;}Z zapLnd04nvsYk=AQCeH#$Q`AZwNHn9}^6bKk<+e~(Ru;V7f$`EQsF zzxF>L>|s#sMThQK2WgvQKO{8%eei*?bt5%tAZa4jd1%p@MhbJ!XX}00$lrw18#-=$ z@}yTE_3M34Gf)g00)1Ok{#vK{WYM@B$R{d%Yx_yZMyw^(PtYxAi{<_n{xA`-bxi2h z2wEbbJRcG^w}rae*;*QFw|b%Jc;kD_lPcA2r{06!Cc;8*EWvMKc&5C$?>r@~>(9cT z@0$ecI61f7T)JE-^Af1Z^#h#LVHS9^QEfW;-Cy;;Dcd-(I`A_QTx5(9Oa-9#XIEaE zJg}3uCRMiyF}yK(i; zgkY>Q?80Ru2r_d2ao7SMUf`TcjS(p8u7pcyJLjQCzR(T48W)Ey4t{HNAq`R+yJ}93 z_?~<&mM=S)bUPsNIS*hm&*uMbVA)_MH0Dlc2fZ|&w+Fqu>kG7M6h|w4NTp@&53}!y z9LsYq|6mKIZYLSZx>+)w#JnLfq83>dHY((SNc5d^RpMi6L|YQL)}piU9{Puj>58=5 zbse`5k$fls2NT$qeB!ewJnwMLa$K7ZDe}t);oqARQ#d|77J!&D9S(G_H_MfHN&Z-6J>M}i@&Qy&Ny zhXS@^HlEFStnzk!r`iQVGLdC#@1J!=*egzFG5$t|PaciV5(ORRL|d4}?z$0B!8r%X zlz2DzugXHqt=oW$&1E#Nh2Hlq<(h72Pujnoza{xC$4DKn8$KTWpch4)mguR;Wa+Zj z$1yh3dd`bkr2i6HV>Vx>%8$H39Y~@>H#!S^uQ49rjlYM*G%KbTrFX^?2sOIqIPdX?ua zZ)DCBF8lRGCdUgof2A?I|A%+?yd}k#+S&U2Rz!L>b1yceN$bxX94up?k6^3Fwsjg! zJt0zjIdFWPUP`|16K7PP|nhfWdMi)onp z2!A&xC_?t4(Pi+D-=bychKK7o%DA-6K00?QYhNmRxzurL54xrMCQsw=Z`fx%hu!l} z{m2{K)NAi;8@92^T6FJG1RNNCszt7?{vF@Te`wR8kn#G44_Jgg>8XFzwt9Kre!`8u z>3jG7)9)ub+hOEU?#O?BJ<+!~Z_J0c{@ha^@a@98YPOv)$>=_gxAs@(C2!VK|K0Tc z!#lg{|5+M)#>ED=B8zQ7Y$7QGo6jwc*Q`qV)T676vv+eYK02;%d@X&j<%Iaz>{l@E zK61amo#)%%Ip=q>dB;CbwD((ndVqtL!>{+PEgT+97hzPs4yhf9Mqz`xP(e~2zdzqmWob~I=^BY*G z{EnVFj>h{GK7h;>A-wW~8-A1r`!jDF$#UBa4Etg`;nF|Ld{v75`2sLs-OW?p$ku-U z2fj7g%j72+F2CgW;M-11#b8<2)YqMHVV7T`Z|K==B`pK^RVlK8Va{tSbmH%q`Qh4+ z^sI|K`%zZzWcQ~3Cp~Jve4j4JuKoBPy|3~{uBfu8TIT7$in*0TwKZ6cMvK-n9^EGE ze6z?PpV;!8u4n5q9>x43b$&i@Ezl*4ZS+&?xLfsmOm_PouLaBe<-oss)^>3L#hwS? zl6rBK>Ew0T`u$EiOS%5}pUV!Z`^NeE_b}%1p1w(Y_q$*JPe1>_$4}3%{5xUttgm

mg*EoC#qeCkW+KHchug?HmVX61WBK0Z;{R{m^dKaIJ& z|C0^1_NV2~6Tij>wo9h<);M#b62sm7-v6N*ONj>343ME`M||8bGI>F;M%HfQOj3@r zjliwhJI%8?Wrk$lu*29~F$>InU%#^#aHhsliAQWD3|9mtdx;_Y0RTSxVFLggeJ{_p z8yR6x@e-Mxj_hOJU%$j3Gw=hT$iQ(|8X5f@H7n6mmcLo4AhUqs@GP<=AkzhBIG34w=L$lM%y~=yYVkXhI&n8D;$%@6m@0Bda0dYSN43 zSm?vZAX7fnkl7!uQQhUp?DJL~Bj9{yP`>#9nIT%X%&TToy0gtrTB!$`kcH%mN+8%Q zpVyIbkt-D>WYXw+G2aEhLlFsGudYxdOFcan||MSn1_1ZHwP1?+?hrkP}xhiF=4qTX&Ece4^r3%=vw|eEQ z>1H6{bq!mcGgh%4Vjpch=k_!ED<)R)ZZ&J&(K5=hFLbY@SJ3VJ5m|RRlcUq((5qix zj=s4**g%PoITutyd)FOM|T|GuzwoY2&0Cf|(Zkv^WZ^*yr$o?pU#@Nt|Aj}KV7kA#X^H;-ht=a~gHD%PkH zjwhYp<04z^MRSJl8$Q(EJbfOs8dX%#bQs=MneH_XJ5%Oi_xs(yzW=@060D0L?~UY2 zu~R*}Siti&>Fi&g0T~s*@`Ku}?l55Le9x5&f``mVN2U!`D)C$?lL1GY0}A^Wpo{49 zvf!hngPB?G^ok&`!ABNcWb3`M`f&8+v~?c60`XB~7%EOf$Fjax?<4vH4ZB`FJTrRe zUgHn=$fhFPMV5Ku$Gg3*??$3?ewS1~8_b3(#K@K(vPiPZ%T!rM!6jfg_~;@%>NFEs zF2k2ZoT}Q>K@%^?rL1P9F55XS6~9#@t75U`?sv^<;14u(93f*~udKF;c|x9vrhK2( zD`urxRE+I1*7zVgvIrV)BDxLe8Os5akmcw3bHY5!*vLIT>;dS6d-Y#EgZWjfz8UGa zoJUq`(?6ig8CyBr`Ll>Iu)egg`-NhRgI4Yvdg%rnL~&$NZF%-*Y{=eV!J ztMpe$pM!6}S3xUes|LL~?SP*g;F22|NQz{#{u9`CFAUT{i-qA9ms#Y2qv=_2++QY0LU-CWe8tC*PJI^iN***t< zLO%vQ{ViAiAQQP|JR1Cj=UGMv?vyqr)3}KE*q2xAnX#~pIgj{|x(pHx{h0Qp$E%4( z!j>Q#=Fp=c6F7$s;7r9p55}qQWegx`x5o7bpBz+W;(pfUMZ})~1Ga@!gNIQ$>+tOO z)2Esh*v4xuo&>wn;2TM^M?G^c%ixi@ToGGfnoqvu3Yt@ABCegjh5{}}!uGnV-yF8I zkp6=(q|N0Jo6>V^KJc%KGEP^WASl{Ut|1L}Y!TinD(n31^ef`_@EwXxZ>-G%Z zAAh}?MppcpNmb4xD}{)yaf3mF(3=#4ivGiAr2Q0ipT#qjpTvKv8RJFuwB%zqVUDa; z57qL~bT`Ceu-0B-gyYe{_o89LL_C^g72|ZoKy1b&x?jj~r74SV9rhY9iDxDCcGr2x zL@uzk08h*J=H#Tv9#Z{tJ^rCBc#dP*cFT9JNOJV}{550u$5pBw4d2S=j1NfB$6bwO z-uKE|K||Aqv5PXOQ>EtVrEnY&-2euXQDaIeyuRP=uIz;M0 zzN8zfUTf2qx~R%6@Q(gwKV!6f#ws0!eFam`;|1XhU0KDc*ss?WHcR*$UXe%GZVXv3 z9#7GtdjSJw+At#>pRnrHSpaY7k;_AJ;iE{k@y(K6CoW#Hv;Ubss$Q-7G_Gpy%VOE} zzS7$gYlr?tyjck6A~nv;e8#rj)#SpA#m(R6k@`t43t5IWGtF=nDA;OqPT4oFCuKJD z0A=o9;8W#~60a0nl6(h=@7>$}?5pncL{%4!|8dxO%mI4|=f2vw5-#RrwJJ>bJZ*2F z@)=bkDV1yikTJ4|z*p-OQY-KsuG?U@l35#cT`KsI{BgG|?e8;fuB;}idz^SOuqw}d z;PHH`&|$d`B*eF<+7$gxMCMv!e~8v4#OIi=+k|1`lOBzE3su5wvX$-90FF?l5bWi7 zU%k@i4o`TG{Zt88sK=LUA_4IDV|7%#chtT2yxrs!iQ3Cn```bSvfTF$rmU^;7yl74 zG2{J?p^tqZh^mlJShx&*Sd+Hc!fzYmI4qAb-rde7W1>2^|L!&|$I?bWVMA1zj`@x_ zn5`8=m`3@xYWKBXQ57s>BpQ{2q|H-Iij4)|7I93rm0n(jt?0|^75hX*hFMl8!~7yX z-2Crulf-&-%B>>f={{m96E|ri)ymKLJNd81pNcIiBD=l1yKz+~#tom}2)mu;+be*D zKS8ttnalF8QW~#4W58B?oyxZda2l|dJp09Tt!Wq8hM%WpS$&Gx-_r~s%c|^VzZLtM z#cnoRstKQ8Rp0g){`KnTBwi2maliU&uZI&ymCxjr__^D+`MIgDKSc&de@Cqj4jL^s z9NRF`yMXOjtBT{j*oT9C>u+5i&xP-Fc>I9ZU;XQ~I%>uuXis0NEhrnAdu(l-^y9GJ zMlVU@FOPwwznU_=+lM?~IaXVS zV;qwub070w$2hx6dmk(l@gDm;z-63&BzswzpK}5cvjyK_PV6UStRv5Nu&fH7iEuG+ z3OF zvl$D$HvBk!qF3w_jQ8kV9&9$8cY>^+b6C%uO?z0vmlcYc2>ZE`IOl4{1gNmzZ(Okb zJ*y5MOGQf9>wS-~!#-hM_3VNx+H>ajQlCbkW;;&TGR3xIeFxjf_xP`fpH;v9XnPEa z>p9nulVMX`C6+Jb-*c=1cEL>tan>v%DEV(%;IM7Rc}LU0(>-oEE6P5UI{&zRjNf<; zx&pYv`6tY?SFFwRhPB$-bcAg=huH1oo`^hTcsI+9_;PmSIIF(Ol4RG%Iym8#3=tdr zKD)MZ-(=$dyw3!Op#M(SBG4yw{zva8a8s`rIs`H1KMCkQ6mx1$k`kZ$>^`|X14vX%L-=1MF zk8iT#T(T5Rr7269#(3=*Z@~80R}U8&bHc)(^Y`F~gQhyo;M=Z~&U|y5 z^2=hYh2!YO#|g8*W&MS!;aFSJ_&Bo`=O<6%Em>@sC3fN8lr8Gi_hG}v)#_to>~T(| z#rUBk_&JtE0Sl@yTjauVlr@x!x0>9{0;~>Bfqwc z*KD1PLCBP`Quz(OS#AZia}Z>o-whS%zv!F<=D@%4F2;wRe&XX-`wroB+@^Nl2n%jn zV6_)6A#iCylc#k1?f~dA&R(H~quHKeVpdYHepPxjgzTYU&T=!>VbVAE!Z_F3=K?$G zhi+p=wLg&pkKOOS*2Oq@#M$qzKRvg3G2q`Fw%@%@%E{j>Lz}e^cGZpEHjeqB0?{`2 zG_Ka`@v_J!L>3c@KQssa4cgEhOl-MV{&Z9X}X555IW+u^+Qv^HHVAU$iExmfzG6$YEaE zy$ATwoAN00%BC*URLW!Y2|i0I*Tv>~TwkFLEjAeVnh*ZPI%H4lxiWi@C(jM@l?Pj@ zJogXV`c67KyXWRys{CIJ_=59tV?W38z7}0FGXP1ErP{|OelEXd)pKDBwfWEIpW)Z} zD&z{?kNI!b#`9o#vvYoI^WJI`2sxbVJU9TzeO9q%L04Em>;E~FF5}|k4jyNbnfJX? zbrd?!Z7ZyY4l{`|PB4ebW%#%u;V44imW;rNvZHHxU>vx*2nU@o^HK>#fW86^F16rU}55eMef!*v^GJv(i1^Q*%f#pZ8zVh8Nhq}P!dOx7<6PBHB ztNd*u&Ckg3D?FdtWvjo(Ixw!Wptg<9g+EJk8e{85ma`4iU}YrJmyebo*1>BW!AeRv zq*~?o=np|bfzJ>2RQD5C9x3`jbMA!?@$8{eUHUyO?D@~PK96eWfqGdM7on|t+26;q z9AkxR)RQuPmIy)qpVDNJ4xJ8FK$Dhq$c9%&?A|Mvo2O%=x5l7s+{!`#AK$ z@*IYNVGwQm)g4;o(EK+JNJABHfSO|#7i}yD&52Z8x-8G>08f4b-TC1rr_0(H zCSvmJ>oBd$=9#1!zwaM!<_cufZ@pSz=lyU<-wN$3vBXZVO5qg^eIdbXTIS>TO^STY z!SnsD_rk6MpMviAqa^4@N%>UtcCL!-E-Ca`*0_=q{rk4?i}@EyIy;nIQ-8SO)ND`t3R}s+jpV5J&&&0zXA#S_n{DMD`^a0HNVKdCwi(_R zg704c+d?a8LpYbYAGOm7JWiJuzR@-Ocl`bQq6WPtX!co$eDv!G@ z;5wWv@WQX?L}6zKZtM7Lt1%q3>D6vqmv`Rag8O`TpOo1Cc|6wM*T*@meDKs5?_giq zj1x4dgiO-^Ney`&JYCkJD#iDBH!qT(bc27ygu6Xu1*UcHVAra>ERU_*75$K@KH#w9 zc-80c`EMD2)9)g`gF)vH4b=QVk8~ZjN7}r7__luwJ1QQv;KTWPrHzfqZv2P&K~8UE z#S{M#pQb#j{hPguMRd-Sx6l0~gP&TF(Vgcu&-LFsz4vacuvN7F-rD-~9+QNcg=I&M5PvHKnBM~`MPJKCcJ?)a-#%2$^IKUrX$H0))OgkF zRc=HN&;50I_JeGDH_zwi_4yrL@2#BlyD=H3&~HDros3*yEW%bbzwN^iU(2(;-o{^S zjY-pw%F$+v3|;j~qg8nigGKf~(0sAw_B~-{^?AN)^-K%vnB88~cAh>*$SJmg_ImQk z$MN$j%_drKto3Y5*lc}%vVj%WO!4vu3wHM>$8YZzpI$cd;tjv^`~Cj%{sK08`*V4E zxxeD!3FqN=(sQ8-2}$?$*ry6w%IQrxp0X1@Z|9Fk8Cdi$`AoL4mrFl;+b`v^KD;N( zJO89T;dsS)&Vk?iCu2O`mu8bdbnIZ=`z2f@xNB^jpF`_<%-Brs^iO?5emwPq_gGf5 zo@!9d`L*{S*GuEa{M!D_KlNju+T(lLF(%G5l@)eiXLFbq9i)|U6UpNwzG zFJY`jzgM^;vscDu}j2K(WipKJo3SburdiA~n= zI7+zXzInf*(*}^^tJe;Z;R)UbjdelcH(FTsk<=lT9YuzvXgy!re+ z4riapL!9&A)m6qx0agirX1d4>spu(%dd_7RM7*E9UaeBX07ParL6-KCS&?`-4`Uane{za^?K zVHrJxMbEnV<>U6Oe~A+foR=2e&ihgA)N%HOYEhI0Db|PAv{q-j8-8ac+nGHJl|&-D z7voAY10ONyfdAncIb~SAKu*Se^DkFRLBGmnoxCB&5XP;XUQxhnO$ff z6kBAY@nIW@?AWSLnW(Y?UWIK=hv^-SE4q*8&iX#{-FW_t6K%mG<2h76y;8>VbLcNJ zo!>Us@$kW>X0@0&II1~c^-NK>4CIW;Q9-2jXFYaiYk-FNn&}*}Y1%+%(Wk4vQrEkl zS?0*>*M&b@W|=9UWU+COwLac!e0H|1Uw!SbmMQsYbW?0T$xN!9&o8g~(rK?|vo=43 zX_bep!Mm_^mDSs3&7qkc&W~_V)y=C%0LGBDH?5qcx5oWD8@BWHsHDgDrP9Jd{LcC` z=0W|=pEs_(3R~!xRvjF$ZuJ!CG|ii?0}=V#d4US;Lw znNr6G0P&EOiXg+r@v6X>J7*e?ISpefD@5X1z~H_P{pKhm9B>7kYs~9jaLCx#tXvl# zw?&r9O55sumg{z#G;{!DeXb|pr41T&Kf*Iy>UqzTZOHFA|ET<<^`J4qeBkD?tayBX z#Pafrv|m}>bl};uTgRFPj<3=GmuALbWFd@#AG6})jpI8DW@hDd`}jDs>KbQgQ{Ie&A6gHn3)x6RUP*v%KR0xE*T zl)*f*WL}hw)GHy9oWFct2W7pxe`DTIskBC%J((O} zjwz1gTAd2-9+V9~_(LQDt?bhcSgZRMN||IGu8eP?e>h3P8Tr_*-D4iDo$+oCasy%Osg()UBdn|>(8;)SG6^q z^eFQ_Cqxx(t%Xp(o)oy3b463hD32`JKQ=)mmStzza$rgJ5il90EyD0WY*(r-GbA8gQtDF?; z7}vsgcgb~0*gjJqPrO1#hn;;)dOwMeFmEBu0d-1dN%#8A*0VYSf^p10;XK8Qi^`7@h;$peX0Xh$gf$!F2?ojxX`be z_4170L3f~6lHE*$(|!RTBV+KaTKG-=B=~;3cW8kX=>Oa8YUo$U_>{?4iLrfuQ*~9I z6XXG6lHxQJF}$>=g>Vc!Kp#bR>c7XiV+&uNAsN^2@n`(CR!U%91)jK{8*!$;#~Ajx zS;(WLnYniWnr7Tg8mqAkR8NNK_y658iPoR?qasy1C_2`X6&om?j2H)W zKQj1R#uPE9!e?Z6j3JL!k;iEa*}mDgVfg|6hh7Q4*R#}fwX^|ww;wLVh2hUOJs;WJ zU1kT&p`)(9Tvl@2z_ZK?;=Qw?Xz?GRKV6QguCWE!|72}B9_PDP}vV}f9o$fr23iPlI}fKzLBn<9Ct0deY_jbO;ToBV;X{9J-xEe zd@i%u9|QIpwjM2@&`@6XL=mE?(=iXxQf;)*NaI(?gAO+|&>}xmKA1Dgo~;rw6X0~p z&uJ@se`h6udu&u8#QZ=bSaY|rPWMF?JHu%dz6`3M8R^V9Z(qC1^6;fXU(Wk~yh6EcraEt#_lNO81xftnn%;*07m)o^dR$D*{ z_WBaLZ*eMA{K38v4h~_Dec@hpt5E%6lQg!RWBpW9ZLD=N-^;p_m(pK%|y+uyzqEiQBgS6!YoN_z!n z#TVi%@8D0?eWL02p0sB-b-}mGz^}9+Ha=4H)!N|OvsSdsy|lyi_Dk3&;{M_LAQqRp zQlwPcJ2I<%_$aJ9$S!_4pRu09T+4dE*FK*(%W|R;b*<9I)erf3O!{b5tor)}M*{xK zsuF03F#t~AhK4!)y0>Lnukd`*F1iF&$5CaPby7bEBcbPW?|#6n$@oc=>p6x} zed?NV)w{AB_72jHoP3aQueOc%7V@Xuzc{J0Ji;_8a5Wj7OYOL;{eU*ufBsGD)rNaT zlWvzwPx2c4O+E+qcUV3@$Y8*j&sE^;6!R_mQfYLjNv}A|Hj8`Jz4VwD(H?BNVM85M z<;4&isIckw_0{YM#0W>+N;ke*@M9(pL^lj2a}vxyWRD)&V-Vu`S^ zfI~i)oO=^W`^p|ubo-fqmvchHZ(8;2to(H>_Alm64==V*r>)t7`ltfuY;lgz`+1ox z{67DkHbDj%M~%k@A@|5K{Z~5L0+%FV*UKQy_jDMm5={pJDh1QVh@&f z7}h)PTgF!6tSQ^pinBb2!+iQKcWD2H_4%a{)0l({pX|o_pV((&eO%5nzLAM|z9%BZ zdb-Rt^6|&nf=z$Lhq~tX2+C*AMK(ACJX&=&__KJ+XtWWOGJ<;-_8d7>15arEQonR@I3c38yt+^!z| zj{T8~{LriDO7;hp;M&i6#P=pXk8e6}-1&CCpZpuX+zyw1@2j7&q5JiE)o*CMIx$*5 zw`?3|k}eO{v*rw+@xQG~vX=LA&pl#JVGlgm$&krxySR=EKbZKH?b$h(bzhO~;Gkb6 zJCo+k_G0j}d(epG@iz=Y@71P@{~0v7#Cv$YMzM$XU7om(@R-ge6_?nHK=o6!&d1lQ z(o~*9&N2r&XgyqCvXkVZMrVcaO-E<`*%7R|Es^)2d;#-almNub#i;)alg;1 zMncKI>kCY@z3&2j^fL&d&ViZI=y?t_vjB+ksE?;M`?uoE_WSRyOUD5(N;WuJC*V)F zznkZ~km&+8M^;%8R+ZRhA}$Z@aoj17by2=>N&+v13@N;5l7_fAo}1tYnX(=A)H-fD zt?Zu1X#8I9&-5L&mpAJ8+0pj7Wt=y#=HEZ^C!TAtSD(u?p3`Wv4RBe>iR4GNu|4G1 zK_}=-x&P=_LV2Ta7L4Enhu%#i6mWoQS!(GWp6(p#TrT@KH` z%8BwkD~Y!(Z1wq^>2_TCVP5gu`EPF!JnI3aF#y+CYdjELgbvKU%cQpBZ1s?8l`mEU z3XLXylW4_DEONK8M=sq z_w=^Rqx7#SKP2@CewScH>kl|!ebxh!IZoq~cXk*5v|p_60rx-JREu4lV~#)CaQtR0 znv7J|(cjbNL$fwtYwrTKTRUM9aKv?5o#q^7;+%B~kM}%L5dt^cotbMz|BOMMVsYw$SDVMeM(dWVPA3@EjlSSf? zD0FhX*5po;g{&v5@3Z2td`zYKh%fZj`TD&tpmE4^%0KEWHWzi_`7&>;&+l;%$Onm+ z#zDCF2Kj+_43Bhlb6f#4S07FUJh%Ck8w1;G3Po1Cw_@;Uy?RW z*B{aZgFO0uel;I#YfzDeemX5hf(@D^+j(Ids+4;cwC(+mhw# z)>d%=e_h*nJ6hPIkeETG&uBr<6Vqf27&CGV{w0#9>`B+zek(w1PpMK z+LZA*r=85fbF5QnA?3ZFc*1IdumEi>h#8pTIHdw1Z*Kxx%{UmR*zk03H z-)2GE=L@{Vml~Z**jRWL4~G6nUsie0g5EZ9QB@DpKhHhaujt0-k{>zY`JIf~+Gt|S z0q9T;9X6>n@@-y1?|UPAitdnVcZ3~;`*fhpR~@`v$4GdfUonya(ZP-nAQvoTt7_^t zN$)mry2v%vt!`l*gZ0g4t3G15s_c2G!g6ksNz;cFwky2jZ9d3+T{+9bc@&8z#KG0dUskQ6mr7wmJI?r`Y`O)~__Az{wMl0SQ z+yBC{URV1ca^leb!HUo`bbZ4oN`Ei-?MatNp9(9>DK!j|R zF1u*GK%F1fw05IPnA&ily3jS~#Wj_zGBkGUs2_f5C z&EYqRkAPL>2=@sakZtEWaPnwhE5}jzT89N>nGY(fpONvTWL*Ps7g;!8UB?i!Eq(GB zJWiiO{995+&fm7!QlaOR5AR9Qt&ksPjEYP~SY(XxI#MnJr$Ra<<{5T{z13Cx?`ozR z;k-V-N`iKOBWHwk-9o$b;oe!uyj}mWF;>p3{VDhN+vZ4N+lK8Bm4rV(|43g_^?bj} zIAWQVa^l%1>Mda8MD^2q{r;k#o9=jQ-R5z7^=bU)d95)rx>fBPrFgySLT~+Av77lh zalUSS{xo;pTxVUFHr~@p8!rUt{~4~|>G$35-(F8y`}2I>>7?b^=yO7A(J8PMgvqe3 zl{8zQ$hf1DdTX)AWyg~l|I6n%RxTmCV;KCyT3ljdHx}6?L>u~!I%GTV^1JBzwb^bi z@-X5rWei~T?wt;E;L_SN^D)TIv^k#Ux7bp%BeI!SIXvInCs-)`@Gq0%zby1(BE?T? z_DjZ3bh{3$pMMt`sxP$3?)iLK(+@IxH{Q0-CQEbQM~a@r`@y$Gp6>a%%!lku-NE3p z$2II>$|KTRJcUw>|$Zy3z7Q~g>yUudGv;b$1_NO&hZImQ5a zz}I6|d|_#}%)RJy@jYL8kHhyq0`f=?s-Mr342V?zv!p|7Td4-+1YrV2YDRK)gS)3Pvci?Kb|JPq~2V6U)HGIwvjmB#db`g zLzasL_aeWF7pXqdyZkiYr}j(PnC8lR+4?;7_k6a)=iT?N=uLSa&$cnpZGM?yQfymi z1l})@CI@?eQ&tO&m@{C$t7{Ol4A%9P2j}3w;+xoW*<5G7?)P`s-;Kk6|EbTjj$`Xj zede_tODyy+o7e^PVeb#an(y5VUznb0I-YHGll{8qIt2tGZ<{q6p_*f|TiwM` zE+Am<>({kp61d;FC@Uonf8h)H$fyC_UY;%Y$PL@16$x5p+Q29+$^$$$0tMU`p~%0@bH#D)v4 zZ}PcUxa5rIqrdNRUy7q(`GJb8>x_zdl(_;~u4$zUP67XzhYmqiDsw;{gtC`6V0VRr zj7?c(iS8?BC7W&(cgsCz%|jz zd|Bf6tiWfB%m*BxGchJA2VgwTyb3rWt32R!o_~t0=lLsV%Z*CTWIRdgb7@XDY=*L~ ze4tb$!I)!?Q5j){IsZoMe295Qwjdf4{SR1q|53RXG86W}t5ymDuDcG2(aX+fe z%y|MQ`0qSg)@sWPi0LF)$aqZb*kx@Zy$&lVAmp|d_`CBpukAvm=#9MB<{RL>_?w1_ zFsuv54SmE_CMG@InHOQFLl0uD)?~wk6L2sqe{iNQF~u?ue3;v_=34OyDT9@- z6;&l9vgco=+RmLdko!kNKO+O5&l_-J`;CK7U^io1*sLVq;jHvE<6B!7U~~IGSDn|a zocD?~OnWqCNzaUYG?`NGi?Cf^U`d(Wm=4&cVVDm)oa6|eT|OsjeE_Xgb=EPAY{GPwCe4vLxn#WuhXA5Nc47v_@kbN2eyhWG`uzOwN`fu3zp$oiH zC8`m-@-)a2A1|vGe-D~H!d|V3E0{E)alX^;Im*j%h9 zOT{iBm>p-tLMPm6g}cPltnBsu{TlR=u)dPc#7bp6h9$D$_KG_AP#?b|do^V^o_?o> zZYVkrnN%&a+(I^|&7Y{J zrgd`6!DYFswrYOvw^`c3u=%bl|!Ihk($l8oc0IbKXNPE@lnRtkGlo_fg=SC~4 zG>3VpHCs9Uhv$e&v~0&tz3cj19_)u>tqSSL#)B~i`#x@>Ec-YA`j7u8{c$B)h3r-d zTw$}k@GJP&GyYH7$hg(S(?lG{xmnf@J$WM0%}Y4W26-1%n@H!1rVWp5^Y}Pa2|iT| zlD|tgFb{qfG7b8FWMSS^1{%-Ww0i=FrCN5zr=xn}aV$FEZXEMu-2(eC=IRZ$k!n_* z8c$!<2kSJ`e}_+Nb)PEk4@0c-2J_!xRIOW_M-O1a=Y9X*dDOKNoyK*@Fw6KQE~C%n zZzI8a%kuzU+AG(bE3(W_KWhm4kTr7-=;MerPTtM=b7jQbC#rrD764j3VhvYZpEguh zBc1(yk1-;)5q8S_gSap zwODsmcF0aY;$}xy4~}?|B(JN_1#jQBYNBc!wyi!x zUsLvX3Uh6bKhG8BeZ-Qp>T$|Y!~_n?YCmv({;AbYA$yr;$-b7lJsImojGvR4-TxbW zc~-kP*I)OC0E$x4uF)9a_V~PzK7Y^=xi97Yv0p6fSsB=Bv4`Ld)c`bsF=X8FrHkw? zG~u$7<8n*#ocjs(XK3#r{Mdu456iT3@0Hx};=S#HOXvUHnHXU1mdX9Yqf*VZwSjB5 zrRHz%Y4a@WIT5NbK;tmXuV$a;8JVLzM*@^)bzjc&4xRVJYCQB_+l8v**oQg#US;lo zrtD2$BdFm}n#Ib$tS`rVER#e8zGi`-HUG*cEkTcQh3Yvre2KrJUlWV?6V{FR$?p6J z);wkU^vSq#Cd0K?QCb@MY#$k3?HpBa%l>ZYIZ1TW{a%^6(=7BL-bLIh?UbwVOziKH z-5#;1@E@jc1)Zbhs{ke}8yN!Qd=%N>x|uToH0hafL!DXf?_N}mm2sUmow=R-T4WXc zQT1mCn@dWOuo?5eursONC5R>2Rt zT)JNAIEX1$K3*!zBG&LVpTpi^f@*&lyzED_jA_qZO(y_ms2+ZApk)BLn zxe2AdFuyo=Arpt37!*~g5oen*D~1IIOZhVR9k!ImCcFM;-^$v#su^#dah>UJHvI<} z&>DnfKH^^e%qgUP?DIMwg-7A`c~pV*Qf-i)=jR}^S_|9dK>Rt+q~Gn;^=*5v`#g&ud$se6si5M1`nmT$ z+EvyWjqPCJ%hirOTNOE$i5Hy@g#X%g6~-EKgN@`dJ{W)@>q*wI-Cp=r(>~+5V4R54 zNIPF~+q;Dy6MhHwW6L?otWb%$g#Cy!adyOf$9Vp3k3n8dPXosn(byPA(*C{Yndgqv zj|WcX_37)}_6oy1_TPozzv{<>st1Sd zb3X@P1$3QPG~8eK?js^3f+V81AmJA^N^~QMkfua8+7M;*65U{kge1!7y#!IBjoule z8w?R;w9)G@7~PcPoXh_?XRUp+_s#d>yZ2gqzwh%rAF$y(f=&fvD_)YwzSO*rOWNRj zQH|&Aybmcvf=Vh{vuHn$To#Ma^?8a=KF@ zL9ArkS2~(6M6jC1Pl}adZoQcFZfV|G;}Qdtm!F>2(Jt#@7G4)*DbZS;w?7*0*!V8B zwI5W5-Vn@saYSwt*4^a*jxhd zk~Se&Og`>~EbpL?+Qp8PgM^17QQH$grhOxCXMHp6at#Nx>E`UstSLPJkMMR?olY$4 zI2)PV3g3?}AxL&CEE)-5*MUcx&ZDP$z?=I`ua%4fxnTFqCYRlKTM&^kopPZo-|lVF z>mOzDY%Yq_8)ARA-1*`5yxr;RObF2c!LeQ4Z1ihS)W&s|pN4eOs5w^pasolMazR4z zGRc@68y&p=FveW_@_=WuN??ophZ*63x35~?R!zfMa~C-J?4xzQ(Ir$6Zd{q|F?7YR z<~)N{lijJ?PEz@DqF3nRYtE5N5y3dbn2o44jqcC$yZB zOFe>B88bG1>Qgd%zN}!Z)1G5v)mX-L-rZ@Ws6H^G4fi@TIlz75&-Q5PDZnP}kK==g zV*~5W%Kr_%PWSIvgRQ6#Vopl^TZ^XLEeDnT^RzH z^EhATo+G)#BefnD5VexYj~J%q%+^Pw#+#SgR|NMMBn`HH9@S>lp7E%O;xw*(UTXb! z?nTF5OEtLsMp^oCrubCKMxdBt&{)cWz4i3$Y4Bs&VhoA!ry--sXX6lUw@*LQD1>Uh zF3D(JLe86n8dnlw^@3Yw>`(v&@o>2`>CPuZ@Mr(p{;l!1D zqiEeWhU%6ed(YaRnkk(k-11N7W|P zY{4vp_W~`<%`eXO}nKo5b3`$ahFz)eh5NV&5%9E}F;h2uNIC*X>(6 zAI9LVdmcpB=h7vK#owke^9fr{q>ir@)}y}(5e-bdu;HHUG7~FpwB@mh6K^%%&pzn< zoeC`T_`@rVS+>}L|ZxAb!CG84y7Vl=zH;>V2``p{nWPIXRz*gV1t?oKe)o~dl!kw_8 zx5_eBBc}9pqdrVxZ+BIYq#WS$in8LCHam2#Lp_^0Ez3veowxbZQAtYLIEg&0FO&9&*-(P)3C&L<7VG z)wLn!^;w9g`hn7Xomrg1xGG}jN|LWp`Wse*G`&?<8m}qHu61&)Xk(6dFu@J5sU=nD zd+XHpDG;M~47-azJ>!2FAV}`P8=tGqSrngW_A#E0Z5{ni^O`AlXQ%G@HNIl@cI>xG zZRNO}1z*N9`!1;+n?CQLlRfK;aAR7Vz`ukaJGGjhGzY)GFWViB8@fCEt~YYQs%eAt zcXL3+SR$-UOHpU_E$*#=U|BKhltZOhMLJvY8=R%Rl+b6*&>qxgCT_^BEu`UpzwMv~ zFwVI!rLm75;M@m}`AWwy=&#Rm?B^i~r(U%4QwF_Pv1wR%7WcHcOMXk)W!EpoR3jOe+{jp87m-32^Yj0L-4-Ya!sH5J zn;^W_>zV3>cM`D5z>er$?C*J;tioc|y;klGYUM8*w){JT_!VdvbfqcBOSOdo7>x)G zjORxxenC3!+`Xv})kHWWI(xHAOX>$qS;=|iK97urNz6%G==-Lk=CdTO*V?VWe~s&} z_SL;cWXN}4*sO)+ZES^pVM9J!qE0?gO*uLs){T%)Mo`Z9O^=PyLJmkF%IT`t-7kLh z*5Bfa4T`Z&vzq)cZj)Of>5*F$n&U55HS!{b{A+8e?T(Jg1ts+Nui>%tZ!d}j5MvNG z9NFDG_zxX-0*}pNhA-wBgdLTvMQdIPLi&!k>+ktqS6oP_loILHS?1R>_xicF37YzT zle~*vIw3t$jPzz3|FkkLxtDRGodf-gILEhHP}BQdc$@t|B%r*yA}DD6jgiFDlE&>7 zCG_>1B#R4gg;=P1DW5Q1`$~g3nfLV@=r`xp4u<+M*VcL5zsowsWF3N5%F@sk>Xyp% zP{cxGy8d2#!5UYo(+6|Z6+vT^s{0pTeYr6PpGUjva^#0#P+WX_eO(EIUdz}x&drH9 zz3@bQ2Vya$Q>x4bqYsk6z(bUuy247l%Qug8=nIn)VOM=-c}BUK`jo!lneoh9Ik9bq zEJM&kYgo9`7SFn9z|aCII4`;fH;-;`TUa^pX`H>7&{)ZGs|ma6z?#z`75Z*-?z+#c zw}kQb1!qt4F%Z8Eo{%KDvw;`pYie6NaoUQ`8JzK_a=(PDt?QnGViugd^jDk?7J4`C zKH;U=RG--9r|_KzsB6Cq94631&fePSLprw|jp-fCyIO+%+F{iV#DxQN%cSkr_$3UV zB|e}XeGKMNgd%ZA(YtnW5Vt>-g~zWxswt_}j;+kidU#4)?l9m94)b=nbI+vj2o7@2 zrh%};_tWauOLk(@dftq=2@8MWLpVZr%N~jok*vKA>qr~ zSvaJUFN*w1&)*8dRgD9xR1nPFzqK2%WGO%_E-7cD2^%DU#}Z#lm+w!fV-n}v?jIxb z!@j2wVc5ek97N@@{SF*3U`PyApShGyLTds(Y~bGrcV}r9&LJT8F*)nUawsa<=k7B~ z=f-tOWe3<*@bBs~E9{dD*+#nh0@mMuU(K{GE9bymE8ve-P@pLV=so`!AU zfXZFawwS?kYksM%?6-$E1j55GteYPMV~}LkMHCOd>~V4OJ+{U-o9YGk$U*)SVGK@5Dp)E=Cf))Ra;WIbi|>0Ga8_G4xWO#Bmp zqi?q*Z`#Rhr)NE)fJ^ueeVrghXcv;v8d7plcNai{vUOx1eRFXVhcRqj$)^`;za1p2u@ENRDsFL zF`HrtR&=Txv^bEYW17n97fGT_au#T9>Pibn8}^F?jTrUoQvx3=Li*HC>?fYlTH1BJ z66iUR90;9{CitN}{#BEK$ZW_nw)u^k?VG4?SW(Hpl^Wbi%SmlE{IGORQQ+Co5AL@L z>S{b>&7_sI^)3q6Pxp_Ifj&BuR|GO0X267C$3|<1Hd|vRv>jw&ek%#Q#``9B4zA*s z7V14v79-LON>YIc990&4sM{)L8|zZXSH-RSYDR2@Y1|!DHEAeV?zj zL%B7zwP@eIq<@ICqjwV3GijeKWzgc_FWgDPRK)$hE$v>Jy?ODktRJphkO=O;8|g=m z6?}3TY}#&l$hdq8I<{2Tk2=YQ(>ZrF|+4J@92CxC2MQ}q3xV8@&6x;{v zhmx5M2D)x09vm;4!M}26*H0p)TJ@41HmkTeZ~)VEhNU}1fn1?de>|uF7QWLBGC}2O z&Mw^B&wZLRpe0%BX)tnG(oZW|)JQ=YTAWB1IrONH6J&+fcKZ%I=@rr1Hxjh+_b zz_Cr`GY=W1Xxi^6;x*dY30e~)0w6ME8Jn2|d5Rm^=-J5k4|AJtHTuiKGN627@MZOH zB9Z-5cP6+HU2+e*!7wR6Ki>Can`&9XJ2{NDJu@xIVd!OsI!fO(xdz+F(Px!~VACr7D(`GA+D;1>lN{o&MN{$j#K=(NAedZPN`^a@G zY+yxp$hBQ<%_l~$Q@t5O4jvYg1|!Qh^PB`6>E)RUf6f_*gj*;}MV_R-zm+}uLcAMJ zUteWNI5&loDD^eQy0{bF@pT)F>{|x&-C5q4Ic>A?rKc>s7wraO@@XGTAWX!zsm8p(7y58(;#5%<>()YOekXF>r8}SNzeeg{zMtA$s}p^Aa}AO2 z3$d%6f2n^fJbNBt!0Hihd$#ut^Gn6nmMb5_ zPt+fx9#2J`&wTLD5N77Jcq(YJSmH`!9>K)!*H+Piv`KRi>;mX0Gjmp2&|uzpMoGBU z0imM%X1m2d$1~=R-laW#2ApQ|q)*7fZJKP~rZs8v(+XP>)refqk|4K7`FxL@9# zcNjGK?BMGSed)7X64@g)y!omzASa%))3-OX)&fRVjDjfIUE8?43ido32A>CU0Ug|C zEEdDYg*X1>DD}0E5@ENBX(y)FXiO;;%FEa+D3@D{`BqSYh<58VYZtJcdN@>ma!-zo zheMM{d4qk=`qaE{4e`b+P;9um#oV5Jw6n-)N3~NkjhvREIiZ=wIc?_hcI^rsZ2K4U zx;QUETd+?-ffqUv4};XFFCu0Qzxq6{Wd_8^aCTXk1sar-#QKtO2XSf~?KGF+5;DVT z(rZJB!>*KB#u0C#i-IDuzud9ClCDTV~ zj{@x&FKL*_aGyV$>LTsr%+_h5=L>`;^`);K%)I7Z0(^Hgs>w{Bf}Ie6-<+!S9IuE_ zInH|*;LA}TH)34;cIGRTL@4dJ>tj*mCanbX);H~DPDf7Du}#|X=4+kIzxtH*Pd%r^ z3ZZ!=z7~>}%7?Wz7uS2-i0S1f#4)+5{^T2#>o)F9Zp>?KE~5$9_rGJz^`x(8$R;4i zNsa0!hnp{x%va}UhXaM$D5AEaxHYpM;KZ70 zxp!9~;xP`_Ir6oPQ?lBCv?VwA;7yI1cLMV`$(4|P=H7Bt44IdH)1)0@-kX(TI(cb$ zF1$)kOKLH8YxB8$k$f-ob zxadw#ysYxp|BqGa(><}`oT$(Z{~zbgc<$ZDzv!M>1tB2Z#XnDtLSMkKRGjh_!!sM=hZ zp)uOqV&6q52C`$&eQzg|AY_2KoAX>9Bk9|{zh)4ai9BZo*nTUlAkVx00k}q6T6K~~Lrv2o8=1+6 z&4xNFHPr{4!$n4^fvcCjh_-5O_EjbuQEXb5uwPH(e6|nATiKIRt5!Bk2duehlT&3H*OiBr?Aon4j*N0fP0O=f&}QM`FXvy+}w7`h?nEkJCpBFIQC0`syOGGoqvTOU)BnD z4=mm%`ME7jwLYbYPP2M8C@(*2cpd+PvX7%)w_21JtX1tMSg`}Fxl#bNOAI+1eLZFz zX@MDhWUCant#hM*@gqx_N%>mA1>j@^< z*XH-|A5G@aE7vf5$hY-AX;D=_NI`YC)0FL~frMu(Kpg|Z;@N0G+qhw-;z`h>iu>}} zVB>Fz)0=+T>;09MGpr{?TJqyl6kMgcsQhk{be=8o(RM zft(N?r)k{Vw)t~->t_ekGnA#|6uoh*}u`Xkg#@01@K%N?naID5+x6^$#BlU&`p!)CKSf zVc{RmLHa$37~1K!KsODK-rm#ynk{Zx0O_9&aSBfB(QrCkeBn=?9=T@QgET|b6EVCj z4@>C`T5$=!&nmj3WQ$P=qX=xv=Bz8!CnL7>evJrDhTe#y2NG2}J?_@7%LB*FcKZfw zrnGPAPW#yX6}~E}i(!_&DUs;feN^N}44(VGJ#5m2+KbToX|kY)nb7hh-_Fem%A-0i z;!)p&#vJBcd1ygm#!xdN}Ts!vDF}{p-06VE#o(7%~jd6KCP!!jP7dAwe~_| zm=Fph+Dp#0xba`}6Y7lMzpFKhqD zAX8`#glcY7-E^%xnzp|0;S0ss_%G9>^Q*PC!XZ&T0T0d6>_5U4;PsXQH<(!$e$?8e06E&9O=6*`g=6l6w_0s4tR84F;}J?Z2QJ zpWnVac?>beo=aii1kjcW$k;(3hyh)z5S-$#vPI5WI?AabU$*gC|Ef41DBSA?9bq^~ zuqj(OzaQt(aX&e>e@+|9{AnkJfM|gQYb+cf0A*_5$Tb+TQx+n|um0#foP5ke5dUg- z=(|l8fE*2wpraEPy(G5_ckrz84jBtQdF;W3A3GT_C8aRMysHMdZUW zP5V@iIA9H};>TRBxHIyA9VIz(?+8&__b!eS;verBjX*3yxf?8cmwcXFKxJjT3>p}a zfvYc)kqIPtv-2rooJa!nrf?1WlH4NhUH$VFKL!#M!X0R8x7oO$OztQ1(ZYU_`Yw05 zcm$bOnPexX=_Z+*b;huP&Dtz}a&}Z0YzA~yy+>n9t71OKcULeJoRo`1Bacz#V z^1o9_X`HaWJIkVBj+gVoH&%`5WJ!<#i%a4>DDx>uQg2d3z|6|t%#8^ltvz(x6 zai(+OZx>E>S5dg&~uA&DtVta9Z>Y>9y)QTM3Gayw4!i?a9@!8z96> zyF>S0Bx*s=IDHbx=4q#Qx1Bs08sIofQTJ4-tAv@1I(`H@*JWvN?p zUo%rD`MGj&&NEfcb$qnOzzD-@IL%#2y}?XtZqZU#Ly`mVN9MQ2WdZll;M5%c*$+rb zM^S6DKcgO{&ycP}*$Y!CXD?y71ThSP}9XIO{&6mU}N(0=$a$VQca-0TlQ2&gE( z!aT_cpspTqm^rqld!*Re*#Sx~WM>k(?#s9K^po8z*ffWp{kFwu2bZ&yt4O|;_G;i~ z^gu+3ByRRtaVGSgumUDh1OYC$V@D$_L19qBj4awjR;1T$%Jb*fj%ULRyN(l?AsCCQ z>|>@$^CM}=3Pr7lHF0k%z^AhZ9&N$$2>X3nNsjB#8lm(D@+y|^1LDtBj&|wvCW=>Y z2j6tfr$4E0%+5{b~_JsGQLGw}UD>R@#>F%QMZr9JVOVs?^~e%)PkM*(;9O_g2C z+v+ds&$lScBL<_hO)DCH)GG5TEnnA#a<4u$HXycX@Rp3*S5*u)URjXt=9aR%+N-+uyBJ<7qNYrRMtWt5}*a zoaf;X!one{q~Z!@E&NeJQ-YWQgE_jyz6jC&ON`tswHu5+PuY;_5?W`-6s>((%{X!Q z>qnc|Eoa16lz!mdie^J$Yys{e)$5S1EV`BsqsKPllRPK}pkj`#O2g*7A@RxCbWp*4 zMg5Z<-3Y17X3gG-KTUjQoJB?Zpp;2l{wP^X0JN--J3Pmk?1CxRK(X$#8Lh17wBe0s>iQiSy4HK;z>-@A(xdZk6khv_auFK z8>E+w?L(-SU$(Aa_Uu#}FgVs}4gXaK)EZ_{=G4rodRr{wKh2iydm{Ih$h(ALpTeU- zLn%*%sP$EF$)5)&*i160SYbx!4wXvF9Ql(nO&d>ZRTa3qf+?%F`uQUy!q>|Gkkb(RQ{%5 zkyVW6%lhj#n{Xf2D4dIMxb$J>XzTPZ1o_wepiZlPwrE-v)0rgJ9Mc(Yb{Gb(l`0tI zPNg+Tj&dV$RG;+=X$J<4wDdHUZzGm5b&ZCLBqzg}+n05tCnM^1vsjv@FSl>%p6$+b zB_6Dz>v5-~ImxNZC2)~ZUfjI-uigwxDb~JW35J^Z16CQBjjS!yR;Eb4AxjLF6`n=K zv*pZGO;56Cc^c2_mf8zMyoANz>=Zdp7!VAX^Z?Dp8Al~H6h%y2RqHO(ztmdf zLVmBdggOS)RDAfjZ#WUaE+*Ogw}MjS2N&NHBSM6G&H&JY-|lh(19J>|wm5qQv^c$%XvJem_w?(;d z+T~>w&%~Py@`Qs&gHbQ)Sf~eaP6rX{Z5SrG_dP@N66RbnDYkO%9PNf@=<;~cODek^ zd8SPeH^w3MbST5vnH>A4fvb=;gE;k7ou-e7)r#QtyB3&Q)i+1m!eMi2RLXiEY+J!j zJK)K39H`gey*#IuX^WiZ>-(AM%UB`j+cmsH; z&Apqcr;>B8(cxglai>V1PF}S-@UQ+nZO8&=6>P`EGUfID8y~SGFI%*=CBXCuZb1GO zrMkgEQQ9H8b>@M{vVOHA8Gp0)p{*FBufu!MYF4>8(nU=L8`Qxq>{66T^sNtbV{2U6 zgqvIYmpD=H%*cfvC1#}*+f|Z~^Rsp6-s?BLs@f}6S#3eBOL)l$=A3Pbd%+`udcnRK zfvOR!*i6WX-3^J?h(sl+}&ntScd=i|q$QMhm%xmP59-K2q*4@v|cf z6({;s)yc!lAXx6DT%QNv?_`I(K_=YC^Mv;o$djSma8&UkZ7lqfTaQBP0yw=V{DRr3 z3L$ELgSggSi|RXnN-#51*#RE!jlZeM8m)v=%Ii$NbUE=fNOPUaCzTU_RrCkTNPIKL z{xM0iz7Tb3AD!ZNy)nlO5STTetg)Bl=id0~M>aVubBxg57>|mxd8{$2 zQ|az!<<|CyQCo{X@7m}EZsIZr%#f+B-%%KoeGp8$!!kxo8 z=3iKqY(>sxxjpI@?BH$ZuslahH!(eRz^6jVo|)Y!2($*uVp-qInIhDu>1rQIRn4Vr zbsg$Q9`50j`u(G+L<|#PkLPG14uQ9x0?1kq-}u9k7X6#4EFYO$`=0M_OZ-^48~JL* zP4z6;LOb)Nz>gIXL~e61$9(jdm!brE!k3)xxlx z#F6NWZB}{=BV+ZmQS!fi3)fqdO(&MXk%;UhcK*?m*6sVM?q_F+wG_|!AsDpCvu$h4 zIVfcxvoT3Fzi{@;kn?AJV^;X5ajv0=^vK#LPeag-&DnF>?rv1Y><`6WDtc#?v1h2F z1tbGp{<%R|>Y?f^wVkFAY8BX|P;`Dr^v+b+AO8{EbI?>sMcp+;82{hvmsHG`A&{c9 zV3#Rvq6;ML(UY3hxV*`m?RQ8hV~^Z4|J}5!XDq=S=O*)rTLJR9=SSGZh$0CyCVt&# z$8QHxhx*47+ap3Lj39Q9FG9rU_Yqk8!tJjEDBUxHgEjv;e^cj#gJJD9Me|W(cG0o& zatK)W?50u6NEE#j^btedjSla8?X7lwqWB}<3kCf(oxkd#70<2xUR zgF8)7r-jsQj%xzF-;P9Fl0(VI{;Hoyo2uj?@{Si-o=iz{JBD7)PIVoL(V<2gv_1X% z$ck-oN3W*J@#QyU#RI(fk%NSSZM8B36A;dxgy<#TlClsiv?BT^6d+!kAHsjBR=z0-w8}=Jn-?|>zJfVD-$bN>TTfp}4UsibDW}54ENSPjQgG*> z!4|Rs5d#;$0G(7WSCvLbSo}IlLwS=@Y=g?kYbh5949KfjedI9J3E}m|r;pr`R13Mv zv)vIRsC=Zwe=I7PC)5)VN)L&liCq`X!ns=&AM$O(XxqjoLA@I~+dnU@*(xTKvaMN!`15;F?lBSO&wtVxqR zVk*d&?^O$xOpnPk@E@+nWLPEn|K9ljj}`J(ItfnhBg^}QTf9$Fvr$aVcr`UqS~IM{ z{GO@%WKA5b)+C#m_ZfKg88)ZnJNi>~!(S$)ba+)YQQZHeWIvsJfeaUCe&6urNC!^T za08}oFPq_~x9c-Sou^`hq!7U)Wx|Xyb$K+^@s>no#R0tffys9;X%7TJpmgtp+ViiP zr?p+w+GxU4nd%Dzwx}Cy(|Eu-Kc6OyMLf9N6mw)cGY6rX5%WiQ|~=e7|zY(uAcNfQE9dJGRfm{ ze}guaDqC(6bBeQN+*d!jKT_MQXw&^E7de;x^~TfEw73Lq--ve$+~2N=%t*zlwHt6O za5XLlUl3i6|511%ptab^1!=uW8Zv)QF6A$~$THhzP_^jz8LgIAL%oum;gP6q{gUHK zC^C78Zle2hxD4BP(~|$lwFbo_CiEJQ#vIYzZ@KJX9XQzYHmnbhe080iyz5`fzP46LGe8;BGZ{v zBF94Our+{9uAs@wx@8N8^*`R9p$$_XNk)cjxKn;wJ3L+N?&c#iT68dYn%OAy{NK2z zOUNx4b=H2$Eb{+YcAoCFj&V$KFcoN*bUy=SHs*_DweB5e&qg-In6No1ogPoDUTL4r z&)ge%_K@9~9?$W4Ly=Pk=O~xZa}VI)v`*dD2>Yb_^la_-*k~N;-$u6D9VWnsTW&Ts zOzVoHACUIjo?B>73Z9W=Dh|)~9Lbv}i}WX%218_t8S~x519M5CuH?_!pY%P$;u`T|aciu}Gewey5XT?Ds5!F?`WYKM&AWf~$qg8+zQF3!!$6 zt3#cCzbZe21@{Cs;<$4B@4IImLHr9irgiYRhS^=^_a1Og9#UhW#voZJ$RinDAx!D} zJA{RmC9`RMBq_u%W|LCRHkc-8uTtT6`hnlB+-;uryw9CejtRyW+_9Yn+fk3m+@gTv zA0nT*h0i|+(X#=CkGxxocWyq0+*G0oRt#A0KFnoV`n%DGE@vY!{ee03o|;k`d%t#e`mMxLEl7invT#N8c(JK@{9KYi$W{;VsT94WJDkE}E(MZj6BKK+f zC3rY+s5-~P)TUz7x=vt!M>n+7iuK}R&OkeBztNT+YaI@p7O>&zYyHW>19Lty@MZ(@vU7BDzYrc4G%8_DPW=va759f5Xf0waDQ@UKh7g9!|*bg zwoBCI78X{yTh!zFMU){!&|bu*nK_MR!e)+oz)@6;CopD4$m}FlrT4R2r@^$u$Sb`oBDvi;wMWlv)+ywz zhYLUNy;uwN{5@m&sHOv!YPyLl-5ZzE3R8(O@t(#yUb4)~o-p_-!xs?v}Iju<3*PdDQjH||wzGkPQZrU&?7BzUc!sLsKTqVTZi z4#d|Xh8^CJsuO)X}1>F(72ZZI%U5KC7t<%*@19Acev?)w<+dBri- zH#0!Qqp)A+wVdSGF)LbiptY$a>3b3H+H;iod_pHZIxl})b8+T8zErjrHi{bvg4Smi z92|EPeg%L@R5@So)DJJn*VTT#U+=&VY#Qj$*5J) z{lI+1w6f^3sYtg#^RIS{@{w$yv_}M6cXa94h74M;vQDovl4g{3+6xgGb7W8_( z>snSWlG=wjpWA1GAx(JG&2b-SUzcijq==-S@4Abxve3Wl%*l-lGlu&9Fsp54=5|{) zg4d)MddL1tK&-|Z#y@#92l7q!SW5YIO+-#GJ^%=Rxz5}^%H=uSRAtT)e3ee{ol?wN zn>3^x1Q3_^&?)^curQBN8Zm$;*O^7S#LJDOu72D3Xgt) z*?G}lnqd5Skw=z|PlG{kYgzX1w@vt88IA_au9%q170wiB?5*XJ~{g6^sk0Ed7NhQz5WHPnx%_IlF9Mt?-G>}b7A!AiXmEiPDe zffmw;oj1smpX$4)%_b+&xu&7=P4dbJcTykBC1{#?biw|evBJ6l_f=5U>9%;ix$nEz zU5ChiIM=F;y-UF8xKhNqEb7{wxy^;%zp~Z#Q+XdBe@uk?Ft;7}cH~^8MG{4x2u&R> zwEcxB_ws%*a=K_jZ9Gz8meISAuI|sZxW!F~tx{XIPN?p)aNl`KDwLb3EpNXq7O)dI ze@Pj2o)Nbye2cVWpsN`D_CR&pHxNskMA~Xvm?|}3fad*fM<6dNSt;>o^x(e)^1_+M z5!c;WiYmlA)L!qVOp0`{4cRU0N^j`?0Q}J&-eL4mDfjFIdHEZI+x#=tB%A(pfaEPN z+&&Hs4OS?AqG4h{3=u6`d@pg4 zEJ7Og962zx3|nt?f`#4+WpH4SJ%HW8=Bo$?J;GkRrYv~BVtEnlspcovN}@4qy|wS> zR^qM2CXJ>R4VnGyHul)q-pf8c=hBROpA>GTDm^&zsgi5hAD#abWo?YjVAUslf`SdMXMy`;2fE|0njF^C1SlqK+dufCq)M}TW63I z+^c=IytE52RlPx#Z3@iav(+0Nj3IA5wJi{5e{I8njA&XTEG!;=$FY!7`VKY-P6+M8 zttq;^hPoMCiSUYd>5EH$1fA7oaHK}|ZINvARg;v4c%CmqY=fUse8|TtCvmY8rAnRn zA#H$V)C7+5luZe0M-sf~_pn!1lxy8`DkYcCC{U3yqHpi7GZKm6WKV{rQ1X`Bt{}J< zPfNs1vYyI%&URj#l2Baltnft_=1%mrvK9&mXI`fJDyV*ZUj-08%q9bqiBrc2<)NmL z-{kevgHzGr%^44+jc$vJyP~l`OQ$3X+1xymDr~X2v&;KSTk{z1cCVXX^JcFXh z)f>>Q#<=0sw;V0rOXw_8&ii^%(bfjCgJ|pMa3iwr1d^wRX`l6Xo5Cq&qpsPHR@k8_$7xE3L$lc~!0X-~p#rMC0B-^yXM@sQKIUU8z_-NS36!A0E*a_`i@0VkWk%qm?&gMM{?B`CL zh*qARR+XWu*nBJV*cdrVa4s6nJHJ=v&JdBuz`D*M@T83yC2-uM_pRnKC(!q0gU6_tfjsF0H4 zEQvs#1dYh`;fkVM(cfB+2WyqbHEcFseSHS?9&mTA@9dEaU##_Xbtv>=Kea(N5L{Ds zYf_Yc=W=lE=lu|P%dfjvvuA9R-N2P46$60`(jV!!UEK`RSe)#H;Qzp8q10#nck~l* zLRxjUnC|0j2_^z7K3|A6b0RpViTlnr;h&U<6z3$CA5dIQeY3Asjy83-G;MFQ$f#}r z``mMZE23?gVKFrg8TV`xw053vi&T!OOMd{vIOKy>zdKJQ8f;pCZJ0jInRA#vx%Nc& zXeNjbxXlvuzA{_VyAS5|#*GqR6s8uXm`pTh`K3`oJ@7+pbm%`{qki^A2N{N5sIqO7 z8=F10NJD0LZ+N@3?iia9M|W9jH)hM>{wD$p;Mg1!UC+WeBmNra)mUUNH_{_df8t%KRs$V11hB#}87Ligl-Rgr5qq(?R~-Z%_md9fecIjtL(bx3y`2*EUaU9IQ>v)MGtEJHThXLSff$_7hr}LS zaqR%`>?cU4&WsS$OSL1+-e~tZDRXiR+q^e>gPtf`66UGKcqXt3+q&*WiH!zn|Nvb7jRwfa3xMGp(rYg%|t$?tJe6)yGSr+Hg>}zj{Qg_djs3T zI(~kiiE31rCtFQBTqNwyo{zA>zw4UXb09SpE2Xj`{q9F-#;Wd`-kXs6-LsC9nZAOH zR&OUzM@qw*YW)-OH`eTax!|E8gy?MWaj@|g6D~c&~&+olf=}%ZMX=6 zZ?BuFs;IFf*s{oXBpZqP!oWX}Pr*_uL6cBMc&u9^ToZjWn+b%X%YX!(vhN*d7kpaK z!9H4y*edwjmV5`p`(7=1D3`6P3~+n$YopXUZTgQ>t`uTRk+}ZDmntJ+;vHiL6!X`C zk*-=Px%RQ*K!^Ta=ZgOKj7#qVJ8Y*ARM|GLD$!ojHE=E%jjRX$ev`Lv1Rs4;`?H^b z0`ycirSE$Bdc{W5`*~efm6i5L3yQS&n!WF#NMT_WJaVfc16B5pRA5k@wHwn#>nAn$ z0d6f#vuY)8onC~!?s?HqIX&ySeg9Az@G3FJ*@}Y=e{ICc7C;MOsoYbV-u>U7{xnxtkhI(*<`y7s+fC^JvllQuADZ5zyO9# zimxcZ3S!adc#58CJLX4q%%_2qrzuvN3U|!(Y#gB>N#8bR5kgcn)i%NyRHd6!(cTja zX^9vYKBzP3sc>FitwJRLUFtOG+*eB(%T+)U{nqXI^!Ke)Cg}sGxe)ugb`)4+xbm0C zPCI^0bGA2X(i+M8iSZG8#VOgDvCgw|98oslTZMehfnVU=Mc}+0HHr)GH9iXzrfiq6 zPbL6x1gw!J~m5_d=K_Ew58md8`6t|**$GQD=?!u;=?OTJLo z)27Gg442X_FQyj#XhrABTL8&&k!qCYJzna3Jk;bQEJBdEk<_805KzK_an}#xO6{kp zYi-*ned`v=(SLO7K(=td+UDlTIF?gQcB}Orpl(y7`Ot&^qSR#TRfMWP+EU|aK4)GS zRkZzA0GNB-O&`L(otF0Q8Sin>T-6b|W$K^KDXRG#6>KxOnNb1ZRJHJ(VQYG&+epa$ zQpS`_gfEPK&P67v?9Xfk%XWvcuQu6U9mv`hO;sCn`lE#t$Bb@}eAq71INt2}8fduB_C90ftAtwp0~BOaKZ@osGj{{^U`t?wZ{ zp>r?v^B;YwMevy|QjW*so^12+F}+0jsfZLPxi)l8R2Zx4{E^*&cUOC?-aW?q#58sn z*pIe6PwNEJSyM3BDNik~YNF|b?tQ#xEDQT3e6uxq>Hl*mT~2Ns^}%F0B=`4#?u|T! z!Ndy+!dEL7bm|7NXY%NDT8vY_;6A(*4L>V}aaFW83|n9S`6xFKl)-{f3CYEle-9lU zJ~g56!~_*B?5-|`h*>o?uZPq?Dnp$Hoq$2dT0&-e2>X$N1oO$KmTEsL6Rm&J4L_!V*L48dBss3I@RvKP5`{#L-72ay=-&0aEA4j zCDq$Ma=X4;G&8_QT#27BAx$mG`L_8@+kfZqrgm}j6_7ENKl+%2ggMtr^iprCT|LE| zxOCPlN%TM{&;Hu*wx+$+)D4g#0md;e$P-j$ug@hg?{3?6fbZZt&0Bq1wA9S8-7pxy#v3Pym{d*C-BqFw3c8}6uTI{c4=Ly_ty*})gig8@^&8(3 zyzlI8Sy{$_;Q4}+Z7RZ~dX-)_GqNkg#VR=5cG1|-o~E{o-{Z`8%_^Zx=OI{c$yWxJ z!)Z?5tiJA+dN;6Zp+m6{^2{-BL^o|+8Zf)ibQU=IF6~_FIbmf{Br)Xt04_4*IyWA#q(Ss;22(00F#BZ}>q|G3q<(?u8S{*%Yw=OT)E6Dh!@Z8Jp92^D zWLR^T0sZI={~Fi-Y+y$#Mlv@IA`CZcv+T8 zeP4Y~Ci`1^^UY_LPBP?8Uv!!<2-&S$?OlUt+n`3&?I_?JQ*W8QUiN5uV(L4m&g!~- zO!Vl}9_q<_x^|-v_0(lD7@oc+gUv&C{td1W2T<<|vi#6#| zezRxi;un`7Aq2;(?wj?badekNrF*2sU<=ifQl*D`5!QP|sLfC^!(_`&Y^!T_-W*vk zC~auVVQeDcX|af}uZ=oM&^;WAtfVpl4`?+fR70CbuCfXH67U&8tjYxW+18V!z$5t7 zzzBlRImu4-z5C7Tz+C6Fz)U{%*6iv=!lOfpyx@6W<%}5n%5?(>MY#klgaLYSW-7|F z6-9xx|M#p{8UV%lxm!Kh00%FWhWvl)8j!E0=KSDkjrABwTIp(b!zwe&U<-&*fA!e| z`T7`6nR|X)h(|{?)B3lQIRY#mz_cfv$TP&<%#*ghTbVWOj{LoA&i7W^@0yru$KS>(@7}B3ZgoQfnpoqV zg9UuwEe=5_WWRubfaV6`A^AmKNX|T=`OdK1i2Uh5-UyKk4@m{2^xhrgx+rDjrfi_? z)YH`nkQ3ld&EoeDHj9G?Rn6UG*AE0ZwBwm~>6*7O@~h?8JoNk=V5)ybPyo5K1MWv& zfM@7V+`WT-0tnIpc7YA?LWBwSXE%VzN76%!x1(6qxh~lK&F2B-u zgvhDDb!jue8~M|gq!V`Y6GOMut8CdpNSaV1)j2X@i=jrWKH;234Sp!3Q5sMS-ooD% zh-&X~ritHcep9}nL|H0VwQw6prbuu_VE^wTsy1RlL@Z)pWj~N}o?Ap80&9&nJH?9;*O3c-7;N7J0%(4$u}o{Jd?LjJW$=Udr(~u1rp=j_HhT z;M&A@?j+%|Uau?uk-^4AS)$7Pl!t%e>SdYkZ1shvs4s7JYr@gv=0{oCENvD{p5jkr zA`k&I`UBgKbo?nPItpjqS)Qf#hbh)GIKZ{*+X6t*vdNz)X+Mc-*Nt5L9D{AX>E>>j zR3shr=*@JUly{$qNKCf%v%x7wm3wM;hgVUCO0kZPnx8z5AG|J-`>h!Wll zp**S~#-Z=pdVxDv+9KK$1>~urg~L+}KuPNxhyy0N{UM63n`m1&EUgZY1 ziEV>(pYfW&K94SHS#etnoj)8j8uem`M$HC(L!X!u?Rzbic0(;w`xaRkBP1Q8@$PD*)kcr9`(Ti=o>$XMhSelI z!G9;Jntm#dGqrSipMU;k`^M!lB2M$9wLuVkGa7ZYBhBV%jZprH;i_AO>~+-uIU}Cx zzcQE{To-Cg72}oL#GU<`H4df3Iwp9m9PsJePadB<)*lO28_e2_lLx}I9h(cSzm6RF zA7{pDA~6#VIt@C~uN$_8&6=;bhMyI&n?RU&Lh~z}U@~I%QQGE|m+M=}{<*^4*O$Oi zMhRuweluI)iwqIv93YE5+eFDHs{G`U`X}t@LD&VVh;Q?;9y?{p+4yTl@?is0p(Bg(Mff z2tkFJYfX~R*SGI@L)Ryi)1@kRUapqXl%IbVXv4~GvS#ML&nP>TfJ$&H-jJRn1n2zD zb!TeLCDpJkZZ?VFDM4FR3znS!XD!F6*jEBT_a+j zydei@$}^1FaB{SFjtU*~55!xTg}hoVDypDPDqb|18Q^<6c(#RkBNO}z%l>AD0$o#7 z78;>qEVudC&@*{{?0fnZ2eXBk;j9S_MF9JCJ)}qXk#wFNLTG7qplp4P&zfFGY-`5$ zh2V87rw=85!~b;!vvz-?P?@EA7+Nh}u}+7JziLnrwUb@?SJ5wxNiS zc$hCv`f3?)K3mrG75|@B)u$`1L80RhBD^T}xqD6BtTS?G@=`6=F=<>n+C_08_y?Q# z^Lni9Qr|~NSVq+6B;P$yk8@_RcmTC%hfvTLta|;=?KZG)M4OtihfXlnO8ju6PBM_h zou8^1Mvx0GJYyF;Z?OvQ5y7LnSg(o-BgRgOZIDrX|~$9hVNHQzf^wVBnKMJQ_s!lNQ!Ytk?3@3O@Siq&~8 ztoCW+dx|wd-s6jc;81iOtb+|dJ zR7}eYaO-S9Y<1=pk=lFzjOm)yo0e`)ddGi4G&(ZT;boK`f~?(zCtA_I(28GoAJrn2 zN~y=IveMGEuwRz;V8tHvnw561RSMsdd>z?mmT-4jM%2ouIXJ-u`@{AZk5(>xlmrpp zNHO_+*4PB|{2gceXi&r&eR6_YM^IG_SLi*|qc1;>J5iHoh}EPMHol|K{D&tsH$=Aa zPUz6@?+dle8OcL3Yf+#|^zI}d0!cx<@;Z*(# z%%NXA6f&JV^as;_fTPT-+GlN}&zX&4S-!rGbP|#cO(eX}_S50J<^Ip*EIvDN8WLT7 z1#waipbxbOJP%rTw$5o?5Ts6?t!$k87CdWQn(i{)aSNDf)hmOf0bXM>OMA zd=L61`n`j(w$L;sDLB(Cwf)2RQ>5_( zlc?EAJl;$Gx9`!Ar)x@dD@O@4sF8#1>jmUH-T?TT>Zf~PyZbo76=SQH7UVUS2dn*4 zdnjJOx-MhMRcw{Jr#um`Fo9ZLce8qePOI zJ$da{deCVVF-OIP?6K_L8`rD&(=vPawuHU3_HV}to}WuwahVcViHoEncP?kT}>Le`4uAK8eb33=;ZF?enDI(hDwo2ct) zQ}&BtwBFJ657rLlU=$_`#%y&3yncdbCV1^z)+A!W6oCcx*Ze3+;7PxDY2WQlu)^sn zpH$$KCQd8a9p%k!gM-#mgle!rR%!S`AX9Re!Pe9f@_y# zUMk68Lrm8pj3@@7{@Q8^NDJJ1^oL>o?uv|!s&(vBwk8EsQ7$)C!1B2oV_ubir&T-S z+fP|Lmtx23Y0AbJ?@7UpWSHV|i~sDYdi(Y;Q`9DPO9eXWub|GAVg0Ttbt5sj`f*EV z7BnVp%X6l$g0+AC2Jzbm$@Tnk(yn^tx4(fUB+ku_%|((?vDDE^UyLZS*O*4J@?+tZ zT_JovzQvx^#`<1T{oXbQ1wv5_+2emrDWurZ@tcxE0SC|xCtdF0o*{(bljkC|HBAv3MSpt3xxo5tEh=y($ zhUJPH-J_s`9o1h?m&ie%HovK?27Qwh3OkxQxBSGrc;{oW^z`cb9aYlm18Y+BQ>N^R z&$fTz87T`(yZ@3BTaoG`>YT-K{5HOO%5Tw|fy8O+c=#XJ=KweGcX|umH|(2vcib3l zI5Nv1jRT?C4+NeLsGj?WHp&OLZ6M!-f{8$XT;$d4vBI_yoIg0p{R~LZL+0J;&BGcJ zHg3`vUCDd*E=9i|ac{M^zI4Fc;R4IgKTc=7!*c_u7cx&8lghr}#(*`uZ4ko%H7v7!xd{{{<(r9zzJptLim>OaheFQ&?CsMRoc)6;ABRHq`GXw zXESDb`0AJB8uR9e--;r^ZU>r3Ko!l< zBE!GbQuzy_wD!VrBZO8CaYwn;aRN4D;bopG)7n*6>)Jl!c+GW^RC@yEx&S3OOf3{$ z2?m5;$P2{$SttpJM5kVx@0Koil#HEGEC8kudW5?xJVa|bJzLxmL4E|#)0_f`0yq-+ zed}pEbnxsn;!Rvl?oRrBN_-(T#aG*!s?zmNNm#&G>6)O%37Q5`wdw0B=n_Qb)6Aw5 z}m;!i&E87N>5t{SCX9tchDW3NZQ1u=BWA|4RRCd{C{TRPUY}`wV3~F6?a@l(LF^W9?!pJuE zM2o++kz2d=Foi8U-oqaim=RNAlW4W@Ym{E2fzT*Z`I+j@8^M2g$s(O8oAGxvhE(69 zWNwV@eP&g+4XI}g-}qW%e!8@_@27|O&0FPWk!(CQThknk?8-Szc#9aw#$<6nWaR&O z_qoV$cyk3ybsgzS!}&+U$8^~nmrG6ptYE)EL!xON&InPqV*B6Be)e1o<%RL}%2s^B zj=S8u2)^vb%krt3on%i24&LyNk*fkfj?_IJ_{2lXKs})p=kl=fOub|Z5?bfvNal{m zaEEatS_NJ!h3!HPlDe#phOFK5jM)Ma0k&{?5 zhnnxy9@MVeu_Sk=G>pGRAi+nI+-c1Xr6kdI4;F?fjBKcVY}Al0d2+k0HKht874kAi ze)jPSO3?H)Vf6!kFuloX!ONbQ)jVIDp_S&J*%QYp$1H)YUJ|Tr-Dpl`F8gFbLrrMN z`^6s8uEvzwsUISBt+P(*meISCHYr~Ma_T~!B;rHFHnM3n-2IbXXL(#jMl#X}Ngqp& zk6QWa*EoW#27K+1Aw9rx3?x^Q}I5^OP1koiwKSLSY_o&>^(e?aQ9TH^gZ)wex-ts>2;#1@!kSK zHEofT_j^t73V62Ner?kUD%PGyhR&}A02!GYr36BQ5ME!^;4?0BupurQyx#~afDXba zwY?6kHdcN)F{4CRyP0Nf6>Fg*(QZb)A*3A`%N8#;3JOK$I`ZMi3<7Sx~|Cvp54TshT?wUu4L%5AwXyr+y znl{GBDFa-K3~z(*ZR09A@lHxDAo*o5abyEngC#!G!%J49DP}-~?HYg*dm|}>NJ;-~!PFA1yFfc7dj#m`w%?sFPna2f$_QM=~JL4*%kGc!@ ztTy((m=c*M@0B5>sjvsccT1sEQjt5|vxDjDKL{%PL`? zksvXffCoGesPr0irn;8Ba37p(9~kOVG(^e(+rJBL54z=`bgPuA{kJ62Q>z>$g|yAl zQK{E~=6#t;SFc3`{bZ$W)z}X{_--r;iA=?8tD_cIz9@Ojq`jnZ(l=j*y~*|wn^qMm zLOAC=!JVvR{F*J7>psN$mg#2%15n2#upw<_La7ESkR3FW}!Ig|z9H zsf9!Z^dl@a&8;bXrh+T=pTAvt%Tt+MSuhA{wZ7kr3zJ*NxUKK}!2Ak;vPrv&D24k5 z^|6$z2yNcMiXHFVGe0u(jz#$YSnh!28P+=M%0AdIbk=eGb>k)sa(6xNj)3ONZg!l0 z9(&F9HDJ)wT*MIcyG!cV!S00n+p3}JENYGMLs=GUwq<>lpz+M?dF8w67W7l4<*39n zK!QK#Z01kz{ShzZGtuhdY?v>5^eo$NX`YzP)2hA!-3;7b$x(OJk;2qt@E`TGcV2`| z?YA+{e`?asZc}sb zV%QhRk&BUnqU{a!8D#;FU0bC_4@L~C%je{3ch&j%q04g)%ox2Oox(G+O#J!(Vb&)ws{o|^U0Zv*m&(2$Nxqo!} z@9G12p{FOyuFIh6+LmvMb0SBAf9|U?p)MY>p=R9M?B*-ANt~w~Cfo`SYWw){$rHeQ z?!4|@(O2>v@ZoyVtEW^7)3F%=*Cy-Yf@f4S7*^chxA7I9pS=or;o9vU}hBk7+a$uyDYr9^A^9JLaN+T+(OdD&xvdt}e#MCS|uo8Z_TpKK+Uc{4SIJf<~ zeqLuj4%nl^1V3d76nGH$AF#vXO0j|ly(xbPD3j`!B0-t#Kr}tS?*@)YP;T3@-T{OJTQSLPX63nJ48OB(Z~+q^(eG@_PW< zqCvWkbek7?a&Ki^nXH3y{W`FttM;V0PSR0pUH;&{(2v#gcCz!5glc<-d~ZYLLIgN; zOctC5d1$USpt|Vug|BGuDv_qt*HzvR&F~WheEb`w{St+pA?Do}>r)_mpK*?;s zZo2_+*2#6O{c=+OIl>Tabpz=xbxkwIIOaR6?_^;c50Q=$AWVvPeDRa5^HMLp%K~5L zWwP?iNaI8HkAhG+c5Iw^9akQn{~Eljw(HRD{e?jb*3_h9gppiGJJY}+wPbq3cFbNYn+Yw)RnTO6gJYUsngWvkL|FM^G1m#|>upXw7 zz2oiMS5{U`EO1UaGj%hR`$D(EY3GTs&$GTCKh5kHU2T6HB%3jKH3F;cge*Lz7vV(| zal5{5N($v-ZEY}iW{=b3=`Zb>_t=+?94~34LD|4FM->C0CcyehCg%x_SqzGj z^&|U%8)p5iQ~WidNJp_sqS9;p>yz39yflxRs>^NK@&L^w&&o7@jEo4=h}fyuxmBI! zQ&AmBeR+JPeOIRPE2b>~<#%DJ_ zpPwhbES`jLK6;GbS-}n|&WAk@_&eChHknkG;i8 z-MwLeLN5tWFW#Ot4F5jPnCvv@_N!3QHHjJV@4TZF*R)2OC|Do>8o}MPb{c{Va!!>2 zvd7S&V>?gdx!1>KG9osHsumQtC^*?wkZ}5@mzRCsPXJMnk>u;O) zW&Dk8p5g(kUd4ER6${Zs+h-mBucrIvkqDfbVSag$L$^^iWHoTn&7@j*t6bo=*qre| zDyhNC-`arfMiXb>$rjWGR|09JZ6fs4kZjy5OSJjbo0i4zNpP$Ay>Cmh_=IionpwO{ zpdIb^^>=MkN&x-yVCw&TjHjDFLBzLUu*z*c%Mhp25^Zef9$?S?)!l>~fabZuYP0)R z7-hr!b8kmI`~hxMVxMZupGPxao7mtA^mmz_Q$f#Q>-Mt4gn8xu-0QW*C{o_?4?=y_W#@a{{S5!nTZu7X5h)1DuuwT~0n zqO#_$l~!GmkOL$@ z1o|+cKwckf8EA%NuX8-^p*X~gTr|5HA6rOvS;}V+)2{VHtpgACpHKpK+>I}Atw~b| z6++d=FjHi0JtA+2_%HfkGiM9?f;b;@U4E^fSG7l)$KV@jdwGAwUQrf+LZl!Ha+EM!i0}QX&K)Xc5vY;yoLhMwyTWB87S7 zY64g)AGyFj1R&+Nsa*DNnst}2B{t^u+ppoI4lB6P!ofgKi~D*C0}_sKD3pMUiK1m-rpOC7B`O)!SxTe%ciPlz@QD zGa;rW7ZTVIVmW}|fE^G4>R)R~EC=AZ_5sEqB=!VNb#$<4e&Kp-s7EKlFW;EAlaX^p zKSyA^$UwtRAZ*`|v~{&vcr(Js@dC|3r8h)m7mjvMbFD-SX7S##A7io=Cz+>5W2Yus zJ{|_YfcXz1zS}SPE&n7srwV=pN3f{0b_sf|V<95|2K<6rLg z&6!m$)6f3UR@zle4F@j#jHJQMHkU5yTo=30X>C-MCYNbt0nOtK^SsKgjDEh{WZrVd5BUcc&CHwRW1qc?GcS4j58{Bq6f1nZD3J74W_S;| z`z^33^tFxRk3G6y1y@dx^@MYygt?v1?;#*P?ahZTI*Eu#rQ~HM8SzWSt*kVb(^D>C zpj!naX$DVoS;>z|u2yPO;O7tQiSa_H{TBh;KLp4qc4`psX=PuJ+&;G(F5AOQ(D;8B zX{6*>g4pUojMRnPm^&~*GQ?SPv23x;KO)JuXWs_5^O5(E4+?n3UU5cH_#BOzdn(0J9FxKox}WJZkc?qevJsUSOMNnyj{KEUKyV6boeToO4oCzNM+=wcJru0h>CC8pk6xdgDLbu2jbdN=j}n7dv7zx#X$V$ zNCxoJ3do=B_H&azNJcLv#+e&>9+6fmlUl&*U@Bmp&u~EP>YhzXyYLUh^^ftp>d%NK zF;N&YP}*gO@fkpD#|BgTuHE{Gd@ESr@uYxEic#AAPnk+8t=Cv#E;aWxb=cLp|~2@(D_J;&uc7JmKxv z2S?0R9|M~%At#bE+og6-O3x?qB~R0hG0$P^(TL$Un^Z@BZ2uu197Vdh{kXZ-2K3(j z5ycdo@=QYCP!BiRFZ(*Gh4NtyUR0=_FStzG%lwfp{nYQ$DCjtuDxQxwC$$W5z89A$|~j+B#bjEQ45r_ zgRkVz-d`$p0;+X9Yy*N(StyKfwbQqUXoL2`l$T6A8%n=O&a*g5Oa`;6ELcwigfbix)9dSgM@yX3CuIE3}NsAdGv+v_kDvKQUBxDDb&}4oE1me9LVt+NUQoN<3u|6#3Pdb3+p4LXo6)V=A=$1U z$sTx%?`Lmou*;;&(c!CD=%ZkO3tqvBwsf$Qh-r`~)M}<2&bH`^W4<^sWsB!&#<_I< zv|o;}ke=~;YZk?fppLuaN-cjcv2p!A8gdkCZk?7T)TIAXRz<8yAn2_gN3XDlP91_> zxtkniQT1YC%Hru&VQn5|*4l+x0268i6Ng#NShr@27K>4A3|EZG#%RsL8@*tr^OJQ> zFDi11$j^NY3#!3$gP}tH6-ng8Jde*u>*4xfG6?TMno>uUH7ktq=NKQ4#kWJA-m<>C zKLv=m#2eRAwas!g)!n{QHM{hSvyVoVk`_e)d0Y-GgrCYC%#Z^4%2pquNQFkjKg%$h z78~Ouqrow;JrFfI=69s8Xnu6CwG;8R?M;T z?~5S4nbc3D9Iv*SJTb+fho|>KtWuAohm94By|t)IThc4C-=Jd~q^+yS$xzzaMRW2I z^c%J~sj$zfNH74t*z}jpo&Fa*J2nuTKfvH6Vme@wRgQ+&u@lwTJ5BiI2%<1{p+ipmd*PKVAaaK_s zUsuyxs=e4Cizb=k*yMZ>b6*OZB~2h+gr(V3e0J`#eXdb@#pSQ20a8qtN0n;yjjpplyK$krA3U zNIQbk0%mA$rwp9uMp3xa^*D7}9$4jv z`%75QSt(k3r@stX=7r?8n9^(tULS{{!5w(>89Z*w!k0luo ztcu}`uv|o_R(RXs;t`eeh=dNaR4(!tj27I_pXnx9Wdho>x+ z@>Gm|mYy&#X(stDF$kB=SS+R;4xGkS&&O$E#ZP7moR_aKbV}F=hMRHI8T$A3FOKRQU=oxUTmpRRZ z6J$d?|KvK`+&U zvTara#*hUUk7GC`+*N-t<(zRz~{Hs_kN;8p`m`KN2D zLne9zMp~__mkd4R!Nhcik3D8cQRy^i(Hb8a9E+@S#DR^*4Ukq1#7U{{}8R*@euFC<7Y%dQybOV69|R484XHW!dsM{n%c0e0cThWdjT5z#>}^%fxeCr-@cX=;^1;OC z@Fzh(6nx8Q7b?#_fWEe*SdaFr?r*%TjbCnOZ;uk2Lh16ZzETsrccIE-s-de{T>EJ0 zaq}Nu{D11}cYY#LH(Pf=1rg72=(0c_aNLv;)>qGdDdi?-h71?Fux`>>y!;CAj@M$( zJFr^l+`J;9v?G4tqaQR=e5BP(9VW(AWsa0EEJk)ZpWZEsgmYGI8FEW0ajqL zak@X#QmxglogG~HClr6*hi)*QWctenvFKoaRrtR$LuExBTzrxvN1ZSE)fzO{{VCjK zda;5F2faE;ZIB-E!^FY-LIleyi$K>o2#F274SlAOXcIbVGl%eN^gF%o%s6xMzu!$* zb>+BN+w!IHV+nxXz)OF1nO+GCe~Tpe%8AUmH@u{NlcV%<1;!X;i&;tr<4A8ZJYby= zcPqvg$O1;j&jfMmIaMG_*Bun+LUpnqkftABg_qkWC84Sud01sc6Z8ijt6%#mehB-v zI(#-(^Dgo0j#0p@F!0;9^vm-Eq;5$0CpJd}2JAM3(2qdh?esd>U2bV~$2a}2BIYfy z+;6Bo2gY5R9Kq>jFLKM}+n}>KxBH|*4P^omKYM%$CZjK+HoFuP*zG+E7c8Ps(0%W?H-Z)4pv*gPG> zhSV`Vaq0f}s`Osbbj8Up!Bq!^UrOCZ!5|+uFLvMIXT$$UGy!1#OXEAj$lP*Bzq{(W zdO#HPhv&O`0#4&=%JxZd#L}~zi&gs*bT-5l@3)THZW-DN_#sq1io@m4>`X%&A`oHs zx}Ie}67K~Uda_PLc%HAk8r9qUyhdxpFh(+)egg6?Rj0hMcC;QFIB*NsrV|+x|8TPP z^{-@1Md@OU26S6TSIzIfaJ0HTU_>bB1yVdSY?9h~nENTo)nE6xC?Vh*=FYc&s}yOi zJrU!4(a$Oc*D|?8ATP*T;;yz8pYwdG|9zl0PRpgrqPBXiLjdOHp1CKd*}23`t(*Z4 zxQ-So%}el~#GA1QJ0p%;poW^76<;$3(%G34s*4ed*5992d#!`9c&{r%I$Fxn$j90q zZ-yX2lA@&kaolvv4JW+Q?u`!;WAS&KF+p<9#l)#74(pr)x#^a!?I6RYM0tW(;iLwE z*KFa=VN;_Dg6qP(`^trwD!xIUd)Pp?a?b7MWPFrA*rh@&S?0=l`*R%o4ZjM}7Zvzi zdnJEPe56@WJj#hgq@Nlc`>qUl)0sTVba4GRqMNg6T^XTp5fS&lri9k3=6=X<>eyGW^A|_9n^wf*;LE4dc=yK(h4tG_ z$3aHCfh2M}PkI0f1U$jNlRi3W^i5zW{u5T(vGJ<(k)AGnuX%^EU0aVZQLY z8t5l(4?vf!m&ouS@BM0jjOyNba0nsi9s8;2%_M@+-1l8$w0L)IQE9c`0pQnF_8t?F z)O^W7pyzE<59=ZTIo*nIlo%u$#OUH-Ei{Z&w8t-qj?L$6O=7^-(33Ij*#EYC{Qrkh z|MP}`b2yN{&M@nybAQMg_h97?^xl(|6ajb5_UXl?PDLA83FPO#=b86}NtKDL?xq_F zHfP>9>bS(QEG73Q`+Uu|qxUO`tMPd%Xrk$8#@k;vcg9Ru*$g5m0yea(nQ+Pb^WYGy zSx5VOwbF*%F+o^YXKv-o!Bh7h?_v%&2%zZ6gt=|Kgm^j`N0F0fe0IwO1)+!OTE6D1>pKhj`Eu>|<-Z8MoUa4FB!9mhWi;o~mFzq$r)^pX9e1iT z7T#AyD%L-Jh9cpacA9?p`}c;9FNJr8nn*JIoru&h^Tk})c!JIF=zolM!H@`9S1gY7 z=}+S9mnJ=0*MQt)+3?4}Xb&gbh*7m~p$jcI95Xy!xP8UvbN*O#(z~KjB?ZIBGWD4b zC5&kUqv`1q8zpeM8+kkT{k_e6_f9QM3r=kFt z9YWJ!S6@>U@Hrh^zo27g=9{05n{zf_;G=ZhdDqs% zD*-bV;h&}z4}+q?389M>Uk+NY#?L!=$rD^cv>Y9D%5v(`T!g3c1sgULi}Mou11*?o z*%aNVhT}D^JzlCBvw4IIV2ZE69}kb??V|oYJWB;j%`zsZZ6&WsRK$RIO}sz8lZ%h$ zYh5_|nY3^RtOq5RJdFO$K;}qv8P?02%|0%W7<-a#{R1>3oc-9IsN(N@&l{)S_+igI z17n{d=G|k>vQmHY$Ik4d^heDPdP_|+t(g>+=JxV|C8-1ThP7R{DI1%+&^*pxbJo{a zeTU+M)pX-@l?%U!g`%uSEJcS$DLSWq=-JhGf?8PQ(ruQrwuJ|`3gtynt~P4T4{>FW zPqKykzA^;q-nZfZpx8){F}y^$0nEYqREUbv(gn>isj{>9n^`Yx6}03HZ~arM$UVM_vKJm7|@wIG4B8T-!+ZWO4>(|10&OZ-T`y`Z{OVbH9mx$6z`GuWrU585l zUQF)pB!{salYeqZ9A0whzeusi4!0KXoab-+n^my$>{r~|6q#X42u`2K(fS0m+lW^Q z{xwu}=}$I!eod7rc{u83vYd&09Gu66o$%z>LQbUEp-ZiRk%1Qi!Hud zeE6T@USGZaCmHAca6G97h)eR-Wa7V^+29EnxuN7dB^BO3WjxBHHuN2>C8z9)h*aWm zz*_-sZImIeH8k*|5@kK{X2vMI{a0xZnLTLYt~(n_*CtRA;a6G8*^HpqRU{KY*e3&; zB>5jj^amq!F#M~fVnx-{y?~NfET879hN$b7V0E3xKQ1==pnig(o;|5)n7QUwkNYdV zon*Q~t4>|bU?~w^cDz|z;yqLEs^m88OtDS^#Z_FRqOuuAx~gh+w4X4)4^o0p$7Q$- z&L1%@O=U>EY&tgPAt_dGSa=QX`O54G63_=_spGeb3t-_vDO^pn1sTk{Q_g0JT+xC) zC2~W*Z4&CgFS{!j1VCTINTPM7TIxrPvG8OqtM85|W4%I(_PJT^WssXzaYDMY8QcU)98e z&-KcFGuI@Ws+;|X>Xv$aS$LeuhQ_tqlq&lryMo~i%E5`ApXV8{)oG(hIbF9Xq7l!7 zgjNx7wd}1O>N6_#HMW64zuxl~+Xh9?1@x*BY8KtR?{8>O;(^|Uw2*gdN?QFKn*B(9XVZE}7kzdBK?c3XZ zbUu2l&mILLXN!A_R~V?x-Jp-4R^E|%>t9@aILcrR;J$o&(Z9QaWO^2?aL&OQdRH<$ zM;3wJlkT=Nz!;-te?&2S+Y&c%SWs_`eN?9d0il1F8qF&H&?pI>b^yonW}u(Y3a$p<84y?Mx34&PeA>84R`s`kew8bW%~zAUP5SbAdl{Toi#mIj(8aw7n4ziE`~^8? z!LO}GwwqT7cZ(+gYecFpapIf#>yXKX)a}KPGWx2VdtZ&SUGC+E_X{$P!%}@z<3dy` z&As@At!|^I&yj2TeM`}Kk$5G5fpe#FaWWY43I5uKiX~K-XM|T_ZhYA*Mg>#4KR_9< zteYm0>1R?mm1jQ>8w=51z@S7I}NQ<`X_U5BeUypEiLIWPS2p zQW;dKecmLDIA3;6cxl$OfWER?MJO?QCCD+V^nP6{_zBy6wNPGdG~W z;y%jNxnr5U1QR!2za1|YF40TsG89J^{ov&!yx10Hn0csNO|Oq*9q|5tjGg6QlmFj_ zRa8_;MY@$xQo6Nyd;3)8$s9!AT#z{$L4PccF98 zPP1<0stWS%1`6wcZ`)hr|DEm7xJ-{vS{HZUpxzisTmkQ`j9r!S40%8dc(-=n;`WFa zk?W4-|Cl7YM%l&G$CbB1+2|g|m7+NtzQ9_k?l_v$d?x#WI>72qN(&M2W@0E;a@O?Z zocA0>5=BZGeu^5N*Pqgb-g}Q+)hNx;SD){oYc7^!Ud^$g{+v{ErV@DdB22O5b*rwO z*)P$3r(&7{zckM$VM2#XT>?JXt>bhVg!CE<0t1^t%5GT$4HLuQGv+5l&?+VqW9@z2 z?6M8<+G}Nu-uSfa*{2ox{qDu4ZL;h<<)bTu&31Gd0CuT0LJxkv(9#)L5^(wRLA?Y` zr4*w4hg$vI9B=5KjTB?Z*=qtUN8xGgaxZ-0( zwcW^f>yG!wr(2g|N?ZLx)_iw@tFH(B>JA*i3Ylpg82M5D|; zdL(!O5;cGZCuj2FMfu%xVvg@g5#J!AT5YIqvzhXDiCiwthr(5!wy2iiH7Nn8QC{5Ez&836+zKSp+Gxx(xfe2=3ljNwM?jncW7>Y;xx2f~M zNlFn?8o~HBxjp_k5VC5a0(m^mvIkoG=^1i;HKXsjbJQp|X|&65ar|`O_ay@~z=DNt z#<-HBO8N$~7vKTf!K`HV)6<6Endf2gAi5T{dTakm!cWFG%b#q1t+Z?e)qlNyr;r~t zwr{#1GQ!`@ngp8^LSVfF_Q~LE%ZGlzCjsH1&=YO+Q!s#MEn@4u#^41eY>7q5|22C= zq-)lr!;rm`rm@zRy&?2bY|WN?kVv#=sh1J@?HH>pyF(2u>4H0SXd$7s!3T3ZB$L`I z=N}s=v$Z)SO-VH8LB`?cM<-vGtWgSYpalNRWWTh@Yw+sT@Kc~*XfQA z6guci22N!X-V?(AINZ9Xf#_m+R=mGyh<~I%Y7W$n7MM-(<@2f2yRSN79Vh7wkllPD zBhj1!Imjp?TnAf>f6pod#b~dk$3GU43-QOa*({pdJ-u?hk$%D4`FFpNM7-3Pv*EdCwJW>z z-|fJ`6hbm5UEE&ifftAhFjLJ#{XAM%>R$Qn@r?5NM@H#kIK$-&YE+99W=}mR{dT2n zz}RghKoMXgq228e?jEk4ANpMm!_V&+v7iX`5AT-w*!0Jp^3g$;!w7q*xY zxm3?s{*3@O5v!cFuUlyE^2?HHz_>nN7J90BcU5siw|VwzPpopGWm!7kfdWX+y^4KQ zyNz7~0&CrBE~T4w?RwUz*;<6oK3Vl%Z69lgRAjOQT}NiGG*nzRC?;M%i0MaOnXh5{ z_el-EwSzN0MvXrAv29MCb)^~5Aqe|`Y1{P9x^V7*!sT%3hfObF<$)+(l9HhL`U&^- zmrCB&*GC=r4c*xp$a(f%F{M|#0>}}ee_Zy(fgO^NRgoO`*DJFkFr-^w;8K`qw(XI4 z9Y?}0c~AHshHuwOdkh`H9s~pI$T8kTs5l_Csb23`uGR^U{}1>!IG)b43)Vap!x#8ZzN`Hp2eV0_;_P*OGK83SIjd-OtxHgxfn<`(_&5^MKmFGjnfLw| zyV)L~FQj?0rhQyHv;X6^7rXnIs>%s}A+Hl0BeD%1e93TG^jb{i_Rib7>zZqV%e84o z*=&Zt;xq(1zpq$#U7v%T9s`XBUxe!NnYNaO8qY_O&8|r^C>(3|B8_LyBBVyeAjeOY zwegC!n5#EeQBFtHpkWb|H0)~on>!Qzv9bI1Dci?wXhopT+P$PI6u$2oHRl7=KEkH7 z+N-ApmS@wL94OvTr9$jTNB0pEFO^YuS$B(Y*Tz_w$-(2Z2?IRjG#UpB;yJF5k@GD|x~D}o1{b4)tU+gQYChW)PL$91xff>l4$n$!jur|E_Fl>@ zXhFb{lflP6tyb8Jc+0(rCe5fCtprM#ah|iSR~;Ot(qd<)J19Qe5m(mIpHLy~I@F(s zDucG~P941UyHH;EPQ$7rdA}!){Y_?RzvG0J-c|IwwBlyD_2_={L-XnwHG|tTPWz-h zua42Dv_q0g1qv71?Bfwys?*~W{4t51{Ln(pY5J26JnurRYD(3V(P_r%4R31`ugH>M z4cjipWJL+@H=_OscF>q;)T78RtY|2vQuGv$;|v%d!a0as23M7b&BADgM#zgVQ9 zBP<)W%Uu2yr18AHF9Fp104iSW4-R^7?R&2)g|zN%HhnRyC3ey5TXn!vjaYgAIHyd% zC0GSBJSkZN#K}Y|icNe)q)|_en4J^dOPlTAltoah-K5@w8R|aERx{o_oHsEjT|0kX z>CV>Lw-dl=8fF`@<((~7tc&?6W%~uCCj0HfSMo7la;ik*YNn2CDG1>0MbVuEuSgq( zMwDFInv93a5m9(TEwumjpEH}8&zJ8~el?2Zu&z7<8`%n#N~o^2+T`IvH(#_*d*;y5 z9L(t;-Z^Yh*!ewe(7!Vqq)_$Vg(;+=rIey?D|EwCBfTKkCfP#J(7ZCZ&{_}E_b&AQ z>?tv(+CX}2zGdgAL;x(sr4Z0ijmy1rozr}>FBbo`?W6l|I)wn>i%Fk$7fQ%LK^#A= zG7`@2n7M;DI~=3;qnEgAu0$a{!Y#mA9thsl0e)vSUQ(5U2?Xy2Mp9>2f1qv@Hs7q5 zxt!$#R3GRhW5PKqT&P;8k@;9`S-MnB$qz%lhs=HpFNjONLIQ()my^Cj@9t*LlIF_q z+Ic>$C!oOTd+w|q$AYNhs&v5kT2h(8E%)3ZwPu=h(hTDYTRKMzgk6Gt`p-;zYGTFy zw6DA-`omV(kD8w5eNNWIyRkcgq{ZjeuGxEcHj4B((?UarDc2I`GsR)mZ2mQWh-M#- zo!v`ysLcz5n2>Z$wOw@cdht5-N38k~FA-xx_4R68WoA=Q;E>ea^u4Gm<9OFGcmq3C z=BhLZURmcg(wt1TIU&M?Kk^49Top__U?Sv0>ZMKAtV%;(;bu%H<92>IyUU@uW0CJY zqqi3Icz2Bxcs_iw!0v1I_eyQ_YVU)uI!a`MEJ9E7F3OgTcLvOn+J4>x)ltN3C}t%?5)*U}-8;Tb3ulClwA2>8Z(O z8c^hpCYf_Iu1T_swOhx}y>#mhL)MJkl)B?DbLjL8@b*+@bMU6J03wM2Iwo|gXM5_J zZxW$g`FW$4dgW@QL)ig)RbmJ``YyQD*Pv!E1}D z9Fvn9|Wp8>N?>xCiWi=1fBqrK@ob%<_O<>|O}uXP_KTq^1k^ zeMLoI#a(`04D3sY5LXE@q;GU`$@5=IB0TUzMj>yoqz9d|AF|5LI$mPd2iJbEF|;N& zmK%E+Lq6VZ!x}E-^?ts}Tt!T@-I|ivOw8;-)_R5Og>W2@3b%Fg3ap~OrkVhspl!;5 zVFE{So^XpLjUH*Ue{;{vp(W(O6V_)a!tVEpM=#2P8mIGcEf2qM*L2T03e6J#%Xo#? z8XJv9JAI)%Anbyf+sfs45-N+1_YZY=MsGs9Q7o@K3+BFy=BIUicR*Y_8+Ipt_GXWm z=`~$YA?B`Aqa+kt-k0D|(ijj5TI>h6xW8rTKE{JXdTyq8sQ+$x{6(_#^1-F)LJ! zL(a*d^jcP*g~R4qq`h4>bb>pc3kHX=kV>JMo*=xPOkw-g7z}QqmBDTWYeZ5TXYzkv z+*hvlRYsZ)Or24oo_O!btUWkx6*h#%6Q+{tJ3;@hS`T-qJpz^f1pOj}3YJPyDnj{3 zmC28pdwN>`7HxsC^sRC#F{JFDghLv-;wS}ytLh@{zufiYfxX+{bj@o74c(1jk3-^| zJd$mCB#G7l3xOcCi@OgtLMlI@pZf%xPikx@lqpz3IPcjDWIA>4{m}veKJh;+ z$1(Z0!&*i|^@|Q<%1Zy!$Xo^m?`=2^hE0l;w(60-C)fXN7%weWU?0}c39@M-18kFt zA&Z198k(#hp4j}Ge3umnfWcLOF*OU2<$9Cg14BLhS6~*py!JuL^lw~N;P(KxU-QQ3 zKaPsg!B^Dt7QU`}%z^nAGII5Y^27aqw;yjmoA_2|Jeon6I!COX^Ao1ZqF9SWCd=Nw z5!{I9$ts-49J6&J*F!Zx^Ue((?WN~ zH=le-Q*``iO)y?#L@fKnb6Fnz$^ZClP!@;5tRGW7&d6xXv&2OYlJer8CRCtU%-~Wg{lI!IdhHyiZ|z?!kAxy=~j}p zZ-bNwT$r$iRK@wD*sapiN1^FEIghlOc0&a5si-fXq5DyDKdu%7BcWMjDa2f4?d#O- zgXM^Vmp>nXLd~_n_Xt~qqna(^hdB;DVhHEj$=iV~Wz4GjUG{<0wLB#X?SmajZ z_O;4U4r4oYVOfoXhPU=8RA_Gex6-gu%*A!G-2_zWv|vMNOjTCH{#LWZgmN8vXP(u~ zJS6+V!Qx_{OdsNAZPuu0>9A3k+7CIAIE@Bc%ua7td1Z=?Kf{^oRpuEy9wiEUeDeeqfT$?U2-EtT>{j>B|A_T+%RL0Ri~ zSgu}3l=~MFJCLCpj;y}xDc7SF~SAhslYZrd)`8)zNvId0JQwJ*?|N+fHQ?diN6 z6UKPAbcly%A`DDMOHmU(G$Tp$|2`h&fXSdeh|i~OvpBUYyLO_{BM$D3WKu2xvsjG7 z(TuorIE;3qjk{8x-z>hgBSF&EJ@exX*nB4emd>!7%sK;>&{u6tnbVH$YcF{~MMG`)!K-JV9U{va}X2VvG>~#OQ*U zm4w~2aTm7^)57hXv{k}AwVv(Pb^Dt`ZcRFg;F^oCS35WYBg?N@Hy%wd$l<2s81fsb zaIAVi_id!U9oySYW6nr9{i@sfc^&%`gsVkyyVms3r!k^Wd7o}@8z7dP6%1S~=Fkq4 z)u6f>qXz5d*1`_vXd4=(qK_pje4&99Mon-u!^Iza$g6*0dPLCX^jHwW2&F#{=D;u( z!SLY!+)&;l6x&pp!oYu5d$LSiXNa5FAA~Mxn9Zky8NxtbHxx^uR30u0ZAtAJM3JNk z72(T)gB{xh{6R9wUjT~e5F;Y&Z0$^-v;XAt;0ws$ z90=$zBrJ8Qr+Y_xV~n2DfbE0)yhx$D@FK;G#?(F!?X`|gvm=%xyx{oHNh@k=Z0xSGynDN@j^<2j);X=MI z|Kk%6*@*Y!SgqdmXiKbVPJ@h1Y`q%h+})CkJI?{a{c7fx;* zP`2TTJ%Txhe$je|Mkq#F&WQM7qS5!yc4v3$^W%(l4Pd+?t~@YJu?4ym(MACskg82p zwaRRf0dD;S*p3H|sUG|mwoPhqQB(veRi~#`>{!hMrj}gC{BQGJpo1||@79EuijcE_ z!U%_;C_CYy@gnnv`PX1g9-#}{j)S`<4J7Im=WhBx3|5!aj;KqgyAg(R zh*E_6%JE59uc(F8eHOda8h7~1l=I=BQJtbv$YyJOAYL|tPdE)#;h76xZ0uJ}j^Zzp z@d<9!Y^03-OmiN1N@h}~Gz|a*-(fNFlia$`A@Vlo(O>Upa%`?nd}+gM>^<1G+^mnQ z`X=WtSf!+#ofarW%?DZu$`&Y@_L~bj%xqtT=^A#F&Hbw?g*hb-KQN{mgpv!8^ki?w z4q;^0hL9{$9D~{`45kY{p}#NWBHov~M@;UCs7`=SjHUjXvUF%zios?%AtR!<>pH(^ zMys?MO#(I)SFZ(qvOrzt#~^VG`g>A(g0;npWz<#SQOwk*I~Q_*D3{0(7c!~V#ye&a zs>4sA`Z+egB5E7SCzG$`fW5-^HI;cQWfvdLmBmw?qwFgwt^)Srd~6N?Raik^MDFia z*8ZL9#PNX2l6bAw&m8M?gruDZm8PcMjDsn)M&)kIr|H#AJq)X&KDU6=}KbLq+l>t8F`=j;mUtdO5Q=@t^4(^X%y}rpMgtZjKd>E1_ur) zlk)M#4SL2#NKOw@a17hKjDkKj($!eRw^EunBI53IP}^Xx&iauT-RP&xDO4hhUH6{+ z5NJy!Vlck6eUMGcKU=w-Tmb!D`x=QmJ_j%qI<%3~OB zQcxSnINE$B?oEmVE%}W7>Dd-ak)RNi6!Gcg+@6Bu%)xqU>8}^Af~N!SsR|EFkL?%3 z#)cy74R#Zc&T0>t@xPBE;}COR7L)wDRlZ`$ukeiqlTn=u2ZOpLlwli4CRD4a8J)9i z)!fW#rsZ8hl=M(4kn)_y0jW*1<4J}LPmmMB6Hwv?|5~kVC9R+KUDg}wN0xRR7!*Ge z718jXEu$AAPv(O<>o46XK=5){)Lskz_qQvyXPoT6!9V}woUrxI-r?P0UC}z1TPL4) zTBf0#yZi1x|Cy1J#X%NKgl$F-Vgn_^zQUQ_Gwl=6w7uTmP^;pnfMKq$=9x^3YHMR> zUL(Hj|3uI^UmtS4d^2jn^Itm^N~1KJ=eBl<$B$-nklW81Cks z_wmN=#vESB|0A>#H$kQvPNE>V+5-^;>^wf_nfx9FhvUTlZPK?&ZL9*R)DE(eGjC;Z zAnJH4yKqIqr1lB(^e6H=s)$j#L*pGmBa7WvQDTRRxdhUA45VHYaHB&6Xp;;VLpNHk zg|)dmP^>L&HGOt!=JIKprSbUw&V}qxE3C7s)(FK7Y`<;<9)47ab6CUyE zbQSmvGLYfwp;*&Fg=K>s*+J=k2fB6~)wO52eiUk}r|~Bnp5U{*Z}Lv?0P31>w5!Oi z6`W$;WOR*JJblY7WPaB4#clrJym9uO+0C|w`dXerGP;bnSPKG!U$gA$H=phaEt8cS zyzD}>1?vGMVCH(Yi{`b_@f`F3<2CdVkuh}{6$YuMC-2fXtXCyoI7(kokyXx}>T-bZ z6!jN*y_xA)fbcFBdJX}JuYSdxu9dSboD}pI)nooi@%-2>G!#u`2F)F$h^xZSzTg#3Z9mGe8u4ewp03!}Xh(AZQg(Y40y^rqoR?;}{n z_-6?zw%K_DVB~D<08@i*g7}^qdaYT?X4PN>m((f}3a(BPFjsGQlIF+#{>QFw%uKgA zQANenfcYid73^>U)L#F6l83e)KEThLyzBBzwttOb;0*_jCzp6$avyW# z$!7ol?6l&E@$R*xqj+6yIe3z!&nA1EU9nr?0A;ffI3ORAK3vrXVnW*XwD}nI5h+rg zPcY2}#(y{gAGH+*el-XF>xs2vnS>*+@2i$!nSeRQC+c!6lh6zbDzc;TFg$AyG2yzv zu&R4@D&v$!0ZAQHHsdUXCDQ8aBnoXN>uY#6zGVoWGob4-8Ufmo*+d0M_ncBqaLXmN zCn|g+6P2GjANyheg z4Tpd>H|j2{8T;_bvA+TJviC%LElH2<08o#8Fu5hyiALFd6z2R>nZP^&>V0Q+!8nR2 z>F6n3L$bw?RWi1}yh+}xkr$IT@yY6xjg$|a&c!F_XugX}GVc2uG88Uet+~>yD^)!> z#`1vnjYQ0#Xs=(_U54wD5L{BtGqvBKN#w zb#PsmR~!R(Flg17v-4g4)GFGm#>6n8@^bGa_*d1jiJmKyalomErrz1tLyQ;I!9wC_ z>q1oEZH|l9s^}||q1FHgZiJHp@!ePY^dfXTaOHOG`nS83x(0~f4pDn3QexnUScE1r zhbh0A)xJ=2%5ab_tV>}g&)Bl$Nbs_f&bwDLaL5<^ay zI}5h8u3d&n!Mm06U#L4=yl()+e={k5{Y^^Wk34RbXQTM)kKf-KFCh2mA`1~Mzp=RrIDMzs#d~!A}qrtvgK5TCR`qKN zYI1~ah-&F8!}tA@kdr+ZD66tDm~zA(f~H}cIrPlW&(akd+UA?L$##<|_xLQie&Ib9{hUPExUMt;xZ<@I}_Zs98QedA# zA0 zrE&#f(c6V074PTExC;xP&N`SI9Nrps#eKB-b(4R2{yx`WaJQQH%J#fd%F)QsR@sfy zs{9nNaQhFxkXU&S6HEccY(*G3#$-u3x&QX-mN#0j#WeoD(0`U&8*nf4+A zI!wv!UM5gN-2y>fnWYK(t0Rx;%w(VY`a_s{Q54~E8?T_T+GjG0>Ux}_vFb8+>w|b& zq_+M$i7HGdPz?V^ZK*pP9s$y8DuU7V1nHEr%?9|P1mM(ct?7rt<=zSH*wd+fBt#W5 zxG^(zZ7ZWL_<8l?WSs^XfR>IXpvK|3f2D`_;Yf`2=N*BYnD641d1g)}YfA$_ku3E-NHmnwA9qju;w-(S{?m-YLY=qr4CBWlFZ>E3-4wk&-oLw*>P z&&*}n;=w?QhIk%d;|wcf#zUAeXm|=^GBhD?g)$w=cBM5~e;{B@i8`>!i};YeWkOTa zO3wPdKzG-}wUGnJj>%Jj6M<~f8S_;QxdV$z`%EcZsS`*=HQv~1i9;tLpIexMreQXz z_08s!PpLJdAi$S*Kel|nLiy=jZ(!qA2Cn`ju!Yq3SH)q2AV~7qM&NoxX_<{yE|(#X z^cYjLg7bvr)Wb?GGLs{d#!dB9W$wLhL=C9@aA|eoC;9|Ftj2K{O$RX#;lZnxSK25Y z*Pd69nsWsv7S$=r~#3Cm&p^)riML2 z3RmtEr6E`X>2wk~SA}J|7EKMG#mSYne_Y=Y!8TBVxR%?W*?;uCWgQ>=;b*`34lVWh za{oAMa75dB071zsZhz!~OO!D_SG~|T5d2BtotvzjQ2GVArt8#`GxnvLAJB(#fqDry z1ew*}Ty7Vx*{TYaj-A+sRMENd6mB2qRp^XH_#D(Cx$(CzWp`iPbI<$q$)Mks=tJDk z7wcdVjkd2{ekK>|V9}bop>+|cR}@XM)T34#V9}xGxQu7eseT-uNUHm82>yA-oAl^V zPF4WCm`^wN%Ke4riM+|i7dOH_{C7V^z)OJ${DuSzkXUCom%m50!CW>D5a2Wl3?ts! z3%H6qbs0!=0M*2m>ORAOLhNglaL4O`>o#lIxz}gxz~tcheNOqVU?00SrU|VwXlK~# zfclEJgOyWvVH<*SS)E~RU!<0B-?N3QFr*KeJ}xA4^m_4i8MdzZO`^kCx31TZB>`sv zx}Gd+Vp&^@=XG}DH;lauq$Aip*B2(n)8`ur8}!WjolTP|$A4nff1;-ryHGKU;_IaL87SmKY9F^EEgq?GTC8-6=y~ZrAHShL^m1Au8WRgO}kgqiz1|y5zi{i zj`))!Uj?739JGbeSTu)}j@`X9dR7pB0#^y_+s#45Oph5F*R`T4E`5iR@NCSFWgJKwg(ApB=6!#fL^%csob;Byh7aAD2%5fAe1_dNYKKSFY7Ih z^p9Kq_&!b*@2d^@cK&E^4%XL<&viBkxi(V}-Rc2z#qYO^*qh~gu~+Usc92E!y9cs} zMm^Rm2J&61_vTV@(BY5Rh&eKZmpux_V`gRGipIE|-5Y);D{t%q{{8O$?XE0^fSncl z;t#z$Osg4W4tvjJqNrlNo&KYf;f_Y?*-wb>0QS{SBy*U9%WEl zHShO5a%q=ld>OWbD?HvMjY56PUkc^hR6c406E6TJU**^tW^$goJEK85_u27uqL26# zpR82R$NGNUyuYY`pWy<*z~Ie9R6IBW={|5)qfbdD-4KP98scLJ_E$eEOa$ z4qrG|mT+sP&Lms}RXd^?)${V_U9S|*<#%3ewed9`eX(o7I}=~RmNsTri;e+-Srg3> zOZRtjoV3GP+M%B1^r0SEGMFd>Lex*JIvL~z>)y{-hta`$rE{M4r+~>R0^r8Bf{)3A6?S?S ziPX#CRPf-ucHAI&TC@-S7i7GCGq`k52+JcfY*r86ZTv?>9P~el#Z&Vc=<yX0%Uyda62PSplbPQFc2s|- z_^Rh%uRFthW^^`nC>SWJCmJqHdPUgV&t&V#=Q}{;ePwlK1FR^s7pZHXoMI&(;y+kP z^Je4(Y28GA*L3vVPjGs?f4=l0>yGmEmxh73J7FQv=f!LQp)S1-B&SSzduv8M<)#3{ z+tOt{PQ5WqPW=VUgFFY+~ao-`d}o$9{pCI(bM=%=m_X7(2o6|G({`m zoG82Qdzoj(90#d8Z&x9Oqy$54qoBAR4|ebA{ZDt*O={bK=Y9TFUuLq*S_eH2tz*(0 z54r;|46R=S(-d&;m!8euruDTjoz+(?-0%Y!W+h+-8E$R^Rr$!BT%~P1<%aSU#t!)W z7)d8g1{qd|$0e|I29bcJze5xo$qS=+TbRGA04;~lH-)o@OU289%dSp>EabfD85-=jVtY0GT0SLhoCr+)1&3m4o zybGkQR-Rm!htf$0=3!CEYAfkeXY~jBhb*^7?UOhB!`Z>jA6y@~v=Ea%)@t$jkQ&dN zYt>v&7Zs0HM}^#yDnB%#tUi~&o8SO6K6V|QTp26F7kT{^xz0!X;mg5Yst;nWsN}So zt2YM?4j?2SL(S?LBkHn*@8)|$GZ*9{4G(P+TVEh=8L)F4cXeoTh!JpSxGUn5%qYa! zcq|Q^elbqGU4Je{vySqKlA(p80<{SE^8nv{V-rr{b&nh$PJYiH5{%W)8u`m7J9^bN z_DBfH;xKT2#ok8h0h$#2T@Ge4b@@SBh zwDVuXn>kG{vR-kH*P-j!tE>@L{}ju2wp$bqaYbM{e}Y*;$Ro~4_7pF*6Jc_;DFd2? z9xKn-I0nNQkTUti6NJ=5FDzE@F|>SrZ1;L`HWOxH3&Z`SYxr)*fPEV(6GGDzVg1y2 zxGsUmEy``f;bKa4iMIEe2oQ+>n?s?==JV)G6m%o%ld>{fcVh*u-S>u|e1@HUZ>@XZ zgXAfDpR_#pu&%HJBM-txIoCr*tX?+zA6O+!TLj?$dk&Uyv1pe!4Q?1^jVXJntBNq3N3D6i#<=~*aeBM1Lw`hj_l6p+Z9Gzf;r8(T@ zhNncyM@M;)a*cZmY8x|FTP+P{sshO3K|10Va2iby_^@jai*)J8B!wwhE?Lbszk6!V zLCbBrTn(gQjaB~Tl~ypC!D%V|H8D*S2e}&BY&i7U1ml&OIQ}sLRnb7ER_vV_vBJgb z6v@+U!7VE>lo%I<@q4yppwor5p?nOrZJQ3%eCx;0=r8WJ+bl;jJdJH9Ls3zGX_kQQ z3U^uj&v#?|_op=IFD1^-EpeYI8qD##CRmd*&4-TZ!Qi(HRwG&qp7-K+s0KK3?w4`g z_W}ZMzdtoH(R|P!B`s{`G5800YpYS`Xb@xFY z^iK?HlRgiFP?>xIbE)_})qmiKfAaFsMe&6*WW?ZQ?eEhck-4Ma>O+z$)=gjuH;3rK z96d!XcwHoiYN#>KE~eb(8e2PmY$|(vvhNnC7WHz!DNO#zZepHw+}%lv=t3++Fyqi8 z`EC>@#J?X7JkRvvTn3stB82{1z_c1hhNciD%pv_JVyrkXD2z|ylyLvt`gqE1+3%EV zj9lZ|`>w~7nGM#~t(<~?XKQ@V=SX`k%lC?wavgfoiJnoN`9WIRuln#{(k;%?wZf1t zC5&k8rm?Z)u60!bAS2c=-oK^^iI8UXdRNbMB}gC|OV1{($4n_%2HJ^eZzhMtM}24s z@Orw!_ncI-=k^)7jjSSw5#`rw+^pE0wDH=OE&|Q(po)Riz+^m^HgoOG{lo}9Mgna` zG<86@J9)yNJVgFL=o~t&|EPJU<@X2I7F_-AWEaYLwy2Fi&;&YrbfL9TxpR_Y$l1A< zbl-E6Ut3YmCqOv4{!$y;AJ7uq5KK^XU2f4h;+-^XZOx}XV}h_?C(A7u&gZsWbQ$fV zZZ}VT+cCN5Sf>bm3w#nLBDJ`2HbG3@Fk6k^RqL(!I`?Bxd-tZpC2=+4tCseR|2G32 z$VkL04WCevYKeS9!qux2S34?Ws|qa6##P5+hY!WBPYbbWPi;T;&0HmX^(XZuJYTuD zLsM^mN=)!9@#veD#h)9!AYY13SHNVZXewx_j};6CvD}i4Z#w$L8<$L z&z2m1DH4mAXM^3&+mdO*_MA7Oyoc-|ZnT&xm&-ot!QZn6mmoyLY2$H5!HnkF@Z7&W zg4P^)mRbu}ck6=SeCULP(Gs1Wd9{ z8b9Fhk{m!*knCWH%8TdskK@UMP!)C1iju$NIxX!;kxLw;KGcFwgXT?a!}jWB+YBr_ z!M1)r$p?B+e-V1OLLcH!i9GqLm(vHFAvb#x45lX{OhHkLD>&#*Iiw1`U6$SQtxnxI zpF~5eu!4Y_cK=w8+BQui=b!EI_dIb3mVZMFPZ&~!!CXaY@X}fg5SB){ExCx(QA7v& zYGbvAghP`29XOSCO62rz@Eg-<*~;u1tG)N7`j|?L^^tN=m#GnRZM;Ll%RkN@Kl-z6 zff%0Gn+A9|%rqo>PdDrLAqrmH{BOr{XfyaE>EKU#sj>G~g;Rgnlg4#yN9_%Pc2lHl zw$?fPccRoVe^=v#OPXWiBi|dH(}aN5sk3i`TcMrx2lNECyYPZCg#*;f6K8tz4(}A{ zS%(GK3ERAI;O6hrui5_+)gYc*WO~ZNM~hD!Y;B(XdiTEOvF7koJFgewmJ3Fgl_cKO z%l7+=VG`oax{C-q6=v4Qs*w%eWYVkE%B!6(*OzKlA~TZ}aSSpXBmsyUrFp>%J*BiJKDg%>4n^QA&S9Zite|FuU) zrB(9n+u=dt5j?l;8O|+VP{EetYkkm}nK-9Iik9btdsxGP2M0g%dI%R*V{OV7h2?L4 z_zLdu%1;V`DAg>Mm0>9t?lK}}Z&~?%ra9WXHJ{xS8ka4lwx7DU{3wUTFs&)W{w}tD z6m2U0`U`b~XLhOhC{0jtJn2?gPGAh1Rj=pB56g@Vhi?C7PfdWo$O(A}Uq`Z3^|qh) zgWCy%v7*A`m~6Ab=5Sr+0l9OHc5lzCK8w;$Xbe>halfb}L-))`#aL8-m}TgTaO1%g zm&CY>)jRbeFU9HLk|)J<+i|PgnC=LFSpjLs$6=+L1|!YF9@#A-a-%Ac&+jiM4i^W_ z4R*>eB#*Nce4Zo>pq2P)IPS6ATpNd8Id`e9uPzarls7!T!0Kq8OoLS=A5=W7J{mPb z1kt@1tz(4lawN?8Xubvn|BW3;9HPGx?UP=#3$$volaJd0O+@WiEs)cayMC9|0$nPv z`{+%bj8kYXjpts!!(~0oX)@Wg9(&ftah9EK)kGj?;r3dqdn)zcP}ohWr|t@G{Thxl z5@Ek2oQx*|PCDu2(~279{`JDxMq5pHR~FegfTBA9q@%7_*)7n|4l`eo5U;t}{SSc( zF$>wN9_@G_xbA6cyQo9|##M*NLCGi|63|B)_Ab8~vB5h(YdcPnj6QA_pKM59I^0A& zDmA|uR)X)*?-^*kzmo>a79mQi9I;GeI8{@rlYX1NMdZ^`w2+5jQh$|}7n$Lkq?@r?J5jbrm=`94tV2NO(4ID=wRo6c;#_OZl7(m+EIpR zMp=bQgix8!-e~wJeQ7r4z169gmH+2Painu>eO2mBRdq#q8&0;#?I?24cM&EqyvDw+ zM<&tpY+feT%}+`|y|NrpYh0WbC=+or7U~ zyujAY=-RT@$OkwZlMZpKfyVG{Vd+dvOMBo(GPkTDit5T~0yN2Bsw|y=9DP>^8iRi5 zz`rVJ39nJI(d%j1O`GP1ih}hvnIw<`5#Qtg3O0Rkn*5O(4r{c3flY7!b$lz}bRTjp zzsiWN0T5h%)7P$@Iu4GP##vr7hE@rSt1m=y==+GB7i94u^;EepG=i|PtGkp6e+aJ> ziz+mx(6or=@<3Ixe~YTpeHwr_eF0PtHFr7L!LA2C*5-N}n%yao3}H_#E@k;xh7rb< z;Lr>Tn38eA9Ds{1q}|lt<+jLbqbB@1m-J$Ki@dxQqs*%(z7=&6vQ0_RWDUVzgq_37 z^H&P2ODq3?a~HG2af>krbz(n0Y&uXN7n=XMFWmQ^sC{Xt6v0sRz;Dh=%SK_d)R^{& zWL1xJCS8!3wq#6PNOoRlcIanDT|5j=dA+I!Fs;tjaw&Z?n#F; z0q1e4dUu(j1X=+=}ZRGa8$;h79)OYpt1brI0ywV0Z@ee(0z zU=1Ul-)KCRMQYtdN-~w{H_3rRm?tKh_j1aH_1XlFY8vrW zKY+iivyK;sd4J(qp=2Yka$+Q}r#vbp);aTWxjVrWe2$dhSEhb_!%+~vuXjvtY;d7Q z2=)`$$lXnbacB13=Xf?m(_6_U?9%d_K7W;=G(K?e>}X{Ez;GIL676l709m}!xUx8u zTsd$?KFd_VAC2W;PlAfy-w(2wZ0x7CY$XP&omx*QKkC%T(Ybc%#=+xj&D1^ZjJ4=( zt;uaJM|m9A@K)}5iZZy?w;`qN?}*iDViymLH26=_hJtsC`~L%nw2wewN3i-9H zaoe%N)rPVOrQ(OtsT>GOU1G^k-WHUaJv>O_i9g*!RC7?yNCGCe!>UZ-358&LypVdi zS2@`qx5uAd>B?Bag*G1)L<_@9o!~$C)mo~qEX|HNeVl^4Jcp7_#S*9^nNOe_H#XwcCc`0njn(5pc+$ImnqHkE|}!f zC%G}Ukf>piN*DfdgI%Y=rlAdb!{Aq+M*!Mf!MKq?vpm>k7)D&2N&e@%{c8Id8OaKw zCtLGzB)JFees#ic#64JF3OE_V+h$7QX}JHEB6LVD*+#7~dvYQa`9z>=nK=Bi;oVYfR7CnThKn|v{ff9o&t+wTjrB^0-&R5Mz=O-49ynhQ2NA( zwTM-@>z@W|g^?plmyx1TCc|nNz%9XdwHYs%Tvn0Aa7($oG&6@scxM&r3)M#L0=yn- z;t)HfrO#J$oR*faBNyZ*!(5L->&i;=PqQL(-1`egzgJkSBvN5UZO7XF|`e*Y(d$uXz-dWIec$iK=w zLtcd42)Ij>3D`T$AO(bJ+3?j@;kX)-vSLvhbUXUptT(P}UzIDKzqZs<^z#m#K~l%&DPIsMZ!VxX!0 z^^erwXWvI=k)A}VW19NqFBfR`z_!v>lZ{V9&+1swYm6T!{gt0G)s9;zR5&@#Eak)5 zsO)PB8<=4w-`sra8oXJfe6;`#?Q|%81GdjJJaTfogtMz2IR;Tx5$x&wk7(5u;8(S3 zZ66#=Me56{105_v`);Fl{G(rxAjmxvo-*>Hc>6S^7GCV3|BlcAJMAi4m{O~}tjd`8 z=lQLE(gbntW8Guqwq*rU8~O2re;c|$wud-SzZ=!pxug*L^<)`4}bM%m<5pEWd5Hz_Io+XM7(hTPb?qsjOSYEXwQ+k6PI~@7TW3&r8!U zHAcx}dj1DpK%&1i)a$$F+c306F6u`-yOLq1`RV>68mggP$xU0_UtviHR^iTgvFhaE zxP;++l9dVSB@ElUy&infV8yeX8Y`to-I#`2?jxJA?R)uqF5#bAk&{9D$!4_8bE{F= znHg}HT=}P(IB725hd_iQ8uOB8V$uHr$0gA5K;tF$K?f~Mh7lNr=ja)p$>he_AC~zO5+90?Ja54*DcS;-mX3&BK_J`>&r4rnZ0)QA1+oyGJ@W1hQUIAr6_EM9)dwNk$sb|B|8 z>${@1fnu*~An=qK(S#nj7v2Oz^xwL+`~ABH7Z^XlZOq3#UZ@9fF*m};O$+NANX@7p zlA}Bv&;lm~`2#=mhDpO7K5$vX{rK!gF9;)J0*j#eONT3Vsc;M-=Q=W#gT z$v&>u*8q$w<>fdD2g7-fdmPoj+sJ>#Y1L!bBV4htj4Ll3H-X8Rm$-lT=@3fC(@}Zv zBFot;TGz2hY{4_|__*$9R&;6S5Ath7X9C}t+rTKz+l!pA|HHw^=rhp~cuHPAi~Tfx zuGRH5AEIYnVj{0Ta1>*<5%4@uTiHr5-Ad1_bS3K^F-IYPZm^NqC_l>F69D7Z1g& zz+Qh%TQeSyVEyYg%?)!uNM|N5Tlgh~#@^z^8t~W{y7ELkGuvIz6S}Mf?+ddSPqrUi zbhcAhzlcv`{)v;-fx||XZ_9j14me3d08FUXm;TM?m@oQCU)Cnx91s`1GcFEbZprWW zju`XpdySVjILSdzmN#Ddcw=n5v~01aRX+rDX5S_@RV?N2hOhb1*N084*Qh_igUU|o z`?@}vc$4gI{?=*3*N^b8EE2&~&_dG=-mQlZpzBz#vEA>!X9_6m8Q=!I;GTzy;sy}a z&1%I+%R~}han+V~*cSb=9`KDGUblk}$cVkd0k@)}f|vVmH!j;NWU%)qo0``gM~s?Z zrk?x+vMqJaq$ij@W|N<$ed;D#v4Kt2y)6HtA67OFG&fUtE!HZ`Q?qTVeih4qBbazC zee3ptd!F;%*GUOQhkiAd_0griK$`M>rY&HbEq3Yp_X;~Xo}*UQ&y(DH*iIfl;KcZJ z(CTP;cmVc4Xkb-l;17o0u!T-(R{XTa2Nx{oS(5#*4r`T9l_yko*>qgE=cFr`v$@CG z#_-wNG$wd6v>6{PXn?aG?i~Y%9P-lZ*7f(xE9sY~U9v*==05oYo%XN7-~5994WngT zAP#p658B|_mEH>$B&Ol}RXCnP(P5H|JC(4Rf>6S8#Biw6vU z)dk5gjqDoiR`Lz;8_(zZ_a0-nOk#jJRNN?@s^1%j76M0UOWSZTVUyTyxzBzf>jA(T ztPT5V8jB=ZXW6rAKXQFl$Kc=b4+ozuXt+2iZ0Rp0EyjFpwhw@G@;e6M9YFJMmiB@B zvBbo5U0Yk|IQV!3bpGP=TAQC!S_PoEXCa@ntPG!3>>|TC$)|h;pRdNNW1-*m?}~?s zR$=58;J7dKh_3avH1v!igx+rLk*@muJT8D!W@@&?lKV{Og44EqW(AY_@4Me^LkqSg z{W%;$x90~;`Y#4*uj}>toTRsHpJzMx)TjJ7NYjeFYjh2LguO1~wPHW`I>Wo6bifc} z$#^Rr9Q`#byjl9WzS>%Tm6xAn^{J`-+|CU!Z)mrJgY6e+TXb`*-3HoP-4|6bqI;JZ zTOXVuQYgY+)_Kgn-E;HF?%IgusefM@Y?-xkAaT<9_CuQV8^-P5nHd;8IRm*%G~Q z_HsZq+u=6vmp<9$qGOrYEcu`j+~@g2-OD!Z;kKncw1@r&d|6nbKh;U~43nqJ3|%^vmN;T?xG7^LR>PV6)wD;&bkMr9b;0c~AL%Eau)8 z80n7WmQM(X9E19C7ddW=_)>fBzRDT%dg63tpSQdh9hnGvUOK#&Gl~%8ZGFIQO z#*;f-7;1bMezeo4d9Qe4@`W@2)zr4wrhU-qdcFVn(H7i$G$Ai-*=LOpCp-`t7vG}* zAvj`t&oYPK=XL9|o|tUJQZ9Y+IrNk1-*z-E?{0KJOtX#&Gis(9qhPN2>?Ec_LNf zqCoVs>e8yHhQ6Z9>TEGSHLI68 z#8&t;jbu0qtt}jALYj=p)hF;h;T;vU+MGp`^nX70k1xNY0_{=yi)@<%j>sm|K-(_2 z2WN5==b^waSr+2DVP3DKWt&}@bD^`m*zA5Rwm&EMmTvd zIdC;QOBG*v800AYi@zc>BdWz5ndO%6(*?6;%Z=-jJrg{q8H-hasJ=KinU{|#11;=u z-_YD=_m)k&fpg99rkT}Y8;$6Sv8%J4HhCbR$ZZpc$;h^#;z(xKQrj_}2h7B`EVnV1 zWbIKNQF{rwEE&gnE@E%-`HpdIg7+S09A4C*NMxl32F^vM*3iW*svRHGf&FTqOVuW; zJ{92eyE65!x>#T6m#d#$*4$6FZz$s%hRi@tc5ldWJ*rN$G-g1~eb4oRfQKKQ{y>Mb z>o^?z032SCT*ixoj&Ec&1I&HiksY5Z-C<7IrH8&fMOU)E>bjsq)dLPz_`myJBYWbw zb~M%V6xi^p?_BV)@~yaK<=XMWjwg@aayt$RbEV8ak31X+J!3Ze;ZwFhUTcsakaNJx zU`LS?#j%fPYBeT{s*{nqO0op=iw#EW-T_4L6psNv;rjb}sXO?_dKJ8W&^WXHjjrzB zIfxpz*kErH=Qi$d;^RQR7!Nq~nptgs5lnpytRphpsAj{pn8Q>7OV-02?C5=xt`#3E z;ZOZv){B;QSF`Z~zWZf0qm0dG@=%9mRCjFkU;r8l>8I9qhR-v*V>?6+>)M6=M#wj^>_$eomIt}<+zrzh z4ZLPU{#NVaTRyHzcmMbwGMFP^tCg#L;0xb*{hKt)jHo4cay>irblgY&cECljX{@8i z63+0s@S?zejXH2N2zA3XsxGoU$ZYh@4qBVK&3FyFjQ_I9KPnGh?OJPJk8nIG=rc0D zw(zTQ=udoV%QaHhm1cj97w)n$LcaWh!*uMEo#n;6`XXZLI8W8!Z;L>V#J17&c{Kpg$)x38c5W{;%12vr0H(D7sFabRcY%vHj{V5@8+6^Do&oEn|VF zlixgkXWBrn65lrI%UPB3i^6XUKE8Z_>3s@i%m4zy(w3mK6o)WwmpB zcM#dwM%Il$-yB-a%C2p|(~2Hw!7 z{;lgFzaf*|9}HdYIX+iTN<0&utd+wbLH~gpe$nXSZ~GMV;J~P+OCU(u8M}Mu=Xn-c#>>R)`|udSf4ZK0L5wqv@>%iAZauT>Z&njOZ&C#g~A+>TpcsP76u^)goXfya3YoS+E>8@)bBz}sl)$i)Rc6J*H6UO*#Ux7>P z>)bEIyBB)(ak7dl`Zpt=Eojj&lW{!{vx85rj?a)AHY3U7T;&Nb|FhnVYNLZfZ2vpG zhtJejw5W&DSN>}zp7D@-ZqUz0umc(0SEhA#Isld)iT8>g!_MBm-H1;!qoQoc_51GUiZ!^+wnkqpe~*~qYv^9{x^Jp`5Az-$ve?x3g4uIIcR?G52qgLa?sa@jr`L$=?8pQo6&V>$0=})c!3ig zZ(hU;vQ~Yt*#8_l2uKD_ zww&!u_$o%WMED&&a`ob?L3eYK5!{WK1N+5*2f96BOc~H|jeQNwM`HiFCONsHhtZnJ zt51xcVXsSNOiBWjm2ywAk-dlXJBY4DcQ%r3mi>AzBh~yFeem;FTU8oCpNL;6Z6`bm z4z&^=_sRDKd=m55L!{H1FxK7Gj%NkFmsS77iyi~7aoi0D1vw@?RayYfxRR}zoLN~k z_B)Mm7=AIIpP+cuaTFhH-@S*7s~?7jy#UxVUbCxj447fxZ(1Idu!3l-)g2!`l0bE+w!`RZXZ7!+7J0g(9bs9 zaZGe_(G6(Oo8U|Kky+6MNyO3W6t+J?TP!lPssg86**j zm%3lfedOLC&mm*%XZ8J20fggEW>W>BuvM%x+gz16aD1*`xC6}B`ul2csUB{`yF4@2 z7q>r+I2QU9+G$f;!89J|=<-Ri8Nh{gL+DgIAO6*VG+nWn3Vf`C*Gz+!eXM4zFPLYz z8k2j*!~r+Q)(Xr6FZa2l@jTNHZ4_uAM&e^ZNemVnZSQ}c7+n)Rw zx7h`818rmP@I2H0SzpgG|0GY;mht6!HV1q7yq-<|OMkyEu`=ES9;owT&ei!)|6)&7 zj$<^~E$CE{H_%9{7U#IMX6!dE;X*s5GHrne_SC%Sk(J*AK48CA2Cnv0d?@v;aJChD z1RTR$`B=PmK{fKz%SB_cM$=CS9N^V)-_ZfEoh;=Vu=yQKf z_SU_|$$Q)la`P+vX{LQ}q55tG({*p|j^&ND&`tB9!vp-bc<)DIgDP(t3z=hxV%LK= zat*~kG25fLAD?`$V&91$AlC&cR{ey~ukf)*KI5Gc=9zJpG-+iLiU#I`aE^6UU&m?%DQ)DJJ_DD5=N|i`clExEzXLU>c7+<`0bRq zvC1u)u1}Rl>IXOZJk)vV(_U<-A7;#(%`kWSV*bk(B_2+f5trv*!J*@4w`h7 z59XiT&osvB;Q*?R-_VsaAGCo|Q<~)WIYm4@x4q8yKafW}13jWJ@h5cdN-ndX!~s5MzO|`emrq;qk$=*Kb4wcUb^8RL z@MI3})92Q%*|RJ>>C`RF28ljB|HK1KJN~ZE?(C-knjZ};Dg4c{V{2QyYvrEheB07y zupFZwp5N5>YW|iBta^hLG5OTrw*Nn*VcL0mk%E3wd#P=O1MXMH)@NB~?(Qq&f3mAj z^LJbJySzW(YDGU)9OpkbpLi7COF+myv;+cHJY*w(faend6k8uK!Dr&i?jlpz+{Vkb zyZI|>+d|Lgr8ePptD9Q-e}R*O?J~O?2v+X(+oL=LZBEi5G*~a6pgWiER zlix?x$b&boU{a~ygEquCIZ}OwXlZ%x%?no$z>_x-sBp4>^J#mJjL-bv`{i5ZC5Xl^h}NWHJl}+OZIjM&$k&UEm*=HV)~$d) z{u^V}gRO0X$q5fmu?gA`JkPz2^BGZRBo(l!-MVJn?}P(VS#)ppciKXKhGyHS^57ZI zgFcggJT}p8`kX%V>`@Q7?5YK--L&#l%Kz%w{^dvriH) z0uSAS`5cP_y!ZVs>v9^KG0Aq<@T=%D=o5aagMSC!3NAf;L8Uq5`E&`6+d`Hx#^iQY zpUW4t&&NrIY~w#;j_9|o<%j35`YwHjq&Z|eU@CmjR(Fw6MP&$Bo8a-;=(U z)fkUMS}8e-s#5m5%AD(qij2$278ujQ%YDILZTJ#i=TDI2^_bf{-oQfYDEDfk6PU#q zwZDFUy)W_5;$A0tYX!fl3la|wqh7B0g2v?;Tk`_18^TxMdCA!M?2zw)k4YyBeo!@D zZ3J+R7CLF*#}>M_wOOtzwnYapoVDRK5962Y@h-u$_k&2JPudJKRjFZ{& zW-ShqGE9%&>_!jQD45|5y5gb!W`~%tTGahS6cm8Gj_}J`Q0u z_BTK@=K0gG{;#&s$~gM_QfC&n^MLtNtNv}}&!w#+oju#pHtEJ$w^!NT>Eb1Po5p=; z-_Lf|x3K8<-JJFJPtUJlSDLG@lbzsWj}ztZWqZPjRh9Pt@>0uId`>@q=UI1^$&RB+JD>3g>i!C z_HE|pN}D$6opRsea|R^)n(S}+-F}4opV)+OI8O zUdlc7;Wl)vtz!+^UrauMDSs+X{)kSC7H|~WTlEv3Y=r21wd>s2{(tg?_?e%``)Xe5 z!$0YCg=+@~dWfFH-~FM)8GPW<_tKtLJ%s!1r@C!ri(PHQXWrEDfvczAdAy~+JN`G> zzkus`t)O<>{Re9bg<)Z@-0C_-=ltYz?8c3L?ZI#6x!DXC_xVu{+-M#)@xQ`3gVmOP zHa)cD!9TUT6YYQ4cDw-lsdBB)hJWnOYs}D#w(qZBGr~!ux%H=8Gm$S}@?P{udmu{l z)@Hl3=7~1N$^utrk37MB?!HgmIbMOlR`PDFhXh{dK9$cm*X#2>+Z5(8-^Vs8dt=Bxe#^W^G;b?m5 zac;KNosIst@k_DhHTKhg)_y7@J6)Ri-{0Rp^t;qq?a$&%yM8|D>@CeFUVL6R>3XgI ztB*d}$6{k`Zx{Kw$^+b=FUMPrTl7AzlYUz1jj7-EGv8^alRoKg)y3g?{!m_5t;&sW zblm#6)pv#|=4Uf+Og_pVj#Iw>;oQMnxi_b}Yy*dXjvFrqd$ey8Z~UkK`hVWN9Fh?O zH=W3~@RGN(J(VBdZ>#UOlhvmh6;ehYTM^x%Fs1K#n=GG zb1R2uJXZ|&BFpV{J+lmOg^(7EKMCXDGtEkmrWx4KmX&p=?Hu@bWJ+%Gk+`-tXQnwP zV>Tahb6oeDA=y1ES37@~`LOW_`BwQoYE>nzveal^tkkP~Wi{OH)bSiV@NwgIj2|ij zj&o}T9~guA_>_z_lX0Mo>ll-f8o0J{d8V0UWX()f^?|4YIT}~^0d4{J^*!}Q?*m!F zaA>G;md{0&T+Q4%ISi7)jrBm!!r3N%WE~$B50)$6^@XVX)v7~PGFxC6OMXcG(dlx@ zeenCD)l4zyU#h*CP1%foN7a{_DMu>@XjaZC3pQmlsg7iTl=5lSHZaXf8+O@!*2$68 zYf&|wtFhRSH>T?f=|Z;TVw)~aoZDr~K0D+*nG@Hk}02COF?4jNOYX;8+f)~bG_o*Kd3#BbtO z76Qem8rIe`GbG=y&-2_1`UWqieKzV}`%Bv93mOGGCN5UmOVFHN!n)dP_&QoiK=oo|HVR||q|)9n1|b6T;t z?0GQ2Vf)T}$ppUL>V-l)j&%#NX2Y-M^^lVve&2hZOWFhO#xx#q+&H1kZO!tf6ZmQH z^+HF!B>Uj-zkzqGH$zX1agmu3)tRvNtJ#A+#$9C#t$u6AdtB#(o5Z`UkM{PwMdi%! zOKA;+`KwMYc#rGp&%73E_#W8l1VB~9k{NFN*7bvty`eQ1t#j`~&X~4g$c!sqzGBXe>=-I-*}yLe7V|bZ1fj=Yvc#MUt_=QhHrrmbB zE2=z_4k>su%gWk=_UgxG)u{1Oi&h#6f7t@(!*bhjOv<>RNuxDC@W4I}og=MeVbH_ZDMqPQ#FRg{&(P~_mU&?5czA!V2(;!xAqM zd54^aJ@)i{On4r&n8zsISd~NgCg1_#>A(K^m-~5Cl71bv`U~12_L!>|mvM)jx3O-; zI`)<)Pxv*ve$`($5fgr%DaQrb4jODWReuW|(?ZW0`Dp1|_l(Hz^IhyRbeh6}ScFgT z<+$v}*UaX%(g1LDJ$h9LVE;7YNm4Df+#@z7!014S{&O>`9s_@Peo@fmzU!B$4h?x7 z^C&S2%NOu5X2)@>df_-C#-I>#alk1(Gijw-Y)m14~bErHwX zgDXT||G#~v^NcDjW|aqGuWjJrptuoy7oKxu!KeKd+|NAp8X3^7$%~eQuX#@bc(;LL z&;tHG&^DtS~KIl1;|eyWq}8=Ww-o>PxrRs6F1De<2L$-hyZ5>}JB_9>5q#(PbTTDS!T!}T+4_8p=h6tiZubt> zP0ftsGVi<6{QK53uUA$pW?j`167mO=cGq*dF6khgF{J|c01M1u(sB)1tiW!b|HOC#ge^YIiEqIIf#KVrA)lSBmNBoG+ zZx->LkYDsYVxE}coYahAaT2dt*D&mb_KL%J8N0@zP${ydS6^^qWa9xlbsK-6nv>2$ z_X4JUA!-i-WT{FPIJaM$EHFK z);w4jb5%r+X@tLY^sEcumrnQs7 zhZR1b&JEFd2cAd765*q4YzyXrN_xsm5fj8dwbiEQAP}u|$vJ zlaX&kv*{=%Jz?bU=3OSw^nP;Pa)f^zFt%A2VjttAH9_~)&~xSM*atPz8D_;FkMI1+ zwDx&FC@bkz`@TC%r#zr?9(qiE*H}j0KIC%XDfZZ36z_H~`Udt0^31-BN&g-99d8V4 z`mqEXUDx^CJp}&|&Rdym_km*0a#j^xo^t}5!k-48uEz${*U>6WiSueVU#cfI_IRS1 zS@~V#UZGEl?>F-S@X0*C@?oaf3el^P4s+4bTrCZ2V&Kf&7fEux#?EQ{X%Bj|vFevNKm1ysXHdIlV0q}+AgcCKsyeb=+|=eanmYDv3(Egx{+LtH$E`_6YgFRW`G zwqGlMxyYjt7=+K|x>fA-YMoR5>*VKzADRtk?62Pu|23ntX4Z8O&jSZHQNeY ze|>m2YpOmRuvHz3_v-%s_kSPXf5o`>^K7q4?urjaFlgNOc+&e@s+o~UC8q>ZiJU5iB3vm<2 z3(j>Mbli*|e;OTL3ngy*d77CnVpf|7dwSLT?&rnOe!9P2v;p(Oc&s>YCA)j3Sw1F)I{@j-IP>KRf0-eVMeB@5egujeC5{(c=z2P`3y?ZRR)G$JUA*{?s=~=(@rwoY&_2ergA2{#Bd+?4e6P(NbagfS;q^ zL^N&lc<#2WI=8@G@q-9WmWTVo&ciKc3w?^IjexA+Rq+4OrYbUHz7rZfK z^19=+elS*f(cdfEKrjzbiw|J*LeT@y;(NKL;DcYNnGX+Kck;pPf+zYzbx#Byum8Vz zzFVaKV@=YEFYhKgf^5{yi&Pc0FQCZ=HZS~uXH0ylwGMCbagi*kz0P6Ct{xhKF5|lB1}^gf_jvJW;F{qDZ&y2;9ROLYoVI{FW$ho=z0Dh} zKqPE(Tdgnp2I+Ae_UQAq>J!$VL~l9SJup80wzRwKyQocK8J}Lr<32}EwI4U%nB8Iv z$@gM@fy(q9ni5qpS ze~10&&B?&ARa$mf`rNTuW3AFR?VOass|_`lVIYP>$i^)p@sNco?e2Q8g+b=N`1BzH?2)fV&13-NN8>cqTujVE~Z zjK8?Zmd5NSxwAT-IPpw<$JqR=%5b~ZH%FNZ_^i+-6s%R;gq(=pwhbwa`1`gsUAGpW zW13zpZ(=6mmpV2q> z(_&aXFl@H)F-dlOp=0_jc(K3F@lL+tNzd2OxBT zt;D1OC)P(!Izr_XW85FaPk3RU?Qq(Eg0*$ZgQ_9_W~J{Os~%t)5=dm{0|G325Z`=vY+ zyzUx58KfQk-t#m`fH6Lf6~018nbjpI`@uQacsaSP_eugfx0%PB?KbHWW3)EY`7;h) z$3Z^mz$@K*Zsbb);_36mi*G>pHy2-L+!P19;Y+l(=9k4B>)*bumVC;|lNn6rZ?Pb`kZ0U<(ty8Zzy$^be#!)y{-&sfB-%qc&aG&+= zEoM&TXS(8{G?ZoM+X!W-7Ni z2Dg>1*-UB6wl zObc7sy{a$c!7=D~r0JQ309bDw@^e_!DQOy&Cc zJVb9e*_#;8Ha-!7;N0(q&fzzZZBySUZ(aEyYn=E)Khu3Hyn;+Sob&U`-^tF`2g0w< z=i0WvnMcko9CuHj?2X(X&nqNipPH@b%5olSU54F$;`grY^KzU8)GM8<_EqI?KgO0(t<%Dvrh{j8$3t1w#guN z7#hLt^p9a@9w;N<{f{*bJgJx#_Dqi>7+}js-SfpikoVVOOJb;RQXPr2dHN1@`A#v5Tu#c*fUu znl5zyeb7^w`_)cg`#3v0v66xE{GYUiJ@nyQ91rJ}D|ourumWo%13v5gS$1|h9pCxi zYR83CL6wlcDw zXca`BKnS4C*^la2xUWqLx-*llkv0}USlGlH?UaeJ!zBk{&YB5z&IpmtN~dw}@5(lE z^`TXg0#bTA`^M?(wZyG5jaJfob0&04nq^iZEBCieW{f$zE-@(~l`}QoiVfNQK-U4Y zE*@jvqhb~+diDE!lFs0Xqh=L~Y@R0k+}gz7Y8<%VgewmNG!oM2$82Ovm}#liNL4w# zDce2Yr&Y`F+#%T%l-A)S>1G}JIWl`#zYjc|zc=Y8Xy6`MO}MHI<1DDa{fxfcW~XH~ ztZs1Xd$y7xZ(a{{na>$xa9D#kRC7($v)MzAxoI`TK-p$v)-_}#ycJX41pi%VaUAPx zVTnsz_tLLsLRBT7dI1@Cyga81A!HqkN_yFG!F{P{XG#0pM(APZQ!=n36V0dwg#%R= zA0u-Oo()=Ctz0=7c%L_7R^u{m(GGF+Gz(|k2VIKH%SX?`8(D}p8CHX*&a_Pfu)Gb*jH$Y>(UH|NqA6yOo&ABm;;5nbNL1 z%h_FbA4yCS1n~%h5A1G+igAM~^8|9-Gs+h!dYQ=6ZMWUl*DcvYuX+%r-;mm|6!X0P z)&hFZG%dVa{vFv!LpMWW46-?{OpX6VmS47tXez%b7{= zdr`~p?Qg4I{OPg3q3V3NAr4Q!g?_o=ra2S7iE1aa{Wi^h<1*@uDJP6=eT$`dlIC^e z)cD0JyW5#OEk7HXc}snl+Aagm_VuyI)S3#4UjB@Jr|j><@I! zUqc#FS&({a?7(|u`oS2E->Yx388{R#G8P*@7v{hmr`wnEBbAA(`}cF+(A;mcUTyH=Jo6{#t-{sq)Vp#!5Y2>yR(^i!m*Ke^5*&i2k}6R_B+v@Bmdo*N_2C^y;WAhLuHq z*n^y(cAi5_nqIK~7r!)V%ma&)cRAN`WOX^mLE?#{Z+6gpFvm95?8$u|-D7^jU;140 zRZuzpH|4y|jUoM+zOKI)(h0!eTA z(R^{0HHne9*^QjAQ-GSDPLl6GOd!)_BtO z){C>AIUj;@;vHod6dUYm2VCaakU{9h#4J|68gulFQOtU8{hPLY;Bnk`%Qui$7Mr?d zx8_Lb%i!7=pV!nY&YFw^>yiC8cIlI@kr|I~R5p%b82L?71ko>wuWH;cYHWFIrVjNC z8Ts?6@hHULP>04-MmAmJ`dB8d{2X73!}t-gcD1Q--(U`X!kEB6=9m~Rb+81E-LkE*T{D2*@g+O{l$CAvF*8;BF8)%u6F!^cVYqa}>AxUamdz&aViyiC z9Bng8s^Ho-PQZ{A=dH2rGQhUfg6%`;|FX%|3j?tp!hZbMfBnCAu|I#xKVwX<^6#_a zYC88jS!B|tLSKOsfR{(Cf%KH#hyAWc*X*724SL9P6~+OIfl6+%PRqIkOviHJtm~7O z%hy*wRL9vyr@oxXQa_`o(7Q?F(PEvrAm-d;a{&(D`BC%-b0A>5*PoVIFDjP7-!o1m z*4g5#jB!ycYx(&WWf)={kg`iLjd-d*Lipe3Y0Ni^Xk%8i_i{-tmEW~@$9J9Q*{ZiC z!(*J57$0K#Pg&QJ7M<%rkNO%w-X@Kr;+n-tGQEVUrLq?K5#Zf;Fy|k(s~=n zbY0hB`Op4En?upK)Lf+SA!l|4Ugr2P9*Kj}_uTG|o<0YXxzJtwNDNdqOk<(DvEX^~ zRUX($vN_H%={)4W_$4##W`G&}o-q$({(w(|Y?8fL`b_O|JZ#vh_Y{8}8}=&^mU@rz zO8aiL7LRW5T%P&3+gA~rF-E+&`_18ZeS3&Q#=PlS#sh}IS;iD)pZ3n2lojrl)pwsS zW2_3NCo`;UG1t#?4EB>oV^@d6fT?(%oz*7>WSo=wX_kBGxUV^$MzSCnWiZa?c#JhL z%XkLka$Q5I{^aAjW~jLNXtcN?`*QM_uo2`3vcP?s!iPrZm^J;Ivb)$=kufXV*)n}~ zdJit*H1{9Akq=D*;fVwKYKp0ymjA6T!=jZFP48w89&;REt}z)h^q_pnAdQ(Wk<5&ikgOUKrWD`NHx%WjXDB5_ZLn zvx7&op%qiZT+26px$mn0j;B(ShwyXopXH~yKk2U?_QI@s9nub8QZx$)Z@R6<@9)ew zJHF#gc0^wK-7|P@K^Dt(?QVQ$V$+Q#SGl+KeCOJD&s53uGcK-6pB09#@n*X^;65KjAoZv#G+BiP;#V@LY$nL)xD7uZSP7 zF$rt)!JcK2=b7@E`C+zT8TDUfyMI~+Yj5@RIG8m^SNM6w?}&Y5`y|Ki4Ij?-zKz|G z2ff@K@AEj`7dVn1!al{M8|_d3H{xpz4^J#HaGr}T6o1g=#9i%$`_kY1-F3a_deHu| z@33K~o?*J<~KHY2oZT-TVuY~sL5B~$A3nBKV#p+0h~JR>RIvMTlaEpz>409 zn`RHIz44EvE#vBN?lXC3Y`&ph*- zy*Yc{Is2@;`}y#>qc05b{Yw z;j?B(yXR4>cCO3O6l_%_#@n*v1t7DVG~HVq=dc+i)w5S&E*clksjJd?@rbm@JppkK@Ro_HYqIMAoQ{GQ~{ncv!FZND#!3vKE7`;d93uySjwa1837rAL>t(cnDcb*3`$Z&ubO9`Q> zxfWHbCtE!*>sI)Pn$9+FaHWlPJe2H75L30#lzn+Y?R)TKX#Yj(J3~nAZVh$j=AJUU z+KZCkba?k~Zh3#%UpZgH+jxwj(>&yk_Qhx2L|mf&=V<>uBc7B)f!&yJ{XC zt(dqYgLWT+XDx}j?(lv^g_voqf9j6f#u-X_pjY`Q+ZQS1qJ*U~1Fu~x`H(%t9^tBp zRf7_jJCkOCHA5IewtxBa<~4ShRzPDj92h?duVt0Kw-AHmU2!-uZI!ikp-6yER8lu(URt`xa-A*$<#d4-g0!&Wg=Po1Kh}hJ?XVt{;1uU0kQ^ja|i4;ib zxphRk=oU}%MAEoDxbEdth`@B|)8pdL4&POmOQA0n4X`>ch`R9>XVAXOXZNk(_159M z>bVRrGui&MxEF$NMy!o;=P(H%ArVg(+}DX(IWDH-CpLsiFD8w4ppdfd><8h+jc3d? zFw+f<;S*D6uVCGFW0b=%;zSC0mMbXLO(KwA2u=cXWSyD%;&v3=)WZ|GjO9H{1-+i> zJB49CC6M6WX%3UJ0g8q2YmW(?@L$}-k4iK)OBJ-P_wY$9T?Wg+oqbd)kl=JbN$GcC zy1+lo27gYq)sb|AR(MAYIr<rO?UZVkj_-aK7|*QE=TGNWe(Tectz^G;omh z(Y|-ji;Na7US3U_&y`NiVA^-re^y+mr4M55GAftEPiwhc)Yj;L*hb{tlQuyQZ@WL2Vq5r-})ylia zd8)gHh5t2ADGn9>dKScVkVT!U(o_ujtyyh~>%uuq^{M&S7s_j5w8peI- z`%?(SJ#Ih2C-I({Jd$h$1rT<3^)bw%B$MC5pD=4F+&)VytQprVISsy;`@$0U4OOw1 zRginMqu0e`k zyMKvi?B+Xr=0u^}{~bUl2JO7Ipo4}(C)vdMo9&NlNwQN9TqqyYi}v0uTSc++NtnrkPm{eH8_LtR0^HD4tq|>M zgmMVb#3yD1p^dj>`Ud>g-{T5WMg@n6k6=ZFP7_ZG9j1Vk;&e$>*NHu3`WEpZYbHm! zLexl2*sOshy|4(&fa_w$_7&}7Ts790F(X}&jl5L5zd#ODQJAB5VbzJzX%t~Zmwm$! zCuQ)9>{k-8;)a;eG%fKRcFOtsAkA;jl-B2lt}3~d=mUUm(&mgN-vrH#g4CwT_sjom zs?}r{MjrO;-iY-p%MlHB^rweHKDS$JR}a;`dGHG=Xw*L%D-JL98!*bKAO%}pVaX~U z1sVFuz0KXYjKd>tD9-o$AzLPm?jKE#B?qrpbnIyhH8SOrQ z=ik<@z)4i4gWWI<6y3Jl7u5C$6!Z$1BIP%3Pw4sz+!&Cw>v16>pnSd`_)gM_atR+A-FJPRMgV);SXEe&?AsI>Ef>nH6m0yx~=|i!VUr|!AEHMe2Wo#S3Zu7bI!)#wI zQSQ#P06QBi^K}eiCfcrF3UWXQ0kJn6mKYxtltvTvPUC5=>v*@nKhK>!C((|_VI;?r zqgU@v8-BM46ECt4?UyPDeXM3^LHneN1UGkTa5RnY&AhLtLjB1JtTVHgg+at|6drGk zIBjZZV)L2RK@Nf>(upJV{YGq474+InD z#G&a3<^AA*I6F!xGJ^6A5V)oI*;hHc;n${L*@Bf&ftZrw(?NWGRoyeIOJeOSnm58g zd_}T>t%E0pryO`m8W&lX)o>qWGC!#9pRzJBV{n)DkN|sI8Nd@#csh%LxQoHw4zsT@ z{GyGK_pB`9b`;wN12td=N8-}eqE_?uXJ;_yZP9(Ru9 z?F@NwX4IJqD!<>#24F%6Hf0=tu5ihN2tkIB0mo=8ymxDP2ENARaIUb4l0upndYbKB z|JC*TmN~Lfv<)H>g9*q4S$GNEdsV zQNMy^K#EzxsH2ZFiN7zW*obwd=DP+m?o?yq3-MO%5NBq%&~CB7hTRVZAX7(CrS8y zaIPuPr^?gq@y}!J=Y>T%g>rKe^RUs)4?92je{edjmUI zv0ku zRm9vh77yMpd(S&a91%^QvqWn-@k^FB?Q{g*Lns^OO6Jt@ckAdu2dm$_oeUbwlK)IY zurlA1!Pn&Qfx-f2*~hWob<+x_J}Q2DF6C|`U;akLrBfg6_F)Bp0B9HH*)d zQ*A41jjU~5{?~lgC0+Hq(u++#mi<2dbkuJYe(MYr>7zkQuecsY;rZ=6IGF`$7OCiA zFXMDehm5Bs!ah6|omuIR8pEn{Fqx7jZ|1qw92w*|i){aHU zQErFuuyUsMhtJ(S$%=vd0@%#&=suGFdR*i>8lxYpb=aqH@h2`7G_zdghgf2LxQj{h z-)=RaBx`RQK^DG19%GQ$Z*q?}3)nSDOs)su7Aw}tn-=~>o9bH$>ZE_Er*sw2rA*3t zH?McCqT6m5(c5&bu299aO2tZc)qmdY`=!GwcOwP)wY?*W<$eljqD=e^yX{42!)f-V zn0*9r!=$F0lr?HKHF0Htqvg^4gY*90J4RyDoBS$(bgL@sOUge9$NpHG-9f~)OYnO1W{?COGg!=4R@OR!k+ewK97I^gNG={T4lq3cACwTtp!kC1DVUc+~w>pfZG zRT|2Mha&>@aCco){nU?-xs1N{B*lBqnxc4nB-*$YEqRqi>8k58^~;o34)$Yd(bwx* zBm5pBPqm*8TmfFebe`6&$S*r7Z629EwX}V8s(~asakF&+0KE5(-B8EV_RO_Hb4vI$ zkl%D-9L4|l2=u<~@wfHuC9#mr+>apF>3B=i@1NM+FyUj=#d{8g4gwi zkLHKMW{eZA8*R9wVKL|pnhuVt*cz2rC&_9BL_z; z)Y%7^YPbIIXFi)d5Fs^VHIz!ugl;aW4figYb*ICW(Wf<5;yX6jv51f)|J5}9`q<_G zin{)mR|l^19f_PM_<<&Jg0lT8k&{TdTl8Dl6Xw3gz9%_g{I2KrbuGkok^I9!e}_WE z?gB5qtL;eTd&OKFKe}C!M+C}*#)jdYt>uok|6(en7T$$D>I^&fgwGnoy?Wq-IECDk+fkMH0 zHK4>W7@Jw=cy4%a&k@Z%k~GIZHkhFYXU!N-<7aG(tG|Vte%3>mbGRRDsBSII4J#*v zH^l5DikS6cIWLsaG5Zovf?(gln<-0~r5%fDWBJzc&3`udE^N8l+-QEFO?5ch`M+k_ z3v|~P5L=C-Y9ACCwP$1oHYtZQyIke|la^5w0-B8WrrG4xg$6A;KNT=;3 zep>xN9o#u&r%iidm*=`S5i%Aq3yFWT+k7+WBLZe4x7^TbSF8WU{J9wd*K?_Cnw=Nz zGmbmb*gUb2k>y-OjD%`q;_Tc){V(F-YNAhIIV0|oXvwQMH}l}~U9e^s zr;^J;Gi|@ihdp1?6g1kYRK{|H{=^k9at}tJ3=7$dI{f{mL+^TbwO7$H37oX3pLNby zc&x*2vnLLJ$m{@SK=Fe91Wpgxm+*!MP&JrUgg*Saaovc}=<@0Hg8<3JYdv{#(Os$n zd$eiVP*I1Uaz9kUds~>=%d>Fn=eHtO)}3z6e`TliZ=wH6hH5WUiCXAKB5^(9O54(# z3bv{Wwg-R1Jp~?cF1NPH;36ZAIds1?98`riuwO8g5%ZJ3iaF3wOe+qz`)!*uq6FL9 zp6A4atS{Uox33#kOht+}vde6%%_T3K7n=??BF=ap8!i2(?|Vth09(lT)JtFVctHN&wSttNEB;xW zY;)fHV`I9gNAPT1s^Ng=L0FkD2bhHG5PK+qpd!lITkY_PZP(nh5`r|n(IZUGv73`} z)*8b558+c=7A2)hr&APVAAwIE%(SIPH-W4KPrb1A!i|s#eP`dE_7F!m1xoFi>dlql zz+jpTf&)SuD9=NbKwOa<=BRKg(3ZSq?DiLNi>*!m{r<#rA}%BeY5*qO;kZk_=QH@a zJB`thkbv%8ps-_agO%-I%fUGiFsKKWzJi#}wfW04I>K`nfMU!5uuW5JMX-K78ifN% z_Jixd)}qnm)7kXR&H`0zU}-hmi2_x*UD8j_L#XCMnZ3yLk_HRkL2px>h=NopeCs67 zw)LP{Gd^@|Z0x?}73`hA7kHn)tzyjlm%X)$%FXwJmp=+3Qx8TB7#KgQsjC&N5@((#t_Go zpO^ADRh8FRM&~U!BIMd=dt(>(GS31Hx@lhsqZEDj^Znep zUX%*sX~Tm6I|KeKx#t@`IW{NFo+HXXtPx~(4I4~qv2KWo)i&?J$QfTA%xRD9o=&^p zeTh`85(}+YxjfzlX4TE@e^ zZq25BGM&=_6p1)UfG2)k``moKWFGp*VFt%N=4Uvgs@ESyV zHaEudfSdklpTNwh9xsd2ZWzjsBWZ%{V|Hg_ z&Ts9%jJmqy_L+MzGktQORaOxA8iO_C*x->Xj-y80`8}f~3ivYLuR}dffrhpm2z`wxH~l>MaYr>m(1BNr5- z3U1xrUwu_olSV7457}K)wf!4n$c#me#kipX{p0OF>`VYM5%+};2f(x8Twt|I(oD$) zufssm>TOT0Q$NTRg&ICL?CUhRXX$uN80JuYrj+Gncv+pwT!2edNH0U$~ey z;6j#>hQ2tbIxHi0SM&=riOv>0HeObI`cZ9UVggn?Xww`EIK)lsKUCBE<@My3F!oME za4G5>2x)HIOtwVHn#+NcAi+V;nTe|`LV#I@x}+aFx-7`i(v>`>cUP5@kJofiL%Jx= z5?|$BsO0+Nba=u;%5DBibLMgvjoR&DE#sx0-NrfBr(7PNqNyp$Y9W}3v~jLEakjb^ zgechTC=IT^@)RC@pN$D$r-=7?0ApNIAem}SJ{<=)T37&2S*THx1iQkn=i~AUZ9{fs+U32~B@R4yuhrW2POvX_~3?l@+i(@$4oqcmzDNG+VHftjBH%5iS zQR7JV>CSxGF7m2+8gHX~XLy)W>>5NWLr&KnHo_b`NiR^G&Dn0 zK3<`@uF3uA7vF_ujn!dK@9L>4-Pi66dh-dz*3;j-wg?(XP{g4M*bA8x*za}_fe*%3 z-xNt9%f}oMDYf?TUh%r{z7jnBRr_cjJFKF935m|0BroGEMW`!xchFLfK(V@()yIV_}ElW^jKm{05NFDLcuu3SS$d_pYIv=ZRc#m*%Hi; z(>=U)!#1extiq)-Ctl8Pe;xmb%W6RwEKP|aX$@P>2dDwAvSGyXJT_!l|wy8q-G?M@}y%)avu?GWn|Zn37o3uHQ9$6~-1A zB;XveEDETccBetF<%<`bU5>=A>u7FU&CWy$Ql+-Iuf}uM(t) zj#SU4!bw}TzZ1Pn{HVSH89|R0^bb5|)yD`QLYRU4>zunOxG&-W@%(a1OOM$ZMRWIO z(Jg9NhTziVzx3ey$7{%j7gjlyIs)S^#E{?_ofTZ*AkVp=$0*H)=4mbsyZ8Ck;~1w? zF^vN8lHIRJhZbqeCARiw@2V`nx-O}@{W;Wb@I)D%$wkn?dBKLRU-ju~+l$p>2I-XS z2IqFp3M~Lran+TtYkx01@+A#~S^MVJU23y9i^V2|gen1@OT>LFkJF6Zj*9p8&m5zp zW@320-N4gVAr+kO$Ob<$Ml_X79DK4mN}aG} zGxi!MA9kBYtU~%i-=U;9oC&XigDYP@T+i5TG+;4}|DLuBt!!6nZtWeAsO~%!LJ!du zm>Z?@FIBchY>6B=D~+tF2SHdE)lyz=rH|^#*x*Pc*4wS=$tp7dy=o1oTJRu~Ah_wI! z5)ja*uaZ7c8>G!HRX^F@KOGHfQy<+0U!cEcZ$QuddK;I_WTs)jZHn?2RK>Erb&D!$ zs{q*N&~EuoaQtA;h%-&dnu&!hnF2@ZhF=(?)Wco>u$TIu8*QihkNB3V;u4P>6bq09 zcK;7-OT|=L&y4!&-;GMRUwOi>MSZy8CQh+4e3FYI>$XYr?XG1%P~E48se2lu(1GZ=U0LhYcOV1Khrn>e%ZS+{-dAF#S1jvFa8LH!@e9;F*jyE`@DuBD}fw z^~@>5o10cBI~v!4yDKw>*go6IUZSsDPoPc`eQAq>gF#I@WUH;%{n5+x;C9en@C2YB zxeGj^0X&GYS>uPphp)5lDvHSFEp;xF<;GU>WK(1+V+r1#${6JaG>Kx`%>*w+aO?_$ zfdjp&hLt{beNH>0vhk@L z=giNU;S-uQQ3~|qX3L7N>^r{wk_D=_q%YDwFl4!VWw`Vf>SH)oS>&LmI$?ifjk|9T zPaLgasA%uTmKk3E_b+uHtfor{5y`N0cL=hdI3BAq4o@@r#lUrSEHE3ruv2A8uM+<6 zs*OUNp#7BI8%)XB-rYg-7`M0X+!J}b{_2w%_bTM5sNVnf^DA(AS z;=$^}s`0*M@bq^&mQUutfMxO|;9{{$XR;Ce%?MX&kyYl>0h$yqPH{guboTTKQDk#u z24uzRREr6hZM0<6S+zO}XVhEqSE_vc1pTplQFFfmE*|VH9?LT}wQpnZQdbSCkeZ&6 z#Z>u!KI_QI8}nx<2R7|XJ@k{H5NKq&H@yhax`GFtSL3=jm^FA;b6sqyBQpz4)ZJTj za?W_e;>Ouz#1M1Sz5%bCllLiGRW`7Go8hX#m(g1p0j~vF7GOb#8r}SE7uh;#UUWhh zy7ho{=wJCSi1-tDK7}^Lb^Daz;V>z*^@&-NiSjj%mO_X@2ZZ$;B}DSy4)}=WmeDHA z-%VU(oMqa;#?qMxe{6JD#gj8&#^$3d0~2AOWp7_kh-%%|K+{kP8CTjUt##mv7OrOa z?e_Ak9zfx2%>S!rSo#RJXS%ympqxKXHF7Jv^LHA1lhCgir0C z@yxLTc$qigc66z7V(k-5`{TZy>J2$$iyjWxZuj;`-TI>FM#|9)DK~%W=X3S?ZX7>yETXKW(GAw1)zGEw zE?f#EBbr}c0O8D5Pl|0kWAC6vtD_M(3O>QrN&kmz#1l+($T!eS+RQ&^XRT_M$u!Ue z`&ekxZ;=flzkhBXi*mhMA_^jxk${XK{@mZ}ur|qdz~zM)Z8_DN@8dCUCYHybGQ!x`zknKz)A`%q5QS*#oQTlgo>KViB89zIJ0BLK^E&# zO325BM_r+DM3G3KD`bExaGLG1BsC|FLvuFL3DU5!tgSoars&RZtdd+3$}GEdAG{SC7C(#jg1>-1Sb^R3Rd1 zy92=z!h`?~fQw$6&d7FsLUC2)FK5q~kM>deot6kPN?Ugf_As@d~E5G+`pd*7f0euHMdkwk>BpKse$!Q$P#?eJ3G?vOuX_2AID&AQxvEkr(Q*>k z7t!=wX{hICIv~2QYW1HK$Uu@6~5nW)jA z^g&rV)26mkuEHqi16w8HJ%`c~%F*NOJQ;;S97i&t8Jp2)DYg7+XZ8t#Q}m^!sWml< z$t9R^(lgTVg@J)aa7}SAOloq|dQ5tIP=CD=ZrAM;2-N7yU_ zZCMGEoNFf}YeBw~$DVGLCf#dO-(j~)ULiaq|5b9dmfj5(ncVg?h6jbLPi^X`+oDq7 z{R~gLp5FCLXl+W3iSlRF_&{u?o$ZPizI(1Qmy%%*bsCp^V9xa)shjXy_wp;w_s`E%q&hjBz2`@u{!q z_+PC>6$Y*8pIrR^HpYpJu6w2Dw=1hG`?cSvIfjq#Txz__8J%Nz8*yPG4EZ)*SQFu6 zDA*u`2n>(6WRomqu~sN?Q9bapwbUnX1h7$M^DSIeM!SimC%iKk|k}cg<~Q zuX7WdRZR~VN2d_lp0t;tWz+EG=q5!TmofKYX@FeXvJ$>cpXw7o-!vPhXi>v2Av- zw36K=(e9%7`)W7g*NWmPk^UNNFXaagQjx*n36%*x1@fyro37Dud@F!bC#&?&ZJN8y zGoRTdPO?qfn?OR=KQfH6+Wt2M^>eSw+u~o=HW_tqA1fEUCRze$HKxw{I53E}r)=0) z?Uqig$41>^<~dPzeMoE>!c64FUv%35jbCZjEAs^?e7J7XomeM-I zbj>)CCCG9^`A{-$Bh!7_*GfFRgH{1THadp74%5I9N ziMS#;jD9V{epRVF+wm~Ih6CCJzdb4Y0HWKe+dIHL>jy@f*$b^uN~ngYrWvyPfoGn_ z7x3YlgM7`&&*Zz~1Dg>>B1+&geY2o*yO4q@nFTjJG6w~;n_)c=%x+;V*N=-+6{BWXL-7;V#VTL9cc zNcROxWm$ch+ORu0hiNrDj^(9a+I%ih5LfMflwV&6K~lTTpB=icq5JTyO2&bFcSmM# zw#=&V*-(-zV8^S}W#MZ4H}p$4?2VO-?~=e31E^rmI+#|A1J~d}_;!12Cwn=bBDzn{ zXofV}A|YjYx`Mcy?S1a-n4dJFWNr&wAa&P03TYH>ed1~+6E`kTh@tY9A45xWWKdiV zZP&u`snHakoGe2f#;!b_@z1VFJS&;=WzS~0Z2`cejauu-wT5|5Lg zugzP;>RmK)Q8N8&GNYlRoDzFeGB_YZZ0cl1IS5BSLbLWI%Z!CTsCD!CCIu-8SdfT$ zzQD`&YI2@a5_~nN(;%En<#!0>tA)$03SrnK#l(PscUr z=4t~59wC}UIrr%P%WxV2mz#c(*C3%aM)Eqji>aSy^E3}iHk- zmmKfZT!aUgmTEle^x7iOESY8z`&+(-RnI)Q@8z9${C?dzxwzO;@|^0(h35zCtDE+B zsS;eltR;4(N!zpV)27i@EvO_~S8X#cCGbxgG>Id-j0pb~H2meGp%4@#n^MB^7m#X$ zjeGc9Qpvc}dp`z8k9lA)Knajp`)0^M)Lfd_3m(coLMx0>o=}k92_JBcPvpQL=&QztkjwFgXh)4SkpZWO&k4hD_1OK z7WX)}NwH2|Yg~Bu^0&pGCR+cQ`zq2yG~Lt|?+A)?2)VDD%E86+1KgLz9EP#H3A@HC zLRa-t8L)r4LD^gbFnO=Ud?cFnu~(Q+5ov-8q1$tCak89vBCnFg6nL?DGt-YIE<;kS z7}mY+d^^^k)7ZzMaWM2%iQc2R%NL&>&nL^sW-NVLxL-DL_P>|pgijoapH8;|8%Zim zvioYIdrMSLu3mYwwCLHV5;Yzd{;SyL$=eHixcn}~oW<)`0x7vd-ICtmMSQ!rVl@I9 z$ce@R(G9N{UvJ^MMhNh=P}zl1Z*b}A6JGk++3eOx$7b9EPcD}IxVGVyL79p?i38lvSQPO9bPVYd{Y;@TPYWxZ1 z?#SQ!21gI-D$>Jd%dk#1ejbu+E(?C!{)gXB(m|3_{gFJq{Ycj-W*f>&kfzJAUCaFB ztF!W+N#aYy$=Lm{t@mhxyw+e-Dnrr=1zT0|W=tZszl*v8_wz$-iy>y#W0IMyifHtb(rc`L;9HAVTJ zOjGMC;Wz9%zJmeClIrbde)0v_W!)+6g|1O0RQciXDNd9_9@o-KlOI5 zjjOY3`yr(Zc%t+X{iT}CAN0y;y5d?gsJ-_#j}1#!3djhRHd&#xY!KkJtler2T)KXJ z5y+RpesY33Oip{+Z)!{JU|C%55^jYmATO>9XNrs$^ivKW>s>!?+{3NJ>z+6K!Ag zudWdd6*tx-xI4Ov6b;cgFlQmISI~sd_g#Z~n0@}S_O~~x@}$%n7#%3y6_Hu|P-&-Q zHo<|kB2utMDG^^scRzNdc(!P*GK@dxdpZxT%%*UAKW>t9R8Q32-ri7?Iq9c5cXq5& zn3#dmf2k7XCg)fqmN0Y-}Q<|=urt0mfUgpQ)Y{MV5))M1+aUm-VpUkW# z{j!$UtlVbmufV2z5TwV!($f?Q4@*kul6|%FgWhGn9!2c9L1UXWs2Kmigp-NQs3kqP%AL?HX5YfxUMQ?KnM#ICP<@3D zs@A)i+_%Kq-NKfJR7~Tb*Nm|y(ZP}6Ed8=qo?fN@O%z!}r4zgXedS8R#XSH6bgX+@ z2!!qk`5|Y;Z|Qh6J*F|ydr-aGKw(gaF^x}X5Sf>i?bUikW5+f~oQA$wDZLZF(ohaE zH38^0c~Mc(Qgxv83IuC^M>{;jNH%M z18LwMr9CgAN5=Np%Cu31>ug*-xR+8c`VRPFnz#M^F|s|!tlkB@X)p2m-NgJpRm#v5 zIF->#-(K@9v=h?AKm&nC&uPA9u|Trz4(+%C)8XL>D{D9&W1IMocf!i@ha?g4?n&j0 zF};@^I5!M2{51(`0{asN|AM(|OzsASg*np-?0PK(y8Q9Z!{y+Gq#!@!*Lv_Fb(Q4W z<=ev>4V+ZUmFG|;=YfCflHL&N^Ek6-Nd=?;e*DMA7U2w>))^- zt77yG{!JyMcOC0Q{7IO$QR4j;30A8O&Uedpv+4@9!lW{r6p0yY1P0Krv_J#!Ft6^~ zLi5VFXml-Ymxof`h4$9njDJ)w7n!v!M;#TQ>p=y9{%Y}zvGtd`@oFNgcR`01X*VWP zPN(gYQO*H%R!r}`ZljNH?ZerUrV0hU6V|g!SE^U3vle#Qi*hTl06kWMB*1cVnx`t* zaC!tkHX8?@dvM1KIL%cdSf2r^IIJ(qJ8#+7AG7t`)vY5kD&Y+xNo?NQvI{l2lUpF* zDHh=Pk>hf0yO+K7$MHu^;D77XKMo8sv*XwUB<^wUTEolZY}omVabpNZ>K*hc#`GqL zEhIm)K=iZ!g`t)hNS}hMG*)i>N&JqwGH*?teB9gRlr_A#(Y@Vy-sK0{$OECPLU6NJpRpwbwu@%p zFr~}BoL1$+qV&3{j{yI#lrgcejHwU9e&2li4TQWDVAb{kH%_%_JaB`fluc8){6E>;Qxic-Wq}x>kH{^ zT*-uk|67oV!)Y%lo&JTV`0p^#eF?S(=s-KA%f2|C*^|kp4@pPR!<9#ErH0Zu@Exw&!bqu1P9q91Et z^<4lh`@NKB+)y!E)^#GCAw&M)A}e;TMA@icGtn%z*GR5)BOdTa%7w|}mX@8-2BUEz zUVwSxr&8H4qL!rQ`3bN09-G7g3zM?5a_xFH_ccGf&cuHOV9715#F&w zM|n}G>wl=_+U00WY+!>K`h2dQ>GbO^Q=JW^2LFxylRrJ@JsW}&ODe2F^#OT+?U=$& zvQAlEu>Y|p_9TkQF^$(nWo{kR`4k`Uo@{+K>HTB}i<@M%tnMt0+$`78w zgfhb+6KNiamDhvhI}*;dmuiFVdSO#x!ZzJ;YY_JWj>em|U+kDX%hg;me@)lh&3VIM zzrcg%&$d2t;cNru(F#mCA+;5fLO(9~wVsRrK4E9BGI;E!$D?5J+aq3I5Hw=L1DOie z08k{|Qr0e_k6#(Xk?#r}Y|i!k1>u_W5+8*r;0X~(X~gw%yvccMloKLb*09$_G+bpO zRC6p&bH&N#ziA^xUulVM<0ao|qml=nQ8@<8Mi$EdvDc@3=1~j*n3m)Uh}xf=6aoJ^ z^(W_cE&ts8>bWNYIpf1e-eZh_zg{~Bo!IIi-)os(ZZgpck{+@TjZN@+y617gL}#96 zNH5!_kp2542DGgRF=p=F+`mXy%Q<0#3c3@mZjEQW-J=*EH@LrDP+oU`yft!fLl(>F z_H}{LkeOYCle`re7Si!ItmmJKVg3G4(xh?|p&18uosdfZ);=0W(uhsteK_7AI#N_V zAJ(NT`uk}6eqe6NLMF%Q=CDI`Xj)Cb!UxM=X-&J9kl@q$)xVr%jtHBhCn3)n*T0G1 zx!{I)&fTEFsv23Hpn{a&(*6SrMSc0s9X$0V zer`U`4>rAe;B;X`?FT}{lV{Rg7y8vA!g4w#R1cCMZS|6gQg)5;L}TEZ&PpUe8Ode0ctBUi+0JZ0YXP|2n{m+I;~!_E?~tRMcwPsr?Je z)9_)8m}Tg;p?!3Qb=hs#)aY?a9&N;xK}%5v7x>ee{Nl8F+}n+R>D#O_11=<4(rAf- z%0F(?Jrn|9VVh!ZTuN&Z_-g)BE8O#RVs-Cy^^}Ia)1cXj@qq@rtwCV7U(Mnr0N;kD zYGS`rkr`f*0-~5bQMw4D0_6X!Mq;t~Wh|#Dk(L34@P6E` z#}+f2O@m(>n;f(!NB{G;Px_=U$~7CNP$IJN2l_m6C)8P_hFR%^hKGrOAYiRG&D*s0!J&#a|jEE6)F3$>bMh? z7vz8wo(l&X#`$@xce1|2QWlFmBn`S8JO5FLDWMO0uflP(`1XmkE$>^>`YHeFCgdgf z+0+!5ACW8FKOgzCZ8Uti4WZ?>s|MDI%e}UOJhKl?1WVbuH&u%w%B5k7H5nSL!4s)< z>r-}n$&>i%Q5PI4Lj>(vpg%CB z{^5R8WIKPzCyJvC{(k^bK(4>_aMneUt!6*$LH|>hnv{FfU(Bhn{>6N#tVOzUHH`Za zBo~C0%$D-7!MvH&NhTQEir=4lEqcV`mtQFc>3h)7_ouxmc={fhH72OBMd*9q1BVLE zmeD%|aS#5jrc;_FXYh;7rN6}y4X81gOZ@@#AFE;;}Of$p~6wBB9=Vsmv z{BN6>W7=3Nx4`o__8B5K#+Upx-kmkiWZJP8;NGJav~Q~IFNB^>ctP(_Kv|^;=Pu!jNLPA z>Wm{%R&bZGJ>+|gAwhKc2j1%$rg{I8nQitH&%NWc4m2yA#Z-o{4+B^#?G5?{s_1>p zO;|4rgM_@8d-kv=Ztkae@xCYOA8@nNd|}a5dSkKGB&+9)JM()JbS)K2%eYJ(7FC5mqutq>@ z+UAO}g!epu%|68DPx-dQzl{gkU()M)&ke~nVj1~9*HkbZ}lIvx#}N~GSH0e|mg2qA3B;#4cHmC>)G tqWAw|6XA5_=}gzBX{Q*ayV4_CMAb z4Z7xD9BcaPt3SWvP17HGE5~O#l3v0v?|Xhc^(#8MHBhGFN<8Pmr)&q?#r zKGsRYmk0YQk_NNHP^F(PN`O7$@Qbe&4-z&KU5|UefBAI1d^e2M_gBbR*gB^g{Z%}{ z?@N5i%GYqV;K*{c{?hQP?A!42n@l4=ke!ZEEI4jrd3n8HFJI#Zv(~h!jj4itjM^Et zSLY(#pTdUm&~y9eCI&fp+2r#Gj?87*le}+uS`5arv`cKiWjv9}=;M1($Wj+U2y2I)XLx7=lX&`2q ze`>g9rK5&f-BTS>zb|e{%FUjL!r`|L+IaI^kOBi}#6s@MlQclBt)zR>T>Pc_zSO@I z3|qm7^t)((;!CfC>zS`FhSgRqC>4l^ zH`yQM)CT#ayXznNgNbgq1|N6y^VrYx4g7`3*N#0v~BAXFXZ2x?+#T<07 z$HjsHnren9m9Gu63@$tybq$BAyx7^&z4O$1&?kVZ@$06~k9AQQ+vq*N%Qn=X7P*AN z<$JMPou-fdz29Eyd+y6~xjr^ozABJ9ZhQLBw(=lo{M{b4ANHPZGi4e0xBPaa2lYf7 zvnSqc^<<7y_RT6_?bQ*ypnu!<=+U|8H+~_9+Uc++0lo$S(iU;sAD%2r7%B*REaiUj zJo!uxW-JDy>;FRK`p<{f@3yXLuu&8K{I}0z*(d+DROj!xnviqAH+Y8zSPDHZX^HQ z__b_!oWJp82%m?2nHwr*Sy;FmCwgs6?we}(o%C0(i*3NVSY%f`F}TR%1Y0l`?~eTL zmJzmtVHvbSnL$GJ_n4byczpVk8}B1FWya=DY`Sx6IF!a1^4a|?w_R4VYzphaLT5}l zvRcFw*@&^=nPZat&+6@@U9K0E!K%cGQ8n^I}{`o6rqK zmnQGC|3A-(3)=WN%Y3ZZ6Pw0i+t5PF35}KN299`9JFA5)5!T1a|pCwV$?+kiu2)pqtP)VLyT)e4;ah_&v@G_u)+Db$0;xJp}ybp z1zx)PyfEEhg@q`{9pY4wNq*NDPZ-%tnyW~B;-v?1CIP7ftW$=Yz^Cr8`0>2J*`1KQ z_s2b!wguZZeZ8K8`kB0ioX%kXd|l))^^WWvd}>f&WrfxnQ93dDw z1^i&7r*0~*deC?ESFoT?pU)|SBqps-^LxU#*}wR)iVZh^U<0e3p$mQ~)3*8$6Td(B z5X3|9t>kC^c8!gVcw`;a5oMyDg#5Xl8xzDPW;VIhHyw1o;xeA9x@^g79;&>{`EG7f zvMTNNfs!r+VFa6l*6f7!Sel!2ebfiwCMPB5`9jL?sAXm{4I-`U0Z1G+m+`+vEdCGz zBy%WK0>kcAamta|BL6s)ex7w`3%AVsR6bw}!GNwfX#Cx50y4|X6Bb`F`*u`g;GjX` z5BMB+>Qwm$DNlF-{ky(-Z8pK*^th*e$?qa9D`Bl}vku$g|Du2VFI!mXfyl8z{ygmg ze8Iuv?Vj_Ozf11%HJ6dzep=EaQw3EK`=aGC%y%)i?dmf}4r5gV_&DfY@%5T=e zVgtuAXR`-qNMGym>TJ$2yG)6$)AyVS+DKn;(GKQ9sKZ-Ko$cS@p1iB^AM(eW^@Qi= zJ8g(12K-y5|4dmu>(Xo3KbSKM^qzIt6eGFfo~jEyZu%d<#brr`{=7DRJ%ne#|DD%q z`3xsL1)*(0_O zy~^&>tEvY&zdWqtTK}NB``=9k%G0e5{Gy)zxa(iDt^alVHy-d@>hZEukFR~}=lAyp zzrSpdY<*u2+)~_1Y+iqV^SJjoL(#|vL;U?yUH4>TzE3t@F}mtAQx;8s*>766L2E~v zZ;kDk?DWK~`;b*O#rFN;>3+D#-0SOi`GMb!X2T~@WT%vFBcG`LvbWoL&uZc2K&|~_ z|1>+@>xZ3)RulWJg##0tG1l)sacRd?-#Xox1Kj0WEI`_=H;l0Y>iG0L$-?qzwTsLz zvh$njd|jW-L!*opidf@+4&Jr7(?=WMMwEOP+ULLhd9vZK$-Hlb<(hG;@BkR=+#QBo z?cH&7^bxJ3+OfjVv)r*iNU!af^$Y8W;O}x0VLZD|n;aEG$;(LM!REOyevfIescQs6 za}2nijw$!###T;xedcPbo+>V$oA7JL^RQLs%CF%2vkKd@p04kk=*y$ONpgv9rpus< z>bKJ`eUJx@BL)AkwGXJ@AI9CO&TV^)M`Oj?OSy;dJH0DDPz=ED@4h#GDF1Z$B<;eg z8+RM+;<)}OF3y*$N8n}RW^E&JQOB7ZzuDV$;{AYJEdLL(YbuNRCF=Wv5qCCR%2=!C z`pb)JYo&Yo=(qm)>8bf@=QGCsvrT@guYEabsWFhTUVI=wL#v#})}Gt`*xhT~=lFM7 zzJI=W&hf#I{>0NqaQn}66^7)!-)!5L?CHMxODX@5$@b}~v2NwloOJrt->OLY+U^&9 z-`gGbW4^RM4o}rs!LE;3|LY@e={6Q}m%d@P*>OF}ew@qT`z|v~LsUW_KUVCV|F#d$ zKh)#pAYQ8@Z8Xs+bAb=k2==kz>+bnPknR6O=k9l^@1_>?P}wJc_)j0qebk5g+CL+i z<@cN4UFSCK`&L&h?|s2a8@ZDDi03YR%z}znVx2Q$KjP>ampc2c|h5=RyxQHvf@` z#stzdSzsB0?GO9xL!$Z3vc-zQzCG^1>zjJV7hmdWwsZiwR*y>+|HyuTH}kxWe?1$i z-#_AR`}{1ttY3bGEvgQEXXtI!1?=+pK+ho?Ubb`B{wI2v{;lj~lfLwy?akALOkd}l z{P`~H`2R^+EB|GX{QvqN|9O{OZ!mO-uTa7-5-BT#kFEqdd|x0>9K`bxQs{*_ETPpNNYxGJZ!K>Oz4nWm)C$|%Bk zuQ!eB4Huc&GR7oo++I={aw{v_dP9`8G0b|XTn~&r0^He;le0pF3bvC>WL62jwZy`n zGGO*w6Lx^Lz*>zOZd&A%@v6ABun+q9HoR&p=8cUMNNP9ASd&*i`F^*1){Qknck72_ zW24XDW8UC+=q)AK?C>Wuf9Y+22i+_cLAMLg%{0twk)5C$X4)8zY;F77FGssW*ZM7B zDHrqK&T zXdLp7M>7vpJEM5j&-&^|1*+55i=2+2NZGC==Pvu++z=&>IO(nTl!q=~=ft;fj6y$d zx;8v+H(i{xNp)AQ{HfaDeyFqGBn$n&Gamh2=CTXdyQ%+@P4T>a$FK*uk){F$IR@sM zUFNK8hfW!{f^H*Xd8o-c4tK3%k-nR4wOf<1QC@DBx79X){!6c5d-FY#6}`2jZo+xB ztZNwjB@=Cs-?P;xIo&*``dCJmAS$VzWBTZx%suZRpxl>SXymp8Ji zolEQ_x8eGtPsp-@+jL*;5EW;z?a%cUXZE>yG7lOaz~6Ht;yM4m=mzxb|B;yocA&Q- zH?vY7k+p?yaK;>F{9ZVnB{(xV;8wKRe%-7*=%@^O>W{juHws=bu9GY=jEzseG4;?O zS(jVaLn_Fu_2xsyQ5)(94@*XKPS&1-Zj7@jw;aTfTP&}+OS^?EaqG$0$W?#64s$G- zHNlGru^TsTjviW?Ktrlo?R1 zcyG<#77n)Qx7|3K5&F42B!hh0`uJ+%)vF$}2BXVv<@?cY1A}Ov>up~(7pXZJ<8SvB zqM^+?*gk&2EuQ^G<;+Npxzo93j~J{Ry7Duz5_G0A?$iyezR_E2J_dfV+f4j6o1XK3 zvb~uh3sS@5RdSK>gs27IyN~Q|bKF&5aX1QDVvfuTRhfBE|E(XdgX**;^JKrh8u%5o zBC8^7HDu$?Tun03Gh!tUz~PhG9_tx%s9$O{<{ZsF5Zx!monnK5FivU1cepfVu;eMa zpN|j>#W=TPpe#jxJo#)i*FhPx^21?yNdPcY&vebV(x&ZicIW0zyB!lZE)#QXGNZ8F z)FU3Fc(4bV<%t%0#~5SGL+lmC=FPW|+B!$7xzQ_itmZ9M&q?$$CXU1u)p@qV`R{XH zG(q!d&2SfKw-Ga}ajngzzBzyd`QR8F`W(T!4f|t)t@;h6K}NLZ6?Kq^50>x){mQH{ zH1B3T>hoZpHvmVJ9jM=56wkVCbj$ee4>wBYO{c_1!C-uFI_07cx$t~I@a`-)GWH<* zS{-)A_+f0b>*Nn$t17#2mru2U=pENto3oe>oFFN#P<%jyb7dA<= zpVlq9WoHI&kvY>EPJjWZLKj70b1MU0-Exmh z5`tugh8faApJ@@j#i*(egrDb4$aP!oVJs8)_d7Fs!PX4hnSFh~#a2IMg-|;k>+RJu z69Jx-F|tuNJrrjKc3}KlS)7Uv#yl}&>|Mw3R19U>k2dcHXE_^jFSna>_nXdvW7rmn zzjRMOIuru^K*qfzu^)sCvI3pP*cjR=1Xs`XoDX{rl(VU-#$A z6wiEMJ91RxgvBx6lz0;1H_#|&eM_d?@e=+{9uuxKs) zPnynsY;rfZ$5>P>fpo$2^^UI@4_}9LecBn=L}Z-p8AgIK!3VW4*+Vf$XLh#r^GIGn zS-oM)d~tq;&%pfl%(xh3f0|hy)c+dwx8}vSt(}8-5zfEJJ{*U9wIoB|i(ZT_i@vpSO(4$-zMt0M`s6O4aQu;G?N+P;ZIo`So>srk z?Zs+_YKX+t-#NC2%yG*$YUcM?|Wg&pX*v%&PxfuT2Z{N znNysXKX?0+*`*pbTlzO2j?3KoJ~P-KGY($th-JMYnoUjYL_R*}Pv^PHUy~mrzVrC? zc^Kj{{o;cjvqycI-Qx9};ZA8F-k9Y^T+KXW`%6WPGiGW$YRRC9y)|UR?(Yc)-t{5Y z3cJ$QZP89;q&~%__3SZ8E#c$a#=Gu+V%zBRGiV!r`j9;+VJ2fB?;kZM?PDeJrDaZR z#&a9YD@|mqcnDhRLaEJ0e%oyDZ+hFuuBzUb1J8O^C-eiqAHLs=4p~h6?VB}vvVDxZ z1s9{bR_~%?s&}> za@bH?_G@VQ(pM)waDDsvy)Ely7rpnTV{^^E#(83tNkh$f)E_SM6Z&r8^0(mYolRC8 z5V@|ooL^}AG)XfEc+W;&Bq4U7di-j*`Zw7bwca^q%|>^O)_ue|S$Rw!7xhNtnTAMcUTB z-yd`whi0u$z09~#;nC42ov-5Q=L7ou_(_Hm$F}&8FMb;J(wGy!bACJ9?7pD7?9$#Y z2DdHGez;+Wa(ljDK5KXz_Fy+(y>YcEKGhgiYd78G#8$7D)R&lxGT<_8JqviYGs}#4 zEy+Y%UtQjBWBimQS@>Z(zgA4B8K|-E_~`3J)37q;66_RfY;UwXGRjLv%tjmdQkThh zeJi|u|NE@9jq&cZ({mq1;pH3!Z7=CiJ+4P>cFkE-u7^HShWMU&)@rQLM}GQejB#Jn z>vG<)TaRD$^L5K*+vjFqCh0TppW+yTbJDd_=PIJZJm;l8M6&^ct!B&}`w`d=LGRE< zPus43mwA$Xod6Q&h>lHMhIzi=+WGmNvbV=7J*HThr{V7`c{zt_kJmHCgZa#Bc_+=aUM;ix zNj97HP9AEn|9#3T4BM7#aMb~+`fPX_&z~m;xHz$gM}%$TAVK8fD0AWmck=X90D0T4 z6_Xi!nO9)>vF1SAWc=M#;rB15qkeK8N#mGZWP8a6t4${Rhd@6&o6Wy^1j!!+d!4}A zGuWf-5h$?J<_4GB?|dt;>6G7N?A< z$*n@Dx3{||@skehiu>1gc)a_V=cgt+y^fT>FM2dGd)Oy}MJ{Dhd+EXJwKy)Welb+mZ>p{hZjHC%t*JCmS6}D#v>rM{G(F zy^1aL-P>9V9f}`T*?M|*W5VCdf-UuZnWP=MnD7$IXm{c-<{6Gz>ox3-R4P<hn4IU$Wx1$65>aqdrV>Xmf33AMWqYDXnMu z{j|dtTl{c6yy*vWY;TeTEHV{Pcm;CQf@D z@`U^>`s6M+(Su~pR(an0iBU7Khw^4@QsvF=Xg3ccOv13Z$97ENo(oSA3^VAgAB_gx z5Sg0>n;q+Rh-nC{dI|^mKhhm^?#4D2d)rDhpBsI-TbOuvWaRWz!EWD|d8AL7zkL|Z zC*l^C4GliKqWZ7(yI?kcG=o-^uPja^)3kx)<#k{N^(MwQ^*finNk1ZXU)#OA-+e>c zYH#nB4P{?s0a>(qkLc^Zi2WMdqIC`t`3IK<5qa6#?Qhz^V>#}l%yzsu6|dgbut8^9_30ZaYhF$>SJ<=L zCY$hw$C-84wAihe*qC_pBhsFX2Hyy;Q}?yJ>v_sk26jPI&^ znr!Z8d%wo0eEvNq&X*Ku`96O!sYk_;HzC`xyV0$WEJjZ8=*(&1MDH*NFTA(XJ&<3 zv*Mcb4dU0sSEu-&^reh_LJxt|{4BNycN7Pz%qBL1{!&}JNBj!4UtA391I2g%c2|dO zwcF_vZTCbgs0W`n;5dOni7Gu3}%FCO?d0pY%F^$DFBe zZjF_m>%rwG{^WOk|K9JP!j!Xu*3Ky7i6N^|m7mWt!nShg#vCWtLs&ci`TUee0RHqg z*5z9Y<8^$w1#!*ROJ6#D%`~PAVvN~V?w%Y=ZF8{`U3R|tr--c%QYS_3>+4yM*#~^P z?TF>%Bx|UO`eiZoR?OdFwqs*E!+5;=9P&wK#3z_hEW?Rkz>E7mt67h2o(H|`fBV?{ zcJDa9^XYlSdTp-L$GiWv{ulM&Ag=p%47t6#{(D}#5GnOy{KS4*tp$wYMUUH4KUqpk zMt0Bbg=H*b@r!8B$ku&&zWMFvd3?8@dzq(a2A&kmih68q=L&-$15diktxR9d!pZm8(~o5$}P z-h_U%mX|Sxz6w39o-nngIX_L=r?o%(VvC~oUO-Ot=Sbqb`3T=u7az3Gm$#(<8=d=R zoA+(NH?-D#eV^C17mQ)l9~ier`=TFIHvLhvq2HdJ?0kHmZ1Sgi8kNiE$o&)hH~6x! z?L6QMW=ecOG7CC?^*ogO=-UGEAM&YL>=`MIcpP+t&FhEq!SmKA`^vP1&OwAuU&p1- zQ&bPly1oC1vE1|A0p49M|Eh|TcC=#T=efPkhuz<&=es^Xl>bs@cm8h6tzO zPEhZ58~LRFLBBuJXe^tSwmV3d77VcICun`d(NFJvu_vFNuVd9@=Q#E@f6<9U_qg|W z6kA;Oy zbXzTrRKJ<6XXb*#$Qz*AO%@4c^M*v1&&kWSp-U!T8=>sCE&$l`Z4KZ**Za;5QC9s; zWv%bP)8w4oq*~>9;vVhfJa`kd2^=>gTMIm=!6%?t2ib;l!jbkHn(AE>FkLq^_FEKO z-sfA$2G2)!n4h_Mt>1nN;G5Y_ann>gDPP&vOz2$nH^GAmUC0!c*`Y|+P%-y;^sR0y z5#zrZ)2b%KkuB|vQbg~1yK#Z00_NGa*)lQULy9h|- zHeu!uTWnPUJ=UG=jg2slY;T$jz&ql=+c^($)=lOi#Nwd+Z5w@)y)Cn`xh+{lwtTDd z>+eH8?sjM#>lWN8dvwDaFEsI-#V7z*er50nxBr1}u(gmGzV&XnXxc<-glk_f33khE zonHEjG0dz`Y&(hmpP!M1;typ4VIOsmkC%p zkUvX*RX5UhKh2nCJZ>6Hyf=0phw-hpzzs(I02#HnOF!(k96+m0 z-9x@)<8YUuh}0w4v6E~u%PwbYyS_(85%^a=Tpgx2slxYN)&2bIN5&RD6#VU*)zD9$ z^MSkUeaK{Hr6RluI&h=u^;EXwTG-*aa>goVw&6an&70;3v$}iU_*nSE$xp8KT=DMI z%a-+&vm536@H-ou2Pu?bAndQT@?P0m)1KsQo50J2a}BnvGH0S+cZTiz#nB|jFArVA z_D!DSKoIKrp$vZPUm2sZjb)lsPMY0i`f}05Dee@&YUK~_c-b6dWMj(5EyrZYf~QX@ ztW;bq;%m7zTLHc$YDw+W7Kk zcQ#1G!<^=q)93i)??IXDd7imOB8sHFYPqH4*Mb*9IWsH@CxJ5W6p&VFB7l zZu1>-E;p)sWwaEVN_L5#;fLS4Snc(jh0*ur&pDd}XSp~iQ#*K@wr%=G;3Kx-kXelp zH2*-fS4^U8I*(P^Z(XMmoB*t~vF)QdWY(;CG~%&8dHXdVpi#TT?JODjuJ`}`=byj+ zN*Mv><#K1k39IcN@4aZ_6dx?%7%2PSo|Q2KH&~6I`(})ehBceqPuy3w{B4Mb^}}tv z$quqreq_o))JTuG^304m>*X7iF;_#KVe2LiU^3XO;Wycq0Sm!q?R^Aznq!EJ0fc|& z3!=lw)>^Uj@_{ICjGfpnoSNmfaI#Sx`cKMT)@OxpA=~5fV8$q(w3_+ihcQ>odCYMX zMoamy^UC&8ABgwWuVcoI<~rwO5?}0; zx=Fspa=eFpJC7SMxACSKPs{>&>{#YF5Yrs?4i`#r90=IL-P7O6yeL9=#d>!fngxkt zeDIe>+(E3dXFbCE`1{v?{D<+}@m~{5mD!kMN`8T3bs#&|j8otF$$J2?hsiNUaTpK*a=SmGb>fMW#wU4YNv z8O;OBrjvanAH=Z-$=*U3uV)*r_h_9YYK$V^YwIdBSAlJ2-npwDMKw0cwRI%pn1iiz zkv`UlVP0`$rt4{5-eu}33k80^FMcF{i~SXh9nc@>3g$S1_u2N(xlhcw;-GoP{~PA* zewj@Tk0FoUazPZy3G;~M5j?pu(!H+JGwoE2yz8x8v}omDdzQ7_6VtM$9c``QI5cK( zw*6B}=8-uj80);Kg77Rxi+u^^)_tBzOif$XKX+Rpd~LQKzp)+9@`PWpRv>jatu?S5 zpFIoeJ9#~9^2ADrNs!;{z88Eko3_z8)811ymuV*!|Cq*3=*rA{KR?2&qwS?zvYj$+ zscP%}qxL(oKj*%(zh(Q&W0N?0t_NW63+u3veTE`-{YjqEzoj2m^ke1cMKOkYKYNgU z$+|?(8Qaxb9{bmf^RxrD!eh6^CwSwv(OhQK2U*~;s0Z^@j8XFB)OA`DTU>Ysa~klY zGVqDz-Nr}}zts!zap_;#1{oh3Q(xq|WCuFyzOLhNoHIhlJ#9V7OP6|wx(BO z-u)XMj8WNKllQvM==Co9HJUt^K90YLjVxnL3gyb`mp@eYTB#kxa9LX=9H6kfE+$+|+Fw@M6UxO>A+;EZz2J9BH=O zvl*kkKL73Xt$W?rFMGByFpZJEzKn)8A7HWEcfs`gdMJ!-YJTS;K*g`nH6^y~ihEt^ zN~}F`LVD#XpCtnwpIZ4>`krH2^|{s_mcz}d*NE%x?Lhg2@%@5x$?prF+S9W!KJA-K zTz;ypVj1Ci=OV*gpYPXhx{UPtz`N_SxAu(m{+#pUj5#8XYc+;urSIpdGFI!Hg~im@ z(>O#t+CI#S&!>10*}Ch2{&kxT8S49@7Jcv8%-ipa?x3F3lll3*#xQpJD|T>JKWw;Z zdqMLG*EvP>N)4E+zQ26cjbGAufAS8!r(XT=q+P`JQfD*$9h=bN%sI&IOod`BBbNjy%^IC_8GyQr7H)?w7s)HR&!} zgLhK~=&AL)Huo~M)qTvU0_9h?t@FVi)SMqL^KivneUD8)-_z$vy}nMT#KERMU;oD5 z71(s>7VxgxWb7TL-}{(P{X=Y0;!I{Tmku+T=c0}ve|^n+5~Bp-S5b6E&_376+a*YjIC=Z9_I zBsee^wBw+Si2IuN;A%V8@og9ude(Y;4yQ}|`74|_73bg7QMcg6M)nw_^oN5ipqKyZ z#-vYU)xnDM*GoAwZRhFvm29vq%yDL;8}=YBpXw%%v*RxV;Lo&AN8q(70N~6v&3luH z-Pp{M5ABV57rNXY>Y?vVH@UBqDt-T>o{WMY+pBg*S!YTDn;NJtZc^j>4ox+=UHe}_ zzx0ddiyT;>UJcw!AADUnF1#G6&@ml>`u=_rfx~DhlUX=gU~RB}V4P(#&$ewaa)B(U6NkgB1+JJ@<(H?g z8=psQys1Xo-vuP$1E&1oU{BG1)k{7d2mN9VI7@#`$36sv*8*S$xq0&(^UuP1z=dVv z+BB**&$7RaN$~I56cG2p6YfjR1uSLxpdis5l$aMs6jbrWmZdse^H@9RKtN+X^ee6E z+yo^yr*tvM#)ZX}#;h81*4S^x=(eR~hXd!MZPXQ+MUoddN?)1RM)UGKfIHtgNhaBz zbUH;xO}}G3eZtqM>zKdoFqE{xj_p<#l8G}~-z*ov9S9ftA7po~_c5um1MmOsFBgFm|T`Lc!WKBD@+R7fpy!-x&G*UY|biYCe%;T(#c%T3alR`+7WBzLm zHE=)oc6)5Vu7IgDGibCKxNJdt^z}~*#`c53{5hH~rHvIEmC|5{Kd`MhZPhJ};j@W;)3G>&9(eu+?=FH8% z#h>fL$%k3e7Ev3_+ex4K-bW67(*ykSNZV?I293jZmH)PeQ_p#LwfK3E9*n-c1P|Ts zz0b4@*TXivu$Yd8H~Iu49HZW2vl$Hbd{snzS8r2JT?+7_8h zeIuJd8d5wpUoD}CAK4AUEHX~CIS5(D#f~-l{7HY9(q$|Gl$K zIX4K6E0ky$SkG>XeqJ!?&JD3}p zEj;S>hiyKvQ}L^8e905(zftVLZNU?awZKre>52=cFY#JmxJBqxy(xb~4V&7!dguV* z3mY3u{B_Exdy6HkwjS*azke8#?u^ZkmVVbl<2Q@`3}cx#b!#tp^EvrD-B77Ie2a=# z783W`u(jBzdwyy4ndmFL9O&S9pEqWKc5nFIRzK4F-?3r+G`{Bz#D!1PU+drffrW0H z_;ZBH&-$oMT}wt`BumESnCpv9azea{H9owVrO%?=kU!ew-FsWi03XJBIOT4q!`jvp z&z>+KVZ64vulGUik=2~apWFQPqi{#sVUJ%nyYi02o;Rj{nu{$WGU_4LaF*$(m3@oKLp{cVdiq2g$IkKc#<4?=b9nlOZs z{a@*_MOIAxh1=3TIxdH*cViTr4D#eZHZO?mNPms#Y<{?nZTi6NJ}iz~dD2O*Z^-IG zu^(&hhJBKI_^|H3C}v>zuf3Q3vy!RQ@+Kqon#%f?7Vg=uUtErTv9I%hh;_XH*b5$^ zXGav9yz9GCXrJtLBb?g*Wog15(rUy;zxAL&_ha4HsBBN3pwIk7+gq~XsS-Wjv15&0 z_BR+W+s>}AE&s)%bd}F}q_>j~9;JW04%F59(eY^G_j;IXsvms=*~)+8kv604URcJn z_SW!&xcnGq-Lsi%wpPJX!~SEY=^U> zVN-lJ{;N5M(>(h(`oXbAuD9bcl;yt?qx3!AMxTE3Jk5PNj_8NrELJ;m^Ti@?NI&?&S#KWTORTo)`8x0X;+NePdQonbm3ZW7 z(Nn;9n4Je(*f7zozF{oTRC|VcyY}F3pJZqEz}DJqVZ8G@oByOs-ar3>4r_iKbd_H* z;V=yBf@izDO`EvjVy3T+^^=XtHtbn1xnBK3%lS7O9qsc!v4eN{hk75{T;xCNS$VUK z`99S9k-#BvG%mluwTaV>#B?#TiwxfF;9{H5ek@og_T%JC57XtowO;XHlX*=u`*i*J z@Bj1vxl6z~^ji=%E!=;8aO2ZF{oDyYJD>nVrji}5H%ax|RR*(aVfOxf9F;L(J_k=U z?VCYD&|@?4t{RMQ=4N5UZQ1B3Zt+7qe2W%4gQ7(j>Al_L>aBD7-wu7;&zG!m_c35HY`L6$BOxh z%-b;rs7J?;Wr205x4+zk>ib)F=Szuq_{L{!e8SB%d>j2J?y2w9c90FM4InwT2K~|? zgFD^EcT$$9;E8jM(PE_id7_GMWvn+(&t8ldj&^&e*d6*EH(+S6yW01y%+xKNJ)lJoS3i;aN8}2I66i z!jlqUtf8;IluKJWH#FEc>`rVPM`DglKD*@25}Wm?MEH_g3pA0U9#9Wx#AyA zcB2BweACtRwPeHlxZZz7KX{_6*g%@M)z%j8H^GTXD`XRz0-JxoM_4Dct3zLim+0g5 z_h0||ujKXpH*NZvf78x*-K+{5%(MwkMn)C(M>N{F?Hgv1?XUUnW^^lL<;6q3ZIN*@ z^p`WpClW9JqGa5T`NVr!wT|p~I81 zpAP@_$9SIdumAcl_0QxBcz#g0x-td<17!OK|2V2iTT6ol`8uH|bl?)alFKq{9aLzGAra8y=;1p!bg;)1&^?b0t&0U!HpkHW;n%fkQ^oCaO9PiJMHzjJb zYmS8*T`N;nQKzXc7gF0Wz=$ThB8w5XQ34eFlu93|mbO5GUg7CQLu;1;)Gl zystsR1uqv)jN}oK0DYW(u;0iCx-;|0CX1<2zwrHwZhUtc%R_iw*^!68M){NCdFUtR zJ1kR>|DJuZ=Gisw#CBs`#dD3a7pEL-O&iN|t0`MAlK08<```DWl6kWu&lyvPr|;_e zwb*sD^n;9LN**v=YMZ+c%NtW;U+$!gePOGO7dt|F!r2g^1F+rYzg_gf==aKu{nkT$ zQ*dB!haXxu+2qaTMzS=GImayYM&+>(&Y21Fre`zBw8gOv&cWt z>{`h5*RdQL>{yGjnD`p6tao^pi+h3(l$f^Tg$H4)@Nd2pbl4TYv!q<@!8X5`S57gJ z07gK$zmxnP{O8}_-g)`}ILK3^WDvXYvGV9?(0Uk1`MMxUH}8 zB9Q^&3CAXY4W%EfdxY^)kE~)Ja$s-j^%;0~5O!)5l^-XJ2BNlNO z=BLR&_w9yZDHAo1;HTzDu#NAVZy3uyr(oK6Ogo;w<6x%iKj=@8>^RLMcpP%W2-^eK zSg)DoP3MJG$5=te8IyOuSgVU|V8+W$;}5gow2uRS<5$kG+wGlFus%EofSn1l5f}^b z1~@?|OL>BSd!89-RZP#oA^|Gwm6vgXE zXa{zI{W0vpwLaWs5#46IFtALvNO;Z2|F%P(z#(2)Q;%E|EG}1H3UkP<+Ouf4_wfH| z!|tHYj3be)k~KrCm}K!2vJpua%crav5UT?=ha4YHxk9TAxW>hYYqg`yDQh zh2+o`YS(=JUfA813nAhX)pc8ugddfPnq2n%(i~((I@r<>&8mqb# z2ln6)U&G@Ia)-U(F`nNB6(HY@`MY3shmF!~P1QY@Og$X8d$mmO7Hv)yvG`xMnF~fI z+XmTS?Dn*0rTe8G%Q#zhr{(Fgg8t8LELopuek%Rg>SaAUOqcymGvUeSo3*s&)-&gU z=FBK^=vqJY|G=Dy;?};4#kuOP;(TxZyzo&XHuuF=Jn09^$jzI%j$8X8XpJpm$800cj3V~@`@7Pq}{e_T(7zNAeie(>c}98-bc zb@E^AkDb;IxbOIPr=`Z&$S=T_S`PLSS89E+#@pmk@}4TEFDmAMuWM~j+O>{5k6xke zp4{u=d;0m3kh{I6&qs>`_jpxet+^JzWPWdU(5IZ7gj;!E)X?+wfTLNhc|%qfKbIwI ztfA*S|6O}Uoa!eY19x-0$ZPKm1ms$`7(4|%qsE?bt6wtGGfuNibAMF-*8LoKZCp?s zIrlmVM~~lW4~;nu&9J@QPeU%S*H!jFd0`#aD=A=Xo14u8qq2PYV2g??@q9o1znktm zBwn&#g{<9j%l<4%pJ1byCd^xyMzO6CoBe^RKhVoALnW&^)(6Q>l?#y-%x|x^c|WIH z+fx^@WawJ5Gm$R}tGF@ak>tJW`n9ax&EIu@q}x6l6zzA~&Bds#Vn3}J-uTtCOt($8 zkuj-j#+w%G(fuRE7Ulb9LrbPGhHD(G(;)97>v!UA9os&K0oChTyN)^QCG+sW7+PVf z9Gml8aO>H81F{^W&IRXG59Ph$oyM#0zHmln9&5%3lir(#%ce#w_5}MCiYLv_H$Cn9 z7tdy!Uk@2D*EM?7r#{FR|K4!n6YnN{J+o%c>t~sQ$}W0{KB~U?#zzjDUvYt>a3l*Q z%99N*{9L>rGSqPOS$jUy20PDf&WZ_|&KbBrxh^#K7W`>h)XHy_4Ro*A{kvx&o_#vc z{eBBPIcI_`ZNGQ<$Ns3?Yr2gePd^J}&3SFmo>Hs%bm5;U zyKA+ND&MC)0lXHF^H7@avi`Gw1^#~Zy`(h8ODyE?&)0s2vBscdlro)h;KHR+Z`1D{ z8+jb#vofn=%o%IfUenq?%`#p#d>_wG+ldUg%_j5s@w>V|SnY<`0)A)4@aW4aduDPm z)LDB%Sb}AY&NJ7A^qhe$ykQ!0OzFAS;>P!iahT_=;`>j}Pz(Ap9`#Z?P;(aD6PNU% z`uVrdrzK|6uo7%y>2+Z-mNnKZJiPzmrjOV3c~99FS!SQo=fT|{^XI~7mAx2p)%VFE zz6<-)WAq@ikNunWBcZnI|8+mqnw1!Xf-&xUW{!tB&-$p}H<=BZ^4Urj`yQPBV2?SE zP1n7oAo?7g_Pljm?X}+qGFJO3ihiEMbbrqKct$xr4|L3RkJMwYSi()xsWHONbBoQK zjlO3*s{L;m%+$Ycd2FoDi~-9^MYsL){dbE+_Wccl%fVaHZ|GCvDVt+AWf=ZD{qQ`y zh5g03Hs9<7_o2q_Q2s&3XEKvI=cD`Aec5Z-Y#aGG_-izBz1QQuJTIIL2(P*xrY&lI zx626X`}0KTWaEt33Z>9Y0-@ycVBG(^(44YVkZX<5;H||v`Q*d3`}TXk z)`=6+;g?}_b2M;pUuNBW^{ zvrS*K04T_EwkgN$tL$eFCZHaC!Whf@kP9?RM%nAQA*H=5wy}mBIEj`-GB*tt8 z53otAe&5)X4>D^;hei5(Ck~UC1TR!8%yyGR?%UJT!4(5U{`TqNNx=0Cx2Lpp@WQ{5 z7qJ9o)BG&*HT_}O+TRL%Gi5c7LbKPVI)2Z6oiGc{8^5-ShChDZ`(2+VxA-ob2sTdz z-CTVBJNA>A9`r2YZ0XN@K`_Vhu;~8HW_|jdb(UPQaiHm+7>d2`$R8KmUF8Y?%>M;I zN4fl+VTAFEC5{kI6FvP_@yJHd0YNiP+9_p*zcL zaC~^<714M7SDR2-UN78hX*;`}VY~@`%EGggt~Q@EHkU^RiU~X=UFXf0HLxfDjxpJ; zjJUA&qwYHk*G2o}GjM9Uy2yR5If2dwb=$Mh4Eu6vAY!MWSP)Ymkv%A?YW zs7(Rn<^rEmxWN2Qx2tHXd>f9~HsvaVsv{?=FPi=4GlTmrS;0#jb? zV2proMRv&s3*V^EV{UcXoRT5dfyA9@tM~Xz$I5P71iO^uY7lE(2xb{IvfbBz$Fvid ztlV^YBrdx*An}3w>^9Hc-wUl#1DoxcwS~f{_(Zh+cDWqml_m0h9s}c_$)4~bQ1+cT zOwX7gWiQkhJKNG|^I&=(^!7t&eSU@a`EWMBmtDc(tXAK60e{w50Y2wKjjrE}A4AL*I{q?@ z?X{>KwfV)UZow7gZ_asvgvZ?E;BKON&RDH*%dqFM_0HMeV76f%%YCN8@~+eSz^>)c zUFwI}_3`I^!bmSRyxV+>)?X9;u^%tH88))L)%S~?OW3LQL~vaGKzvx#z_Tu7(qkFu z^p5IQp1?2Tu* z9Qp>MCl~UNmW-jXzEW4L<~X%z=R)_uV@LCcRu+_M<2aEP;^U2?)+z|bR^Ii3GAM? zSj8bwi%8R&G~23UHgT72e3#nvSm-&=bCrAMIsQBPrJckYBhwJ-cZU3)#+UVWS?cx! z7N6&D!(E&@ZV`3x$xLK3=Y6yRxgZVc`o<3Kl?qOgqdd~d;J#+$9;xeE2`9t<+9K1j0=Ayff z(@W1Mjbh6WJsg$)KGc2|?l&2W^aImM)>sqMmWA7ppXpY%)7 zeWqnhGg~ZyQGe9tC&OoW64~)cx?c;~a2U4QP59S3NUL)m)Fj!%jSlWN{WoE6Y;7a! zZ^tG5fn8g^fA}tKGsdNU9Pd1AicNWj8-f2dTgomzhn_x{*ghND%)QwU`nk=+lpm`- z>U2InURX)$=<>Xo$L*fpUL6Aa_|iZ6{vPA0H#Nq*7H(<#qzck;O^hen&(#cM9`Xkssq9L)X6&479mnXg5e8<@NN#+>4al7D2s~M(5 z#w;(GdH76(Ep!fA{=I#ItN!M{l3uA_`cXD3=fbm+e?mo{lg$rvJZ(ER{!oYfofx#r zH#=_=M@<_&B;&JP`OQ^`R8adPdfaf({r8OR{GpTeWP7`wKI#4Xy{uVic(uD?(@>#-dE-iHLLT^2=b+|;HZon&3+7C$bKj>3AMr)6A9>aN zx~=v->0rNHhDiPAd5S%Be=YS&^Jc=EqDQeU-gp1p&)p-qI@Qs)a~#+hbKO&N&-b(M zItGQU&Mmfj`fR_|f9Z^+U(9{T7=vTInBAtW8GfjZ7!E!?Eq)A}heD3yx^`_rZOB z^f^lQlYaO5K}Y-9AF!y@g!t2bP2!10!CwCdpKd?c2FrslZ?jOBm@RgO>b;)6ACmEC zr$bAq-+R*Ur?K`akX5Z>6Q+ANZ|k-R<@$NMzyWx7!95#7H@4rT4I-Rhd*p5ZUVfkE z;R$1L1Lw}aR%!dEPq#yYKh5ZZiFPR$-v4higY6Rt&09+v7{g{c+-Qs&EOMh@-l{Sb zD;K_avyZJe=0F+qR5fK&W0Q6(5-mg$M>6;m)Tb0Cvur1UZWH{~p_YRjPRGn75a9W{ z2y7EhxtZ8%Q^3!>o&HZdU5$EhgGB}-Ce8hzPJPB$CGo<0KGi+GcY1#n{!Wj4|M$Of z%MfmM%3D^j5ef$*Y$M{+K;&;;y!3gyG~WWY+uZ3g9$vQ~9LIJHm;QOXaRPt50-U({ z0h@YyP^#aSz!`Cw=Zj1n?IzaF>lQFR+ijaqH?p2f23wc*aEo83189kFUAkx)R(wHFhO-@B9Fz|hHZ>>yUFIsn5Vv)8uxyC5opBiLy|$jYzac(1{!Q$>Nl}M#yQ&x z^ee~i*l)lsUMU#hu`S@~DRAS#FNg%mvXVTRn^Uxb5WJW_QHcKp*)@0DGP(Kj;=@ zZn@pVNN=d)IJgq${?<>~2-<84`aDSAkKxln)~7%+GKti|HQ(2pwmE;4V*gj<_OeU0UXGm{+Gj`*53QUpBomE=_;Z5_i4b^ipp1 zBRcc@v$Bw*Zk`OCO<$K=huYJFhE6u~e*dV=x7YLTw~96W>oz-jR;Xq#x=$#GMz>@} z-OdUBiW^xy@pU9_0=Z*6^j1%i1<}XW-n@+n@90fZBS6nt4aW`W17jg0t4{h|+UGvk zU|`V-IJdA(_V2=#e{c)nw2AFTWR^evuHVcCzT9})Ytf-5WtcdYeYtH~X7XUaNjIo& z0$1o4sf%%DZ5KSDvIzO+8`{vRXqcY;g=BY{&wcRdnnV5l-^et=8-dGi;#SSRNt$n3 zyyte)Eu8H(%t4p(c)j44SPxU!=PJ1LErShEyFxAhve<{^Y`QjXVi>X zZanU|zW7*r2TWu#4zs`KDL##}nd1PF5vGFwg*^nWxn$)U6J*51n6jV0Xgbez5f6B} z{9s`djAf3}J)|^N(}tk@&i~gT%9^_~E{0Kp+(MtP8y7EGkPZLzV4jN%VR(--UEXu{ z;#2_#xRVt8{sz2{A^`+SnrMSfcQmsnPaiv2A1pd)4YYh`8#WY-lO?j zjD2P$#^O!mp?TS=o8A)}rwc>6J7vQdSqc%C0`Hc~0^0mnh{f3L=1wic{XFC1V$C%)FXwad+SWlbv zK9kOzTNwMhhSTT5FlfzekF$S}#ULMa`Gv}KSvM(WJ3jD*%#o%o8L^4;&N6v8A8aZ6 za*fA1ZQRvf+2q0{<|aHCe)7y125ywBIpz4@ie>l~8z6pm)7r3tZDee`J9y=ML4y&t zGPUJsujaF(&%5&Yoy*^cHLY%7#UnV=NUjgJ-TV^%p0h-yKlO@Ho--pD@Y<58ATZZ* z>zD{*Qy64W2CM|T!#CTr-%h#D>KeZ0`X^|+-#;{qLHhq=Jw$)KlQ)k0A%0tK=ofhc z4Ut{Do*M%lhh!_f>&GpjM_pzKs`1`v4|APiJAZ!Wd#G#bf8E6VFc))Ouu1%2D(^S; zBSH{I{xjonRR_;;>Kpc_Lnm7HHY=MCn|;vuIr(nTenxE|P8mBRZ3xDQ@rk1jhmNw| zrr;&EP~SWHgj?ui7VmK=7+{H^q-`$$&zbtV4>6*tzGfU_jdqhmnAM+p(&yv-X&=zQ zYi4YSsVnTm(??L7>Hlcnp!$9$lW@@s%SEz=))a0$KC^+J6LUGjFh(2?QyYr0OPlOfzcEh@F;CNZ z!nAulz9Q3>T{HFGX1gp|=nLDN!f>Y^&Tx%Gi%poeim?~u>&7B^u}4CTtm$^GSwK<SMp|Wa2+H2D8$=elA}!>?X!g zGU$ckwrp?e`7!NPT@Y1%aGfh@)-~>L+2*$XLcd?*dC|tU)0l@ovK@x04;a5$`9q(X z*<;Kr@7Tq}JRG~g_eS;gv98#j+URB7=IOnouN|u2#e=cvSPNO4QdZ~RBlVQll@iZd z;<06H;6Ep}fo$ac&gv&IN7ZN(1t`#!Tzny0htv)XFa$F&{k z@4e1ze#hMqJK5RRH|>*hcd?Z@mZx6Kn7~V$6;K6%{Bgq;8`A5FA^B}*J{u$r+IuFL@lj63_t3LP1*n6%S z&TgGGk4E|Hsd%s2$W{N8=XkGYlm|V1zXqPZhk*5voUeeP2Vc-8;aVg*SrSIj=IZ7-4 zZhPZgzGr^QYeY8MJ2rG+-buLjDEx}{pywB@cbxpvKeFWx+c`0>OXfk&SZIkCFU8nhSO54#$0)OLU z+KaZwSciPB%+lv-_pS5>dhShsyWj0NI$CTI6yYLr3vDm=!sXb%#GZD1ve-<>5}zZu zf1pA!jk!~7`_mf0*)q(hKdp5S{yq10&Uh=j33?7*N3s>a;~AN%EAGX-V|fBsm+auP z46+R8UbSVOs``Je1(>ZEtH(B$J+QvR$LsSnpXGjEuO3G~JB59RuSa}E%5aMoxTDUXVla0n6w^G`z}$6^QJrm|(`Y@~q$uprwox##8;xajk8Sxbtlz-b$A^t=14lUqbAj4O4zhlCLOytT z9_SXW{5-N15)+%TVQGY&jPA?>NG6xmK=QOr)GNT6ozl5Sx7mHckn-+f=dVEQ}dVIB+IVSEOXjQww?FY3_#u{ir z+KFCIwr?rx1#TLB8@ib%i$l(W?K9c=Prt{;#tSX6dO_RJy5s%um65)+ntqm9?`6Uk z0Qi+x@x2|Xr`!Gh`%-_1eXtD9s2|(W`8!KsDT~+hbU?R{aR=Iq|K9kV`!Ds0sqFpf z&muEIer$Q#A0D%n*DktW^%igalRiI{*8&S(==FY-qdo@F7BL&I7kT)F9(^je()PRe zO|b9xaq4Y5GC5fJ!&!0JI@^rt2j2Xm;bp9>P2D~X)vi5YecQqU zJ8gIrGy7j1mTmLkiSxi4(J6C*WXQI-8xMmlQARZOv%27}btD#12O@ldP7k|M)ntwC zviao>cv3l*_4GxvW2qle{T_?)hcuEr-stnt*VQg*j|O{!iI2vI=I5|sIEcRSoXeuB zJQs_@>oD@oa!)@2e#rsN><(qVBSX-gv5u4%N-GZ_1hDpqIIn%^N|+P+N9I zdyYTW?K#`Y#^rjq>Hn5>;K3zBFVz|6-{*tH_~rd32i!i}V;*zXL$+5j|EJ;wzV&-u zC+^6Y*I}Kj{liW8iMhn6b6m6p+cNaN^{pDD_pfhX^AIC#h!9%GYi%vD6f1^Z9I-s! z3{>Kg7GTiSylSta5X#&G8s|fj~3suo0hRBjv1=VGc}_FS=d$>DX?n ztK!{1i9O-6=ffPzo_!%vbN?UkMVB}AA2G|?Qjhpv*e3R1Gi~yianH-PVqop|m!%_?_SISYX-v9I zj%xhI%!kZX;s!vBA$)+kqAT@t_J7iI$&lFc5~<0@hT*vHF)`agb+`i82-n~F*OX7Q z+P|Xn#d~<>CYmhaPJAX^Z8#R=j}20be$M{zMo`5W>pMj=UAP!)>=wMcW#&3GW9s`b zwnlP0MrUKqd;7x~6w|`=AlO|uL^~dMKg#n)L_O5E`bBf!`cCF&)vr9p+?;zTxXRAy zb`E+!q~7se_n49PQf-SZW6k={IAi$LL1W6pc`m%W`w?l$2!qvg_!?(2ny04ELQgtR z%|z$8?QtQ+OZA5I1Wz6+yT7k-T(MQ8j4Zq}&)>^tCNWtis;W6h_4KEO1?M<}cm2Ra zYabU!UUL}X|MWwL@kU2JthL&iv>`VhxurbYOdP?7L|BgIm~jG>8&~223`oJ*553mr zy7xTL$G!mkFz5y@Ve;ayH@vkxQ8luzc7L}u%Laaw-FeUT+rt$H=A~%nYUBFGWN-tt zBne~8{$SI1R~X2REnf@WEqbo<>e_DF*#}#Nu_--vp<#^4kr;GmKY#P=e1~A^DD2W+ zG*|-P_&pw<^#A-^bkDJ~jqmDlk@MVOC9_Sx(Y|g-&hlUOZ9LVxUf9Ywc=JxQxj%eG zKwn`LXI+P0jLdCJ3he*m>|GFC$8juCfR5}Xyq-7R)3g6AR)&SSB5{BNka9$ps%|=L zNhF9rzz@tGDp1O^ZJD~2<(9`7fw3gbPkdxKz9+nC*b6<%3f`B~``~rIKYpa~-uHS= z{;ezg#fN)J_8fNnhX%!-8{7}LIJ9R6x!8O>)y>n8CmjE9mG|2P+T!o%zr#x{_03$o z0hXVS&!NZmyN?Hdb*vwYeg*tz`l$P^mCs#+9d+2#wfelI64*k{U?(~E4%pHT=*RX$ zp7GwprBdlr?)f;cCmsKx|M|X=FYphpPQ#z%H*+KU&<@!<`GmP0j+37%&HwoIWhPGr zIuMKPul(G8*WDanx7Lz}M5~?N8m<1wqdY~t^SkSbwom$?``6jd)-YZS9a-DQ-x%|f zTz+3gHsA8O!ykS}-%9PPHi^f5-7vU7-EpEn=ydP`=dr>k4_sVQ$A32Pdz_Ivv_2^R z*7amJpKOGj;vVnc%yxVb&&2Ofu(A(9a6IZDW{uXYmFIsi8)vYpPsaZB%qUR)w@@_X z-wKr0XkEwkEbsm5o2<9{BzGduZ9UoLem~l5x)bqs!27Tc8PA`p5mz{DbJ|x z>G@ME5qUh3u=^kVXr|?ZEj`&a_*L8Q1qr{S+lh}>dyvoZ^y0^M2(qewcoUgQY-a7? zc7I+x_OVSa*MUq>pW+&r2`lNHCU%tXI;NC2=7S>*^{jtN zd+uAJNP}42l)SH}BO9i_$V)x=Vpr$&XvaS4%1ZnF+Wh>F<8JSTfBk&@q}>)R*8Gz+ zpM3Xi{P!Ej+aVLB(IZb3`}_gY6Rpfnb5HPh9@dsW^#3I1KfU+qz8-jYxgmF+P=D3V z>Ed{rdK8iBqj?9lAGd!ge+~84=7-yu0_V%12<9+Oa>Va3?1u-|y=?=#9pTE~YWo-E zMAt{{Yd-+_H?+3r=Twif^fX=+EbYJZ_o@SJ6C2jOCzYx6>|h8urJNXZ919 zL92d3>#ox)T*njPy1^x96yN)-UmaI2Fys>~5R53jr>%`1l!$i)`m)l5^2Va|<>-!3 z+_V3ickWXNut+XWMev2}X5~cFTAdBaOy?^&TaC`|tr{veRQPGVQHf_15&&1L|1}v8 zI3{g6FSKgI*@DZP))O3!7L3gH{B)F@Oh3!_c6x8f)1nWmzuYG|bJAct8IR}(3&%3r zPZ5vHab6r+I#IzK$2dK#(8kAec}0*H9SQ(i-tXRH(2=L#Mn9V|Nm>SYME@$UI5}On zlVnnU(QxU;Pm)Pm_ldCTEb-;DPaj zqpVflI;|5;u%{`Z1Vl?s7 zPEz(kgmPxkZ%-)%Pd=9=s`|KAUt2z)((58_NW?R9uNxSK|652@6p2tbXsH_E;xbheCEeFof z!QtbIlv7GW&W#ep{#^){SHTg}{_TD%NR}tBG7PvP!7ChdR66jpxxg9^N#R52bogrD z^F*pqHf4aXOB~niGuxD^``rFtmFKot!R<{}Sg0HOLR)&bwNjl#Qk3Ia=7E$uCyk`+ zFCM^2uJ5obY+sp&*J)ms?LclEN*-I-X<9rtV-nZ5xaRvLAJxBp3r_vy=b7H=duhRy z((_queDNGk(*-Gk`{+M(Wjh7i`yLM)ckn%Vd;Rvsr-3mzO5 z%eEyCEwZGpWc@U8q`Bcw53qDyxA0hbW7-B(+96xd@hhqX;}qB%H;9Mtjzf1&T!ANQ zWhJ)LOE;xrMs+w;KEwUY#idWLI{6WsF0QP;2A`P%%=D#vcdC{+)qN+cb~ZNx=<(#os2uD3 zvK{zhR`_$pzspy`cb&BPD_|7#B`tTyyc?U~lOHBL#6#tQz}1UroPO)Y6|_W3?9#7p zmw+clJJe4;zkry2u+u!`kKp7S$;w5zUrG9u{baT^_ubou866@JC&Q|^UmV0L_Kek0 z>M_c7E#qJ8CvV;_G;T2qc&g_t!~UG~d9%C44?vX)*foDAPqmlOb@%mjN+;x>572-e zOd6&wc{lqC+0@1(p!FI{E<_FeWpx6Tb#c5&K2ah@N{n25uk2Wmm+JZfzWTxm{M++^ zOL#v{%=iBK3FPNk11F$s;BcN?szSD>>Iu$iu)XdJluNZ#sV5raz1dz=*jpb_ZCK%_ zr+$C(-HXjH8AL0INGZ#lmG_PbBa zH5k*(2c5d)E#>rcww2K3&X2_&rm>xEhVK!yCErMMV*qp-sxrO3YFp2R)Jj1{`d|bs zA%7~Q1ClPY9jh@G(~I>+*V)0-*xZR2PqgSAws9rSY&z?fi5us9NJ`*?^#H>WdY0Os zzErhuVY4K8ll2AO!%M4Lp@e?m)1-qIjfU2IsyTLl?#rtq0(RaI%VQdCjv%TnUP((K z{TOmoe7~x{xu1wf`vwM&Vd7--nNQgJ;Y#<2O`vQuhd9Xoa%HZZw@G=nAd;4O9Epn2 z?^!Kog#I092Rva`byv5avoZ24!E9jNI74_G_1LF4IRJDp-cMx zkdLl6S9{A3DDqE+8S_A>)Bv$x^I^*-@N--}N*%tefTgv9N;p!af81V%&O6L`L<}Jm zH+qHliFYW4cvfmYoA|Wr1wJ(#?PCrvbAI_d!xir}yK7wWM{+Sb+a>1v^pTps>%5=8 zLoTbmbWT~-gJoYg(fMGMwE(FHLiaa+fNewKP+H6^VS{6Rh4wWRY46wX68?0=RNekk z91EHt)?<5Gs&-0?|42?1wncZ{P;e$Gm-Bm{2O@n@aShy`7unRR!_?fBm8I7YQfRf! zJ-RO9oXE+J@*G{fCrNwGIl^y1Wsd^RRrN*a2BxvYiM$Is20Vk}NDcom=?Yp;U(Ee) z$Om{QVyof@FTQ)x+#SOy+GqeBsnxEsAGScRvfe9*;OdpMw9T>i3VOJDJl%P!SN7?L z4fJ+6ADnWObECZ)mH3ogU{h`$Rtw9Te;KN-0`^s$Za2seBOivN@<{8)_%z;`_+ ziSc&YP{ojL`~9!=+yx!q=4G1>eLu{thupV0^jHr<_O7&_0682q->c~@o#ei`p5RNPDY_7Kg z?ESq-E9Cn9{iuLRaU@@R1zXaQ#V@UMe7lcLF_+t_`~5pl4qQ&VtJOd4!6uG&=w!1XN$g(Q-d-UriYIo z4x0>_q~WoD44;YN9Ie8h@%)rXGdyTtH+k4-3BB-;zwXzg|J|WA=FjEb@h{g zi)yc-v&~~0=vS^}8F&;Uy+D32RX z`nsmr*E7zx1I_k|*=$Sp{M5egglW(E)0%C9F2#Hb{4pb0y#E?a#}ygIn872&r;MlW z4F*qKSEH#G*gGCDSC%-G&@Tl(yc_+3hbpb=+HgAb#OHOl%F{h3DfN0k(74NO<{0Yt z+it_hVtlY)&bZ2XpPUn^@K(D98b$t@*Wz5)QAaah$NMy{XTP%f2IMDpdnznDz5lNJ zTKxD_0UlT1zt`nFcp<8j``ksd%VoWn$YZtRohzjFOZ#-@_i>JcyFD#_ZF|Pnm+*}= zd}iI?!&&kh1r2WQBExg$7YLD5&_ik=#yS?vj7`su)h$Y{lMtA1U#+QKY zoyx}x?;Q-_<}6tP_7n`6oSZQ-xZ8Vd;MdopbmRzh!YiMKri9D0f&&ivIN~{Jv^hNY zgyWq@9sylsx3i1~9Ns2Q3!|PM`Te28^Urn;x+Z)i&jE~97^FMavg@&v9I5_N$5}pq zf^mEJ_NtJRdmj@Sdg##DDYv zvz+-IZ^GUQIg~rC_P(JXXWK%!u)1hQKG}&)e}HBI-GiL&iI;xAUr)4UUinP^C%bFM z`_ZPHVX=MStBu#IyYDTBh0YivH#KTJ)4m3Oqi^ z_R&PVqA~}hK^uSWYWflHTch=&KNhK3wkNq!D1G>~0P6(ktdi(SLQyR+=c#_-JkH+- zB_XO00Q`%?Re7f3P(n5^u8luBoW6+89Zv6PQ8{1|=qdL3yKh_J&9=@L^ZRHq@8&zr zNok6^+L(YZEPC%(+;0ixaj@N8C$JocyfbeT6KJDh#CrPK{>CTd-PUB$tHB%nP!;i& z$jS*>Z8l4~F7f~Laq>HHV3g$85+6;c_!A)?qJ;&r-J5T7k$l>E4ch}gyW7KNQB2VA z=InsVstnEd4>kdCvEEaa!0AF$teb;?OEcD?2A!yad|ctc!Dk9xDp2%1iYy{;y(KVVWY_AaV~@XL%@!S6poPq zYwA%8T@Y?wsG}-JLTJu0bbVPb*3nw%v)lEm-|43Sy5Ve zM3YuAHqtkX57vv&O}n1;`?C1N#0p)&he2ma#OJtI7>&hk!DqlZzccfKbpvem?P$|8 zCLu20WX+S`P5&}~;eI02O51TLSX)G2@YJzHBmDz9Jc~2+12Jpr-t@XQiam_P)C=QRDaX*>K-%_g@u@0wmZr`!H(bC35nw zw(o&DO~@=a$a4SF9@3Om$~4EPW86>;V0=!Yr$ze1Kg5r zX88Eo%Bs!YK`&dK(7t>Daz9)oPUk*cvGGlkH#(lUUwjsri=6?)YXXfAssOBF9Q|1N zhtrw+Shc z*-lpbRe3fyTU6zsMX$)x^MAhm6%}f$PKVF5;bqj#n}4{6u_2_E3NDw8<*j9GfyfGHFl#r@-!rRa<)CQ67(*0oOsDeX1QSym#$~ zil+ZHb-Qg-c9&2FExQMIk zNNssa|2`L;`T{?^a~_LsMx!ZrsymYw9eM7u+T0W0)h5$^Y`RuLy_Z;A%pTkONq+X{0+Qo% zA(s!ENwS|GXy0Ld;F;~+=C`D#m+(=l|CeO^hwK-!`s~l85$1R}pLO3$`&yur+Sd*h>^zU^%n3~xWA7&F2=Xx<+t{M+dJC9Uo%D0 zi~X#)`+VkE0~D!< zLpS&Lj=FCHv*yB|hm-i2@xP8oT$r)t?21Sqo`3$%zb`nn=zX)d+nuw1`mNsj>FPM- zgT>eV_S`S~>+kb#r~WtnWR(9w*KWUhyj*h?QskEH?Hu~jm@e~?tU8gbF{0r zSCl`&XYBt!U5z$RF;U8`?BkJV-9EgJ?eI}FMtob^feh-NhiDzi2C3zNub-|bxoAIb z{qTFi8;c1_P7SZ8jPATN^-b%4i-8V!3OGLM@CQG)U7NlU+s1f$?$}!u+W4Kv2(Ulp z7xtE`V||K!Cft3~mg9c)<@v3Gw`x#=CPV|oO(ZTedsItlMl4~WY5hWhxYH-``_|!k(UsdX79f0hW)4hiXUBXhTQ+e=g0T^ z{X^{X=xh0B_wi~xp1NLy4oQ)duT*LLl-u~k3r{lq)Ajj1m1nl2T)ki(;rjT_Q#)N= zJ8vb8X--1OH>du(A86P0h_B9nztNWw6STR4F6U2sL*xYK{9(VB?b?s9b^o~9wR77) zHK^@7-tResDG{Vc!ydB#JoO~q|4ANo*ZE1Sv6+8P|pv@;ltfA|QnJ6CCRaOSw>kPeL@wN&tM~dBs&V%>8t)eoC(Jgr4laL1)}_ za%#W2O`3||2dznQSUsh?E;94?{IstQ3-{Oif|5)}z-deYu5eGJ+@u-SRp|#C;PCn= z&Gdy)fKeKb`UU>ulV(mvpeleQD<?g%Ae1ZL#+<%w;LJ`nuLhc7f z`z!GD6EEnbHhyq37Dd6NQ^In|r~5F?LQeHW^HHlM7$?Sjq6gz@a*9(@`U%9bxLdNK z(TUd36H#fbJ2`m4e~;6p@ti-^PbKN6=Wc(L{{QG+z>lX0AK6dBH3pJ{qtN7uXRIwE zUfnWn*dfe!86ROdCFMEfp786McXwPN-;^lflP!cMY}WmD3Ww7Zi*)8mQ)Zzfv6zDw zuW9u>CWcTAtyefWDAU08dX7#bu~ngO>w~U-vT|1TkkT%Gc+=@7OHS&kDmjdLnozG^ z+`lug&!8@JsKdswsN!T)av)W<0A%V5ulmB(i5V^)JKl>=s{!z7!QqnYYikF(C1|M{ zr`YfO?zoQAIirb!+g_2j^TgPy5ZCc_U#gx~o$ctsPXJEl^Q3bjSNHWAqipT~FL(JI zL*;4lX0cBm=;ldNc#cjpa^AW6DMV($L-3UnuNo$#>YVupLsSAw*b3ZREOHf^FpL<} zyib*;@89Bt@~`s-TAT=lDsQP{AM}pMv7M(ATzg==C6vSdQgt<_32fT^D1xg~rIJ%6 zIyuN3`p@d4iQ}z;ZNIEe63({ZAHQlf2mHMNRzRu0oyau!lZjiF7 z0tH(1-+tm8p9%_GKv$XNckaKB|NiUczEJ9{dMZ+k@AV=(hRTz=s#Y}IiM7hR&|{waaz(3bNpQgzj=jOqxb_^tt=O7g&xp4xgPS*_`9wgqohuZ zlbC1KK|jR~I9AY7ChqRfr)r0QuU8<*6DJ+~2n5!DusNet22m}iJ~Q0ZYw(Upej-MN zzS(?7)k1%K?-f|ES+ksoe7U^#g}sg|ytg)MzhYB|Sxtb$H@Z*1GfHU37`#GQR{hrL z*>eSF#Mwo5q0?>o6RWD}ADY~DSWqb_H}1S%uOd$uod9PvCR7;8YN)x`-YGGEgYNDX zasg}gm$7kaRe@VSIUKMte0sO#=U}_f_SxkRu?1|RKrT^nlk7TI1iFA%zt+8s8)3&w z9MbiAsU))d0z!IY@&Z-8kAHqj9Q;D=rdQTL%yYFiP_-eHu7@E<-%Ya8rNCwd{i}TR zjaOW4{D%8(f9cGALac5yOWvhZe@C8d%=)j}=_QZ#gw}|Kbf0k0#6(>6RLynLDRLI5 z4inGL({JBFAK+9;PvO*gT%{tV$3`kmmua7j$P1BL)wdS;L^UQRw35FAzpo$e$ftF7odsN{FOxKeJYw@!+QrrO z%q=>+H@JWO$A2VFEaiPxr6C^pq6#D3mkqeR9q``t2|T~Ry1eR0jokU^;z}Oig>^W| zswh2L#Y@;f;Fab1a-Ar$FCgb zceC_2=J-{Ew@_txRib~Bt3keqXz6!x4xP|U_8xFCypMY0y2`1zc~ZGK=*!-5o4DSd zp91fN59l=Pr+A-o?W~)#f@jsqkfgA~9@_vL@OfT-u#*vf*ni1tuYAgUr7e808B=?8 znBY;GlQ2v9MvR4A#3288Um)mnbZ=T96+WB<&QV!@M3v)(n~UHDETF;s9#s>y;`*wU ztG}pv68qQP9`oi*#-X{-HfU_3N;YF%QRVP`QG4P#>W*_Aj#lvuc;l)Nkk{lJ@mNHp zS2?ehGE?`(soS8DCf!l03C_@upyzt9Jeti-m1I_`3%4v z-`^K*#a~5UISz&)SbS|2j%H&-&$)bDoTt{JvlidOKR(5y3rZ=xlX2k!g7Z#^>(qfu zH`SP+Q~`B%9Ay8MwCd<%)Cyt+IFax-;vg$aoeF-&lXE=Z znJdvT!VhL08o6uA`Em7Fo)2YvbpLhRsD5At`{HRu(iTVD%5%obJjaI!iFCib`^Id8 z*hlNRxZzb2-(80{+_Fw#nq)N?tu$!4%4qLuIgFRee;~;X!AKSkJ~B+^?o^ap{K~UBtB<*qph2YSi(Xsv)#7-LU2e# z^-n`C`7oO%$LOoeL(cnXk!!|9A2VpYDp!uW-ihomWE#33{_vhVcOPhEbyFiA>FXw7 zFUM=o{R1aVlfIrQd=GzqG~JxINk5k#7=7M{^3Dr;yA4GDoTJFOc<91r=dWwii3<$d zX-PJ;Ki{x3hY{7qDL(eW7P@n+5;UQa4wC)MO-PKTSC2tnjN=>hHOKyfPjr?0-6lY% zy~bHL_lmXF+S%4kSe;vs_Sn}Uc;X^^#D4baKHy+^Vj2Q3eIB;RpY8LlFs(s*N#Bg+ zPlyHu4zuFRiJcd>YSVFmZOLQ$v!lelQpUP)dzLHVJ_)|j*5H6P5qsg42Rj^V*Iuu* zhwvYTau_(&)~`XiL&isuccXD3?-=&ggo9|rCX5fzF?=+qMOmEPWs>ERVm91gpE+kW z{Y;}dHm8m5ZYNp^zvEQNE@BhWy=pj(jp6Au-s0e^(z@q3x-VGPb5TDzN8owwcZ;E# zkJ4=d`=@0bS6v%d=6&EJxxXbOkArC^2TVIJV%}%Ws>d4d7kLjH0F<%Y2*WxF(2ne_ zY57XJ>BPQ9t^2=y?JBPwppTdbS~=*OQsE3GzO#&|n*3;88hrs&^xUZ0-b_Fe(k8_Hh(Onx2-=^_o z&VTifit?>}fBxO(hX+;8g*~3%J=WRdkM(!oD{_@Ju%G-~JK8tZo-bQ6&3UI?x99pM z9wV9e(7_oSHGM$OVu0OVpVp3Xdwo4(`YamH_puhN{7^*^{r7cKyk2X?p~zui4cl0D z@2W8pbsYKeXFbRdSKM%_y!3JS${e2-xKhWCY$wK%4fot<&(Fr3h_PRt zyxkAEE&Bn`hDhjl&YKrq)nt=(YVejMF0Aof4l8{w%=4fXJpX!~_hO}-!%kJ20G`p- zf^)8a!6*Lv?<&oAAByeV>ZkhAeJve)qCu5s*XwmHE#g=BN}$Wt{GPO>>M_;DB$B@7 zHgJDoF9#~wF1b#7m~)70PM#{uU%4JuDMyn2Zk_*`x|8zqD+fXODvpt)+Uw#IQvOJl zVxne$x4dxkD|$}xDaLuXJs__Ko!;fTYpU?4$I{KE;ydI|wT$m{O`YH7M;VULL%wc? z*E<{O0|_5$eb;vQ_R3|xh4&kTPWLaYyQiGex`v2z=U6m-zT?=e_U&!(9!5NM|2L}< z^ZvWcNB4buxn>kPGku@?+Uw9CE(8}3Hv=h8*OSA_$sZ&!dOuIZ-V`bNVVG)5vlr1m z5#ulnkte5Gw&yQ7COc#?Rbdvq{{cVJm9C0BC2!*aVF9cH{QO!KaKO&SssUE|W5Kr2 zvd?|8Bhj5){9gNN{LtX)@CB_8ybx{J&MV#V{wLRO-`Rq?es4qdQ@iJ}|NNem_rfvq zHoMra&z30YP>|EAKk-_J@j!$4PD$L->>*hBC>2@*)kLz?$UWV zp~ae$B;=6ZSDzS);Ap%)wvz_*6}pE;Bp(J_ocMIas(fQ1!moLLj4}b5f%sYeHn|2E z>&cy#C*+o&dV))&8(5ZysC2-p8Ud;NPOf$s>Sae=cWlw0PsiJcCfQEyf3bia^qDpt zv@d#@*LCgkcx+EfP_&Kl(LGT4n5=>i5G-)kcb1-h;i0r?yWdc34)Ipd_K_yK!zuD{ zjGw;utK(H4+T>tve!|Z831IqM(W9+9K1(FYo9|E_0TKG}C`y8S1ZjP%`d{M0LKu?<#PmA|u(C!eSXkSEyw z$#vvyzMR7t2XhDqtZmXkJfS0)Nd5Eu%Qw*WMQzkJe*zYkGi|of zAKco&`}eK)d!O)CY9H^-renbonI0A4$#xuSz>C-yeC~5x?ki}W1Vq2H$@~7B?1$@a z;17#+AolB?MDn7Gn2KyRJN1X`ID5d?$=1wgctKUr(if85O$_!;*gzL^5k|FVjRABTarCA{O9|c)!vZ!qQ!NAyU{AL`k3ZeC6kK5?^1Q{>htD% z+2u@jKWxdvRq%pFI~+7XUz|>{(v2%J^*GQ*m?n%n7h%TR?28ju2cB5EK4BXqujV)^ zW0C5!#Nybt@DdX|z+ak4(BEk|MQhAtQ^?JsPa5L>-CXt#I#|&sB?V{ax{{EX+))26 z#9Mf`;%lFLhaQmz8(`?V5j+u_Oc^!zFh=#TqGGkxm?3=?EA95H>frPRfv*t@rgKt{ zbtBuKm5cc>i9&s**V1&e?7Af57YRNEKa&708C2b56g?IA-+6-NNzZQZn@TmSCdg@o z|9o9#^SzMG5R(`iHC%BL`b*M3Vp;;vkay5l>VjqVJ+^TO!7Pc#ViU{`dU3ZOzBAQz zcj}j{`0Y9=*D`ur68irB7gf&DPn#?>Yxxj{6{cR&Z&0@h1qY43201?*`~-VdAZ(d^62CD>Ki4R8f$=Ymig~H^CZQdw5b@Qk?&%7@z zxPqNpaNN&-MZec&MP?D7#COpmXJMB`!r2U;tzEHL5O!NcPH_aVhlPnbkt)T`3&o9g z?Ky?uU(NBPT?l|v{w6kV+>G*W_E%v}Stb82#u`u4h{)%fdeuTEil0FXF(Cf~auyww zj;Ig(OpE^{+e%$(LCe}e@=I^0T-_JibSm*<_(%6)CC$#+-mcgozBD`ZalYnQL++d1 zl4=*$X3Vt1GyL(`Xuao)3$0Zr73k!OyUC;1?%$Y5@hj%WSv=$I#o<@2&6Hz1`y50o ze8S$S)J5LA{alm9kmvhR_~h3e->JEeKyjNbdcP$3b+&W?M#$+&t}9QaeyejcT3-kq zDpuuj^^)-eo?pCo#kf@aiS~isq8H*vS+u`#5t~Ow;!kB1*{%L?|6buLc7NI+n(GrR zULQsNdCa@dl72^(|BG~z`ZGN?Oxqo}Tz?2Y>>!W2!Bgja0v_j?#fRoo8EN!6AIrM5 z`Yc-T75PNAr}6v<{3m^@-ktj8rA7Zd`9q9j5q`GQp!r2|rdx-rV59JK^2n=gWH`YJ zU9^pr012P2;CRuF-$U#MIwsFc$t{RfS|vU(s$?R>nXDhCb{-rD7i>uKRE2NjMb*&9 zDKmD|jQ}ukboXndH^aB*MXKx1en1j0=nNe+`&Hk>STFG2#K(9ESF-Knn+q#$d3miv zMe_hS#?L>vLOA=+X`6A=K=@-jNlSho?``qI!^M0{KNi|-?}!}p6T3~@`_d2X@^iRO z?e%`TeC@H==lk2W$q{Jdyg2Ftl(& zgzNNt`rlGyd-HV&j?l?!#nx=JZoIr=rNraK8<5<`1YGOA3d_bn{QUj@SEKpEwef%Z z4*i-sr9B@ymaqd~)2uAoU3f{lo^*GBd*V?i;y;le0Mqp}p8F)P5z_&ujYm2RPwhSW zlk29O4kz2*Z+Il|9s$<}J)l~@|8$-FknE-Qs~eBs*T9R*=NbEA)eV-WN4VemeANbg z|47@S=MzSg9bf5txcosb3%gsf0~gIlu-taIPrlY~uBYem`*6Ru`+)rlcwIMjUB@&w zZlCz@0EKjUmLK}J_DuFKTRSn9PcqBTN!sc9$cZ;roWcgEK6ig!-0I_)`bIv)6V?_m z=h)(h7z5zstLGr&ormY8`JT+D{elm=MyK4uADX{H7P8uJaB#fObG5DUAAOp=``vsZRaH=iNT|NEu%F2ygwwW)=768clv`hhzWM z&I8Q&8JpJ10kyk)l>-}>5?_ChhnNt5OZ8uW(zjjapXGn)4SlfZoyPh>UwzggKjZ#r zuRlB|AKE*^@}!f?i^2g;(ZPQBD(qv?edLeI*m2Z#CcvpV(G$o|@_QIBH}pYn(I9&h zoz~m)kKk4RRdWVedE z{Zf9cO+M%E=k`BeCT4X5-_P%)Z^IpT9sNVM*%$awNyd)d9@asa{j+|j7(K*70Y_Gb z|4AqQ(A9<`?(Zl|v`>d)ihSe@%M-74_$_bL=es|=!F|A2g+QVq)>CK)>ydoz+7X{l z1NtFp(s;A4L)$Jr+w|i__H>K0AC&jhpAOEk zK+d;~=Oa%b@;s1rpkm!m(w^3i_&e#d zvK{@|KEgJu>^>pdz3g+I3OMT5M$3o$k9r1i@z>YSWB73Y2%;Wx@lU*44lxX|2AL>8<>wn6V??`sI zQ`Js}+i+#=H^eIK6qBwOaC#909t$%06wWZz&3HLLvt2%soE?EUUCb3mBpthp_meVk zf7{L7HvHifl8*Z@co-iWY-^Janv2c(1adei!N?x)tnZ^#V*)L40{ZF7U@IqP<|(_D zi*;-@81QpqswZA>ie{xvj&+n%J@ehJoHn^?G#C%bhdf133XS@S8FBJVJ6WN$WK)gEl;LkI+jF}S<(hhvi9e&UJ6y9UI27Pm1?|vGP>ao4;l#|AQ{iN5QHs0Z684gk)cicacN#pf=>JbO^ zs&xVu_ii4-g2l93SF~Rz{gxBOvT&KzF*X{?L(tcG3VamU)qPTcVGo@vdEFoTax=DEfh3#xfT_!UPb`PlU?0U#RJbY z|JGZ1z3K@xX#yNykmER=3@5%Vyv4?&&~>suCsLCGQhl%)F9gmld>9i889DhF^J&_g zIT|e%E>pHsZXVil-yq)~d{b&bE%o$QZf8rL>H&TRD3DWhR*?_t11DR3d1bC|oWM%< zoZ*Kr_Sav3k-ih@NwR*bCvbty0&oN2*GBTQoxrNTklH9&Ax#cA?&(RXUTw)u=)#TD zf-6bly5^~0-@XwdahkYJ`NWt3t2AA<{=S$pZEUjXjfi!m_64|=XtC))oN(?H_aN7= zhm+6YLw*HK)5kjUw$ow|Z38Fn17&=f6+%#9pzE0cp>4`wzXnN&uwQ1u$7$!^#9!(A zvTdC54PATF7`jn4;$HUAAa{deA0zL1k2Bv=+}%S3%IYs?+{GVD={>rSv^v+Gy z>m)d;Hqjgu*h{p*6_|2d>m^Puu?)f90I7OUH1s9LXnm1N;tLO&X3-p2PL#%9paLr%sqk#Sm0Wv^X>XK9B%r-Tegi zbuea*nPQU6+W;b!0RbR?{2g4x6Ze~Tv zb0v^~+!Y)?7stEaNq4`_`7CNSw8Hw7EBXAy1xf~?SoY9 z74nq$TngQQea?MiO!t*}+V4Ws&~qH)5DqRneRI(Ya&bPjH>;w%e?dM`K&y3=nB+&$ zI8I!3T^#aDx^bfw#oTYN6b(5BUgI=PqYW$~RmR=FkGR&d3J+u5T=$}?gpgmvx`^Z0 z!ZWm}+=^3-1tk*ii{C}Ow0MI2W!>$gI)ayu%a~{8mmIhEI5>xY|K6)uyd!3l9DmU} z3+C{Zu8h4_`$O2~mDq*wAMq@Bnf0ZlyumJmclmVO?gK7;vgl|;bL5>MGpxVFbrx4g zTnE(vujd6?RX_JwieiEs&}Lg$=kmBwO}HHPXSU_C!{_qf-VbvQ7dD^zf3UbV;tzkm z=dmX5Oow{ipH*j6i|==Tow1o2$(zJ;z%^n7wikrZzyrorHenDB1HV^`jWlTmzLTau zlBbf7IR{W^6V-T0SBvB+@AvP@x+K6@_qPgN&VS8+fnR>hbJ8?@nLdxybB7orsvz=n zfi}qs^{_3F$MC7}pfR*ke4;t7ZQ(Owqm`Rj`Rhxvs_K%*+0Q+eh-I$m3v}cI5t8Jo zOD5eei&L~Yw~2lL>l*9T=$$gZWOm6Fsu1^+&%ra6j?9KzzWTz7J_o@1f}oLJh3%HR zA}fyT+dsd@yygsS;`pZFn|vt_czL7v~nnqD_q!#%+;mba@-aqz4B!8h<)aF-s~^MF9ogDD?f=oXyXo%qf9vEl;-O|JqM(7xwducFU}uDEs4wEBVU$Kv-zBP)GC$AiY1 zgYc@Wl%q`A^ZZ1``PUz$Ewq<60Z>Q~q!Hh0bLE0XpxC=Ga*R^MrG+ zpm$xayL#^99BX0DE~>qZQFx3G0h_wl<-Js=k~Eto52xuDZwI?Iy$0#CtLBFtkP{@f_-A4=egO-&iNS}l~9aOcc&X>Y(-QZxF>R$bn<8JnikXP>2XL{uk^nwEdES)o%!eVbvuG$0-!Kn{e{4CwT5ujXs{TUdfqKA*p5((ao>r1?_J5ZRtvWqk z7xszH6?6NXdBn?yiktKKSD(|XpP`GtGl#*~lU(Bc$W2ggVLgUC^ja%}%9xO{sG3Oq z@OUrSDW%*#Xa)bC>2UI~3eK75)8+*3gBR8V$U|fP2v1_p9&m&|vH5D$omPJvepb>- zs+X}hn0JXKambeb0(d~wIJ zYvR1O`L9-U4(wC$7&o3^{*)!x@Pz>L=99_dhsYZ@-TUVG86Q931{{+HZH*b*TmEF- z%Fk_fT&28M?U#kFO?j>rJfR;;Y;&WQ)=h}k_EY}Y_ewZ=Ja6O!o$z|{zvkTFRsCG( zZf>{O`e@4%CLh~9e&m%Qk34sN-^Y4H&fRxkka=f3&{PQbH~wC21HiY_7O~Rb|61!7 z|N4*rn4i7+Fs@jKJngBLd1N0fhV1YA=YX8LJs$Odx){%(%^cnk$9P!thK6UXp}D36 zhxis6(-6|`rf-xXgq1Y_qiy!>Ydgx^fu??}I(XM4-5>7q+2yf(XE|YCO!w-kX#Z-y z*3;G3==9iUtNzwvsL(HWUiY4hr|ROX8O~j>mX+{H*BpZ5@TzhfYsbx6`<^F0z?F)x*VgmIQ|7C)TqZ_sRHzBh1W zG+)}`BON=xj;>4TQ9Q3&eAto?_V$$Ix?epPkiU7Jm~p0*bzLO4)coy%qIRcFJ{ZL`E`@P*(#CYEC;v@7}Ci6|B;epm4yPv#dsIKeET%i;n zN$Y=tzSXzVZB6S*mlio3dt7|c8oBJeqovMU;5YNJ0@OOj>>~gmobP+CuJ*m=Ai8|v z8V_+X^C`DC#`vfka?Q-1vo*kN2mgU`qm$-ZbAQ1*&42Cm@JG_G)%4F*vXBCD7tA*j zBTrN*wT+ut2ZVmQ|2`rIc@?Xp#A7_>ex23_7s%rM^y~OSP7(c_s)-xr-KJl!S_%x^ zUB!IvDc50Hm6&rStPATp%pAvhUxF@?n`FDn@;~6qXky{OgIHIoG{2kc4$|)S__nl> zjU}v7`Kuoze6YIoEo?H^2+m&=P&7k6NXQ@UwLxa#fcC` zA`J1aGX>iIwsn8iphdD1`O?9g|AjSRFDB@eiLa9iNV zN)S$xG{JmS+KfBh@Bh}xvgUlG!B2-{3a0nTN^6dlf+HB7zyT{Htp+u|lY{XHGa)kG zBl^vMp6GtM)GcA~*j@eVp4gnf4oSl=>7?I%-1KUbN`2!jKolCoq;+d=ztUmtfmwxJ z<2k;c=A|xji`JWbC4!n$)g0jtpOg)-zId=(HsN7*9(uT3IderUcIr+qAQ+NQ{M{W| zsflH#QJ1F;_XKPEqe5m4$-yu3kFJoHfBO6<`N@a-4{~yL=5w<;qBb4*vGH({mcDQv zaXAekJ_T2*2P1y!S4oAK_bKhSuKUi350Tvt*-?IO`Ttzh-I_T4_6mdk;H>p)PlgD= zDY5t^CIuNddKOORPyC`sM=0%TG|#$S(v{+%MB3d`y9Wri`zM%~w*53~IOm`BO5^?2 zsDFji^+OV|Z3@ZLew+OUK4`;wIIZaSfxcn)WXD6XPyBCN(72vaO4uFS={gj;nJ3O0 zPRn=IkG3!T1d%O~!(-?{{j%NEh-SZ^X)KSpEAY?cexv;fcp+Nqll(TG-stMjgguuE zA8?P;!=&n}(6NION=G}obmcQ@=sB|=6&d7uZk!<93mD=Vqd?i)?Tbv<|7KXq@0J_& zSPw)J1<6tLZzkQBO5Umb3*RFbrKc~i#9O?Wd@eQuj0Q|l>ceBj$Wm0u9_lbU#o)hL3qTSO~ zW2an9YRxx8|8J@cDTEKEn-yNEzQp`ntIXAYBxoPLPO*)bthH1AJZS8HW0M%(XI&fm z6JuqJE5{iYi)LU`P`z0keujPCk3};#JRbWLUuyL?C<(jdmi0=lAWopIO$7AY(1}=E=QpPB9iA8UKU7B2Xov-{X(>cgy@gU@N!t8z`ChgZI8Q<(7Ri~{*DM)PH zH#+sfVUF3AZ3K-yW!>$_RV(jp`n*jVF;Czc zW0b`~Nn=W0vfOOCkQQ!9UBouI!1hM2 z#%KbR^xVcz>Ub-*LF2dFzz*KMg2uB?KP(RmH&m+~o`1px2)^ z-jWOS!men74q7DN`^OFAT#)RC7f5YCeT&@ODPje`Afebn-bKQu+`oRUmlCU>xyHlp zmX3YA2R?)Sf3Y0UHAY_qx4M73E*`93R9Fj^J{T7a%bFOvW*#u^w_Js8dW8IJ=xrn0 z@-`P|jf$!T-v@oc?K15AIb28fXE;w>`3^cHbC%+Ky!VCQvyG7V)55I#9u}8lT)w&S z)v6LlRZ-e3GVg2WwTg2-WTxt6hFNx8sx};WJmT;T!Z&oKH!o@a^8Ms-jRh5uCB|8g zAD%9bIUw74fLt9Dy4f|>qB9^58H!1$n_ zinsOXfL#+Qo20`>aXL>udcV^UrwIx5!E#-nw}b9Y`Cpr==0d8wqN(8Eo2sk&#x?M= z2-_5lgZh@9AG7VV_@i#S`k|SDm$Hzl`3`o7>AO57GjB3q`#IrAO zF+a^de3s~|wj0-2Kxhf3m%0Q zhNu==L)OR0>cQ6mPoZz7qN)BA@WB3Tjw?ITaq>THI)f@&@Xq#)AN3(`i&G}0uYI8s zY<%@ycli&P^NSqKLzBarFIHXniI1N@Nh^E{-Lb{7;Fz!8^M5h*!N**Aa0^FH2wIJHQ{F*aX4T^mgj z(2vhYp1{{Juq|58`KX9KWem`1o`YhZ)DN&~hou_oXxDo!unF0gcpslPPjh}ncOPy3 z%n+0@vCKTvth5?pV-I5v%i8Gkgdwzd$v?ZQKKZGAR{7^KYT@He-$36UrlDZ(e*^Ew ztMEq7Iq)LZ&XdrUg|6w`)aM#FDm5mKjXqCZI%%rY0Pjju@F^dpfg4=z1nNz+avJPmt(oevc#?P==$>$Isvs;-;4)1Mjh<8{>G z0sQmxJhSpo+V6VqAH6Hh&Yk4kaVU{9Nf?iPn$LgAKG*&`x&LsHZs~E+`S}G!U!xX0 zHt-(ik)Tr_4ndI5_973T4o@PwqnGZTeiHFD`K@L-zS5so-dH|nn}fm|?n9dV>=T4M zNP|xrZQ*~@eR@IUpgZ{5^vdSHF4!O8JpJxInI7Tc_RjLs`7&ttwI4{;;gQprplbxh zARcrr<9zZVfeX47|I^&2S$$AW{WmztKC-?u#)W2#Xr7P#Nf#B}32*{h!9XIfnE}o17CAt2tHb zHgiYi?K2&o=wsCWGXna%Yp!asc=M0Ji)Kfga~!kk4?YAxT6O2IuMSIxw_i^_o4kPlrCaHrx))JAQanr_tT-}>CUoswo2YF*mX|DRwCI9hg zgLhq0{Q$PRHQ!B*$UnJ~r#dK=Hmu|M`wlyJBjM?O$MPw67{tzwudY4%zbChpY=-Q8tzSws(H|Ow7S|I`uaid|Fi37`C&V0^62(Fw8KRw zA~uwI*b)3R^p~pU=U6A~`TaNi9MUmoKSBzBEn4maE56f4@9M8V>Q~`Sna@7heQ#*y zB4>LKhZsEJ;%a-go~|dG(CwY>FG|Fbs^z(YJ@-wbI%xu)awMPZ=Yt&n_Hy~&@=<`6 zcp&x0imA$zn)%t_75K&6hREgvL3gk9RaWgZ-RHizpC0ps?_r~~6a9H!`UU^D!S{Hn z7Q5PipFW2i4rKCYmQP|Khnt>P75(Vv!m+G4U|j*83%?X&wtc>v+eRJ@5MzkflfO!Q z&HZC;U~KZT_FnWnRYzr~>94Qgm22ada-rX$AMFBkafZDV`%HTXzWJLwoOBbKUP;Wz#yi+M1 zlr&DN;OeKGtguFFD5|VHAaOrAMk-9+j}eX7h%wFvPBkb_APY7W$QAq$rv)i5qFL`^ z+;PH954ib#qG6n_Ap5C$LOjMe8f~-FPMh_ar(@TX9{b7ZQd&#-1w8kT{JZTuMKBl7 zqTkQP*n|U7^qq=z^&a2-adw>fL^PsU32r(Z#W+#FxsZe_>7FO$g7~htjgtLleL=Kt zwAnBb{nh6CDO_;I`bkpU&V7wW^Cp(kPuFB8HNKNm@@|V~pj)xfu~%V}%s#I6Mpmzb z{7O&sHk@+*QSrn7-MqIJK=6B7oK|DqPCUc7EPNrB?djr=UbT(&HmVnvYU9^cPl6&| zK)?M&<6fP#pTq_T>q*9W1BQIpmEv&jjv_x0C&qZS2hfb+W_yOyPYTV+ku10l-1>i$ z!K93lzO!CKl?b$J{V=Tu-Pmb5c_JzU)P4caQ-4@6_3bC0qqSyj9(q6-~d7a+%b z+v!C0_na`|>ZQ8D8M?P^%ze8LH5aE3s&r*o?8!b2^S}XzmeqrCI%o2b2?wF@Su*IV zJOurL#py!7Zxc7r-40hjZI2#Ioo?d#LSrMU5YJ4SV1piXoWl=1^;0x?@p|Zf(j{Cy zE$zO=X+zx}8^K+E2;0BfzsQd9)nlXW1jg?BjeQXf#up6s0lPOA?CKRT&W~828@Xk$Q1lzjECc%j9Vo(H6~mly$Wpl zcF80CZ~;q3EA}_E3mXZM;)AhB_DbzZ-^%FS4-Py84_3RmB`tl-Uth~^zrC9Hi%$Mu zG#k<8!rkg`oe-B}g#1S=(|j!0QN(U>YT=c#W%S;u(!l-oJ_XQhuMz`XMKxm4;J<#A zjUhpM3x5>9g}p3#f$W0y*4MpmR@n!bxR@u6=Vo~Ji+c>D2jRwP@4($&rEU4qqv)li zabK`JeULw&f1~=#@wD8G;bGSxSMXuri%dCH-F!djTAY|ZGx4;0cxRINx-)`-)1PZ|VL6!x8xy$2A{P((wbDEgwdmH!}ALo@Sh(9pq-q39zB) zTuOXgp!sTx{9d9H;v2Rrpb3u^ZG|0BSpj#(lPZ(>bA&r z5UxVEDC=Y`_91*6&_qDPJhTsX_5SM%{_!z4V#Q}zcGu+=8-BFrgG(+&b&KmE1EQIK zf*hLrG>{!sAb?B^-vnPJ8eFAHi4;Cy9&*JJI`QV4dCIKQ z+BH(jqU{S2fwz)RBL1u=ESq$Lgbn!61KQ*;;&Z=xj`Br|Rntf7ImWE8hqh5IcB@oC zCoaRDC5{6P?vrIj9#UKdeq5aEC^9QXG?CCr$#-p%5jGb7xC`ovORuP&7&7AW2U@Zn zp1kX)^xl1kzIMV0dE+5ycEP#|i|C@4~AuoFSP~;<7jcHE2!1xbiVRS#L zD4N4NHjxUSjdV6wu`rsf&dR#);1?aaDL-OX*DK0)M{=|1b=At7LE}bS+~atPeKq)G zLh<#R=8M?zN}VBrw0tgc5c#O!$<(z4W`Cx~^t=IbzD@V>ebHuwK4Z8_Rk?yAP)oz6 z@D+ZqGg{3%QLgaHMLqD{cz#uhsf=vIMb%w`E}C&~@uxKNEi9*qmw`*Za5{FufohX+ zjh{L19`loAPwxx9k@-0IFcAxywGDYz^DBH|ai5MJLs|KVDi!|IemJk&|Et^o^w+cR z)O$Tw2|0iry!~t(D#Nfx?r;f^2y7T^irF?_6MusSRu@Wu)=K!`J~?N{l9b(A(P^yP zn71$wglFK#^_(MDwq#w)@F(o9q^RHTZ}+3U%6PwSUgCUKZXQ`Qd2iL(qA_#=+*>G48{oGq@S?dnbDm26PCA4< zMBZkNh3B^U^J=;I4qBi0L4|?XVBT~;M%4NCYIA_Vx;CR}q<8#>?RVC-qSen}9n5;o z%t+^_&I?-uoZ_xl{}s0E#J|9!!T$!I0X~M?_6oKkml3Dci*=ciKH22j?cTe{?=CM* zr5@ZCl8^O=0QaZMPWHyS{HAb!Eu4e8rWmanYxvdCyvhD>&uH7kB<)gKo29ft>+ zW!}dJTx=y^&fic)acpyPSIoQA>W96;d#CNDtH~zJ_nJqk<=jA^n|pP| zldd%p@^#W@4lphK{p6X2)GohUzIPlpnrn^yIDX~W@3Qlv@)E1CpX>hA7=1I>vO8Q| zl%FedrwnGLnO3peDpO}JK6BV7nq80fyW%OkRKhJO8wMw~gv+?0ZH36l-yeb+?7N29{~ifvYAn4T~IE zwU^;L$zfemi$izX0q5gLyMq!9SOcDgsd9f4XgT}sQEAu5Rp#ml9;~T(Qw2@-A*1@Z zVC{_O1$Dv3IvH!tO5Dm&(r;CF8}Z3F>b%f3P|CV+3tp}IiF8nFr#gN7yFRWLKCb6) z<5^?sYuc*a?v<(WyGfPcuq%&tKAsHtiX9tI1-mG(ta%T5jeVwld_IQ}Ii+#X#Zu_N zvDcQ5ap?IVu^zifd9qzbaqU>NgMAG>KhX!`}2PuKH^Io{bG-N$;UeqCEWN{ha!a%|O4 z==Q(|bieVw>RyjQb_wtE{oES@drW>a*~d-Z%#QL);D{db$UHXw8+Q3*vI^Bz$cD74 z;7ymqcYD*G4Zh#=PTLyO2VFe+ejxB^)A`HysdEpDmY}Vb`^65zzm=TVEr(;1t>=6c zH6Vnr0)ODN^>@0AVvK2TRY~Qi1jpKKdNciM#?ckFo8`a9lhXX~S38swV_CYH8f+=S^4%X=RIc#x!nA8hy8u!9uU4ZUCp}OXkOa&1Gj60Q?~DV&?5{Jf8TT~;?XAG zO7F~AgJY?KeT`VHJ;P&$K0uC=^ByeCXtmF&b-VkdTTz*|k3V!a{O1Q==zjCQj{q=9 zK7X_0wjVHM?MNe+W3ilPE3ab=XAyK*(uSx1W&wZvF5Ne}Le^nlp=(2)t@1>`L$IL= zINC1rM+e;%y0Gy{@J6dF4V?6<#Fz5|VR(Li?FOe(D-=m%;&faZ6F@<@anty%63ebu z!9lniawN@)AU<6=j?Pq{-{}Uq8-Wf_ak4|%SZ{diD~6~ihnw+vhBMl*y?tx52wivz z&E%x$M3A(dV|+M4gW)Rz=xz2BF1G&B#)0ktWCgtXsHC4SHr%BCc~KO@!V41=$pi?s zc_BFsc(>l}-)=>?C9ur9@BAo^n_V#!xK48RY1BNP^+UV2WKU)9^S;Ij{?e~*qNG8? zG_quFg--?Gg%q15pgxbmvv>b=?Lo-%b0ORJzYmjVzvDY7+v>1#urdD*IYO}09LScK zN<)tKzWH_u#!Pr451Qf4UewQ~FL-IV$` z7h3G?i#+8k0=|A}U6fkhXcI_mGLKghXM?}IM|N+1wdVLWo!Hw!A_$G;Yq?+vPD{eZ zVCLz#VOvGYM2}ca{7Q3b9C*PvXS*6sASHk}`O@XHC$9Qc`5(y)eVll%FUx_2fm8X^DUc_>xr(l(emzg~Pd3eg2smFHNZ4nbob2++XOq#Z5j8u<6E^oFywu*XAvQlx6rJS6x(DFJVn2y%G8Y~(smq@<5F!}Oju!IwJdgsOWD)RUxHcZgvUFuM+)NNRH3gnS^gf;X0bY2U-{paJdvu^#xa!kdq4#7D|_ z8BCM=W%bI2-WKuh9p&6rPgQi&N72r;4h!l!8xV-@{#NL9qD{Yw{#^rDzwx5;(6RK+ zb;;3A(q)ObM;&X$hw$phzQHFq%#P?Q4rGu@o2sU4gO@?MY%PWh+w$r-8A0P!6@V6S zun$7^?0{Mtll!j+U7^Qt?J~Nm)uAYOg_d zv#NlMrEIejmJfwY6gkvHTF^#QjuyP5jDN|?kXI~_#AZ*eLm@kI|Mq&ln%ru%4?ikH z)LjQ+%$dOM{F<8+yDq%1Z!CnmU_0?y+ zNBd8_3ZE!tlzBD%7191qZS^v40@vg*WUoGdz_xE1nJeKd8?-(8<@| zb5X2pGMO@B$yd5IkV0RvpWAW4{h&R-fl5?^_!2Ovz}vpDdJi zCG`z3BD~=OlfgKm(^R-~Za}QR1P1|_+ zkBu3Q`+;gG68*&d*OPIO#J99h=w;cwhN{DH@fcCjN63?bk0TDw6?q-sAfOUDXz@^v zed;Ck-r+0B!Tw7Er=;Vci`U`TYjJrw_|ek7H=A+>ocrng#2o8$cX`)H6%^GRZm*9IGo>Fyrf2WQW9CwB9Qus=1E;VFK zo^$8gZ0zYf{_*es_;NevWDr=>Q(NG@U^w_Xz5w$}*Ble78pmQg90<`C9)^8|pY|HH zAL`d1Tp!XFp+Cs?w$V@f(38)&&#r5iOv^Q9H0<0HTP{kN88m)El#t9^ac}3;#v)+0qKhSg~8bxgO;6{OITB zLY@Nzhxx#(|BiIk7)|9lW~tvF;oWq7m)8zJ_I>)a=3BuheWXXHqgEZ5c^v%Lb~)Gc z{OHuxhc3-!bJ;^480lXPNK^{kcKV?KURn@Zej;VI|ct znEXKVcBRj7*6ECs^(mXbik1LMK()W}z{K;rtL@y-&w9J}x!J+3H)-uk9k;Fx<+Hb# zM@hc;aUa_62Vy*}`T5EB>d!5)O&zsj(~83~R+iht z8r^Qo!greMI_Npb+exk-^hg=2tp)t6`!;vX?FOCCez(6M@i6)q5zZaX@4R_izu_zL z?@w`Y_a#y*$oBUX{=bMkQ_5UDu1_vS#R&>)`J9qbH@c z0Vkg*d4ymK6S&K7%#G=u>o4tYBsVs#^FpC7qctma9FWU~<0ZJkW6?ufs}22=x|C_E z?ekz84nE5IJj=x%>&wTh7NpbT3!rh>Uiw`Qa<*t9`K0~;#4oQR4-fio<}5zuOYCR^ z^g)OE8~DTNp8IY3rKAU=y%4*~Lj`U*$ZhkJyFb0=C2Yq_$U}?8aEPrAd5V1i`vxZq zjS&gW!7Ec$gA&Zt`bU3PEZl$+ z&XeB?qPhWQh3WrYk6l!y!YU~K{9NSzehU&3%K=srvbuP#bmxEUJJ5lHSAlUm*&<^Bz)`obaXLCHLgk7y~5 z*HTSQq0~n7FPlT;3%=r1u=PAIe$9nf7X2)^-m*@e|8icUikMbU`NSB_xMH6coNkpa zi(JvETwVV11*yccLc^Z)XyPf)Nl$&af3-FaJV~%vYqy+2E~(_Xy`^h4oF1V`snE6K z>C{eX zW2+~!#z{1IKdLuo@*s6IC1%2*YP#Jk8sXH;IJuZ$gl*W8T+JrL#??Wm4G~O?hmxcr zU5w`!-=%!V>DiVG2zWDdISni-0kJWqMQx6Qe)3!1mjY|zs-9RA*TZvBrRd=_+$~u# z4x2mBKH0TS0~d~xth&F%W;gDm1pw?wN04(}MTcBexhU~tX+NpY=;gtlciTLZliCu; zG`^@p{4g2+l(cv{H5WWQPcEl+0af@e?NpO+SpD0(RU41-^u%=wpu=X2I)RH#T0OwT z$>pCmuLiyd4#6)$*E}g5m4RwQ5&<~$05+u_;JlhbpknDt`asT628 zT&A3!?On<>Als&=zBlY7p!*5pJ2r=DKFmjNXHO2_AQl&F$NL!S3=xfB4H>9kiYh zN4R3Yz@HnmP>D~e=0Nbajq5O&7tuOTUhA|d-^KB6>1)Afc2{>Tc>L2gcmda`r zC=2;o?>+0*8wNfx5nHFg5_WcIo^Z?%sq50~VE<#Gv(pFG zitQi!c6kzd`ZRIs=go8PD|`s}hw!bSv-5o|Haq-nqB(wF@vX*t-TuL!{QkzlGrrLI z>#u@0RM)^yJYi&#$yfNncSQl%H|7Q49*CyKRpU+a>G(Uxq49mx1q@31^h!EU+ByzumBZXrIjE{3#vJlW!?;LCpDwNr zihlft>$N4vR&0HhYi0jcnC{J=HVM4(BK+u&{JcrwR+Ss=rJS?Rm5;%n!i{Z{BK607 zU1A-_-Ln54H`Atmj*UY1TG}b*frVSLm#(XrMyyvdZd)TRr`Q%d1KuF}_8|MLgCgJQ z@i_a-_p9H3`)SvAr2)}^gZ)M!-MaaW*V_E_YBmVDBG~l=jc9Kc)nU@!r+h6rFlLF= z^Be~hTrPVTIfjB3S}1$fO1te)$5YJn2-HUu_Zq9_gy1#+u@H6=&b%h=?$=K79Rtt`OgGARU zM3lNgOf+q_&lQM}o(i8t3tbm3Q1#S%W!bXiF{Z(^8SwLAzo5$lRN@)H;lFYf7__(K zeiR#z`1@3?vGAoW+rR94tz0rcOFUt&lh%BaGVf?GO~`SL1CY*Zb*!q}cT)pJ}%Ra>sI>95jX&h|F+hV#hfJ{skRyS@Mo7b{=^#?lin z#G^Rn8u=P;167?0KIl8263@>uj;36Gr`-ftVzzA#%Q>|x;=*~~bKwz>QY;6*J9M4% z;DighS$&a>hB6PLo8x2BVvK5swtVoCx6`J|#ot%RZMS1xPT1e*dadZ(D>psz1~2v{ z!yk{asbFin1h*uscV3=2$JjWJqauCtch?i814+9HT79E3*vL3t^6~h6JH1}WMnR^~ zpW~v8!D=qB$h~Eb0rRv`k;nBuS2cfo?n4WoSRTA!MsseJW_2FP{YjUpm}ffhY7FhV z%6zFR?9C_#L|C9APpKbtV0iG72x|<&dFF30hLn%>pE$+d?b*Nn{#WR1&;er(Ur=_x zGY`h8a!#tQ{K0e#+!CHT55{3FSDi-(&5B%+edW15t|-FoUZ^NgDydq6YgXDNsHIp@<7Y=gn~%9nk8M94^^XD;st!-zT_IzjIDCcA?9-; zzLxOum;N}|ZIKcutad3L71`D~bsd-0m8uTzx)$Aj_w^KQ4J-83lYW?o)7s$xckkPrxmlxw zSzDDgk+aUlFy0{tiBo=#=g@%*zIwYM&z!p?l)%3YzxqTIVIHh=7~49eCQn#TftUrk z6Sfs)lOgF$-Y}r8nz)d!H8&|q!9uKMW51f`iHhBqv_+tw(0!J}&^KXkYrpF?wzvCw z-Y&;%&-nMp3bwI^C269E_J!ro>{!X3Y4>hx*QKaME50MsxyY(iJ3HDM8pOH$Z1J%~ za<0SwhF`<$MiPhXKJpr!=5`*=(#_Izm1^^kC3ODlE7!F0n78%E19J(P6O;l;WtvWV zz=XMz7v(h5FQ!V;kYD5;yS%PWBL27{FWvRf;{Oth9Q5F2R@S01-q^1;es1K!uvnvR z2N+d%9^$^a-SYdW^C0I0MmELO}%3`f42*Ezi z365@;*IbIrUs(s?bF!cjk3mSz^pvaOxqL}{^Ydn<&B|*DBhwaoX3Yx7mM2BtnCFkf zUYnJCG~*s}xa7~m-+g^L^sfA@J5Gh{@Re)C=F@#&f#1Jq9mRsr{c4t1!eiJ=?|Zc8 z;!tRze1uBX)z0s0JSwNn!mN{%PZxX_=bMSQ?BEB3=CI4ufpEMQ?@0Aa7aVpZLdG8J zqswLI(U>!60qU93a`b`b>kmAI-+Ig?c8E2pW6Zfn-bpFWXjj-RUBaKXH}xXmP=XNy z&pe5R|G@So!1DHctnaPlnsB!3Vh8yRzymI}9ys)Nr&W`ShST)3ui8AVMO*FExD`nM z3MP~DWijcd(jC?U;Hz#5<%*gt6zp*L1G0Q3+^@6(Qf+m%w{fz<2Zmt*&YqfGzjfqkt5mc;fmEbh~ouE%xPKWlC48Y$JNJ@2bHfQYNI=j=mg81p`&zBJry;CWl zh;(XrJ$4#b=bKRea)!SOog1FpseZrr`?4$U-cBena+>s@IEy?T1bVv;4#e#5bxvAD z(ofECN()jpxR$WV^NBeN`b5Q(+)5a>Prq3OQlK2itRR*Nc(JSDzv`PuJi@S|@8cu) zm^A{;qmh;~Ppr?Jc$(jx2TuKPK)o#-`N7cgn93FXp53gAz&<}aQ5u}q`@N_Oaq zqbVY%z`8rr{2cS}eT|bYv`l{VzyLb<3mXO@m+*nMq@-_{y{?kP8GQj11tSIi2h$0E zqx?qiT{Q6%e%OTyj#}`_G8=Xk{)}ZX<;Yq3nr#gQNAu0GZz9R@ti_&4EPIRPd6BfS zM)nHuUci@0ao|(k5l+i9Xs5vxJ>S#PA1`XVFD&@Nc<}6q1RvQA&4fdE z5w3qR$q)P>c}oI9@1J#iNjQxPdpy@ZYa0?cnQbZA2$7N;=S6amV#Xy1GlM8puNrm3 zs}O$|KJ_-PW~-K+P-k}|C9Gu-N(Hbt`Ds65}as zF-|-cxM=K4zHRpvyg`0XVOpA<2)Qtcgfr~JglG5$ZmGTu$4Rimu>hka0e2rcbc$Aa zU>=+sMg2KNA5!I;17ql)`@O$CfhB&}5pcaG>(XbLi_tG%l&L*g=VKcc|18%?J|;aR zWO+S5$gkM--`z^FV$K_-Kl(l5B9+pXRmUs5=1WqKn)eqzlkmc@diC+*6Q{hgOiIy< zhZya$z&XPncE<%L$Ag?fPr8B;gmAUP9<&g!3|ll>bQcPC=?jy?czv=9n>w>yPS{E4 z;q;O5A8*@bVx6Q+^u68CSKeR~KzkNos-& zFLs-Sab4yUI&${EH1vM{CPMmQPRv^9zJ(Lpbgs3DCWD={90%L&Ny}O3XW1?Ah^iDn zDty-KYGdrG)^(s}?2|g($H=}2>30pgnD3d8MQr||KXjxC>mi3~P6pgmy?Ff4JC37G zcMvWCNlZ+&#opk24oYwcsLT)om&k#f5D9#5K!Cw~gVqfD?@HJOmv`r6ufc)1Cevcn&n&_1#3KgP?i( zxBEvX=iKHZHV{Nhq zeHC(r3EF;`LiqT;8EZKFE*lpPZLo@DYYUS@H>kGFwN;Ke_5okxFp}U+ksx5`OwG7D zZI2u-jn`AQGN!DyZp6Ss_h`m#e3)Rd&wl@#JD132Hv{C5bll_o0j;|x0 z540-b#M^RRi9D5!x`B4-4~zVhiY0&W1vzt_^P&Zu70(=TvD}M5muP`H@z(Q0!SC$v z&>}C!H~1Q3pK$uS)0VK0=6yzP%X5L(_j}X%%;T{@QZv`K0L~#6-Ty$>K&hN*FSgtN znTva8o{4qcePOdRqg zu{Pcd;Dfr%J@cQEO=2AtcyOFS*ZZGE|8Tp-$DF$FB~}=0yL#JD$Jk-{!1vmuL=UotBPiElPewa7Dgna7co zG=f?Pf5~5~(!9?p0QNg4NHk3UDBA&iLhWP2aIbX6mmOpg@;}DDXq$bxex-gUzW{p8 z<(dz28pI=|A0ZvzVhDIaHU3?_GF(qI4|<8z_=HWDNLj3QjAKG|wCDU0#4b^_>AE)E zyS15vA=>uan<6UhJly`Ud1U2#>V3DpPmO)(Kfbq5fz{Lo@0A_J zcYd?j*AAUo&VQ&sFOt3mshbYaye``h^X;&OOcXY?N{|Pd$6;N0qdxzn*No@z*Fcs( zp9e6lK4_!WoSz}Tf!azO3J@ooZ_>UmI1>*dHD_KPYx?69TPfe4$Qkm;dJPxOZvKNe z`5N1E++V(+^~LtQHoonAX8*tjo}SNjT(yXUY&use9FdoKhSylXLoZ*~aSTy8kA8cm zRnBenc9iX6=;Er&i%*H~hyLJWzTa0B)Q~SNIQabqINVOdw|R|^Z>8OpZ5&eX_zR?bV;t^l;}Wj>-wV1+sVI!m;ePgo@u&eXN=% znz^BN7?R4_zMuMH-znBpV%|r(|9bWT84rCOG3=y1;KL3yIP&K99cyGR`7}QL!LMGf zeO3-kJKCC_hSedV%jbL5$!@Dd?pLhuHsK_IHxrtLA;has6aim@M<@0ZWAp7&FpLUxExby@- z=||+VueCRudL;kY<&t@E{>^zKmW{>_n{KkJ%0nO0##6r=Px9zNmpt)Y(S?;Zg%_aP ztHZ@DWae2arm6Q`@aiw@4n=P?JW8;sO&X@3J5?Y-gqo%i465UVZF|NO82 zQzU!az(+{A|7}$gX@jjk1T!pbwbHGH!s-jV!iW=M)Z63Ac2^0Av%O>B?*hh#x+)HG zETolvBpvvpB4%$1>pTOYicy`yjQffVj%Ok zG#)48s3gDTq+#z5&O|tB-tM|xm1h{-s4!jSt)GZG#zEdBY2InvHgn}^u}!qAjp zj|z9*?!mKK=d$Llz_tgUc zZAlBug~P{-w?6PWl8ydzpu9V!|ggP z9$Gj~pBFltWv9#kq8}z`CB}~5xetE6Sa{;UbHL~HcO3?M@($hSZO7?EB0~NHCu8F` zv8eEMJYmkCS?y=?A^Zbbr|z2339C0BnES(I@4kF8-L|ABO=^pj!&Bz(5K&G_u+PDI zQq~Du+hT4@pZC6p3a_&tRNfTkBMBH(_63M{6~V!aCCEPF1j*$mtCQcPFNQL zM=>!&_A!09D(e_e*fHWy$laI~Iq5V^&AwOv*-t&WwD}3E9f}k27Mcj(3%ttnNpm$}#z^i*^|=Fb;A5`%izNk5ns7gFF_xIjS#` zjZB(cEzdMczKc;+e7d50*V9|>NKy}E?jrp&_$k%rm?MkIQQb!>?Wfx_agbFd{*39{ zV=K3ZFR#}2CjYd^7V9wTC$xfbz9fB{Tr|Btj#XmN7JNE@^+6`MBGhf>#* zRyFm;Yrt*7KO|YUF0hI?_o^qwV}pBakRNn70^>3empH##l|kUG>eOA=3c(-EmM`E_ zaoWDUdD~^km@L~r$ zrECK<rBNqv~d&6=%9 z3+9J{_F8iZ(S{Fa zP0nS-$#33}Pqc;I1+CaFFPuP^*9t&JI15^uNLKY+kIxv2;{-!|{k3rI@h!+bcwwcf zV3H9$jpxguYLxHQ;1AhwgYR5f0C?a07Wj!HZRg^_?w4m?Ip0sZux|(T8?iIscAt`c zmKewVoC^7$WXo8tDW1g@@gwDhgJ-U#yfR1Fj&eP?+8q`SZDvbwMuCnqk=5--cr&#B{`M$m#Axb3ClG96H$$7xY zzP9R%r3$#QU3R#f0Hck8PumYWXLvgg2||t%7tdJ>(F0V5*oey>{5Rwv!(MkknXdHt z-;#$F(S7d%@)$Z;(vJ~KIY*W6uonhcYrF7~R*q4^27E{5%GLXqSB>d@F2~P+bNUD_ zmyB~Bi!>dC9K~JH>*Qy`M~yrh<}zG<*Zgn#OiDZ+`ibmS9tJ4x-@|Wy9etAI{p^G3 z2!1Mag>L@?hT9D9dR8jvf^b)yNWpiKEzKX z?bn6%6fO5(@g^~zb$hXa`;jr%%{$oDwhs2~Dl zp_(cD-mS`0^SLD8eYqB>%N%xs|yPPlvf46y^UacuB`PKQ+zP2W+kH60A zHb5)P<-s1Ea*Om;x_#-iPdoe$|FxO9d^h~kHup!DKKxFNWIODis>)Lp7Tz4jF=P65 zK40j(kQFOAw<$C))#kvwJsfcUg(||JDai@j+w{x)1M4FQ7pvXx(jEIW)8GB7Ro8e? zt8ffRI-M`f&qmKpmjVy$LoI*gRqVP%H+x<`a|3BZgnK>s2PKA4E%Ev3&})v7a(>72 zV5EmZW7f$RavQIM|efBcsBr=!52d*Rxm8Pt-H#w$vMXbOWez7D?u;#7XBk);YpUArK z^gA&A-l~ARe?02kVSjIHzwkh=ot-&LqVLu6W5`wVx~=f3jOLv}C&RCxj_n0DM>6gLJ=>Ak*QVyjq7`iI|3 zpUT%`X^qX0Z+)tw`ot?7|IR$q%ja)h-f@*VxuPfP8g#(E=;V1Kva`j{Z8Rx%pRN+G zOY^bp5VJKMo;GCuH=gNpdfnFKoOqR^h*Midy}g39|4v0`_(l8eh;`!tHW727&yB{0zM~pCa za`>HQO5<-()Q|; zzbnoDb)W1Vxr}Oe1K!dvSxi+Rr zUEB-toqdwNzX*?T^>LOTo<~YQSgV9>QbO|VTC9B zkXzO8g>vvI=Nu>Tq4K)f<+N+P!faHaZZr-bXv;%c8Ail1$a&y!`5xao96=+V)6S2dn2Z!HHF%TaDi~fVB#7HG( zOtA7pxy~ZtruB?H#v*_6{`;%Z3fJlj zbS(rhz&pci?KVS>_wY;+pik{Qz!T3+E;u$&TC_S2w%;q(t`te zU+HXJ9qK*^`E>2f(_eSNjbNlQ4;OJw(lx-Q8>;||S%Km(JuB?48a5I#>z5ZM0v8ygb ztS{1Q)Srobl%wt(mEYsNbV9=r%RaUYf*E{0K^B1X}_qGYgOUZ&z_x4_pQu;RjxLa(b>iV{*RqL67uy!_b^tNmD84 z3yWS@rxQKtFC-}%08WBK;@9n6nZTh9grDs3y>Vk4c?@44{0xyTxq$b1;$`Y;tGbry zJp;da0^NFd>LFu3RMI7@i*UH-#H&BT`d3l?6eMzb;0FVo39~m-bPD@4=mTNO3P$p| zXkfl9zMyH$>N|`}lS)IzX*SX(a1bOl_@YhwL04fc&JX#XrB5;cC0%j>NG8o-%h>-) zUad(0++U-qc0ihr;jvucW#~?fw@pla)8-YGlP~IUw`I? zll;@)ys#My^weJl53NsOWA5-=vEhi@OudoDm-Uy0+oxqrYcpBtXnw~6M)8DcmqXB| z+e;pKwYkH^ttZp3jUN2TJgy=IKP*FlYb_F|{R@6SHuB7b(VzF<68Po|iGxclWLU{Q z6&_toz7|3aB#S2kGZ{hr8a9i3kUPj@-j*3~q-~PQM0dBwL6*%LC@Pxd4*Lmaq`a+UlE!(ZkU1b|>#l3bg0Q?K9n`sIy z@r-7Byx3>7$!bFNdTqX5eHMOZC?~p{YHmni?^aTR_*B$+FWCo9vo z8Socoy-rqiT^Y7S*ssxT0W&5aLO;0;)GtlEnZ;u79@AU#Pj=mnxB_x^wDUelw-kw6 zhgwLFSkQ`Oz;eUveD`tPw(p+tL#Tiemz{X)?Gm9ti|AL?F8|=B#&TY@Kpv?pSL&wqtH$N8#vjxtEZ>W;+ zKNe2kg&%4aw_66T!uNBeu$L;t(`_PV0V#8*k#elD+A>MJbp0PRwxXQ^&kO(9@Cf=i z-Bns!nL`qPa+L=e`fh`l)Jblj>9D;&|1OMe;YsyN)+XxgV>pphr{qH6fsJ=QMgeUI;YRjB zRW|vzu!D~K$Zh!8kNHl+O`wRNV^y$nbBkVW0fgBmm*F26e5(7-2-yg}R6pFu;WN^q zyy2ePebOCDmE!@wh)PbD2g5jiCUj zmi94tz-UqqtQupN*kAzLYvv0F!v{^-Ve%xsz*D$$(4WgX#CKF}Vjn@BW+2`4r?L?r zLh{q`nlRbbxjT5 zOvqi*s5Txsg|<*5UcyyI(DR5zak+UH-r>-%{FeAxZlm_|gIk@HFGCLwnGR6OLQ2VDprCTp{QA zkakD2Cc4+z*zVYeL&#%9}q)(xyPK8J!PDo#fpItKbc2HnT z7mtk(@~=zL2y_3Jsze= zZsw%Q_Npxh0hdL!*aq0k^$v|kYaW&T%J^)ucVF;@ioKsQcDLaN+!*ILwdoz$C=LD_ z3cuh@x<`xOf$^8I)4ifc3c~SW0k6h;YlHiIm+c5|xVq}XMPI^`z75`44<&qK>~II1 zDeufr$Vq;_tcpR{jr7l;_ZLp3;>zvQT_G&>7U?D-HEKE5;w{^k%AI`o9|SCZqoP$^0qob^f_B}L9=F5|H1l64=(_jcc?(#XfjL$MI3jf6k)qCu` zQrah55%a1dkI(x{3A3c`CS=Q}>#^;oUwFeY^K;^$zc0VLR0~cyURs8rEi8_Hf6^1} zdS;i(j~~#*JoWEfPqc?G3LZb@^uk@efA`qtq*LbYtHyeJhu+_HUgOqj+mU9+U(fAq z{>5_M=qU}~=964-Gwd7TKKG~pCVc?Ax^Z9p5XjyiZT?~Lm!!hKuG{9k&rE_S&}9rQ!T3)f?9?&=$Gd;8o6Y}G|FZ7i;g=KtH0+B?(k_uGDlH# z3Bw)zKa7j+?{bo3TPpT?7^fv}LeHJy<~UCY4mrUIyw#{8{V({xu~A;i@27FlH@SV1 zWzSv@e2me#-Sau@vzFkNF_vqee|E>K+m}a|*2tb4=~i~+tm@KkhZ8Q5-|BSsz2(%N zt7?6ipULO1iZRunZM~dybN&6N=kvSd?+<=#X+vv;>g_)HyLp4~MSjYZcb{WC@|3Uh zEr9;Up+NVFd`>9QBkkcoD{s28#v9G{;5`-j(bhzK3ivIzH%uGN#a3bm)-%Xc>wws~2>dgnV`!0=Fl>vfF!l>HPN(FrNPY^xTi_ z5p9!3#A}DE9(~)@=iFb952GKV;Vw%Q zS4#6!%|7U1}cg~-}w)Cs`P*UykM>_t}?uLGO zI^4^dw8N3zG#%F7?=<0mWxO5VO6_^=dQXo zdnC-v1NYxs&b7%c0xJVa0To~umJTK!HeYOW4+pXUpbTf2h^Obfu zmK~e(jV#k{N9{qr!#CUP?4mR9e3Jc?BYunLnr!#2K>w>9HcY-+y~$kwJfnx5}F=6Uny{Qbf3c1GMLu13XIoP@L9im{cGFN{tOpkD~+SsHy047x!Aoyq_cZBUje)Y-& zn@((oz9->~@#f&&KVoA-oZ|a>Z4Slh+8v`zBCmI~(AZ+3p(cx1O@7>e#wL&eUgH#X zGlb1qSp=tiLWifZB0G2AdaK>OtnE$!VuyPd;2!L4cp{C%Mg&Gh{zG?%hw~ z0PVFV>F_*GMCFsM_`(8;PEl?8kCUjZ6ZccRs}9SPOh>W5s3vZNYqr;{uh|ALEkdui zJ}+M^&bUjPUB}0|{i5oF>ios;qq1G+rFH7G1+Roor_;EYf8uY4eYGpGpctD%@>HEEQ>WaA7BV`+OJz#yjP0%8xHrVOn=5bhc-q0H^$ER+;JY6Q6j64*H17 zIlf6^*AJB!mJgMS_{xbgA? zNvW9(a;)1kDG3&mLBphSitW7uhaH^@79T^SOD5CxqJuTp>2k>CSLQN9(ARpu67%N zYN+gY-xp3Fx+_KBzg%7!8kPP+{=9m^;8ShA-TRl&>4d}eJale7DH6QS8yHly&^-JV zB3`lEr1ZDI`l3^Kfir4@@mBodLqFPLC~#v+NlA=Sr#%##W`D$jUUU@-5+?fydw{WaXMG;wtcdqW4NTh$jGh z@)&Xt66=&_MG;9_72ioD^#>hLA=bTEDSqpHZPhEllU^+i{esTRKh{|ESt_wxE`nM2 z-KGOT%UnmCfbMo1W3LrNaDWQu2ms@1cWzQ4z6UM%)IRVUADp0`>wq6KX$qcld$aU} z10Lo}H+=vej%uYQ+6e%NCqNUfs2Mprvftif$Y7`jGpcYK#y{{KKG0Ql zHv2$A{_EV(hnyqZC$%`cbl@S#i4BYl-$xmobkT@QpjRmCaQ7xU1fLDQiQU&cJ^ z(LAyIdz1IYGhWHdd4MZsf{&wp*>!d1NZ!@=h=q%3+a}y(PXn*Bo%DOP(K-B}fO}N? z?RbIjI1l~$`YI=;YV(7j2kbJD=C>O8eSsr0DL$x3(L>9JLe7C=!Pwa6Fp88)*$Y?6 zE8YH!We$a(FMe_ya7KF3)?q)uC-ZBZX6*;jA?AVnAzr`27LXngDRu$4U%Gq2&Q*@1 zf;{20`XJ3mBiUQS_qhScspz)pYtrStU@q|}Huhhf^QRNc-QEU{jO5yNBj-AV?%x|_ zN}T69rB_Gmm9k!}qwgmD`R{fLJ#ZCqbd$rvBSLo9ugpWGPZTsM@u`Mi13Skw<%K2u zJai@I+mv7m_z5>GClfF36V?3Pwb?gPd}vf^9O@1Y6dvh{#A5)IuN3?(_{&NC1^#vA z+`+=tItV8HW6mw!pLcac(8fr%Q$FZK<c|4?irnYZq7E$kqO6#f%ncK>1KCM;tQWk58?Fd_6q zT@j1D-+iNj)1E6;i%7NF5_U5xwELSZXY;e=oIUV?_?CU1`}H`$ z0tZOZJLngFCg=gbxt=ngbh|F=q>++a9)o<|j7?T9p|V@}UNpy0V-dtUDw!)w`^vf> zIgFrfj5T^AxtEj;rNxdS;lIHqmDBVK@T(C#->bAh&VrnMT}9C83R>~Sl?O^}!1Da( ze|I(2$XN(it;zhGFkXDVWq3RvhnkTN#Z~72oSs)ZjBH_c{b%t|%Fo1c%UPri)_hI^ z#ch+Ug*>xfH;PrjU$aH%%uy>3EM0s>Zj#{)_=Buk)-MDt+)ne;5hKw!ChJFT@D;zI zZT>8k7YLu7mr@4?l)_iiWYJ)h+y)_6st(LCuQrjd;`yf@=afaGq(`O11`_--R9lQA zSrN!;yh^Wa@Zx6rA42f&6+=oKDN=Z5zSHx^-p4y~5nts!Azy>9K{_aOi?jg1QnTvy<3wXqkMsPfjUz;u5;d@}#e)nh{6m~B<0!pHLYAYQXp z(PZhn1iEx<2lkXaC$cGtvtk#O<^Z(nQrNKYeaaf0%=HKT{gdMf|7pQMytUfX={q1E z4n3tc546T1j%!}mM3wjaKKnZN1)mCb6fx1)Uw^Idy#l6HF71_sqN04Ov`JVyw#WWs z_yR^1zX0!6Em0HCY}1U^k}2s>?q9Rz^uf?Z-SA;4JmGz7)5TqYr$0^yZnCZ`u~qyg z;rHJCT()V17$0BN&QS~nJ2~olVbBz`>lHD(T;uAw63!c~-!nGs&nw+GOPzFIZ(fff zyS@T!52m2_S_}i^?EVewr_$yn4UFVY-R85rqW_RjJ;zY-oWlfo%o2WmSf_ya_RjO( zJ;xkCpM$^Zx?)^qZb4e!xxvWo^=r$qpg-vH(k|sJ`uH18ui|5l_WY8lt|Q`i(wTCi z89Jd0Jak>WhCTg0=>6imkuK-;&g_>)+w@M%?MeEJ;Vl=4k z1=>>KOj15!XJcO0bAnx$htKDfRwguZJ;X zPLAYMb1q%EUuE3Yxa35$)$T=nUVS7HS`+Ru&uOf2Ddx78y#k-*r)?EBneM1=y4uNp z087#`<)zva3!edFJLwgCVvX9n*u{gLRpntzUt^AIt3cm%SLZPl5@{7IL!VIY4nFRu ztN2m&^q6NbxyH1Yj3LHiPsn1*HcC5x@SZm z%8H}3W^54Kpa6*06)BMAIwR4eB~nG}@W) zEclXjQ?KhuH#D6c_Fd%2r-_5?Cu5_E>sZq_&TG|r_0^s$fV~ZS$m@*hd3%^2>OPnp z{7#00*8)IZMQaY=er3U5=TVe&UizgpzhhKz#99mkdu*JCc060=*Vx~^b>ltmZ?8NJ z9_1WH(l31|pdfTCau&@u!5G~mBY(KAkLval7q2_w=eiG5;(|ZdS9K6hS5x9VDv{0L zO8d^iMMtWzLY3cNNF>cgac;DZ20Qxm6M>FK-HIZrqmoSC-~Ud|gY8JofLyZ?alyRN z;Z7F|{wFG&91Q(%KZp%xI8;$P_CqlF3$0HwNYYNbYW)|On$p8*ZjYG7;t=;Bjt?_xrrCm+HYoILd|aPgSdPtW{* zUl%!Pr{_=30DpFaDlIVH`*j`Kk|z29-{~qe7Zr+YoR+OUvn_d0`&~(A!~ZS|;{ZrN zx4*VV#P-A<;ArrzLAb8XMLA6C(-jVs>=U5dbNyXua^O0rZm`cuLbWRUC!Ia-{}6x@ zP=(*a$#_Uw_KSlCwD+5LMpP?>L%y6NIap{oS&t{G5H8Mrr~cM1Zx6gcuL>&wZH_lT ze=l6T$#cCam~M$j{0&%4YLYF31S!sbaJ9)c2KEbz{gWEBBFOR7VvH&#HJS*ZukSS;n$V1P?tWe?aR(jPwK1NX8u3q?xp3HR zh~>M`adSLm8`#ba_obj?N7+zPY03Nw*<<-*o`t@%pqs>kjr(tW>g3zY3BLHTz|H)_ zIKU^V7N9{7GL7ds7{Y`sa4PKtQUt~!BbtdFelGOXT>(#l3y0~(_0%5(Ls{r4G=>~Z z=rsSynjy79XKWTd^J6Teki_jA-`k(RvQ397U)DasTNB=VYVX}NZ|}(n)bd4`e*zr=hyO@2oN+?(VhP@**?UWRh94n0=7mchYU=X4e8a4E>#%F+F)RIa zI|+DRFQqYF(I?|!!hJ{7wt$$tgAEQvy=JTuNjy6FnC(jzkI{@wOntJ9t#=Vx$g? zzg5UCrk$Ek`9v>hk7u!H219=RwKiRS%i@WQ2feS*=OXN9BbKVZvyw>EiD|M;s7>=TRN)wokke%^>KP z>mqBq9pjPwN%=jd2jhwKC+ivZwK7)CPqzQ_Ie%tkGr>cAfsWX~$NG5sXy5_YC*PKf z!m|+xKLhsD*ly3*$!6>@<%)bMr7>Ys`Z@?|wStZ3b2G~HIo!^M{;l#gg!ve7iDWT5 zT}bg*FWz_iKikCOuWLW;I%qAq87g!YCWwUeYWQMGel<8l3a=NNtO@So5sf$)o4mi8 z?an^kCN-ZC{iEVXAZ|36N5ZyPhiK{c9FyFR#rfYMPMeXNmQ63P29d;dnr6Ql7gfKY z+K8n6{rif4HF4rLW!=A)tql1Q5Ni@dLiw_#dkfyWqFqj8Gs zc5QhZJufclemKYP%9^FUn>xauxb^R!|Gitg@m%=T1tasC6?Tc&6Mt!gh?sfbg$vb$ zFJrtquCeLa$AkPrUnDHxp%`k@i?lHj`~lem5+V*)D>@?D@Xgs06TMRGQ#|Vo&6~J@ z1C>g9A)N|)3cO&lJ>>YJL-m-n?$eQZmOu!em!G;XKL>D;+dLG=L1v-@Y%>Q>mXH;|lzwdk$>L zNndo9llEOaGahCi7V<%xFz`P`6~=o&uL5IC`nRc4z{oV*eYu7k<_QDG)jR?FJ(kLm zd-nfdrN79tM&6+E_vE41u1ooQ^dBtkf6xN<*kq&dXJylI-#m|A=_`N3E6dBkMkNy)0F=u zlPX+=)=oBK8q@G|ni7$M%* zw1>!BRa-AXFVl(-wy*PjAK%ybD|P>&AKtXVIuJI$EV8wv6@11E@4*Kxbi}yvZ_wXl zYk~V~<(-z!svGCy06w&I!!^imS>*?wSDclsuRKI44?gTXtR&kK3$@-Y7hm)i|6O#j zR{JD*m@SVv7GAPl@iyy$=~8IE+`Ta!zj4uG>~WA))or0N+6`Uabfvb%sR>TEL%&-$VVmvYet$=&bGugN zeNWfv_wbYWz2@ImJ2bYo7OqmZcfX7~6jlQT_uO7GnTDP#^0gR;`uAr=n_lrlfi}IZ z4s-7>VTk#oIH;nIsc(p{v5xFI)i;MeUg6(9+>U3M9=bpDgPJL8Q*S((6~7QZPtaa< z(|?u!(>C*loQP@Z9hTe3ogS`~N6Z7^cX4<+9975iVSOFWV?Wnny(e8}Kged+A8iA{ zALTti*f*TE-*LZUW!P^k2iMI*_joNJjf7)+c3{}QS?yJM4X`r`ExNes^h=75^l#d+ z=s$cQI!IN2u&?XIGPSQ;yY$|t{<}SHeRnag%*PM1zO+pyHjhfr5U0)>M>|yF!{F;0 zOWW4I1!#JLeY^5``1DiGUVG&_*zU8f25t}bka+XFLEfZPoFyBuJqdXQUyq8n-l_4y zs}6gQL067o@jd66b{O*?Z*(x$-&Z>XppeG0VxKj67m=PP*=fte(~ow&Ku&Or^A&u= zKE~4(bk`HE?Z~^)p4N8w8b7W%T`wai@fCY2kV{D4totSWn`!e;yPLB4o6^8YeZjZ9 z{D&Z4BZGY;{Hqto>=ou)*Y=pH!y(5jVqvWhCS6Dl(tzy#uhuaaUL^a*`t#_+5%@pZ z`Mx$i?sE>}+=2+lK-Oa*;`#gM2V2u&()Rul{>`V%>l_Qo@p(J=+fTV)ZGGHV=G0E@ zeZIQA|8&{Yo{jCfW?z4Rr`wLbL29@7zsJTzpj)>XrOLw-90`q44vX(RTxLY0Iwsg| zd)nv?cvbhfScEp@rO!}b=N#ZQi#AL%v>nR%yDNALn9XY`Xze3(H_+eZxB6msI0IL*tSkKNISz?f>|ok z8aV^=aSJ$Ca`IIc6tVEulNqbQWMS=0%~eQ4J)*rqC(<V9$2@7F& zK#YK6MNnvI2`ir)+zDd&31m&QUvobdnpdZm(-T)f1mUSk}ws8y9{(j97tm6Y42xGmekh4<{r)4}+J z=0&qhumD=9ZNLdSv;GQLi3Z%}eTS=FRCw`GdGsfP+)rrDF~T5Mc}!Z@N%U)T#%NQD z>~a9OqC#{}@;GklsSi@xnEe`(gS#<=&SU2%XzjS(oU;}*^=hgyW?fLJ*2#8^wX`SD zQMU0RWA*+zMy*uMxaNh)+}~3&qdVUHG{D{t!@>8vZ1mGpe&4?O!gB z$tV7|iw|hXdDoT$D^<#j$?`R;dC6oXEt$~Nr4DpiF6To_aElvLf8 zIzFoycKO5mgHPSF-A{Q6PPz2%>VmBAl>Y=0})kczNsR?4GZiq{L`XOoHqB3 zxoF(1R2oV@aP>0Cmfn8E@|ApH(zQ;d=E`H?6A|sWO8De~KX`m$gYRMd@OfC)*)Qfv zi3nmuHh-`uEC4%xyNKo~%df(_dBPjnU6N-VJlV)6{jXs~bvKYL7TzwNLce^H7GGWG zrf*j_^xh}HPG4!P>TN*_%M+lXS(rE3{sPyRS7#dcqDz6?(gIEAu@Xp*S~)Xhh;(lF zH$KGaU(?2+DMR2lN8-8%`%G|J2HhM>EIs05CWFSlRoIu=m=wQ)d5Ps5x|;pR(4kU zmbLI*RNO8o=~t1g+Q4JiTu4^0w2PsO42D+xURKnca!B;JFW6I5*<85SJW-ka)#+#I zd9j+X-+KRFb3yR(Px*xLqycZ*0zCI$*Y`W$Q;Cf~bEBfues1J(zqVB15~-)_iNu&K zg(CXB-$Et4mHTj=?Hk{Ej-vR#(SFKa+V?>lM^>NEhm%CC>;L?HCpuAehGB+&3SRP! z1SZZ)a{~nBG@NNs-4yKH{qOX#mRyur$#Oy9;z>#0toUByzH7=8%YTfy+1d46jhR*@ z_RA|2rE)>OiZdqa^(BSk!aFjE6}4;TK1od*y`B{q(8=o)tz)T-o&M{FycYuuge> ztqKKmgPd?Bc|6L#ZPNUW>Ta(u_noLh@RU{PQ1Z7W+v5|JyWUB9BM&5Xj9PtJ=v?sc zY(I3RL_hOY-$*)nQOGAJ8Ny^dWeV9OCQVUc8Fpr5wc}a+$#a#c0p#_UR?qrh!-m_ z)c71c-uX|JXxD7vigCU+d5>H}&uM7&U)QE$sxHjBcnl#k9q({E3wKwKb*mU~>sq6VA0@%m{7d*) z0T<>BZraWL3NMoFW1kWGx3b@MS^c>UX-XBzf%BOXHM$xBp6fv1m*O zXo!ZMo`-XZ6d!`^fMMgVw-Y|$b*1m4T4IwztHJ(iwFhWB;Z=fHH~*dURCtE_cMEownLm~g59sJu; zVaHPEO6I3P1Ge4BiK%yiMXmWv@^iL2(8?*WU zkGx$OVp0wZ7Pum-&M_NxSH=#77PLLgtb`|Qvj+x`O=qMJ(=JFIamwxDZ@y=B+Bv}>pBKXA+$0+OpYh|dhV0{8 zJlWPT4pwaIDk00!9$@4B*Cx?~necq9eTTg3n}5%>JRLM!i0(Qsp9z_gzp*UK{;EO( z-eEj34tO5S&slXM+DKh#*4CXc)RGfk$=z+It7HfMP#UwA?a1wL3=y$L#EmiL)D>bG zBT((W3RmP}oa(EbAej{QGWb8MMv=}kQuHn7MJV~*$}V=9{nKfI?BPA{ps~3Qhw=@u>-;|8jVdtw40uo#{C9YYy;NZ*n*DGYd@bBueO_t|x-x+3Ub4lsFA^xf_*t+rS zoA1kbVEe_6u~?I@h$UVT9|9jUY|;O7u}`yMXys!uoKewz$CZB1?}|9>9M{a1NjTlZ zRvN!gTvo-dS)C%*b+yNfj4S)dDL3BoCRnHG(Eszdnfq4FlrGqDXsi+3XO$VYS*NW^ zosnM{e5*Yd#-GE7w)YSZ=Z7XAz@LSjY2%ZV26nZ?-`{@_3mnx);ZI**a${zG#knRg z4VF6Y<3OsaS{yjdglFsR4*788Wer*@*?H$$(SB~#VYb|E&M$n)H-m>|E9XDeL5cNz z$v2Ec8f~ymHgnh5hRFMN>Pb91VZ||q29tZ_7Y@E{F$?*g9|hk9RmCSw*3j7Qp0Xdb z|9zZ@qs_JN=Es>d+p^lVCd+tyfc;!Mh?l$Fp@qZy=A5^y%@h76Y&G}}mWN>7WjjG1 z)*Cr)-oR_b_vjBXi<@NozMuN8>z%K8P#G)em1?IQjBCB*H}!T4SAbp4Osm~BtDeHX z^_OH`z|p#{W4(uEGWc+cUzWS=$At07hf3eM-Ujd5%lpFmH0)5s?AI5)dGJZv!5-to z+5y9W-)o0+(Z_6e9-c7yCvov+hrH;qtjKlus)^H1uiu>}stV&e=$d1c+W&dQSM_Jj zcPTFFFmhzWsag*On8r0{ny}Wb(+nYCeb5 zI?$}($GN8PP5Av;{WN15ADUPCa+17p-*(W+^rwvu04)Cf)S8i~a322ji4Y%3dzS|! z(rB+@8=6n>{)6tvDvh|>W4l|1jUeRfOrIoUT-o1{W20ZLjQd>Qa^PlVO&PQyU-YfW z`~0SiO}l$tCoGA-@ICcc@Y`DFhIzclw86f!WZX-n;tAd^XoLM)UJpvW4w<{wu~rT} z3z*{BT;Ew=a>B_@-d{r& zF{mFKd3Gezx6GTd!5HRTBf$75I(X%j1}zUfO%+*dv_%M;w3 z)xA?sOxlefQZ`@HHX5)5Zf2F#m;9$^9-ePuBNs-FoLh!1&)H$O8yei-5yxYH!!3QqNfEV_` zsPm@pm1Jhpk#SM9w|Euj5fbdDzDr!A-}ksv4UcdnFIq8fWHsY>;u?AvcFgrN;=_$^ zt@+Jv^SIw@H*&_WlCS#>rd91Snc#;}LoTyEb9lV(<9o*O%x&+j968RD&tV&|&9#=w zw}aJK7Il~c<{hTf&OUr1AzYCDo47mr*WUir(?7|GDIhyDd}G8a9qiw8qwDLlR*Lnd z&4Y2;)e#c$=>Pe9CZ|PU3IzXp z=?RbNtmLC#0$6_%n18&2i4I&H!cRlf&fwwyj~5$VuRj;gOK?1RD#ovXR^Aa8EUhJh zLg{dr<`cDH4K&5cO22%=g9;1Gni6npFcTX(vx>q?42}MAoO~W#hRCZO9FA(V>=3SxAApdvS z*;U4aAR@Ui#_#xIL^ zPrHVJy5vRmrH$(&aktwTOQgYf+B_cEuf4vYw)zzblr{pzY;Wg1!p)^+AKa8kfaiR3n8=%0`!4gI@vVUS&~xf^$8dTc%7i?r zgyQ|%6X5uCU66_SBbg2`_rTfnOdmUJ5-fIvOVDT@{Ka(ic6h_4-mqv+?ysx( zAZbK$P1MirIMn59NUrzjjQky9^#iHWl zb33Zb-a@vpq`j21(hh-gK0wtqY+^1@k{lUV$|j8c8RDV0I_>#?tK<#lM!)Z`97x7I zB&wLHz62W`E<2%4o&Q!QIGg)2&!4gRqS1DrlW&w!3%4!ofjdUE3? z67owXg5IUkhE1Cla&}c9r`oxFq``dPt)_EgBkq1eUCt!dtaR&hZJ1JpNuS@<>=9`P z0|ZvJ{31R?AuG&^6$OxdO*t6z+ps7Bm}&;^uizaJ!rf>}<4{3b^ct0|d7hiJ^a}Pa z+GhFUa4%oBcy=WXHT`+x{pwRlZve+l&hIZVE?N`}aUb@T3+6mAQY-OSWa?P_`N)Hn z@+0{%#>BRUZxZ_ipDdxK1%ckMj8bMn7iiLH$5qk?RYo9>3S?lqGBLZNAL!Or`6n0%YpHSraxp$Ox+?jbR+a|x1F+* zFKCDafASr0LGX1ti9^fGacOp?F4*I_@Ax@rDfl6w8G0mynG|(dwBHjh9hTVGCT)%x zj|l)Y8NZn&o%_Vn2S8H8Vs7cVg_!Jfh-p{Be-wonpnjFrR5T6*;}Dl2EAzjS@5 zt8`Fu@TTRGd+>>FR|p;dgbyJde9}{wiC}p|At&8tRo|EsU?HOo@Dtli`_KfhxtaQc zD@_*eBav~#)}nGmY^Dy`+GLOw?$O@!)D^nm1N#6KHvyQSsj~lFeypSiinUtc@QDX# z$w9{fHrB1mauK|}+ZanC|M^*PiX5fZs6*y;nCu?mHi1`M? z0KbXMdN1w&=e-;DciDP(>Jony{E0)w_8}zC`*CoD`{$Q$Ts0hm5aVAO$uvO|+ZJ1G ze6TlC7b^iGMOVp}+9cWK7xbj&Mx+46avtAtJeISdLxxWZr<(tHA zkd-UmPZ_G#4uXQMo_66%GDvuI7yu?q82>nYCuL;F+}tpyBS9l&sW(sw$s4lCV-S>e z=$^yz4j#&bA}Be=V^UXxgK5DVJl`tUYW?hHg?0YNSOQ)kpO|VTd@-L9O|kp|@A^j8 z(l0au>E?&?3Vb15#sB5!O4EVRn{wY3m#XH4^(B!(cv*gE z!U)x{8_c!zGSk8u2LV0f%8l=b%>l;Iqzjw#g!~k$@CULIve`wBWZh~DzC1+38@y zB<1uP2Z7d;HEoF)C&Q9xWuuG|gQe*=+JK}=boxKNO5irUi1R)UYEM1=hjx6N=K-k4 zRf>B400H;Xeo|SdOJSJ>dnkU#8vLRIA+{_>Vt@RjB_rGTa=88b%w|dmfZx9*y{7T` zzr$7O)FHodf3}-;*%A&u_pA-c1RA)&62b84daG zGe_=a%x`_v?no|x0;bv}?Cc|g_m z*5;q#@LZYK#6E_1(4PBt<=F1`cB?+>`g302Y{K$|ju-Ox{mk|LyUyoDUiBZ3LGUEmfflm&&9X{=R9)A;`6@Ziv(p17 zeJmX(uf7g!F~}BKU+oJw;mNL!fB%H1!+uTvLI1$@dVMdygGR>2`5Z-VZl;2Ee;ga> zKOWZ~uPMvEw}068d06$SU*BaPcs<%JG zbRI4==TVO zC$B0rAaVHfzZ8kp?(tp!)w446qzxL7FEXND|6)`9-~Z45>+alF=ZQ}DQ>9Z!V8mq? zF(3r0I%CZf-*NzKgsUE>Be`N5iN7Ie8QFdk1v9NkI~9H?W^X)B!nx~&szyMhu(mQl zvf8Y4MaqQ@fE5WA2slk7&Ykd|QB@76<<1ivPvPA;ex9(1asK`He*+hNWA9W7y<%4x zQQQyXZJ&}I6}KKpVN(c{8BQ_>%#y*ZCq>~8JoCWA7Z-k-VaQC7K@h0~44itssLI6t z-+cyro^c=%&xZ4m!3&!22MfKbFT%NmAp&ct&hiyeT5Imp$tFP99z$(qulLfH+S_GGSTS23DI& z^2Aa%PS$!q5h`&H+ybVwSp;+0_m5LNJKvnA+IIbk(>bS;@_}PN4O#>zMcRE#;iyv#dtrliA+QNzDPbD;L=5m=BbFrDo;s2_RQ*!ev{{42EA5K8_$IG#Y7{g{rz@VzD z4kH;lhUD_5n``Q`_;WgM0UO?giT*6+D5OuOyyTM%Pu`F&)8y0vcbpP7X)=S6Kdu*1 zRiaL&vYMWG5-A{7$A6%~J4z(PrO7o8^mkuAk?K$V`&f0guY zR73f&&Uk3zCus$?)o%apr#hoQKFv>M=rUoM=kTg(64nD^gOBF@3~;erP?h7EFpOH;r44fKivEoe$Yj_4dx78{iDP^aqac>J>ZlU1J|c zvjShqx4};@dRW;`CL5&9N@B{m`lHVWPq5>g!+(fGS>rLA=4T+eKEQ`tpbh2y_V|{LWpqRc+ z$Gu@6|0L|#_W00A$&Q;&*Hy_R+RZ9YztZN1TvXx<;Jzvx6y5VUQ$MXQCz2CC-}6wD zyG{^g9~rc<>2;O8%Jw&4-ud!o0hfyi)1O5jpRC#j)2Zu#>EF%jW?s##pJ41V&BxiE z7diO0;xpaWN&h+cBkgSX>uK&l5Bd%8dB#w}R%)l%$JnxJi=skT9qgk7J0ohEx+8}n z-62XE3YpscU)3&ON+=L)Z1{It8_c6mR4{-|#+Ta>H(OwiE34nDD$@#>|D^unc*%zn zAYg-~?{9MSjZ?2J!E!fwP*d``;51IB>ymwC>z7QQuqW^&yg}mI*J0b9;%*HGslU7J z)A%Kxdu*9JS#>@aJOsT6nF?UokO^)0+HHrFEs&{kvM8R-3hiX0f#37}7|fdqTNBNxeu_7H4m~v2^B7FhhSl1DS52dY4=MW_V@6+l%v3qV zY2xm5O}khG^N#&W~~)G`BSL ze?N&Fz9Rh8`~H-E6_WAOW|E?VHh$xol-zFB)PT1a{R$fidjGi|I?j{KNtQ3NF&yOH zVK563Jjukk%{UQ}nJm6W#S|qwv_NHD_r&j64K?7UVOM|- z08^IJH^m--n|*&DDq^pv;zOsyrxC_0*{`CdbI@+#z4NOQJSwgQ`C+MJvzmp-u@;C* z1#D+Ce?vTB4Uhd?4O%N(-tr&}(0#Mne&5^G!GFK|>sM53`%-lnGVv$$`V;eqJaAn8 zl&%qJN%7DHr8h;=H?@MJ;~>^Dsglda<$ksn>Jfi}-`IJK*ij=<>FzPXkhW#_0){xK ziD=!Jw}}r^{%YB5{LD@=2^c<4KL@3zjF#?8W&09zpRlTUCUi>L21CCWfBP&yxtZM&gIlh%WeG6r&-7Ji4V($^53 z7o_GJFlLe`^p9KiGI^hvY}AIxHgn6nv9jnXG)ji}*Yslknl^r|l^Q z{;P2??9=9wPUod}?1*Wweylzu;RyYBy;LPF+ew>k#{6FJkm7$S7*F5KXzk8@vrn^| z{qQs)TdNX0O<+$J3_WgIG|*y{T3$Aq0+FFL8)7@!5(07&!NUpXg0 zE0);TZ%9uMK1)6)eGPu$_q$DkH3B?O54_=M{Lb?O&XNBFzG$rxZus8Rvy-mihg7w- zs-lLqefR_5?TT~jj)hg_pc>Q6RjKMN9jBlT&dGVh!J+e@BL;uSA^Vn$2IBXgMx?Iyv!-j)kt?Ofw9W3iW-!k<(jS&7tAEYF%7>?7f!+d~aj{AZP)A!P{ zvGKm;Az*aKSI`dA;63=XXraUI#C6H4HyD3|3w~c;^&(z>$1&Dn;io>n)s|^jua0`t z`fcGF8i(^X_@LKyv@b@nC>mQUIAoP9UTfy-m0mFpKZx1aRe9~Z+2f?|A%jy7OWC1Z zF}B;mWc#t~8vL5{j@(pXem$!@-J@#htOh=9o}1!fEI%i|=6#}nzS#CF-W54ycHo|E z6~WBNw@E(Hil4NYfG+Y2yAOhkC0fc@DLtGpxT`WI-r(^eMxU}!x;$VxqBNd7z-i)q zQ0=T<%J%!dAF+$iFV8terTJ`U$mY^f_X{NId-BuBbLP3J%CJXirr{r?T>2Dl9nN@C z1+lMYKi{8}aUy!qQ29>pwpjX7gJ%43suDizc8B?=`C?F{uBNT)`xm{R`o)HR9(FOv z5waL|FZAoT9P>k_54ms=?eG2$+5Ju%Q|AF*nDeXvPY;gxPQjGNfj-#Y#^x@zJsLKx z{?7Fz(yy?SKjgzmPD=;fTjIau5Zk$@kAr_wMoY+yd+dK%@0*^m4`K7E*&ixL1NXu2 z!N>Q=HUG>Q9G^}Mi-XtrV4;nbxIjXQ#q-e-xowlJ0 z*}kAN%t6N|E~Wl5Mn-zQ_fdC0(~s^h)L%AlMnNd&VJv9 zoRHyXOdV1Fb+kt@C%}X4LHu}~ zavYU>hz}dBukiOf4nm!kra7)qDE zAqb0d$h}>UA$|x)ZtvdtJmUlFy*KF$#{JvH??2<_+;Z4a@JlLJuJ}s%e$X2B8*m?q zGwbWLsQO*MhhDz#Lxy9Hf3lSt{nPv)#Z!;ol~3{pkD0H0?E48DYf)aK#2a~8L)V@3$;RQ23j& zF=7~p?1N2aIetv&dG^Fzz>?_wd1tTHJu-dl@0qp}#yw^EPcz==DrJD+eIdt#a#tD` zH87*o>Jv=S;7Ar9{p5Ek!jQL-y)cTUqSFE3Qy8$r>ECbpCNi4yq!0jmwl%hC7|R)$ zO~ZXmsm9mg(S*8cRlfU!aO3M9%HZoY4Ct2!WI7rc~AnfEd9P#@xSU4%OeMv=JusZ0t$?*4a#GgK1 zQtk{FR>Bz9F&-Kh2MhM--i#G~Kle<8@$gT$8#qEx<)5x{V!DE^2kN;d7bgz}uHIz3 zg`?r)9Vf^Q`VLhr&50nsmKV8?`TCr{=@yJ#ggT*1QhAzM$R$pgO9 z=-*>OGR^bQm3l4pTfn$%HEW;GRr(npck3U{+G;jNC9~=mLz?v!(**SHMGGzjf{=M0 z=y!+jI_wjnIVgb?!9c(_xMlxs6`}TzwMbSeBXV44U^nmQx@YNm0)PO=IPDtOUc9nO zN?}`z-=7YtU~}59?O|pM1wv48G0DV!zwl-o zAD_#So``1R)t)OcKW)>%$KjY7$tQtc@b}a`?ybYi(WUm#h<5o_%>!>8wtIuSRCQC~ zAjGYyH)|0QRSRv5-Ey3?6fX^jB2uSskqp<;l_?kFFzu|=F@hmU-xeDdwcx>5>QMw0 z<*v$L4Mq`=vkH8pqFesX@C5H?kOS`!&Zmrf;4IcF_Qd_vHP3ez?6}FBYlG&|2gLe* zSJ}?&iHQy}+b1lVGXHm4yKgZ-r>%a0KoSJJM+8loeQ2n{P zD#$inJArBhKN5@k-K8=QCz>|V5=pZK@GGQfy@Dj5xW8c^x&t=UJ!q-%?Pyo6>~qXf zwCEp|=A9ok!w{OXquWL8#MwxWli@DE$^?~R&oG>&0VMS+@mK~XpZ}?Jd<+`CZ>#?1 zSTs7DwokN?wE3*Nd?Lsmi}o6_R}TcvIq-rGEg+B#DmiWW9G?uB3FO8bRn9nH2iI+)_LJJ~kcd^_w<@Yj}K z0L=#JPs!e00b8V18YLV$e`8amtBWO-=fLt9(MxQ(vK zUOxUi>|8z+sPsJAyDqooNHk09N``GX_#gA+1V`t4h}4o;51`HW_tTu;Dr8MZH_gll38UZf=4@l;XZ$lfo7lisgpnJ zGvCq9$0Gf`^eI?IsUP9^1_jW)MktYv33 z80oMr+r^fW)O#`Sv^|60K9NLMNPGJJM9fG#Pm-=_vVh>pK5F}JbubKk4hda>3Y~Ki zz3gDpp?C3ARQ!)|3|P*V3U4sX#9%;xb#cgImsu7CX*D;uc6uke4gO6VO56^zw*RqgnCahR!xzBK z`#^c)*p^F>>3^YeZKq)wV}xSHya5OQOqQulIw|XFvGa*b)PZw}^q4TMQ#HBa)Y0s; z-~YSxr|FKV|I1FQ3;2Otb=aC1=_l9q6<@?4lK+z?Eb!iSN`s3KU2`SZ@dD(##AZby zSn~W##GX0+2^zHnQD#oJyfEVi0=OPiCAep8#ZkyG*Xm;7B%FsE%>p^oWeU4%5WFJEB z!)`#laoPxgVbQl7_@5i%Gd@*}PoL}u_d~JD7t_>v&A%YH@ObyVXYO(EM%gp~aLHxB z#W!6BA6q>$VK+o|;b4r3$JVAykJuFaIX0ztJ1t_{5bpyhEa1*k9ynVceNyx7G<0=v44`*h{`n4s>X8F5tbPK%2!5dLvk{-^ADbk|V?R z)|^}SflJTfIV9z|ThwKo!-WpxAsYt#C920<_B=yZJY(82ICMzyyY+cLqT@Q_T98%j zH)StY>qr{<6f$%_aa~7yd(8{B0qNle7l!Neo%jf2mKPi_d{jG4Gd;3@2^h1^UNbRs zzyrFa`Rp&3YFDIeC-$+}k-m_)yG!nFdZZ-R=fZ|P8leAscbN5RQF8G8o6Kp`meSoA z%fES#7{2wJzy9Ip;_T2n^@?FhLPFv==GVg(71AoG&rQH<``5PoZs~wS+ z_eA_T+x!z0o6YgBE*pQEn3W}kwe&NWr1JwR>a`6xBzKNO0v8=h@N!@8&c8($V{U_= z^7*x1$N9g#Uf*s!4*%uO7&ma=biZooCTaFJO`zdVS@(y%JMsUo@Qr?c>)c(HNy=8K z&6PT2sO@;WMDEq}dAhEDt~mHSp8JQ)QnHP8{?P8{M%ww@pK zVWVgrjshHUe6!8Nz5qTMQF5#&9OTPI{-+q(;SV0KKfqNo4qU$dI^<^iHh+87ljlIc z*{k=kNATvck71ovO;3gq`3F~`@c)(6fHz5>H-~4Xr~c4E>A#_$F+l&*+%P6)@$ z@9C3__WWmU_`U7B&rx~EB|G}qC20XS5UbR0d>*!tqA%gN(J3pNUHlK%wExdMhI+2) z-?(y3>U^QMe_SOapNkJlm9M(l4xRSeKJJIS#ag1n_!A^xO~x(#2LXXe{tMn@KD&S0 zzt?EulR2{Q`f=)`jIHQud<%R29|m;B;&L#+eM(mm`9gzZe1E#HFZQ)TE^F~7+Y+&2 zlJSVQK8nro`z3!G)4#UIwQOFGx6Z>A0`Wwf2mk+}@pByCW!ksu|J+gfG+6Uq*RYn1>ORbJCK`(s~yVMkrv4ssC+D)b2eJ=iB^eb8dbRe-um18rwT&?=39nPQ zBLL+WC*L3dx1kQ&3d3T#f=%KljZ5M`A?}0z4F>%(>I> zKr87SJ*NdEf1G3Q!m=wAHpFf6(LsZ;C}1U9j^HMJs@A(zal_kTx=sZY@3Es+6(vX3 z`j;zDXk6d;db}|DnH8^#PbB4!yut>v(F{cB7iIcfxfwg)C^GoPtS9et8`>A7ogSpi z#*G_mhRQc*Wy+{DD%Lt_-|XNcRXuddbD{EF(sbyjDU-V*KMyUqzUiJhe(UXhbIRIj zB6LleN&}?P;j~*3u3!l{FzK3&AQ5eetlMZ{k=vPNTX!rM=^ewAzd|XvsRHS5h$^K3s^ieXT z$y#1CROzG(+HtzF;NR`e1>J%r8?9>TTpdA&d0J6jI;3XwbPPe)jWs_&!DpxH)~N!H-13EUJM6M^>92 zAxp7&DO+(x<2WR|sGW(3I0>-@|IPYgKBQ)q5Cwho+~mNt!|LAlIubbeP56wveX4|& z-^JyIf7jlwx-W|4bI;?jJl(9}PNki^tgS8Qk<~UD-6@xW6WBVIG)&{)#4quzrD}qm z{OWt`_UL}{p9QY9(Qj6n!TiOjqTQ8u`NG`XR(R8^-p<;mKF@=j?43Vu;Kcf-Yza_U z*;xJLv%BMRNo@pRkr&0 z@%;+@f{mkDt=d8lMyGA8X(OqiLJ07nJVpRJK*YZx8i}Nroj39DPvEHF$@(&M+_1NO z%#yOwj4Bv}4BC8A#&`9}36GGOjDx%MrS~^=aQx40l@O(QyT)!4h z*mi@wnY!6%Tn+>HDtywl0}FCX*d_~L?sv58Gw|u1yjXU?ZvDQ)hb#Fh(E9nk>J&l6e`w-6o{@(!^EUTQYU4NbL<l!({I{hdpW;pE!JVijK{P^qQBCEwKkCQ#53}mEoJL@rZ&mytx~p#5Nxa} z%R;DWUt=gf5Z80Lfn3V&ksd2=^Co-&A34u>Iqe^M|BgQO9ykEbLjUGQ-y2$`5*?TZ zQhw6(oxhkPdG6BfJ9>w4PM2w{03a+%@&eO(*YL*&uKFdE+)5=7u zHwmDr%UrE$;fOH^&A(v8{7(rY=CZ3~i&nLx{eP@&-eG$XRfj#WVWGZx8uvY(8@5Y3 zk=znKYjwJ>xLxR#I6NT2IY~n`$Hl;wI>fB(%W1O!&iUHF1AL2ul|*$2YjWYXGbR&1 z$<`(@&i(}XcGlz5F~G#3k{z@m0=bDcNhW~K+kw;J8$ovnAEB$w@(MxdCY|lCp*|zAqlqgL#4uEvv8MVRv z$+U;5-&s*4UPxO7iCL|B;qtZ+C(TM91j`mjB6?+e8$;X4W1){xsRTZm>#4gy)L?JH zQ1v5dP1shbQ$D+BgCG87jV-??j5zN^$i4>ptmYX%D9yk0RK$8=t7#f8!V^s#5nS^z zH?$IW&F2|3$JHaCqalYTJ@*Zm1*e|n$MS4V3x~;$Z;j^d)TuI|>J5f`lW8UG?zuP}N z2On|L!u%}R*Ku4h>*Fl`w!!nIbJ(v+{h#&`+ve3~`8FjN@LpEM)sf>ubZ=~DkKCU% zb7(A~FU-qWGq*gwwex?2EyH4dADgZwZg_2g-{-@w_`P{pb^2Z;Ghx3gJwFrtA-ijx z8uMa3t(gl$TubA$v;(cdgY~%N_#J1}JYqwxcd*8H#>DslL}`|)HW&#gl>H~rVDM*? zwIP$I?c4N}$a@@0nDx6{I%r{?I*EV(R#oj=dv53H@q68PyAQk+KXdG8`-EZNSd(em zV8nVl?Jl63Wi9a!)4)TAH{nEyPJ!z-S6bgs|7Yls!|oA|olDwcJ36*by5zP_{q||& zIqZb-J@xdc>NcyGXFjA%n(Mk|&XIjT=GKbU(EN%$8&1=IP;K@X_|rd8c~lQsHsxRX zu}X0i63qdjlP`qi#gMCxFQfM+PBn8_lV)g4d=+j+MXq@6%x9eZhjp)>M=Ybi(xd(U ztgwlz+fJuWp#ktmt$`}>A3d9SPvBprx%Yt!e2@h_OZL$*2I6~M>xj2XgGIrTsCDR5 z{0*B4-&2cVTvD*Pzvxwtsbbje`NQ^U%^YhQC{S>~0|Myt%s(D;^_zal1K(lzt;*>VmeugR>_s+kdopl?@2S@yf8x5118|IA%Rlb17I}|@ zY>t>?z--!B7=Knrh3`1wqdhKk+5s!~^9bqP+*lm=Wxd&|f3GJG_$vFX8cy3QVHx-H z-9s-A-({6AwBL%jQ5EX3JRn%Z_TRrp&MNzfea=e1R|VL#b%rjuU+f6}p6f%ycbR^) z3_hy;8Kh?pMJC0o#=hVFA>h+#bB>iOJ_}X-ZT2HI>+O_G#=Yi$n$+4g*a=b#0XvRT+KE1N|U-)^UN`c0Xygqv}xbez|G zyUipa7eGgt5Nz_d7=HgAvT;-epU+KwI7f{4j|#SxoaWzA;&}>!Gy-#>Du`&FUKnke z+%gR)w9}O{&qjjKsRF=IK1p2n9SMx9GZ_qrwaC$p|0oG)3(vdm?^FA(zBpIo)@|(V zQ?4Vawi&4^&3Krfm}j!Lo-lc?HH2$pytiw>u!OR_x5v^&PND<+A#7$T=$tb*W(8lA zH7_HNU{6X8eY4S33plF`BF4Sht5VOA7*EZmR3+iraRNUt81**GczMPGh4&d7Rgq}v zz3G92i%;o{@ss39*ycutV5AwONC7a~EoVyGd#KjXXkCg$a`RL?2ZfE`%{l^V+7$QQ zPG2%oQvQf1%NM;i0htQYVGI2T0iVLsI-kNAOOdD=wib-27p3BZ6$G4M0Bn4}@VT_M znFhLXvG2d}?+aZ5XFq@a<=^Qfx_%8|KV)yw#4qQwNMKIIAC)k51Y2NG93ul?Vf^v_ zy2j}uFy2DeVy?+Inbahym{Dbs6@C62xQ6V0Ti7mmxH3(HSO_;nQ%d~8#_p^p!LsL} z*gKqnsVS%IMsQ{Z4R`XcKQKV6qrDzfoc$ad@uduO=f`gBSv8RFKYc!l*MPl`qX#h3 zsCfyPGwk03+>4C5VQi=-e+t7cU|Wk9(%xy~!YO4Y(g!V}Ti5H@B%G@>p7l(2^siB! zHmGgIV#ai2OIF2LC+tZsJQtF~*`|5u3axHhdGND0ZAu!I#=rl*e*OJ-8xQk=iO?d; zXU|1ZJ)+UBws%o!(wgp8@nTH()@M7ZFivP)+UWugWB4pv?!TQxqYD)+Kl0|#<$@yF z0h=y<^t1`ZZ9lfBIN$?W5I2&qpWko_J#@Un^qng zeDw5P8=R1mkn=UB5!#^tJjXG;{3mQ!ROZ`qMRpa(MM>5bwGX0h{{LIg@$?NvhxlHxY5f3~o z**s3%3cP@QHr|2>(@u>fwY@>jVhZV^_i7_h=u39 z0oAHPEZavLhp5UdLNsM=&lA05ya2LyjRUA87A^!j&a1Xrz+f3R=Y*XrL0f{u#U#g2 z<6Ds!85_Qr(PmStxC;ElOJifXBupU}6V_I|k@_@XiH)(j*paaf&9Oc7@PUtY*r|aN z($|S2e=wg%Yy#Fthz_?sVuNkk;95LrL^pf5Rtt9)$w#iX?yrf_6-akDR>E26fK*;J zEsiVHM#FU^b!|PoE@2xr?MRW7Q`m!%ayM`dyN!_OEQw8@h&_Db#AJza#Q3mfXi05E z)u1snyJ>{%edt@rMUx7y=SIMg#axXBr55utz%4HG z?z{WH(^pubm-gn;v|(2I1i$|NwQ=&;WLuUX)+<*1C@uB{A*M}`{H1vcXDzT|!^6E# zzFn>Q!Tn0}V$$tD*lLNKH{V-Aw$f${k?qC#Z0bhf1bsREU$t2$hlZfy6JIm#M$~(^8g8K80?$1!uB_dH3X#%mv@epFzU9UmER;ma}|eB$%=9k`Z=F1 zSiv?*Ii2H=IpfZ?8m=u4#M&F3*4+;j40tBbhs=fkg`7#7I&}hMWB69uv8aT9wgnIi zF_DUukZmR@dtze`+ZxF$K)7%E+;+tMDZZ4)7y2t~mN>W}+Nl@@uf196(KZ9pjgWVH zlUl$MxKt@yp^eYN4wb?e7EeFLqj+4bum89MdnY|vi(U5E5a6f^{a^Mibg9F#aE%L_ z7L$fl$(GZsvgrr0N+p#-21e|p;=g^PKr|T#4Qc6Q6Vf#$GynSQKcP1REitz8d8GQ) z=+}yNb5j=NE>Ni@?-TacQO&kD>}*jjx#LQs>=x@Mv@6+bX)j{L8YYjs94MYY+@*qoKL61u_yMiTL&CywObCHY*) zZs@j2(ALwJO2(Bo&m&&+@iFanA;MQCI7M6_eYc>=HTXPZFw!^XD#k)Ikg*pj8&QeB z!K1)i;%*hqG`b=gUU7r#fJY35Y%G>jAxD(uJz|!<@}-aGIdJJ$l0Rr_zq|V3B$+J2 zezTOU0>8BN<{a|_n=7ViT)a5-*pyG`2UX3zzdm2^6|TI0W3v;(2H)K$d*qVGk(~h{ zGmBocRS{u*cGbAU_j3IJe=%?!iEW9Aq4NxSQi?Z_fD2lJ|4@f*Q3Lop{MXb4=J5;3 zgXHR9s%}%&`_{f%R_SJ6?74PKllkJsUNh?nilxs>4_&9D6)_C?+!T|voRPydT#nE@ao?cf!}B6lBGRkmD&!!094 z1nc_y9V1x;xn-$@n(PHW_B!su!F6>1rbA&ND}Vp=^Yd5Yi-upa-pcly@Z0)k$2f@| zQt$uNIEBfVWUdhmo2sbv<>E1reYR;Q^?z94nV3#(^pN#{XYWUv z%oO5%@W`){nK6!{L8&+}9|TA3>!2OXseTW#u`V|-OP!x(2@ zA5KY{c7B)5MN@Qugw&=K=2D?mJ)3jR0?Jfbn4UN1v5H6^{ijuY@^oNUXJUrMxD$ zUmaHU{LBOKCubaa>SsA<5(ll4&P_h0*m~=$=)K#C#j`BKS)>(CAxCP%03Ld^p+p*t zs!y_=Uh;&p~pvk_rYTpdC@Jf!|$QD4bLr_ z)p_*|wkBcn7j9^d4*p>m#QVSg```Ax{G1s3x|$7?wv^VP*Hb1!XJMRfbK!ByT}}JN z8ZCAEn%0<8o>u$-zD(liu3U2+^Y?Y1mA+(R!mMyY^1xnn!tMvTkkj4`ABOWaScmD5 zsW$X!<<50J#&btLP!5KgjZRz2`l0UQ^Q2HQ++T)`jHW@~yn#%~9XV$Q?2;X{d+6JZPcgI25Cy>b{^HOx5EGeXXKt6FhH`r#QzhrOHlQLtgD+ZX2+EuGHJNoG=oS{N!`IJ%=2F zWnGUq9c1ML94rH!6}e={qr@D+XZPpR^dT3Au~#`zbip~%k6q2V#y4mIx&Zdg$jj8ZGzEnW8FmyEQQ&_Z+`1F_p8jVTjM`ORQnwdhRLv#&c!H4xcIy zg}}P1+eY$*KNlA?QI1E){O-Hi3LE$2OQ?4HTCCPr*aL%YmHO2<2i~>g$9%1RZXlN; z^Q0eqM~pvhsb(9!^Cj;^6e(O)Ot0f&7PxG(TDWLw?+@?)=z7 z8WX}%j_3W0Xfr-UrU1;%kMib7ccoGe$yTKT#}s#*G0XUVyVN;N__V`(UVC7OmCu{- z&heQgG37u62~5(10K}+vHrB^V!ivAY!3O>9ulGB#)%&-+U3W6eivrg=J?*aCrBGBD z|GRL=@yGKe93>geUi!`U&63gTcZV#)#Q6EpBGrBf2P9P^DTVu???|ZF&ujI`^FGGO z0c82prShi}V)&ECv!B23_WM1It2rj{c|BJZJdZIcRTP7=B7vl9rQ)3%jJ&^U%Wb8a z8;OL1^bQ)bn1bc$(#6jvryO9J4X1|}$m>)g zGLogsaG)PaN-Au76b<0hZaEBRd@9jMH-N8$FW|`5{YpX;;xD{_;05MstRF-&DA91F zo-oJBPgo>8a0z`K)fKTJ_LyHH)9=;B)>Ze#4*e)nV(@7a)rtG>D&3JS+JH^RdaB8S z_%9D(knfJ}^WRDu_e~e`Fq3o`Ne0%!PHmpnNDSqm2s^a7A*cRLh5(Wh zd?J}WY^j?L`2eg^hi~A6xE;3|rEb~+lUedR_}n)?$#Iet#-4gM+OIt22=oQLaDGO{hJ(?urgn;UnbgN&`GvL*bX_efvq}g~9 z$yr{uC*REt5mcp<<;pjkDeX-j63I~CKxDotdIhYE?BQmk)d2#ydnU_JAW5YXW}6Y@ za`oA$!W#geCN}P)k`3U^dR*gg-&|StAn3Gw8SwGS)2s#ek)Xe5p&@vbFN^WM**9oE zafk1F&Osa24?e3!^?==nZ4x0~^X>O#^Caf>|F2aE$$nRpwlmlUxIkV}dufA$0zqrB zQNLA!2QOzL4TmZ0^iz#n6#bvLf|LlmF;M%h#53k-=@~7?X)q06*GWs}>|J=wMksyEowo zRjCwdI#;Fq%)} zHZ3{8d^fAL5V{k$jvM%i61-9gj?it;5jlLV7{12ozVP9g?o_nNVF1`-LDi)Azxmhj zB{m%I(y5{(%NS2a$c&C+!YNM`@di3LkK?JE27dcv`e^t_S~2fkDPHR1FCFfWS<0)_ zkp9C{VBr)nu<(?@9s_Z2)vO85Huc-af75v=TL__B7_p;ra`c*m7+Zm7&d z4UBcYYeimHvTB6naM>=8x`5w@brHtP?lKq2{pTArNE;AR-!siv>GPs*($B)rOIwfJ z_QuaR6c=C)0O9b1ip5nDkAJc6l=aV8*wC?zL#U@g244{RbaE&)BRsj80@RwXmh9PFiK3?+d-3Hg)#;gou`NvET^ zEl@m`as~#D;mv2RSIn{G+~yUwqi;#R^zYRd%Sdgwy;BC39Td0?xd3|B`p+%eLgVHq7Uc&b#D|x!z)%;<3TmcS}7R^UMT8 zl4lP*Ka^vVHjPLf#7076tC1V}mTVFOn^YX;ro(Skh{x|c`IqsF!$2xY959!5m2F9M zzYjow4A+LUv}^B*J%a8N_R(EdJ-h2L`LsO=Znb6xS;|xu{3fsqEph0fZP3QBv83C* z&{4Qt=M-*|riLxfvD)qvO0E}!hPC0Q+GuvMl>L>-t-&d?{rsMKv#;Id26Wi&p_A5% z7{J|WhUvAQCti75^T#_<@8lR#|B@~-YkIR{3wO?+@z8xPjIDTNQ7mM)P5rAB>|0d{ zhYp&^c_tqz9azr&({pX}gni$z_NL$Y6IUK0-wv&pW`FX1Nm`&Bn7aL*Lj!peJmfg& zc~di%lej9j^`DCw-`}_Lg}V*%v}bHY`9^mO-^Q%XnQaxO9bS)3m_w(mIvko|fEi2~ z0{sd5IOPS;SBjpohSwp&I34^sXyR){kvju&e}13&_7w*un;pmR?P2|i`zN%-Fz9!2 zS)zKzZHiBTqj$QmcBE(uxLr}L%})L(nYKC~8|=S5p_0Xs$UHZ;O?<+q!a;`Y2Rn%F z*8lu2gP+&>mJ?HR<@>OE(jUoblTHZOC_bfM-A9eTQa9AP0mq^yO=YjD?Z19$=N;81 z1M~fbgB8ohfi!FLf~`%uqTp1IH-B!}Cp_l3^R>-{T>-@YgEN2EBj;Rg$*52BYzX&+t{h{zqecE%w4?kP0-8R0|r=`bT z7WVmqKRlilIV1#Yd!1v*Ag!F3^f3r8tvVszhkR7<_=wv#-GKYwWjyHN;LT|(8RbPZ zz_RbwqBS8#=A|P{G@7R~Md&ZY|cc zP5R+}{kgQ0Qucy>OJC>w1keYKaqdg;o|4Rme!B0fRPFkd4j)lzwm}RsS`L`y<_>AU zPg^KAWo2AgUaxO5m;Kn7+3WAqpXCGg;>EJbzx8Y7v)ZuP(neyNM3u>9jJNZt=$j1d zy0H1>G`6-$G1_WA4fDNC7;ELG#e8yJ;iuO@7VjI-wS6zzo8z3{4_j;;O2U5lv=O~UwI&}W? zEF)4ib3{>L7u8JrL6X$xKk!+?n&Mgf``3-{BYq73edbx@!RDjiMpHuu@~!M=w0nQC zgJrareyDUjY?$#_AOo?#K=hp_^Sv&QSf-xCd68*}SNK4n#li3N8{Xv#oSOz&o)Asj z-D3=rm0&wRPI;tXg!B4B3)o9@$o#>tfKQ1J=(GH_zmME|?}BqzrA zb3s_|GFXHZe!QO5XpXpYDcaZml%1$f0LY2Fjd!^F7_N(g#X^h8No;X{@`@@M13h_+ z5y=;lalQ$`s$>PLBb>Xdr~iQY59h(^chT>L=rOKgwET5>g-kzRzli84G(UuE&SNCG zHC$UIHGqeb@zYw9WG;IdH=LX2M1copKTlPg2paGSon!viN?FwRt@DMe6|l2oik#d4UNvVDVRDxB;_cQpErNsRH@eNWwX?296a#b)ym$+ z8-3>Kpn;!j)$`1seDV^{@pQxxp!;%Z$5H3IKkGTZ<|#u*`y)u1KabJPQ%G_iQuAwb zd|CK~v77wZevsrx@Kwr@6;(^`e(D#-u*a3v+A5%(W1P-|6;3zqqr#=X8vz&^Tk_|^ zrcT$>Er7*vk<$6OSV3?~y~T-C`%iCYE+iv)Kb@v<^w+>e*(^w$vSBdZa@RUv(jlMj z*Xbv)lw-MH?6`Hz4S&PInT`qTlFrj1M|C(ffrAyB0ueZWrgB3z3CYcPhKL~lES&wM zEZBXcdSbu>Crshptgxp&p*v~h=F{kFV;=0pJOo8YKopEHY#M64!91koI4Q?6v8?MV zY^sF4?5F2pBkc;l+Fb_?JSSl7q@%E%AQwSfB9xT;`&sDklEs<}sTd#dn*C`_8t*t< zwb=~?tCfjaO0)<@?Fof7cU{h>jXu(rK;on1$x-_hvD;{KW#{V)0k);hbi{LWLjn3m zf(9z-vX3EAl2Tee>mAz;*G)-E0?$zm>WV(So3Mui_H1)ITP#YfiY}uQGqxWz&{xT= zzwTeY0R{Y#Pf~y3BX3Y(BQ`dvMPZ-R8L0;XZ&9+?PviVO&YuOfB+iZ+fm0v2kv`r3 zuBt-T=os`x8?ayxKKDPPBDF89-EQYD%_JaHH`CuVx3v7sh0QLcQZe4v&r|8Z?mGMg zxSca|r{QWk3K z?l^bE<-4$hnoJGYJ@7$AFYFTc$~@+qK1r_opC0otEB{d!onrgo)M|uFL5JZ_O2GV< zmJBEgIZ_*13Hgn0a^sHvG`q!&`1JYy;doZ*#Ajo}3V9BGbC8hTC$P~i3jXNU^LaX7 z$^|VMEwGhVCe_p-1CqFRJt}*{i5EgIza^_s+n9gIrfr8Qd@}X>R9O=6Ou4k%qr~A* zDSPvE$j+pRj6>GOMr@GAN$Z*0KsZT-Ot1(4Ua-e*htHO%VT*vDcJ<;>O-_aR)aRZy zP~Z`IH{%*H0Qwxs$%rFce$v0SqeH?-J{oGZtP>l`y z5^S$D_Zza=R&F3`z87r2ZFtx|^)^}YVNZc8_l$6rUd&(Zz&D#z+a35G@LMxVPVXb_%GeA2S4Ni0#dYSmeq~tsn^!EpLYQfe(d9;*I*kS8@HJ}VVze8w6*9W?1f;8#Er$Q1 z`Yrlp+&ezEhxS{z1{|euwNEsMpISujZ5V7z3m?ORN0frIWOu3K;JQ}&g`iW=9q5Z~ zDpWH}nqII!Ep?a6^cl19h0O8^C3vmucW>9dr(b{n?L&qQ7O>!0IzG34&&5b9zLAiT z3pgwrOoB#H`4zUC>+ZD=LwoLDRNd8Ow>N;p(y-Q3)z+48WC0!k%aHrv<0bABWXw^u z>vysPSDXxf!ygQsWaVQc0j5{T0fLc8R7YQBC#oEYkg#PoUt4Xe_6i3NpA+7dDjwL7 zS+J3!UD*BX>v)X8X%7B$#>a2Si<|VOq~E%NCcx9|4>$(!-48R`)m0;A??Vh+TYgJj zQ74A4JzlOP>GU4(N*ltHL)t;ZVF#cRE@YACc2OA)Hj z+OYL_?6ynP$bOX^1Ka5v<|`5%!WI;wA?D{jeOj;Fa}AveI6-FrL_EsBR-CyXYT&qH z-SP0=jw98ya{ehR_n~oj_+u7w;K%i>SXCE9oHRv;Wh}ydk*GRtPh}GKSNEN}>}u1( zt;eywQYNZZfM(DS>rD68rB{NDd9Y?>9hoqYJN3Ob8k21w`aFbi^ILX)ex)1-0@>Gt zyiZvidbr}srFYrBM?B;6TQ)y`?`p*i6F$&&+dEd{6_N7UgFCT?o-{x*n(Sv8^Gmr3 z{!kG<#7S=Y{pP-XZ7$b;bF3mQCg~lKysy4dNg)5D-{7;mY`%myK8A+PF@K_}>5AXe z&rAQ}ld_ciP59!y&rLeDY>LlV$4XpA9OshKFVFo?tVJOCcY|G*^f+^^&8+F$rBNv% zlZyN}8B7?keSt}KU2DiDutxqcjk7nFM@n1 zC0X6U4_V!DhC_?GLM^-IGb(N}KVlsIRom}OBhQt3Gp^75zEKa!r&(<#_y~vW)*(Z{ zQP10`IcWawwpYn`j2ra-PIa)AHEDwF2}`~DGrDEm*HD%Eg)d}_oYXJ;p1302oAxJS z5v%7Hd`2ZM#I%!EBzy>_KccaeVX+b68XE}aTvN}C_w$hI5BS#K`&tc=X@_VupL1nZ zHXYy=@L~I#?E}`|y-o5z$9?c)42bBh>%grep8F9~L+st{h5>$ef!rL`|)Q&u|*Db^``gOZ^@V; zbo}fWIA22sCTv&xJ`@8D+&^aZ>cheW#iqe3a^p#T3{)CY>ia9elDM;cxUpX*y$S(KoXBPSIm658ck5U$=}DiQ@tlI z@_=oa=StZgw1DrxWQ#kSQSN!!!5b$Nr>LC!tfky{js>&KA`VG%`ZD%lES1D#$8F){ zNA-}0va0H7%G!37&Cspq#{UHK8RYK>&} z-S{-(QCSUj@G-qZ%a6q6Fby9^wZ-=N!eN1ZleF#l)N|$Gx~tYR{&Y=WXxiyz*Gl_7^}jI8 zLuWcDgJz`5fusTG;Y6sjs$&Y$0li?s&4zV9XCi}#GUZfDD#^_gb; zfriy`U-Eg_*uu8qz)9+aPT#qQWB3?1)&ys~sRke8oVT@oR)0Nai1;7Y_T%l$DenV6 zdzvyJXUul1YV&vVjV!bphs#C_CX#&QdiOr$Nbwouf+cJr6SDustxJ=e{=ToTD(5>% zkgX(9VHURO?z^zRx2yC%{>4c_fJP$$!!P;;namy;feG?@MIkPTQ zQ<+HXgAK4G-hrGpHyV!~LN4I5UW8+Hd2A#^_0g$-Plvw?=}c-H@~0~5m1RZv!RBy6uwe}P5~K-!#^QZIk>+9|@*WIf8qZV=)pi=Z&s|G! zCeQV82|FKCF%T_{ALfm`%{-MbVFR(yDed%w;Q#EGV0fHpv9yhYVdJA2N=u~uE)-Pp z_q$`uj(}2sDZ5O1zmbs1c&y*gK=K?f?(IO`YJ}4g^Z#TdRj?z*vamTxiXM{$G?Q`; z{_DcODZbrB7`T`lHa$-n3%vk?dTxyU7RYMzks8-L4H4IIa?>=770=OlghigU@3W7# zkt_PKXc%Bi1Cl!Ia;4sx`pHPHL1vbLjxkf^DIM}qlujI%Mk5_pHMW*SLOf%v)>Kj# z;9XSu;%g^HM34a+^_AwzvaeJ%jI~<80xg=Y<>s{^dtg7Wy3+nrz5z^-Yi(xVqWUO2#QRZ3C9`1)PBNRB(<5Pt#f}WsK9gK z;QQ8XvB|=N5K?_=O1PBI?11J52bH5um+kXJ^N}33Uu65M>?$!!yE^X+>p;nbecVV{ zzN?trou@H>(kH%QxhF|ffLM}VLF3S?;3>ZF-A|0Oy$Ncw02a-!;_o;9;sb7WYVzvs z%3U@Lw=o0B{_`!Z8XRV`Fe~PNYcwi1@uS9&@R|UpmAI3#Ebx}HRHS5-_~N47nBTJ? zs|_CYNr`S@uYrcy<}EvC&tNG1RrOTPdLhz%vW&O{q9=}JysRQ z=35EbR^)qy%-sANw!}`<3Y?|=igE4!LMtihj&{ZGp=3;mS5l*4-lbRXkY@*6<5}E~ z;>`j;{O;BbnnO*o~FOk%%z*lq_8x*8;I?Vz70XBKv<)=LVLMCPsEOZCy zc9#QzlURhvQz_AB@TA}am3b7pr#6Rpkmb|hC^@Uz;MUsLuZM9Sqfy2q0w4lgTkXryWaRZgyIxZnjU^3H7{@Tqz&!Lw=nF z?Di&z%o%b0Zi`}2l9VrX5^M3))Hi@F0^;>-$=2lUfO%D?B3UF#F~3WgHYIGJO33QA zAM9n=={U6GF2cwIH!=pHg@0_u$?+mldXGU;Z-Ot`))DY(4s|7sr@o6#Zh5-7R+WKV zv=^eMX46`1dI>qX`hheMLY%NA!ydIninL8q&|!%lOeDtQu#(s)*Ao?euZl`lu$07O z(LmWgpxdQY$#*Y`$A(|`VJkt#ewE!I37gFguKHDT(P`6#;_TQ579UTP5`sg}K`55S zuOLm!eaMUzkTtDVviV55p zt7Er(XW9spYKmoO>Jv$R^F;6Bzvd4tlF4F8W1Q^5_G134H1z~#kALUn6#$1y|t#C|4VxeQV+@#9Yslns@4!a@~BM5sSNiE`cp$R{9+Jr6rjQVqVYlR);ERA}eKNi8*WVf8u1X zD_fAqxDoK%bA%vJk3FVti*~pC28NX6R)WpV2`*{|X@kB`#J{dkhR2Vc#K7k+Sn*fU#V9#V6@(%iw;0qDS=wiS*dHpW> z)AYd{mI~QM&;vZvwq11)kJFap67jAT2cYe_>d=>=1Hl(;8zCN?hqDZvxZJZQtHBdK zVa%)4C;J?;;zkXMCGfcs&a}tmrw@}=CGM({s>Cz78HMLAnlz5}utuk#4c>sMW$%PA zk3_`x!*g*f*Xk3-j>kJ^AplXGV(5h?ij|?wk&@)a6c*w-3fz1 zd(Rt*o5BEmr=sIKbT2^B$DAI@jPezMPS4+_l+e0N=Y83FXkh257)ZvBrk#{q{kZxV3{w`ez%G(>fl!$ zxCM=_FSw{Chb*0PV%$FqfzSv^zP1f~+z#~%TM>4JqqCgEj7RThwb={6^L~;O;YluF z zgyycAe8%(6m=D`)T6zn*z=jM>nXZ+GlROplXF*FRTw;7Lb6`C$EI&wx)P(J5<2ZPg z+M50F^CThmzilG`*Pex`*`_-`i_!7>k|yJ!Jsn*l!5?6DHDN_~bHf z`i{f1YCI+tD-7IIoKHg_p{uWZEJV(^>(~enJ{OUh^Xi|(rNejmrbiFlwA?j04k1bY zeajV;K_d^%evynbhWJ~Mg?P?o!5X-J<1glC_(XTp z^JNDN0G6)A^NTiH<1xk+@AF|jzGk7FmGgDj1;0&xU4OQPs_L*d94Phs2A3JTocWEp zUqHDv2934&9K%*ix5)Rb>*&#;1SnIFbMs+ZM$pq~E&}u7e)$9}euU(H~Lo7zt zHAQd7$8o2efgLOqf0cZH$XN8Z)&wF3nB(N{cG#^$W>4J0-X85v{g*j=!#+k_sB*N2 zoRLlmb3BN%33+!|FW|PEjTK$iSark>RhxgA_sw4Ir*>a!zDbNyZO;Z`ZH>70}Z;u07O z)|uF^A*3Gf`}23U!@ZQx;`GP;!2W)&TFaBhcWy6LzV(XYr7XXNc&ypW&n=sNnRp2IdE&(vgV`$q#>n&GQ^vrD7AKPb z@F_$hhphD=eFctl%r?fZ(qQWSaPUF0|Eah5HH{Zx|a@Cq62{2Y&o zuSpZ1ak7+T;0p^!v)Xa*wfQPiviYbmy;fHBZS!FgG3empH^^^>6WZ(T^wUll*X&?z z*lJas@Hwvj{xvqS5Z^)Wu<=y$sDKTRK?dw{!8o41awE^5`E@3K{+E*W5;o!+3(C1E z)1i{`p-a3nXVIF&f5pb&+oaDYAOKmPxQJ(Fz&z!qjc}x5BjgN1!Irs)zVyX6V>ul5 z5wIMpdQa9DEAA#Y+u|JQ1dP3HAlhxMZI3)vSi;|LZ^hiFZz#1wZiS96pIr!lnT9;%nkVlHaO5oZ!ae)v);(=Nk)D&0%4K z^ltc0JSD8<5Bews^DTW7NNvupK8jYJ%9x+1?(&RoC2e79?$C%QSenDsV7u*qIMLY- zeU=QAm8;!msg3s@m|oG|-Qc6`P=l=o$HJ}dhQ0Mi?`W$>R1*gZ#II8aZpW4a0AGhx_j@}<*DB&`Es zc-Q)3MxG=Uw6b}ClJG%ez%4eme|~wT&~^A6J?NQ9@+oSH4xu|9VtT5c75_`h2qeKE znHW`tKOe@W<%T09i{$CipHB}IS;>@wyEH}yKksUFcWsE+xrmJOm=jm2-OWI@Z+OOO z^Wd>v0q;l3e!tTOar$0Ths}BNOKofrVIN9J)(YvC!@dQrNTxmuha^{Q`h9TftO*;i z(_ICGrODtbWfNe`jWbc*7=a^;&83l)?tCSsN5pco6=)H|R4IK~w#b*yrW5?WA2iT? z2~NMbw|onk=!(z&j?_tWj~e~fMKMJZZJ0r=8IQc;<0YNe5x0Q&GUR-xgp~2eL$v1 z*Q_sCPqrYxDd{4%5wO!tn#_am=T$*Nhr&j(sw%#4>R#eFU_}Y^t|xzDV?$U@345vc zl5VwROX9HP#~plKrxcgm$?95GID5W4u-%nMvI5qf?QebgLvl%s&Fthu=m{qs*cE|g z$k^~LlHZMJq8`ty9~hI?i4bxVe=KhAXqXSAafL3)Q_ol*+Ii^s@jtz4FKj|yIFa(@ zC>a<@m9Q~3Km1kI*!IRDB#V=b%xMztYQ807oMtE)&@dB{!P;Y-pgq@rd&jVEka@l% zDGtdaL}O;fi(B6=-W*a%c(7SEDAv}}`&|Ew2ZClqgg5GLnGhQ!OjpTHDSGrnP*ifG z-U9DCuU<%EO#nKKuBbkqG|s-6hlV#F{_--FZVRGn;`4LxJaF1%+@p&W{xMEQuFCMm zk1-y$2e02o@ALifd8&F{$$HJhRUA&+ZoI29 z$3D3jhcP|xM4T$mfsn30*>(}DxHT$pqQWT4Fws$gc+fQa0Rh~ypZJ}CnazzyEaytt z=QFM&wfGY9Mu4Ib?@8HpXPa!(WR(WQmoYZg*z1S{e@))=_8eb7KYx|o6!T@fsC*~? z@ix$!p9230+-uNVRZVt0W#!pz%B>M6x01Ja@a4K9v6tjX!2h9(=j3Pj=HOq+8M=;3 zz4h2um-e-oh&ye#&G@O7PfZw1*=(c_S^rrHM5pUd9SHNV=!L_*aL|PmUn;6>l8#JW zL3X0YseV$9vCk8xOpTlH&a^viFP`J`PsSefCsde*9PuPG999H6Fgo;v<;<=~88Q(< zBV{Ut$R4*>+HFY-VVk&&URj|XHaQMIz#JbD^4NF}J~Kg$4`2wL=o^IA-U$1=_pzu1 zi#QK#wxEe!*-n)7w#6oKNqTGYhwwzCkaU5??8hd9e;FrY?C0)g3rXs}Fyca`*oxYs`LA=;Cq8yHCrCteFMu?8Du+=iazDykNW5p#d8 zPsApE9)1;y&q`D~M6$TusgoRKo!*nGDNgXWJ5Xtym@98DuEr=-n&rDZ%}*NuB@VkXw_2 z`P2VcVyq<8(CL9Y;54fM-+(>gIBAM(u)AUz@u0&4`WS~)@6Dr+y1Qh?R#@)NgEa8$ zqUW|wk9DC;-uXDd+AsiD)#7vM^pyNys1|(nF#%RS7`JCxPr!!#!&N?%uL1Cyb;cTh z&uLf0q^hW}T^{Agi`qB@YEBVxbjB9K4eeP+WPM?Ql>tR15CP!;$&$aZ=$>TE@ zrs4ws@;OMf3A1U&u1*6MZ5)Tn2zNin#Cc9`kIr}$V7%L%$(?2?BXr1Geum?{!ulxa z&d3&HyAk|p`Xvt|^vpiw54aU2SlNJe14-sPD#2s7F>=?|OO6SDZ|(8@<2h^N$ckQ3 z!Arx2XPPkUYl8LyV?K-ly)>JXXdDMCT7$RSE;@5q3Fhq(E|L-c9NQ4xHp_PIo+Af5 z+Wl#E#r?St{qa0^jkR(d9yI&;wlN(v^BL8hzR4)ozx>|JQ-qAxmyHa-9p=Wqh+zK6 zQHvZ_`B39DKEM|EYU4MK<*fsLUfs;Uuhs2(R8jmUbJ>1m+QWCW&vE0jgQab#{KTPr z(r7dEy`1{@*c?LrZd`oHld6ROp9aFu!Joa|O#C1G8I8W!c>WE`L(F%WbGHZMzv$zH zd+}YaJqX))9R?}$6}l|eruJm$*{e9kChTdP=u2K`0rSQ>i-^4H&$&@=UZ-C3fj+T{ z=bC!)9+l!}5r}$3E`C7o_75`)%V8*e<8O62fKbapcknWW~Mp-HHmC zDiw3K@R`=+B^nd^gKyWNM`hS1Of!`8>J-xBL{rwj9gK>xixgj5TeqqF#kcp{d&4Hn zDy5Or%2k)2`?&{%Vla5$XxvNLK8AFr7>lr8>fiBS`LATtpG1^@1KP$?e5 z;YSBA?Uj)YwA=8d=%BkP=kf}3XTKvxKm#K(YrW|r31ii40ff=DN4`dNn zI|a(4ZTPC@(yNZg(|G1r{(&2r{QAS98J!kYqh5*AwK@l9BB8#^285?kfvRfU4qr9al0%p~kN=yHr-r>hN^S?E@i=q7wpU}bhEz5Mi?s%gaoUq zpbNv-+q2O5rKeY4!~;+HpmWY$hx?m+TK065YCgn=Z@*7_VScCnIf!xSOr-?CNKl;{ z-8b~_!W)7n7=wm>x<_CDRRx*;wu7RSK*RXi2MN_isdG#MJFvP3}V%A1T}4` ziwyQ@%ok-VC3uxB09%FO#4;HhB1A@&M~lF2(8iutCcCi=dKOcSB%3t5)!XTE;wHYu zp*7wnqon91b@hgw^u-2)%!N#i_q4_;gU2>oWb)T1{^rD?Iz8*d71*^B6;)1M=ySUz zk3kh7y|hw(C2(>)ME7A&)aH?k?0;*z0XSsmk~cxj=h*MbDsWQC1F$Whwmy+`(|9Fl z+jFk7!zKqb;2yw;G1Nk>)0Q_DS~7i}n|uf8P`0~4WKG|Iz+-bE@Qt@QfVFu_BGEK9 zMhdl`6;tEBSGFcx#xDrex!UmVHU5Xat=WSb^@&Oh7 zOzPe0Fz)Y4o)m~?nUVbF^wSnG#gnra1*y{3iD0p=elS3FZYkH=Z{7TG-S(sHwHoJ@ z`bUuP*zD4HA3<)C@wri-s>Nb)E|XewvxubZc%H)|7|;ip;(0y|)Y2BHaRb(<{h0po zz$wQ%wk0_sj=5PUsKD4FwCs zl!?e108qeV*=@X6-9l-%M@0{p~pl$g6|^;3Q0ehz%y zHTE(F8s5@B2>RJoN25aLAZe1%R#4HBd$19NsvYCd5y;dQPbIyzgsN1Sq&+Etn+yPl z;A5ZPVG%z5>c6{9h5MG{^tr9m-lQtY_uUuM_Hebv0D8^22-!brQwFYR0Zz2=R4Qf( zAIA4QgH1`BXZK+;v{<4Ff!X9!$Cf6Jd~P#g!Q1eSfgxW*?(f9r6{lTiWk}e6PDizP zPWn_xH!BUpC$hT$-v;1!@}>C+HL+>(Zu)b|J`*fLP|QreEch%f{TrZfG3l`1UEcDL zOD}A_LV6CBbssqj-$#^U=V_Z-(t1{qFtXW#mi9uclCKnFYj{-hdnbJf)1YLmDCG@R z-cA~!4MpWI`t$IMFwPbBRwo|+Z_8X%;{tzWl~3RJlj1DK=y2>l91h)r4OZk~>Gwb{ z_@Waw$%T$LO19k%5?>GT4EfjkkxKdnf2JKMT8DncyRb10be+}E0q0e1gpS4{R~>MK z`|eM2l4h4Hl6dv01uj;NK7}>wKEO|kt{Wps*In3%0aWg7fo@z$^1gIGS!s+eSL=7I zEv(de+U)@;I|niXzTESVZ`=hAH7kthMe{K_phlxTgbE>p5(gf$TWvA1Dj9+A{d0M> zsvsZ8CGaB8`z9Jy$eGP|HNUrb3|~mFO+H;(wz z?nH!TLhb#A8%avJiH~woz{Pk+z(; z#(EL#Sk}{K(hvItk62Z6TRmBZ(A=thLY~`QV`Ki`xDv)8`dR{;HSrYlHZ5A^Lm)a$ z1T4Yp(GK)5Vj+2G2=OA`|5!f|RiHO-s%B1Pj)N0{v?*V5jXUK*&vP!vJ)RyIejjYV8*En$+{b|c&LEO%;95VLV;khRTdkiA@i&NoK*?>O+`9vk8k zMqz8`7^Gy^!a+Jvf=ZjLpw}3HmeUf%gs^!R7jIl;8cw^`PRuZzv3VsAN}|mL{%``W zwUM?RhMEV<6hA$Eb1qEkD(Rb~S(fNbkTTZg#qW2-g>hx&UUglK!wE6;9)D#SYY>J7tltzjWLi&z7c14`1T%DdCH1zfRilX)s)O(v$V zpLQ{5PZ}AUoVW(|pwEo@Rltm8taO@So=f_&vN!8~cA4s?`N`n!`37I$m;m?fW!ujjf_&|tnh^v4@)?K4>4ZUD#uUOuH6qK>uABV{10cyN? z%BtTfx7pT8F`?ZbZNIOV!^Q-B&}|BaN6m4_jowtTjh=d|LFXIJ;+h)}_#h{Kzil95 zSPfd7{5!|TadPI{c};zqwiD?u?l0fT-(!B;M+w^=&#jTuC>>6tYr;v$-cg~tKWC}W z(mrLK7dA@Lmr((oVY5tirVf2*07WR={jWV$Q9)|zg=r?3c>h>{+hH>G0n)i zK|BXE_p;II?Mg96_<){t$vfwuxvtV_pRf#EP~W75MI(;UH^u}_L3isYCLu*z9y=-B zfQhioYPR6PH!=3Ln%w#)SvPTX_)HVU7~0gYDbwF&GA@?suo;i%%?JctS7d)8EyndK zS5;FNWFY~)g@j#`y|{-q+jx+R{=7pn@OgUfZOU~C(kIF^NPI1@pP6r8a4QqH4X$DH z4F43@O*!-X>3img_nh)+L(MgNeTjRu`6u5wmXg-j*ay(wGZI~(<)^3BZ7tSxDkcAg z*2;EFg5wl%ANY&^dLa&NIEaCDn}PAvV6Ov~n)%3hByG2swgrBho-vGRJI%}9atx$m z4^^RB5(fqI?{a{kEJC(j(k{_JepenBwYRE8_Uras<27x?kUD)JH#-K9ayW5CJftJ` zd%yu4HSP&TSfq{$vQj^MKLA%8G5rFK%rw;mbNk|lVyyCy)^s7 zXZIV{Q~^2A?t@c4^nPvq(X#rcA1hup4gqPJ!Oc0Z6&M`4Nx5?j&CspR@UdAx+)m>mu-s-t2Yci`*?d>zVb z^D|`Nz!`5~$+6O$Mcq+o6>9PP6pBVC%g~j0)l69OiMb}p^vd%JO=+8wNAeF*%RUL-jtfZw0w_R=Kj!Hb8 zJ-jjzE#k6HfR2USg?>$qyH9Y96V&6RrdFjS@acN=PQ%&hwwp1)4aSVh0<15~S+v|F z-2!t~aKL9)o_%zI6m78m;It7*L9vPEL%~WPSC^?xrW4F(W#HVT3ECh#1kMvL;tAOv z(gMdGRLnr1oWuwGr%gruVyvkvc(Y4<{{?$dd(d;KHeK}K4zj<-dg_l1#Hmy7PF7pB z*$gLo*9oY1lN--MuA35Uq(?qA3=*-U@~tn-XtQC#+y%?6|v zj`w(;&209_5GC8J5^=av0iR;e{Kc@SBskcam!J|#&4cW9+5lCb;q1ABqm2NS+>JSV zg`Uzc&v&mdu;|#g!?74@7nkhw7AFen>Lk1Bj`H^1pUgVTnF#N zVSf^3FRK7y+K85{?_*i9L2mmnC3kjvkDdiz-=#CWiiankSyYDs-GGK9;a~Rhb%pKr z$Oc6+`BTv^PT%&o!w!iB-lq-AJZ6by|6q8jD$Gs;26?fu-HB#Ah!6$U!Q^Gbkoz}*oZTlE1`&w2eO5EmV&tQT3PJ7qK z9`9IH--WzMd(4#J?F5LbiMYT&TSj7RTkfQXAbdG&SK31L2=s#XM8*eKPi2ogWczdP z0$m5%v1ua@SAae+f@~r%H~PUp%fkkOA5>9+Y^980JK&mnHY!N3IC1fbaqRYiYk(k3 zLc}UOH(m39fqK5|jIbbEuq|9bWM*dTYZmc8(Nb>Mh?Cc^c- z1lJL-icxZc6FMI><6-etI>bd_W&YMS+T4`5X{;f}Q1f)2!w*Vqchg#5oaSVKtH7wv#N zR&GvYSSDW+@5yrtb@W~_11(#EE}xgv3n%|d^y$O(+PK^92pbEF8f|kkv4s1HOO)*b zK`cN?E(A9OF0%^g=gv(Qd5B5aK$~Q4@^2L|f!x-V#h!>&_VfxkJ~rY)@5}vKv@4VEMq{h_(JI5xyY|G$D?A=5Z!W@Pum2S~DI{aAoZn!)`%d@C5&6OdIb za5Uq*1rZVc#*6J|5JNzF`bDIcaYK&J!}-`rV zxo!lUYvHz4KV=#ZT<$qskkw_!<+G?jz+G~bAd|dujHTL-Ov>d*Cl*lamL`%&WDaD zT@3#_`88;irp6UzV)+|zm;@DejnQ3pR4RD z*wN?9D`Q?Q-x@Jco*1E9e|F^%H!rL@}}mpRN$nj{NoO@6_kpw}XtyH8{7E zQ!a~;t(o9V+@Y3pMO3cS4EYo zSz(V)s|OyoZIpI`1Fa=qng4t#Lp z&)?~jifU_n^Ftg2c;D3@^i|qDh)1g?j==w@7{ZmlZmHz3OhS+AufHzgn0EO^6&Kj= zeX2UC5L|$(`F+|wEQ=9i+3dcP2(p&I(vS-L`>9GUACLY=pRf)$}==q+r0DhjiCv_;{C*${x7J1%UKG{B; z(>S)nn{yI!`EU9%6S~3owQf@fxdNWJFGK^M$gk+W4EklOLsIr9yzaa6M8jzLPid5(FQahoxVfPWq$5Y8HSh2c5rml|{0XB|&# zN~xnos-2)emOB^+&*9*Km-!^#MA8>ay%fHOjocZN0m~R`CXr*TBj!J8#0C@UFyJ72 z&rR3VD#_Z8>*71eB{6IKC<%k$WAJ^BK?BW}d4-8nm0W9R>jYv9!lE&PQNn(V*(QGu z_%f~^pMc|A@&{U-v`mkmo1j;>Y1jsNyFOnwQU03x8FU`@Ib9~x# z;Ns^REwEKnvehDn0lcO#U8K8{pSQNloEL$PrSb5bzg?NPw5A?3VPAj`vN+_;{sVMV zF~1G7$akEH#b3u`-R_eqyT@}g7cOP;+(1P3?j9HE0`_}6N5(7fwfDpS%DjZs=~8-( z#s*$|g%!R-#*hrz+MJ6A>Czrx8en)&tMGyT7K2I6da!tEV;A;(> z%?)%<%wc~Iq|HitDNEOT^>O1opB+z%)`o3RVD5OzT$dM_h5plC&TA`9*PB!|)kZ(5 zZ-s29`>w-s{vdx3c`)h2s`8~G)|S37Y$>7v@HgSM9dJytygH8lhJK#5ni7raAMESN z-#EO$hU{wdmKsu4dT)GW-5!3stoTO6jx{*$k7cq&ZVQju6}Je-BwHK!JsyH>rM#{$ z^4&&?@n*H*Yo$$T@!r0{uzDFs(#C-O)RR;H$&|sP@?MS~#IXG|S7&PBE+>;bItt%!ll0#q&s z9B53lI`l~HuK_;}zTyphY!^@83G@3Ido=D*z~{gnXyYfUi^ubI;7mWLHk+3BtBTCI|O!p|_)BR1(k6?e+^|g<0 zrOesyQ;aeFQ|c$j`v)90i*YA$!2P`1H-_~l!hO)I95_Xe z+%;r3V%3_j@6TZ;pid=ThJ(Og<#6byOO@>8%AI3-zWilLz3A_kp5)eVE8pt*7rERX zC!)21ad<*o8-KY4Y6f&%aZAv=1eN$zV(E zxuz~zuliWV+n}MQm#y}6$d`RQ_Xn|sz8B@^7~lvvrP56WjpWr((BZJ^2vU~A+&5pe zc6Wajw3vi2l{WoQlgC6?rBBo;BUrG7;h@>qG&DAYHH71zc(*7d6R$VyX|b#f6cj-Gab^U>n_|wLH0$_jchQqs35bfV%jJX&C<2{OS4PZ=&onv94F>FV8|QEHV&_Tk};ZUr_!n% z0i$X`+B^~muqD2nZgMyjC1H9y^3u*TuM|wD&}#1wzR>6kpQ&WZl6Lwv4m4MrM?fQB zQ~X~ivcHe1glP+^VLXolvKl+?<8LEep&?WmM1U=giD-|Fg_3(x3g4N5aIzZAbNqqB z>vdlB-sJBzV#db%X=o>n3|di<#;-RLEXe_GaC{kCA5SDeF>M5F)=S{E8CQBPfMbj% zOiL=?Jb|PjI$<3+W`3+bs|Qqb`4%9a4jf=+Gw6Ar8`lvm@%Mov|7{H?X$A+s;U3pC z*o)?COx0iUNzRAmLg+$Bh{hA*{IGTAkb!*JkXh{s@YQf068}8Mm-fL^dB8$8c^bUR zZA;0R=6ov*t(ae)@aQcdfdUC0nLwPlr#?)|fTUnz((a=#e|-{;JT|}#P8?2l(qX;w zqGlKl+0JYWHWK3i>Hx1w5lf5BTrJYun(6E~C^B*?mW}pyQvugPRoAFLq`%`1&@LQ^b3;CB$M5-0lfw(?OmMo&SR@;q>$Ob`)KH8k0|6We?Zu~l@L~~OzzRIqvz?YEz0NxgDSl!n$;yWSJ z1)Cq;c3aqJpULo&n+>S5uUhV~P{6hJA=l9hq?W zh?ZyLVpRCMhyPd`>w+)SAuhku#7ci}q>ya67A540OBa)Fvk1xL0D`koRVbbgeA=Fc z5=k56&Iun$#_aPt%_$J>aJ;R_e*SO8?!284A)2;+5@LMpS==OB7vxJMeG@*NR$?QJ zE+z}KlzqVVF|z%$&!D&6=PI2gIklo~4x;gu`ZM3#qxwx#zl00kgb0#((2dKO&?P|R zOZ(W^Bp6G;&v=8ekj?bWmp1ZA^j~(BNu9j`X0TRShUEv--L9e<43v6XE$7I*#RAjG zJPy%Oo=dcg3eoK2TQzZiC}tuYLn+xLV%c|Amp4!FTo)b!4OouJVN?BO`_dDfoc|rR zNEXg25g~|b)3DF;Ey*pd5W_~m-_26hS7V+<`%y)SeH_q!`l}(odK^on0>mMQ?zzYq zvQt9G4_|?Ul+KN=kCJb;jvL_&{j4{zM?snt32nq$(P8k0)WU)oMFca!4P=YJO#=}htSV_?jVEl5oF)DqI1kiq{g85iWJ``N1O@C6vVcz6@vCp*eVH^-q0_QMn$WX?l-W6kH2u*nmUqm>U1AGoyW2e^&? z%huQ0z%G#e22(XOFO(m_BmeM+d9D-kTaNKUvdvz}_7WNW*;cmGz2*Rz^!-ouzQb+jhzJ|zpa_yHtQK6=dX zQ!t%Z#yvnwDp}!i^GCxyRm~P{YZ%Ys?DDP0O0?(9Lcd@_kn@X^Sp!!4cQukP zB6XOa52kGdTuTz^854QNdCRf(FkxYp01AA$zo{Z*qw^+KpbBdW4-Bw4j}5*#2PD8j z|E8U)B_AMLlx3Jenb9E!pEmB)eHJu*lRPo01CgY_GvBW{OT{M5>3zi^CGZLTz@|Ek z4+mtVrh@JR%!37K8}!WWnU=yV?^I%3t(z2K$B&oK^v z{%!4A+c;onlqj^`N3~l2D#3I0>e4m#Gm(&ajOQlYH_5=s$3n6jZStI_+>t@U*%|om z%SJrL=X1@Cb)_d|%zL$da*qCMoA7#q!k%7HxE`8d6B15aLTyB$ah3CE1FRcQ4dFNs3(JpMhk|~n8h|Dtw zUGaGRB>`=Twn(4w{F+@aCtvA{yoeXucaEj`A8Wi{yv5g<@Eo{3Hpt2;Q{!pVE`R!X zN^kG`&|Ry;F!=+cWm+2j&e%TmcTeIDoId;))x#tlQP{t*<Zfuj7P3qxLIj0O}7p|@!kG$XEZ_b#<)aTHJQz!E8+a4X2tIzWi`AsV>g|2lEd^6)_PolwZvj0zWrYqs-|S}KJ=!p7z)1dgwzKAo z&3-X&*5@ikgB(xo_EBuoz7cye25_%fowlL8@WYU)c+Lh4^&O}Gq~DRFCer(hX%oPm zUT19NZLJ=>oi7Sc{l)eO_$^sPBfz7>OGcivzrTcqHIKKO_owZ|JXZ8mw%ESbTTb1O z+f4}#T`^>>4jjwCnGCxe?K-ki!OEzy{f}fx;%sJjvpvqb<6Jc(lvn zMg8IMTGF@Mx4FKym(RV-0eZSfjMgXF<{Ca_&PnyXKdE?6DehRl?&x>4_xU)%=fT1%lIvE|^|!Wh#vl*-w@>VW_fz-*w-Hb8vZIe_UX6cM zyYD{qG|!LuC}u*J9 z^*qa7(gnBW`e5&a^!nsq|KX6G>+5Dl*QLPCJTxa7-tXRKL^rMZMvo0Qe1ooe(8^bR zFY<2Z95&H0Aeqzj-#cHXj844_+`vu_eLiIBw5_IXw7%>Q;&B#Tm%Rg=9(q;__x?R% zuM*Tic2J{x)=?ynQPksknG0g!*(tx2d@YXoi@ed4)|>z{*a0ea08Ye7G~v-e+F;B5 zz;?oBXwG@{?{~vN;o9H-VP~6PI2yP}f%5%TC&8c{I6Dl$r-DjTR&gKy{ajH2la%?Z z;z*-cn|idPc#>imzR$vcpE?rN6I-Bo zb;G7H90T!-LThtL*IMv7uz7%&}o1=w}G? zxxw$7BFB{{7bDRm5-{}D5s);d4&I}amiJ>)hDz~MIe)bPyBd5jd!>rQaM*Gq5GnJd zy})ttb(}uWv=`%jJFUm>$0m=gJQ4{`kHL!Mb@Z>@Xoo;{9E5=&JpNkbnl<#F-_eIME|v_Kf^Um%gvQMZSM-bXHvdx4 z%K0ql%IL&m$lm?Vjl`{s#wmhotADy!f0ay~3CY+@*l}4WJod#x;1Z|lo*Qhn-p3$B zUW^U@bO%Ez$N@M(Mt7L8qv5}of#7uAX$$oG^YinfFDl_7%nuB9(5RlY8-Fv6G0!Sy zf&@3#=i22|8pKI1n&WG>cz`A=0|kGwoY?nsk#s02Ma}Se9agY|&14icH!jvz)7?tmjLmj6=x($>T6iAIJTni#!G2U?fM95y7`~ zL?!by+*r|To|Z46_q6&2Zdt}A?@_<-qQ8N9Th?IHAO^Z5lF1>a`=LB4!qjI6$qC%7vPf81T(}5TXOBJPDT3JffJPVf-PD%g2`*S;Yc{Tez zR~%sRLymEh5~a2cSF>cgfz5|s zpYb6%-a-%FQC(GOp%)wc7{+tKNl67lx7>s`=&2J2<>PQAO30o4IB!LI)4aek`=#k?i?0NVH=@3-JOStVRJ>vHlgan zu#dOQ-PP87lO>XDZt(eDJn)TSpaW-?E9aQiyG5D}V#(+QNWVn^=0yRmfXMFOs*;!n z-x%wt=YLNk(x$P%ZRq066NVp4^qRD296Pv6*PCRL?Y7%lZ%D-vvhpC=8Xo*FeX^?{ zqN@1q)e<3Zp8r0dPwEQbjQs??9sXHi1mjZ+`5L_V*g{!mNiqqZZIx{E(I0Wbs{_}3 zW5K5Vd+2~W5}a4cSg&Y%?>?V-*I@y$e^(v$@cXg#QGRc0k)E#N4U z)$Szqlj}WHS1lPwF~Put7KN2Bak~z~hJ{V5`#rShbDnnap6`RZ>&nf0IJ_^-0@y)9 z{A!@Fc;KO{+v$C?)pA*k>P_az+V`)PkVkR`ZILXfd5UBuI(1&j+M{>LAfGD|xRfv$ za%I>k$uDdl++`mmZbSstZsKJ@f|13k`up@yfj!ta=Qy7uV6B-P$7G$p!QK#$&CWHy z8hFt;VCJ@6op7#NYGkeQOE{U_D{Aj`9o-sQ5`V+rIxCC|4`3x6~Q)`d(DNs(dO+2t_G!?fZzjtzKo8ZrIpeP_vyE9^849eQ7!eM-AC^|@Mhn^0>|5rBKfj{ zRy1)yI*a^O;Alf-#6wY4TvAr_L^8z}425tNH-1rHyq2Y)|+6{Yd-+0qH*k1pJY3jK!vh4x#2wU(52L-<5nR<5E$B_YImA?^N= zL{h%FZzzR5TYB_9Xp3Q>VL*WI+%A{&sSu;61KXT0KVj?rDCv?dE~4s!e%fr%&WASM z!rsrAOU%>3Qfu}pa}$1yyXbn`x6=3?8{r?gV4Y{%yVBu@_1nFn@Yk=>!J*TY4hC|c z$YYYvfhrH)*-zUx*yE$+sLy-!{@o<2$*qc~LTBf5VcTt4{hROHr>XT^EdtLuwJM6x`_=jW*p<0xUH5rsV=U~Q ze8pUD!bie^8Emi5xj_dg!2-YS!w>ScmA2qb{OYkn8T5*^y1rgp6}AGGs5}(>kg<;e zSEEBwcaLbc`G0og@&Kk)p~u>IU^mP|oOmt7L>fPfSxfTmHqL%4$5V7&avktt`t+e# zdlwZ&WEFlZ_Hd`nOkW!^$_i#GotN1L%W5$3+gvYYctCcE(wf}J>zJUes#5(xw`#Yq zIbhBGlL?L1exGuwY`8BuIqT2)1#^DKp(R9jK?F@6pmi{HJ1R&K=AvQ_vKedK{wZ(}7GPWW1hm%LSMB0(;Ovk$13qth|Lr~>X3baTS>!?Kr=E$yC(U#FEq7Hb zudsYUw%uwz#UnAd^&<83W&CmIOzKsJPuf?OG04YGDw(Mn(`6e4dRE_bL*QuJ4fbg= z1aP=XW^UW+i8DD+>RGM%!QV`U_yvdgeXjG?gYEgY7D?~5O`0Uz|3AvUMZs}g)fSZM z+5i8!ce-M3Td-h(oa#B=yC)UL)`K@lg6q%)q0JT@G@5)JaDh!8wvIgy~^_8^C`ZbKQHlF)>kLszy zwyT^tRJI|c?u&Q%gKl1@K@`T`$9jWEjA&6^FNk$C3DQ-YPVYlKW~hT82miQ zW8~}HS5_?rpGv}J@@Yc+Yl|Bg82{`>Oc6HFsU zdbRe8JMne9+o~VNSq{Mtn6QlJ-`LO!AtiSTVNW~UcuRgr{Azbiynr(1h!uAzcsAfGI zFP6-g(qVkA2{dC5HfI0Y;e=RW>e;DVa=s6;^x--AK?b$4*C11tBt$8A9^|T`TO6no4>-o{qDuuT4IeDH@B0;XL9eV#Qn|>RjKxB`VRg{ z46^K7nYvDyR1Tc!*zWt=JQl#I>TBi4wXk`3~Hzu3Ep#Ko~s;(h(j zXVIR+boe|A^TqF7|03pq;Q|H|CpahcHG>#aVR1H=fPlZAirw#Jhig|3#135 zYYOyhIte+ps9ubBcrjaM`==u~X$2?X*Ho?seqhE2En@5?aCHRjs;$nbQz+v-KGfOX ze^3tkFrQD#ffbPxHfX4LyTixds;v4sbCMy$u#!5kV?zmuXwU4#O4b0I*D){doCSLS zS%nSVR5U@aOwXw}tPWj6K~=WDZiw2T0UbeqkYpE?+}o z+AtVTBQG|5%UEzTpNchDiC635HpqaT_uJp0pOfRTTqT`WKd20`1*O#?F!{S1BHb7k?fMmS zyf-r5IGtl1feDuJHMVh)-hKMb;9wGzc(gfaOlE0}`v+GS2kr9QF;w7^ z7g9C!O>=+;?XV#{;V(2#;LZcKu~AX%^I`Io5M4 z^_ahekG_D0?B@d8OI6BdMMV?hJ&Y?3#N}AYm%w=W;zf*-<5Kn)!Qa?sTC0r{L5kc+ zoYiT(;k233i3-`bNZ)D&mXOiTyEEw~n&y2zh?le!HqPEqzbK2o5X_TKY3}B9|2Xep z2^Bhcm=9GOo~*>^wgyiYZt<`O`)Wv~e+&26Qw%4yHsO^#%^*YCp%Eb6XFzJsoQ!1Z zBEW5L8i0Hao-o*(3x}RA?%wCP007I(QK(RT_^;z2FINgln}+7|)-ErZFB3;r!6k1) zYp$=7TTLe^FUSVnD8ttI>)wRAH=oFK0gWVHs6JYoOaiyLu+;U2AI7xuY2Z7t z&64k7{$=ka4opg4X&nw}2N|$=^(q)co^y~8GKT#Q9O_IuB)JD3VX*C{_5mXaT}W~v zafB)aScqC#!KodhVPRk(ck4+QfJ@Q7$R))GIINhsRNp8KdECW^^?8|;oU)P^{uKve zx=gw^=o<8-SSD&qJ58v4QDHk2yixEiz~a~YkixRQU?ok+kfc@&2J*Hl8C`UpH(-HjfX<>P1+QX ze-q7QqLqegA-|8SN@$3ut`}X_js?t+GuUji=NB?~Lv?J#$bLb$4F@sb@C8}dRo4GX zCLpkrq~ypM-w{c<$Nm)#I&A)vX5*pyV(L7Jg`{gGgfdg^%YTRN%>!%W!0;Ipql7NO zk0Ny7=CURq_5oPf&@vVfA?sHqOw)w4&_+QYrNlw z=kfRA1Nl<%*^F((I6?Qg)`!jJ8!E&f6$A7`h%kA1{iEq^D|)!sn6@t-Rc>X0*3p-w zj|MtrnMml1If_(QBCk?0dbypsI*Z5;Z7T%k!dKEnoG=m0+Cwa2hl znMueYDo)WQ`9=NytpSi1o zgkSNN?}Vf4#NuzsQI>4Z(zObnD;k&=+a4HG!WM@+fk(x>Y9k2yS(w*FV}y>8@gYUq~hezk)Yad19H)-{6xPMyH1ItMW$3MW4s( zYo#v8WH6f^zG{eJm)&je%I{Xw!T~(UhSbZe`x;qII6#u|rY#S(?OEmZW7t%+2EU|H zycI92)L7wrCcdKGZOLyMq0PG{ZBEb|s4iUmZwXIqM&Ga+$z?qW#MS2^G(M8EB3d#< zN=}q+m25+>4@x1gv}}8#Wo3RT1(EBNZQYb`mSYfi=ZZhOp4$l-AwT0yY-rgu@?jHB z#hWc?MjKpPEQ9O?RJy-{FQIE3hNO0~xxUFRiEi+G$vP28e8i@vY`~`-`o#70t}t)) z?B2kO=b5$yeu0&4wc=V-W2;w;SXXn-(qi^jwr}uuty2Y^g>C)LWVkOzOvRToriZn= zm9XM@w*xwB2`3xnI7#}Yd;mcUm+3>r^RUHIUnKlXZh1SYF$*@}O~NJ9$nnjJ=Sqk<5rp-ZT4=} zSOeE)vS`h4>XFtijlIdBxZZOU9NQ^MT4C5^XuHiD|M)q!;rhTzPsH57_w0wlVyWS1 z>Ld0GAKO*d=fr1xSRGG<{@PveCRpnm?+X^>!;vnkfu1lcz8QY*XY|F-{egL~_GaaO1?c>y5#XpfqCjG)}i~9dGDYNbmNbPZT{wdu9-0os3a^h%S&HtnU9eNtik3Dcb zt}8P49UsqSca|`0{qO-?dcTboEm*`hUX}c@#TIy6Qt~WqI}_nb(UV8H;(5wq&1kH+ zh^aMIGm1lxv8HxOoY^t=DQlo#Gok;XucKwwPjce=)T0C|d4Sd6!)YI9yOdm>pDUH8 zKenG^4mU4evpG3T*QlHt_x9y)DF zJ14+)Jd)uCqPh+iL|(MX?$UelIp}G(1DvVG0nV%89{%bTKDsFR94sT44+l+fdo^O8 zckO4k(Ojq5xo3R#JN2dv9L_!E(^sm*H43uH(Rw>v)W&G;Vbgq=J14FIP25lLIRl-r zGiyFf>zBr^HO;bz`MaL+2X3|D#%d28|)irKf= z`&IiYyT6GiHP&TI_p*MM9QT-G@EzT3vOAwcFRZ)qY?Jjxv!U)=+umPU1T5P@xoq39 zY&q=WaUHUFbv{J$zfb(0{bV8y+J~VPhcceezB7C(qLnTis}R7(joJWD*e)0L%&1I% zjjxoUh;AgX{iZzq2Uk)-&?zuMd{)_i{2elStcJ<37s@=Hn+mS0Wyb`wYX%@h z%Fq>gG}gi3^Kg@Pg9GEZ9u%tMxDL`)Kchct8`lgR>%id={QvD0F<&ESf#yFsOHH^3 zjOKi~e-Uh4n}(QlEID7x>hFi}-A@VLh-l6;-UDQ%|8DyU{34>jy(rSoAeSleN+IZv081}xC7(VU+6 zZ(j4@o)1lBWlH8b9uRZWv`S$|4pfIJSyW2A#mh33=e0$O>eG2{>W#~O#c z0Ye<-%;iGNTf4EjpS@)&ZM?+uDN7%|w=vh?&maS2i9X53F#NFzzWyUAi=>R?$_f;7 zOZ`KjvQx8hkc6E;uHb`lv9XH92)V9CZ?92NUKmEr!K^@%N*ofEsyy-)GOntz`FsBT zj|{xJ@g~C|uTRNOlg=9s$NF6Z#=F|<_1^z(IB?}-;Q5^2BKyr!mKyPM(NHh(cuPKx2RAG?F4F<_zGqeO)~1=5O-IrQ zwzatg2k!L2Ab0r^_DURNO*wPwRx5{^V~Sg4UOpUm9|;orP^OZmg7RD zKF~mJ?6Qd?Od;loDu27X7*vi3*?!;O2POTWiB|>mH!wDqkj}SmV_cV2wZy>h9mu(M#`JHm&=m{8Z)A)j zf6gZyIL7AC_@0MMj7F2Npbc6;gcxl`g*~EKar688chYJulA0c}fUCPOt)a^2MChRI3cH27Zwsp*L58Ao^zfpN*6~?`ox)0+S%}Wy|6}0%%+qEj|XH-8o!vc>a zzSGAFFlXlfXtQmKi>hy^;J0xZ_G~T%-|v$APMHvj*)#HTM|No*$pHte_*o zKWGQlJ=3LAuWsW91B-Wdf468J6)|PXWR3qMzxjdtoj3vqX_COD0)k1RMtmqW#*6gH z-Najh-y`|L3o;N1JR%SjG~n_)swKw3JO~w+?NHFQc*m6?K})H`4OL)Xd8h(1a(`NE z@G~j>ivxOEmCPmdvBE$I8J-*LgP@!QyxI$@AYyFq_dDkcIs?s>j1ox&4;}`8qK~lU zu7F`~{xRN!;v1JY3XnDas&O`20QlEx8+{z!H(zSD+bjD(S49KS@T@qHb40sQwoXaz zIR7uF>A<1uq@df72@3wlf#gI*=$lm(%Ju~>THQE)E#F9VCr3d=^7Nlo>X3%eB0Py` z=)=qmdH=1J_jg8ho3?D&hIhN~D{0ECWD}}%La%=P`nB8sjx3sprMz%3@m=~%VpE`y z9h@+@?bO>=1Apv8Z3(>8BdT9DX9=wl`Xl9@Rt#$EFLj!q$*jEkwCmjWt}t*Fk>gMd zRf*m9B=BXlnOe$bN>~S9!=45mYz^|RAiGMk11Krw@%Qy^HW(^suCEm&=K6P64&3

zWDoG~uzwe=?$+bzQ}RE_HNeT4BVhc>td_8R(AOo!_dgh zjkK%yRbxrZ`ydP_^a!}&;Hr>4ZLXA(7VfLXiy(JIQ@<>teFuYY7(-m@>-Dvv_limg zpvmjb+%HZud02hxyBI2X<33p7(+}L+RyXN8MfJnnq!jc{;@@Gp4>(=P8}3tC;64r{ zTz!#bk1u?h3yBl~;z-zNI$~57>$Q-Fv5-`LOd=_5^3-wniqr>WO5HJS-yLHxpYcjCEEFY+r@vr|MT^~-NzM+(2z;6 zt-N24Z)Fu?lhkX?pTStsj-a}+k&da~b3936TKFP;nxbEzM|HT5%Wo|oC&rgC42VRMd#}(1Fhf_^crG7|Hcpif==!l_Enpi+*z$ra z+d6$%(es}+-&e#WUMm;1uh742$3Z5#tgk~%m{-!5D&fcSfcW-Jw$BJTaP3NyCLQlg zr>xhZOV~HiwC8AjB*xlI5T)m3*a1?iqY^}oOvzcH2d%|CGJd3C z*Ep}#dQ&6^qPCrO-hDl^kU{e^d8#f|*`H-xTDnxAsx)zM!(h_{udAqLQato?eP1r; zZhd-%h*1e0z&Hxn%9qP%*m|qzP`j!Rc5$6^AEYgO3F$xZb=W!=+3=!S1zAJbly4m} zD*A$*fEY*`2iBnm{wa_|Y>BeupyElxSIRRsqQYgeO!Y0YYyKY{0{sH)^AkX*b_f;`<fmj|4FfC>7zRQx+4y|T!#C1w z4Zu_yz7Y?Qq|NL7?t4;FK4R{=6{-7$*TbP7!ejEW^nTmSYJ6E`E!Ia{6({=sR82ya zVAO|`aLD~26yxX5`TVEf=K+OUPYOFCup~M1JDZ19wt0G9+4Ce7D#+isT8z=RlbUliS zX1RIZYK<~LkaWZHz=)O@SMw@)I5)xf4b2q`s7>NZ{Y=?p$tdvwJ$qe^9;z}t;GeS! zJqVw!s)KVskdmMU8MMHD5!*a@k*rod^(JVT{hfE?KYeZ!;}o(31hTfy`O_}Y-`Kkc+zc3?jdva_ zsP!uTy>J$L;=Trqv2SVYXUw_cxx{7P6Ju$&I)7p>4P-MrN9EUQ*&0^94DU;jlzC;7 zundnu1k@JkPoL9{eKdNqv}JSLSJ|DVzDwV-kFtH2sHpe#13ktcdn}WlC*H5YPx+a2 zGWH*>l8t;Fd*H@FBhfA|GV!^RZjjFhkQ%PZ)|v80A7H^SseQwJ&$r{=hA(G_E{49g zS5M$MZL`$3()k33Uz&}C^<1gyrwp@e#3q}}r>kW2hrO$-!@77Y;Dr61+V`f;D>+gp zf5x8FS0t7UzI?@4(-R?@WEk^4G%@S@BN*Ri%?8@I(uc}tB=3Y|$|8Oe;;(!E6~_j! zAK7vFy?J4M+S@sRW71_b#?8NX8|cc{b+oAjGyCMbjDaN1aaQBse-p+G58fZ;uj`Pz zpdH6y?n#}FCu|X`7y_Q(aU@Dgzn{DHrN}|oW)Cu!epBMH`qBS$S@##4EPMu2(=}VR z>O&=UYLEFY6QOZR$}FZK*3Bh*r9C&lPh6)>G-yhOUs_cT9_0C0l z8ox8v-{f2I1v`Bve#>@~M!Wrs>!Q7D_w^OUF7()Q?zT$nm*tLjse-tzmOyHJ4P1XQ zu0rOv%dEYZ`t`QKVy#ZdcEaAYts!u*F8bs64`g$Vh2+EKHr!4c&&nu9m$+koz1zR} zo8gmF=zJJ|v~x%P9QOamBb-pj%Fe#`!0hi=?N@A9bis$1`MEl0&=1(I;m69512W=7 zQTz zc5puF;{~5G?UEcp`}?^egPYF+8LxWMH=Y}O)QdC~T)A?suw19u!IaVa{yOn34K{sT ziK9pmH~YbUig)Zs{^}tV;>U-;*VC0jQGGTLm}!o-RP!*H14T+fi{yevCwf<&n+WpY zDsPUUY++E0uQQNAtqo?o8uf8t!=HCW&zpA&d9hJaO90W3Y1(@9EA(Akg@Pemtqo2l zj9WXOj5`pq`lbbcP5Hrt2{9U#DM%jr&@Rj;31`3!f*3eeEQ;FMMk?ao7iWY@hYB0b zN5CHMFs;mNST(OP=5U&UyA~QrPzC zHzB?yRTj_7!8eRL{rz`oMS787f8Rj?7d>w8Oi@ zOa@GW7%k1SPk2M3%lfU`EB$Up6CN{pqN#%^_`_0U{uRuwS#H#(0BO|y^bA+tms)sz* z3WW3ylxU&xsL>`3Rbc}b_-7{#?_eEq&Dsa%re7N9Dv*~;4FNESICDgzxJlW=-=ufAGDd7 zG#cAMTkvo4S2)DjtVWe@F0zY(dzA{-`(y^a3d6**x{>gh#23l#-|kJZ8n&7b335$x z{EoxOlq`Lr^}2d>2fW*>j+ZO|I&!Kz@40XlyqxT zmonAzz<3hZ9$-}`?d{i?fj{;YG-PP%NG+QKfhfqF^{NB34)fS(6;(#Pl8z)TS#B`A z8pWXcV*HrzdAlod?bTtlHq~p%8K|G+4=JBfXusl?<%npwlctyb_ks}#nwIXB4<-{9!WMKK5G zW0q%1wj0|_@j}ucFE|)}(y}l70KDeG^z@)Z?s!F?+7y?SF;lpe+;F6XtO!`8p2mTl zwFt-F--f|rzd{ms8MqhpQ?^cu+|*yLKv&Ry+GPCxa^i%XT|x&XtQNPSUw6DIj1HAW!-sXpZCc+lX%b+JRfHbh~(y zu1euvSIQYD^YWkfb8ijV{bwwz5|#LWwZl=h(I9LUJd5}N>p!%VFIrMh^2mZ*1YWf$ zchltS)mtItn@>J|i^eY=pX9hS;aY$O?>N3`oJ#YIr!zSwe1zQW<2Y)In81~;#5L@4 z*qt37(hledNh#QyQmQgl#wJYqidHxA_Ivv{W24l-z^K5L^zk1e&B zgD_59_ietH(pwmU4!x#hQ(az3qUCocyhTUiEr(@ph{}W~(Zoes-u#gN+R2Gtfu8VF zBN+$=VDF1?D=9~yO9A@}hce@!Xz@L@#Wo1mUucin-5!z%A=X*(Jcr-yUp9YGJFh_h z1Jg=&+>Mq+hoxy`>0`mB!koeT>8Il*H(%;7c+BmkT6AfeIj6G15$0l&_R^+>bfYcp z0zdqF%aPZ{-&^kuNR^}zzA@yAH+=~h9(m4+rxB~enlR>n=vmjP@Q1HqWAKJVA1B~oDMyf4U{5z<4tzOC;`hMqE53ECwA+f<1w3BA_r z)v+;AL>{aB>hKRs;1TX5b@s%8^KGYxTvxD;bEdg@`E8F)Y`ZO<-&C};<5>~F$fmTFHR`EE9-;&=S_}OW}8jKJ76n29QzM%i&v#qT;@VTMKF+|7w z7TxytUV|1+Tj+Xhx1{Pb4NV%G^GLtdFdgXsniFCvGI4+>W6#^2+^76jB;%WNg3ak; zVVfgyO}Ou}8UL{6*lm`bsHsNvk?&K6Db0bN$6DKE-Nu)Om81B^+yH&i zp&JD+c*DK9#&;uGw>7_JdViNEV z+WU#Kk|R(2*(z26C}u5@$dp;tF30+@2d>+vlg~=V$^m=6nC70Y;)TG$knJrd!g@LR zs%YYV5^<=*eckW ziFKO@)sKaAZ0b#d0?U#nQ(jo(BRc|PRf@Hd{4lZfX@EnoT3+&(WgSM5wt>ib*i)0r zi>M zljATKKJ9@%+I^Cx59D+3QPYq5+3(78KeRt_zdz3x490q*;ivnDo+dlR<#PZ^X?hnzj$i!WP#Nk*5lnN;povwzSE?!w#f&5Qn-SS)3F@>YyI$ zFz9J}Y!6ewoVrbgSO>=P@h~-{6ZYs_8Jq-&qP^j3C2TrQKk0(BTd6(Qk0I0H(~#|B z^xa`Y`v6rRlWsVSrHx6(cMV!#TsFNcjNvZ(XMsVVTiA~*^UYGGwy~&66@4f|WLW;q zo|T7jMbkAuIcb9VVgEk(8ukI&1kM--ZSn@b?BhW)-J;o7K$zqCQaGS_EuH&92{*=? zwD;M-`9W{n!+o}^KK-6JWEcqXv`ODbL9j*AMSf@BkLQsPYE9fqzreq)y_$QRs&U|54Hv&>A*1*~@U^J7$ zodz>IM$Gv4e>Y>1frGAo{XA%k30D%#bhhGU1eZ+_W9sGu(>yUaXi*6>ytV%DJ`roi6gi%LBy zs+)E$B{MVDG)s`@JY?R?NP{cOhJXEfy#H4P&fdegT(SJjcNk-qf*<^b@n-;#e~ZI> zY?viq&Q6+8a44r^V_h*e=jyIjaaZ11MH?k^DbP$=rdtN{W6pXw!c0q$7j3TBG=k*$ z8nls{2r^qQWNbf_0tdDFgY36v2r>0=S{lnW#@**I{9IH!j+4&gI~#@t z>po|n_m$NoV06~Oe!y5eJPouf^o&pzL4O{VrYEkly5e<_eQ|%1yrIQ?++&(&r=pyO za!$=8Z5|l$GIa0OuTj+)|0_N#x=rUZf049XnE%;kS|b%9i>@wPGeLrGs*D=&KICIxYEz#kH#=Cf$ncYA+n@Xop_Z z4}EPonCn3tDihL?sJh~`;LqJvR6(D+`j?T6)spoqV6YDoSZ!>!XjgDhm(3%S^l5nW z+x_m>tL%wwdM!&oC#w?PJ=jCIC8}1q<1Trqst%?}%(pf!do|S8-T;e?=3K>Fg>*;Q zBrQ`i+38vN_RFi%B<)?KGr|VAf`A~C_PAaJq$ZJ~f5=)tm{5F$O=i9+O*b!S9uDfQ zVLWLx3Kqmx;7&5AlVe5w5yJzEcRDxv>H5;Nao5dB8^&RY~cEal$V0>I ztAZ-Q)@c9%VQV@A;By&EunRuj_NB!AJ>EEUNA_`E%Xv6uIu_!AGogi37pJA0Q)HNw z-x{z<97x!ry0NJtV^W5OVUUR^v=;B~@m%kVd?w2|H#|XhT{`3m*`p>|u`>Df&of`K z@LLr#V^}YmzgWsOvBH;WZO(;`$?9)GV>_cGbWep21P698Z)Mxq2kVC#$gXsDD!xg$ zQzrV?wsThFGYuKn^yB91%EAlXwPh+TkZibIm1GK2*&}(CT-fJ`Lyx5I8GPyod!(~| zGI}gX#rRm#gSM479H!i%MTUE0q}4n70M0$8Z{IYksM-{;yfU5@KEl`-g~KdCs=~fv zo$R0qg>8wsyBt$bj1xi)vAnGcR^MpB6_nkk?s^<@(TsxLt8j|=(0(3^M-sfGw0V5M z7j%>|Fh;TQF%Exm;snV=fshXp$-{DQb;?d81L8!AWkZqNii1n#??ErTn%-F{h@{z1 z5^_}6T-xQONGuw7dy9ZP$f^ zJ;~RS^o=Ann2%Q_r!3rRX@mJ(<1m&eA=nb`@Y&Ljgggu%;dR7!2`-l>H@fB4SNNBC zX%5`w$*%D`sR$Lus zTp$l+%ecSW+glT3junU8w^n61#ypeXoe9boinEBSCBrp*$U2-#v;uqBuofU;_kym1 z52Oxxv7Yu=j`MNJD@orZ_Y$PR_{NMZf4*uRSf?k#>_sixz7RGTGg%7HoGrTKo4!lU8rN=o_GoT9n}bSThhT=)&)He*C_E?{@vbYHbRI zoTzGvjt9g_a)WeEzv47#qv+5pzo!j(gZb@x9`e{n=%u%&?DvD5Wy|_uq_Dp@ z#D2#V>?;v-QLLjt;*9IOTXsF#Mg>{u29{F-8%9fCWo2n3XnL)%b&v!o{7)&m6e$^k z!`R#ZG7QhQubHxjWDfI8iPAXmMtYZ%K|3tI#j746RtoxoZzgGna$G%amCdkgS3@=O zui>{QtcBv+A)j{s$v0yD6jw$cETgW_Gh+;?eL+v+v50bZ^uKQzZ^-G*3g(~{em_d9!Q4QSa4Cy3L&qq>BJ%`~Qw zY+!*4{+$nyr|l#mi}#w{tNEpE-IH|B`of0g?vHzXi8cfecxT(R7GF9H)xcdQrp>>f zuZp;s?t53O62ZD|#i3j--D~@~&SPamMOZA?S)7DP zhC{B$6`5f$mN9_f5hz)eDBT=E>w?EX(fHH=$(98c-P{Z}Si z`9p&!O<&#kXZY>&KmgkeGRG(`qx1dtyN>t#Im8gJV-vd(?TgDC8erO9spm@mG0gJ- zQR=<&T`D#a;~e_{gmofDqB`ImHk8*Rt~P53R1pEY?R?k1XAytE)x^TXH% zOy_%_u1`3A(|Uj=!09(zai&kHsux+Wq{wmt?~*^=ZLaCE~_<%6(yf zY>rDr>?6)6j)Ts}-kGzofsd-@rZo?%e%IJ5bB-;Zn^nAne-R&94+s3O>*@*hyd^>Q zj!bd|oG)MJb=ba+`9l^o{y@dB`*$34kvbF#eanD>K5y%@BtH&4VDMSGhMfoEna1+F z$b-!9-|H~uJai)M_pZFj?!~(8tY~YUFMHBzwlRiH8-Fj*4$bFcnW-u0{r8yYbuCRd)qK75i3u#KX6-7VWUu4U}ugTIPHF~nDU9)T|f&&4NXEnq%rA3n)fRGc=8 zwFQzPH{bPr$~|Fzv?i@!K=kL+>%}Q@ZF}gW#MkOcF4K+&OrxDQe3jSF`;Y6Y@k_P* zU|T)QamX( z<4oP44sV8$^H;>qX@7-`d9i)v>&I?8bzdo9hGG(L(1y^s!Y|U=U;GaF@ES0l^2g*E zXY=r-4jAWLG4F&^**s4=6=PWAP+Q7eI@DsZ??TWL>0{=<7$7z8)<{#yER&-xRJKHe zE)UA5g6#S13rW%=^sJ74o^UDB_ZRcUcP_4~DkqMT4;JlxQO!6)Rf->aH9n`k&A#sJ z2Yj)AUhDC9KHSZ+wT+khn6LpavhCvUA@2KX@aV8VVTnE`U-6vX94s1db5mYFx|*$y z*h}{nD1ID$cE4GVeyr(Fm9+Xk%qQ)H*kh{U3%uVW0Y=7J(f#!iKJB~T6lFi(p7iuR zKhlFu9{HK8$MHY#1KXc{Y}AiP<40ZHcLL1_d7{;yB`z43N@p7OeN>>0y^p+a$gFIj zy-!%=*kgw|9X?OS6tFjx$5!(`Wb3eddB5|0O|4%0^`H5=?FV_drrxdd38BZxpUUxA z(c0qJr1dzb%lYC*_E9j&Cg%oE``RDdh0^Tgd@lAIG?~o5n?1-=(1;Q&xHwGw&M+M| z4852zthP!2t`6&53;b|KY{q2ZyCBiVEI2eT@Nb5vLPty(gC?PORTvfze;cilG#{(~ zoxT=8SfK2D54y557TNSM-RrWe_`KVrwT_f$x41vn*TXi#-+4Y~=)GwdgBITZ{_AZH z{d!lb-k)t^JcSQ}qfbZ*arVr}N&NAwjXuiw(D)ebKU}HQXk>->Qf~aU;LC=Z|A%MJ zLBlo=JbwSd0UXTh?w~DrQGZ>wwt4X9kC*lU`%^ogu4yz7oDbjaAmDy6+?X7pFF!qRANb$-3i=d_Nz7jMkw@@5JE3VOMLS-3x|(S;LLD*8 zfkXX)-k;>%imFV}fn;`0jX>7mqdb5wM*Lv-f6z{B9+Ix3THghXG`e}r&2~(9YKNiK zrp~4->_O%Z8FI3h=2)I(`49NaHjDO+?y=r<^y%Og*YTNcZ`fTDE|fgL1xH{kzvpPZhiPp+c#{d*eNM&pu3KN+}skOj%_iIW=3 z)Lj^F;Z2*3*Ph#(8R2|O!bcMBWg{5jw}LhtAhh~LN8dI!;LzBW=cR+bq7AnZqTvwo zb1vX%9O98hBib7qwcwI+RZ=Fj6NNHpX{e(!Xm-j9jBg*xgH`Ux3ZnaoB}2~Zf9TMO(f~y11;#2Xaki?QHhQ~M}I)?fA%5L zcH_B=^!`Y8?AD;uMmzJp?exb1h9h{G?FInQ?i|NKD@5Z$fuKf8)K@7Up_3q~XYF)R&AF*1p`TXW*v+E;*b6J%+d!o zR@R@)a|*hwdDV;KQ=y5hC2bOtW5w6&0Z;z>(le8AeV39=af7P@H5-9xY0F0n&L$L! z=Pd1%T6AwR(r<|jKGF#ct-DphyV_1XAsInb=*vwWRx-co%=isg3pgqBQo(vBM!}+X zV_3`Q7A+E(4E-j_eL>T;v8c!;o>-c6n-bU<1`TMbqh>p)%VLyfmV8%Z>Kp5lz9kL| zan*DN8?kYsOp2|OMw1-1elx6gHfzK5V8>&Q2F;D1QX=254P_@ueayM-Rv>}cg_UWd7 zv}j2CuS-i2SkWB#quD4*GBv(KJ}w!t5&SN!Z?rwbpRmV3D^|c3O&$Z?smSW`tqVk} zv27T|0-x2-HFoJbR)Su&^aR=gyipac;Z!Z3$GFqqf-MsF(qYHIm1a-ZbBwZ}nagTCR=$FF zo|@A6`l@+we@2IFm25Lb8(Mt5_59n?{ss>AunwCEzG~NF&F)i4WL}q%+=vz)?3SaA zaWB_RL{3a>Lh1{_z!_Jx2R)|D66tt_?v!DRS-}{zg6#gdUz^paE$NHkDd%D=_n+5D z2H4~~z(jfsdZ#LT60#2HT#}U$h3GJvtV+&ApQ@doLs%LCfo=O7lZepNN`A2Tr1smT zgbm0U8gEUA*BP|QVDy18LC@^h$akxO>fwt3#-(2X03q95@?fpZ`7O=4OTf3_zG~`L zuu1zo`M>19C$Fd>H`!FiP4SzuZX)`S>NM#QIMP+3eA93pB7shV-qGkci^`K+IQ+Vl zxgw0`{1dp7fdeD|Ki<(e+!6xI^E-@wz?(@A#H;u{@#qA;-)4V0#}WFq%}wR-(>3Oo zIK+4;2^oCX2)^dCPAs}vVNIBc->RJutpo_#Z(s@h;-3^!MzaV)EsSXuw(qZT2?P zCY96IuZ^yVsS+-KfXNZ3wi2vJe3J7YFiSb9QU~Fc?I@G3uezP%J{~PhiL_+3DGzC^ z>}&A&mD=X#8m&Cc8*)0o$3f+?&9xn_gRaW;li-8WC3e6SpFh!^v0x`y%amUYfX+9( zQ5Lwy|IW*DE~@g;hV(>$OS)h7(Awq$93-&T$9OR3RY`6iWTQOr-b0@Sf@G}FdD<5BwX0OzRXiI;NZ|Hv+mg*y2Jn`FoB_BthED#QAh0J69d&rBpCQX4~ zH4?GZgJbh3>CX>(9_^={_W@t}p`A}Ss{8hTY%fOfvHjA8^sS~M9VcQBN=kpG%1&^7F`{>M~5G%X#fewp-OLQ>)XN()=zSC&}!P<(J=eVJf8zjKV1_BV=Ox5gx1*j z6E+6(q2uhL$NszAc*1e&!TH>z1Nv8weTEI|jkL?9_*ozL?D$)IKTp>|gIp!ptm)sf zNk7TZ6Yrm{nPlK2AKK63J#9Eo&b3w_Pg&ap+kp#}Cw`MLtrG@FUcflH|5~%Hu{R7P{YT>{S@R?f_Y?A8F8i3&d+tAy_FJ_x_#OQ`+2>EgHEVJoGTw2TEwqok`$482_T&70 z;O?(>aKsBf;k0hV^YY)QsAPBe|M2gh^q~~r*Fhtbt{3{)?yoK3m`T#y95>>cMPn?} zMWpE->$2SJ#IebUA)K~Q>gjR6KJ@`+Or!FjuTQd>eVkA9|McFc?_CBLf7l25f0V^3 z3qi-4f5TQ`-3mSVBqtC?Eq_&??L0YQG!GAB-2D9G_z(Z`)bodYc)0#6e;(}&*>|)9 zS`;PPA2=j>$Z(#&BqE(QyZ!FCdZLd*E*vl*93OL=eYJ+989DJ>$;Vn>?6mTMzhW#Y zKj!cKPP_j%KCzLMGl^`Ga;~H>X&=pIp+$&HSG-Q_r!>!7t6I$OrevnWd7tQ=g8RPqW)vD6SNeNL^%Eem34A?AH;n<@ zyEkNP#IoXPc*K26fy{w(JOM)qjD!qsxV|GZs*le;BBv^L^(;K65Dpm1^9lMS_=((T z?>(~`eD#9G7;7v2EsO(H(xNQ%^c=E@t*7j|f9`+LsqS3?aAYN!StG_IgzU1+T7^o2 z2#E5jf5%B>!kJlo@jMoC?)z0)i?ZwtTEp8alxYTwkjOF=Ph~aLfvd`1uyQ^z@Ekv2 zwVxaB&#VVW7L#nJU@mrMs>D9(r!1fpws(90mMkDeD#!~ZcK;r@0S-{%(of?BZU*c? zKSqa=P#xyJk2&TD%_}Xe*J^kI9J4x*bpd>4_h1S9pa>5o4?gTq;oi(1gv^lNQ7L+b z0%{qjq^h0HY+RMuDc)aaC0use)|%P;ET3Z;n{rI7D(bzuftoO3e%)PRF|1?=U$~dJBxBui z6jj=Q+pJhndXXuP{69oXjlqzLEyKoki%;bUJ3XlRY|u-8(AYvtzhr z=(TGCmYkTjiaa>QgNNI5i#E~)RCvssdAzc_7p_vbt`&y0a)j-4UKQI0XP;JsTG zK%vX=H?v7!Q7xS5N(LOB9FElKSy|R)-#`ERU&HYwlCq)UY#exaMP|c$JiAiB&Y0Eb zh`v{3uXR0oZMH$RMrD{}wsx{hWQEg1GP3czrvBur2px>U*92>fYs$Y}=}d-fOg*}? zdfR>Z`#FJy_yFjHeHEt5EE^1+hYvfv3@OK+b&%x z;2c@_=x`+Hew+BO2rP%(vG1~f9VPy5(R<tAFO z%`CTf1p=w6sW?E4&2KDUF7ql7(64}vNauHKYTcFNNTxOY_Y&a>%uFw=FLx!I4OkVN z=33FNrcL9dy79fr#_?(tw$JH=peFk3_IA-j(CPgQGL`1xObJ<_4W_7)w#OSdxi4g! zcYsOK8Y+uaH8;XBXjLUEtL%!ne6lX)gNo9?b#9#W$)-)U{b>z-4LP`NMz6+%0|6Tz zghw9JEdzGUgAV3FAB$GiGuBfYFe?8daI;X&+!A@42DfeqzRE@BP9vz&C{dwjXV@j1 z(fjwq5qsw5JOR0$)m)at=!%MxSJ2b0CPSch8SAhrdgJP*SMZ_p*%#giKD6WPwkz&- zw%*sGAynq$!~Ln#tmqE>0la1Psm&8nnJ?r=DyPJ~?D_4ng2&!hWQUcM)u5xLwaMdd z>m3!mlE(wSm8Ds;ox6|MmQB*=yXF>E*YB~sG+_cB+*5vg^>B?jWn}@#JZwxxOdxEG z%*q#%{PpXLY%EROxXiNTBTZPn_ZYsSVjlR*{l(Cuf5!9vcE6&kg@-=5R?SyRKHTuT zuh(+ic?Gh5-Q)fK{x{(3vg*!gZhpQZ#|>Gz!e-l~w%C6ZN{VvTK@8KV2K6qS2R*wT zRk*zMGhht>VFP-}>f&qYth*if-Y>E(d@y8qY&-=01#P^dlFpl|3^({J$Ern^%iE4! zR6)}WI^HW|q0+N0n1NxV?JD9oa-1I#BgpD)Li9qoF-~kkyuIOJ@kPpxL&i+R62JcW zm6f5lJjm+gR~SX1|GuMw$5+Vc)K4lTJ);s=j3H0gNZLEwmkEDyZ-C!4LY4pG5cQV5 zQS}>(1l!Ku{%_DojM3GH%jhTj7d*ZzP6nR?mwOKJyl1_2-I0F$rrUSe7*3;znP*kj zmTi}jWhrNi)Lbk)^qdlQ6GeC=wsR4&^kN`TMRa4HB=|yMvctk1w3sDUD7Buw*Tkg6B z|4Yh?oU2JzX$-{de(tgS`ue9b|C$N=6KHqqMWxN?_iq7*g#;*ZaSVcOos0zq?rz4xvto8Vu?bFN>v{d(J-1{k_ruPNEF!2!Mrw3+LG zn@``H4q)@ZS4R@CBj)k_mSjBA5j&Q7xBE*;FBq*6_QN8n|58@EY}DxMf<3wC(KppQ zTwfX6*tB!Ef6JynaCrgFrrX~4gyv!U8r!sA`M2yi>1qUeKfbG<{+YA$v4jkglp&Ba zp6JJtm$qiuaiOYI+bYIy9{&m+BD|&W4*PVgXxFQtJLp+d4bBQD$$TZxVMm&k9h5PF z;NQ%4zrOZ(A#3kyhMO-|`9S-9(w}ZuzOubAViLy~j#0nKOYXKN&vLxhQYNQBsWH5y z=?K_I3i*I|LL@iX|6Z$)Dao!lp7q_v?HMrj@n%vHqc{>|hsw5>c}^9-k+9+2w%h!!QBmN}=ca8vDq=SYp`>wTyqBV{|?aTTw+R`#v8$?GAO{;}ie<~Joa3!lk^bc&{Y z+^`1?8RAC9>PIB`A!4fUe-mdsp4&h5_JE7vtN1`=>=#vixdqev9o33oUMX6&VCVC` zgoJkZ4i(F+HMPFa0eZLWrmNf3^enD@@5O5<;Uf@ExBnV3fA|Wy#vm55q95qduxmGN zh<0G(Bz?qh&d*Z#3i`vE|Lxy04tx*Js_IQKScWyPZM?@mrMCh{P77FD_>Q&rTZS|L zGB3{lR3L-@_#CfS_(E6O5WAgK{)ON3e+_rB?}@NO|E#U&@LER->u5OF##hDYdCYcQ zx%QqhJS|<(?Bt|ZjX0QQpIdJ4_0n(QYKa&h>x}#39Wl+9pi*_eivFKvV%bdC1Jm1p zG{TxaVx8-->4?wn@2}pz1#-a8yB)SqX`HO9f%Dg{W-RGz-FCtD)xT>01>0}YXyBq^ z@wpx*WFuIuZJZE{_O!#SSCTH9A?3uxVelo-x$KLYe+b|hd-%Qa+=_PIV-3v)En=*0 zzp)+B*DzD&4H*o0&C1fLnbICU^((i_d)l&Jl9`Z=43GVO%pbOJtHc#=SnOla5NiJJ zxkj1bpfTkbw+#Hwm}0Ii&>p;Ojc~_Rps-$>aidr>#C{{RabZ6Md=MdDC4GD*vi=9l zG}cc&!6U&izeg*;Iru-i!u}~#iK$KV{^H7t)nU^QUB@z#nhjZeuaD6hBxu&^5KOnL z?9ipqXZSl|rP}1WuWh`ZWlH#Kb6*wnt28^c?~B0x#;FJAr9)>VpT=)F%d7UbjL9~b zCcj0jCHE=9<_g__eNkW70~eodubPxkQ#7^zTlyPu4f$E4a*d&#J?gmFM?b z>&y3Q2>FDlunKrz5Bn4uhKZ9wY>Z2xPb9EWcm)~FQUh4I*W6Ea=ejGA% zR?7NYaS5)Dyx-66yZi!89M#(ztR(UM`k?pe#nztD{!`pXtep9E>P7U;dvo8k=j}CU z1iz=>O5=b`hM$EB(&rqo@9^9U=Pc*2v@kt+WA2;wk_nzn8R=z?A82S%=#C&Pe?Y@SKR;jY^ zbL<7T2iR-h$0W^`!f?Vr{;vIp^T6fPb&Y+;ZQWT2chkIxCcl3>?tcCAPrMI5*ngim zz3l^!uYNVX2>-L-SH7X!i9PCz+_f@~!^REwmMr?=IOGddlggG=c&Ud zeF*RWx=NOsrmx=T;GZwZa0woOogHyw!cKjvG+WGRMM4LBH@e~dzihKJ&E0?UnUTT? z>58;p0T*8pu>&_?^s1Pl`+vh`FiRTGHm%le8o!c#y!S;(ml2R* z@avRhBFjLu>+vA(@9Wn;)qmJ#r23P7u@40D1AEja9zY|Q?>@^VMQ5NfmVavfED7Qb ze&)&-Z62xpU+f^0tf_?L4Wbje&0*{IRVeh%G zvA=y^BjG?FY$?RAn2rGVX`l8uv7{WpSrDExV(iQl`Ho{g#!xoRJDs?kR#?9dK^Z_gp5q{<*3qeVsVF54VdLnSF52EaC9hNwhEOlRqwnK@)DPZNCO^LSln}U5% zI%u=L+YirOVn3kkPVR=6 zufwp+C%n<-%*rI8F^?1|=Nu+oV&11AQATpk`*aL)Cl!y0b2G?fL~WLOlx5*KjYF1YM` zPV>N_hJ~i-}8BGRgw?#(eVW z-4V!S*)_P=HxT!Q^9FN_mw1BvN?i)xvQuVHU6D8o5IlTAjE8`^&7n;id$><>hjsOw zFXQbK4u6v2T?aU={V4PIxRy&Su7pctY|q97Q~#<~wtF0=>Hm?`?f$0_Gt;>5z^EN& z6vhA;>Tp!~ZyvAm##;y@zch1J7~D3NHWe2TfcmxeImg7 z!^SI%cNf|qyDvLYX4~u~D|7KU`2uGPVjNXCiNP~mR+flb$_l#T$+ z5;+Oe?2vym2o6BFd?_34l1tcTVw-e7g-WWpzxhA#PjbP5twLHYVFH@mzbO5l^7Q@} z8~-PKlmA1O(IG>{kK6BdyJi2i2(3-7d13+`V@_<44GVsB9J+02r)^`>-WxV_$`Q z4oe&g>9H6&GE$_hp0JnT2Yy#1jWcszFI$0RRnC`e$oCbS5LVJd$|Ipy4}14Yd5O6S zgBG&IfJzJ9aDUMx5Xj)vg&H#KKGa6CI{PO4v3-~Px^1YMY}4sNegJqyw9R!t5BlAQ zKd+6GEBR>USey=5wH5Cz)6cgr00F;ih2tw_f4s}SU3~7oVNbWsYtoXSY~ENU7aNR2u3lO?wCJtFQV2&^*b_NO z4Y@|iQ_h%JB>z!5BxF6FwC%+&vid+>SNxHRJosxqsr zLKf*N-c5Ys0mvMcYE$tP3sI>#i0 zP~yGbXQEU(TwCmbf7hYIF7B53KP`{wFG%Goc_g_njOQfnVhO8M?FX_4IwtW)xWjmt zidGnf_)20dt#wTmYutdAfU_AG8cFXKvC!g^1s`LG^ zk(kEQzONDUE6 z+KAtW?s=LskLz(fj~z>=+Xq<)Tuxc@N!GUa?oZMOiEHYo%?Gw$;P~UAT|M_0v8-k} zRq;A&^ZdkT6URqot?}ICXZ`T|ai|FI$-MnDe@p7s-tSYaWi<2yTWi{1_?Gt2HiXv4 zwhmYel0Mctk^dg+O+tEQ9At&eXFi_udD2Bc9@M4&4jf7U{G@A0p!k139Kbzk=<%`C z9}|b4t_{x-rxAU&nfibMqsDG+96H7hU-Pdv#KU*kI{LH+(BeNI=6cLQ^FKN7$MJ@Y zpM^lCNrh);f1hBlv%T@&yx7J$e9edVCO1yss@Ttd94lyP%EW2!PT6?07d*1t5<0YN zh}l>>1l#zJWajLT`5F2ca9YRSRFc)I4>a*ig9q&7lfC>i4a@PCHXcs<;lRhw?M#`4 zcN10*ZG6PJBh|-XpY3BAb|34&l)*pPh8;KANa1z%t0KInkn?*u0RALjj`nJ1$Gc+Z zxIgmQgFfzfB@6V4KaApFhYef%qyL_zOo)@)6z`*`ov$K?1mbzw~o1GK>OdOnT{TfBRv+vc$-o_epXT8mIV#FHv{C?? ziMtQ7Ab%ryIq5&wb3{^>RdY(o#OT})^Z@C=4la{9grq|j4pRJwhv&LWHu5w#DNgcu zw={iz@a~_#zYx^x!GF$v;@@Ad=S*AExmx2?w$O=Qp-Ec=M_rm6=aX+#`&wV2R?;Rl#L_R3MNb%z~TYsou3e9zVcleS(ZF!PYUJ*ZA8Vr*H}oZ zYNh^MW@`PaN<%ypWW1upKVLJ`>dYi}^fv-FGwY_)R+mScaxc#!B(cB++Q|7CvVz?i?Ry{~ ztCR+hLvde}jnA@z2w=6kAs(>x%#F`7u&R1m;Dh8@7+H|PkO{yDS3rPcP?di?=+ZL3 zXjLcl3SK1pwe!!+#D)dq%n)f^c0%S){ynZiPcv&@;x@)px`=DhAEU&@3w%E*U`3v3bU@;HJd4nv3hKJ9zwDIkLTn1)|k;O3H!AG-a8g z_4Uc3a2UT)8K_|5Fk6WOhpeWdyB+7K>iYZNe}x@nR7Pmk6A4GC3RV1Bv~KJ~1PxCE z9e6^P#PvcIwVDt35>+vmY72ZINP+`|s|DknPGE0b$ZV`z~b3-=ptdt>h+tIiFO+8Z; zuJ;(iIZ3+_gGl`(ayq0jd!iNa0rb3tZ;*~EZ$4#u7);$V=Tm=JATzS#0jo`m0gGL+ zdg~O;`EDoawzU-eUmaw2)Tn&mJc!Lwq5r;m|FF3>jQ6vDY#jO8eQucBRaM0=$W)EP zSgYtx3MVaC6aU5LFsA{_{;$kPxBB~1dI8nMFz!v)_nfq7S>r$$s$9VR#YW+2C83Hb zf-VXhOka5*DEVJmR$l3-Z<>orBUe-*y(#_S5*f+;&_|3b;Pt*~_0F2>Sh1 zLMBC9#Qy?Z2EFY*!e%n#>K4U&%wO?^NX07>y`?f5?@C)yed%lc%J=TKUQwwwE1buH zKiH73!1bma91OnoWXKc9`d#5U4}oBY!B>$*RzgoUnNJ6S?gzZGG-87x=cEo)pt7CE z791Bo{F@&vvt&aCgPs8k2_5r}_dzZ$`y#7mdtOSP-h6xGlqy!|rI?@8yH)|-9ji32 z%y(Biu`TD>&lajq>ii2|ZDwEv&R65<+Yz1?ZG^Mx-@|9wy;<1wYA91Oy z8WZ<_z5XfM1BA>{AHe^^Z`-d7A0YKrq_#G##Sg#>aezIS_jhHC3^?yfpl10!Z74^I zzefjowj2oA?v!hQz=wDJ%YA=QJlgr%f?qkAL1HhetKRSZld|$|@%oN_!hX7K z9QZ$5&n}NYZCKp=341HEgocdWe9C$aax7pHHqEx-!j7vLosV-@sQtq`Zi~B2%`CX7 zQ!2CS%}1%1h|dMKRUXcT8q?Bc;xd097=sK0O%N$K&0i2L!agjLaqL)Jp;8cA;3_ik zDex}ZW_Xp4#D_or%o~S7IV-hktBkVwCMqF#o95Np#8R(tJP&-v{zqoZeOIiBH-awG z6+TWWy>9^rmYHUhn z*057UrlR_1RQf?BAk0BST_H~Ai+MyRA=|iGh6!!75DVGti;!Cn-~9E@KdGOKZ@`}g zKdz*e&u^Hx{rpRjHQSHZWt=!@ed9IsFM7Fxc5>ZkSE_V<`o1gSUe}JXWXAbzC#~eK z#B0Fset%ab2Vcgx;g?#-#T({a*&QaB+X2!1S}m@T{(t#p?5@d1qg6}}ECPG@`<2abZzb_HBTEKw?^2U{o(3F;eqHRRc< z%0HOzC9vbA^y^x5Xf}MEpb4kzePS)vUGBKA(mY@8qu3P`smWqn&Ry2B^7A^!3VS#8 zvEI*DZ2guSRcQ|ZuNWBCXDs-|?FI>b_jVif#Tm~?r z9D~&0zeuQtel`xixcYJFbJzbKJKa$HdJz$pPXqqK`@51!klfuy9WG~?>OAW7zfxAX ztO?nC!^&Jo-v3^$a&>I9*zq7*dpDO4@BRE&(r4-)i(e>g2n(7&Qu38nyl+ivW@2e_d zeyPW=s@jv2!WEU=FQND~@o&-P}M0b zmIR-m@^;A_N!q;M-!d0`Y*u@4*16%Iaoy;KaD?_C%aUKC&pn^U`{#vr?=fI)5WaHS zBhYuKFimY**w#sxvGzDC*1|_lI-|9TeP2`R5>5-pxz8$M81D~NPIJ9U&x20)^~$|A z@|P=~A8YnD_Cc|J!SCz?VK2bfE2=2UB^;MY+f3ZXnAH;#)`8=%Tyv+(5F3;xCwN>K ztM8Lq?Ym+e*E{WG#vyDbR9HVM!#6PZ{_=S#*`BZg?S%}_Ds8Bc8~nP)o;B*M;X;2F_Hk86vk^gjQ3>LP2 zbm+JXm}3tnHuAr+N(?12QH&wR8$LobxO>V<%xIr}y)V!VD$8aZ7yBu|=X0OpoKxI? zUtSrWt4ZA#+E4j#)gA(Gzw|hN&Z}JUuCo!#cc0>&_IHgBYG!pkOZ>?2$^QQ6m^ZDl z=NOd#z};HIYi(S$@tJKPTwGPL^XXMK(BN;36*{8ksmI~KStzS%JRba)kd9BT+M zX0}hfpW^@RE3K+}`u)wZztXo^)#-ZPKgc%tmhJt=$Ai01w1ah#T&2i}qNkrj5fgE-Ug$;RIvZHWU9o`1y%X?(4->Rpq1| z9k^D}_FUcXm-<5=ae5qXp0qJ!`-}X2k5|TJ)@<)-cb49iT(@L?tmm1Q-2Ub<@V@5O ze()>DLbkoBa>&#v2XbE}#UeMK%JcOJH*8-#yws~C($)63iB#oF#PSnI9tXz056SqL z|CePXe9jHaC|Ho=47)e?8^)MCCeE8`U}xO$c=;Xy^F2ZQzVW*7peKzsGLh>=m0&Z` zIsg9dI%?2SJ1-<1C+P-4FT@sjt{6PW3-H?&FcPJG7V%D;%4smX@mp1pJ#HzA zeU{%%kC&f)HQAQ(gZBRH{fXDr_kyxNchh0`HfisQ$J!Ko*si{BF9~+<*DKy~|FdE!J{GC<3%gR^F|2FNZzOuiqXj6PY6=D*lS7^`quxl~4jD4u2Zwwd#mpASH z`orgt+x*_IfWsFz`g9%l$ArYL$7i3Mz%(?345UyL062H!_eS5UhjA@r80_}IU}Bkp zJI7}TRGKhXF*C-?O@O+wL6u|8M1FwTL zX>uzW8tkCpdrU&yI<>aIfGY(UgiSp~&-nslAFF1dvEMO)k@z$>zTbZTM7#6-vq9nu z>+R0(^bQus`S&Trt4gH&cpdYZpP$}Qz)+GW!AokjXvcg#ahDics|zJ52k34zgKpK3 zE7(}nD1f&y!qydajHUYh(H}4tu~ywm0~7zJJVB0`?d)f`11rwD`Tr z+~=#0Z!CJzI6EzsLxgHeneF-q-D~tS!wuR1^Ymw}z1aB8K2C;6uHd9X_f(ouoO~g@ zS;mb?w>4ZOTH2Q^4?8Utz7u}>nQjq8dDiui4c1kljm4w(27^Y6ho{cmY9Bggb@~~) zrO8+;8ffzfB(r0J0h!p4F+9HB_D3Aj+}oHOG1(r=Gz469VEQu;UdKEeZo_u%fyAKsyB6JqQzy>){07qyXjJz&a0RbHR!Lz-ZqBOg> z=Bzak)g}gW41>Oa2h7W?{^tG=teW~d`4e*+I#;_zBdA7P{r-9XD*0np?IhhyLT=-; zoG%T8#Zl>y=#%9eeotONzd_qvt;X>b0g}312Oj`nrg?%x>eUsSIJJ*2pNCC3PRci& z(WleCCNEp^r9Hf79ajE;pc-P17jzZxnf8r}NnDyrm`FM{oJzq*^CULoLi+~Fgg5;? z>?rPAX)Y-f-(>GHAIRWiG-E=tS{fcYUWj?5WCvsc`pd;mB3VFRQZ^I~<)-O8SWr0N z3kTqRoFrHAyT!)Y^u07?=l&KpEBho0F{IdJE5f2FWn{o@R*AOIMHWvalmYiW*882< z{36A(dH!2*fKEz=HGUFdzi;2cqJTvpaTPBJWDem5{0th=9IXQ(4}nA9Eat14EA$OE zMBEF{OGwTDcF|V1Z!|YhdEsA@2cS{HX~NV_TJXjGzF{pF-9%HLpz>PcWD!o41`PdU zGzW|WG7&6pwYbI{VZ__}*Hv=@?qt9cxVVs8HRozobvoc!{&y^#fxe2Q4wyHN9k%Aw z2@*Ej8vK{ELwMYm76h5w`_46O!R{ zDalvF5Q1OIrV`%oE3lt1ru}`<9i_HYh^WXMr;TSq2jH2+x8I;KbA0TSjm$fHLzER? zw#|4%2G}%>=8|?op0GWHd}m1m}bHku`4@odKcr(_B3gC^0BF;e{L~%B+Bu5 zXlp%TqiCVqraayq2a@8C@_{P$A*7pxXbq9{>W-w=z5=4!Az>Ytg)adeWleFSgG!Azh(Fvhwp)umbLK!>6#!?l4gv z0}TWTq5Nyu(6jQVNo;0XdC(5Lu0(5SoMn`CrQV+#xIU&Vf^P5Vg43)w>9KR{hZH^VO3HB$s`j(W8oy!tX~0h%=tp%O!Wi@ zGd8^6ROf$dGO;Fy1UjBz}W1+^l6u?O6%vchjk*Y*}*R;Usx!9EL0J|nl5c|NF~TsU^&|miWj3FK2T-+&Kv`` zQw@?{kkn5{Oq}4f@2vsvkQrs8No(f`9!h+KXZ&1L@lnPU#vHiK%>wpHVZ-{ha0@V6 zr!Ofvm?O6uztBAJ*=&Mr!{5z0u_&H$9r6@_Xs|8K!gD|LxtV-QGM{~l`)Y*V||p3rrQ#4?_xR(K6q=`TFO2b@Ct^ z^z0uvlA1%4H(K_7zPi@OP4-Xy;>u)$q|dWG8rR$xfghL7{St#eukuObhyML9<7M1_ zdZo>64VVqN-NqX8ln1$u@B2U)$y9le8)@%geuK~X>T7U%z*rv+gnk;P#0_{KvIlVq=sT8`{%GLrs>(`J z-Z8GrKQ)>S`j=ErI%uC`i*w&n^#gdQc(Sdz&+_VkAev5?JmB%bvB~&u@^pQomE$|h zu-0D8W$G}VL$!9=QmRAsnRJMouw6cJf6OQK;3;bg_UG_%)8tu3p>5V}nzn)-{Lk$i zd^d2)bSm<9etnuVPwEp6r_Ei@C4@fw-Y-Tq<{Dp$|FX5gXEJ0zeQ&g-KaZuuXpGZp zTua$sda%#O1^THmReQY;OIgBg%|7feIGNw4+&`XM9N(e#|045eJ9Xfn`kl5L+gO2< zzv&S0la6PbhR~^xv7Re(u%#-ixf-WTS)UCy-K#?Uh#|( z(&Rq3=Hd*E>*smmNM&u!8&^O?h^+V8f6wC4`l%J4F4NmW$(yG&21yBH4H zp4LB-m!Evp1d0s1g!EC#o?7SdHC}3h&YAe5CZBBACpq>bAO0kh_mzUY$2i+GJ8JumTj0uW@Z}TLpALYph+HE%3z)$kf*qhec^oLvD)h1|0l2)x4 zuN|8Hq~kX&;rZ3iQLwyDd&&B{{5fUO?1!i!uj)X z?=_%+*G$0C`hVgV*xe(MhQHKw#k4`IU8w`M*}*jWuz@8S&aBu`(KfU5t)3l0J`f=U z&^`eim20Hr=wtRb1llt*4Q0_nHU*pl=V}(2nL<`m2trxFa=c8Obl*?J`zdQ=A`T2> z<_sN5z8lU_bwV{VL@AyA);8yvF|o3&^ghlihkelwo82t4eDy3^GMobmLA4&+wIj>W zyugq}T-RRkME0NiM>o(sQ@}McH3GND5`-+(yDfoW7(yJ`Nu)MH(uhRh6x-DlHRgN8 z$@X2bbub(lQN}0tkT51#B`uh>iaYm(%#AY>)X68_%j-2Vvwd||&5g^YVR|dYP~$zz z$5TjS+*$!2Y$~b*r!cgUh4;Tvnz^#C$HFy6^rjo8<}}z zc~%6@!nu&$+}PN4h3f4FKi^ps;=Lntlt^Ym&P7+%Qz(Z#5bf0j_kGHSuxWc_keay6 z4CeTK@FBAP9oaoop*-KuZ%`UZd*2(6cZQrNqYdoh^OTlF?8Y;)>N3B3#$KO7W<;kd zh{@+f6KU*3|2sp?$biimR{MN<_DEFr0h+E^WqjP9!HvpP{I})GXl{{Sq$~LZ8&9wP z{HH53Lxu5^vUg-CzbL!lG{Etl<(b#c%D=Ciha26o_z@0#WnOgJX=sV@nngvhwK7Y# zr9m4(5IGl{?t5FtMs{h8&*-4dhShqB*=GktXhZM)PF8&pN9T9qHei4(_n;YMevEcF zb0c8c9Kq|I<11Lud|?QW?0{$^v+^RtBV{8}DOrw8Y@2WX&{t(J58Doh#F5GQ&Q!Il zw;+S5q`j$us|_NmYUq`6;`GR(YNj+7@E2?lh6QIU@=R$}0e;)j@x9s#SkVC-rG8VE zQii9rvxy)5J4vyX)QUhp=%glasgG^xHj_s1&>JT~!S{VH$_IkeSKpuWaln80)ORYV2Mq+VUWk z(KrgS`Da#P$_=|#xVYOuMV@z7qV`3LcT|*9j7Pm?%|kQ({iYf3Dh@}dJRn=i3NE?X z00)J_j`4HOB}*}~ix zzNSCAR_f3_*Bh2psX|fZ@a@$qY@@LISNkv+RX2xEw5BYz@}ILB@bZH{RW*HuZ2t~A zey2X!_VPF|fC_wBQOF$U`~90netjh_5VYTiGK1z{aWLLYipBt6t+{gMME@=15O@=r z{eo7@nei`x4e+r-FKzqUDkfo&b-?rrF5h2E&*Y;iya*;d^T+Q*bPPrL($d){<# zDziUtI;fb#mbWUoVF=ZO!H0MW2>^H_E@%mI!EK?hO&h5A_3P`O&=Jnl>$Q@%TvS@Z z^uF=_jVyn!^!rLzXyT^i1KHE&pnJ;|2jRsleM!m4_44<(KHfC!z5?5T%wKstCvbUN65STe_MY>rAWwp_ou*!6>Cgi{iXqxtbFJ4?{{Xz-ZD3<6jw$0E!S>7N~FJ@@ag)RPK0ESEE=a145e4%jvtRdg@i8Rar!&_0yTKo#MTeCXKsKHrhv4)0dn*v{=o0>E`sWcZdj+2&mT<#x zg?(=T#AaM?$}4IAu{Ynp11_=g`S!^;=>-n2#KB}#qr2t7MX>_V5O9T93hWZw$yAE} zGgbkcY1^Tc7=UD)DVWOVby;RE4zkIL)*{k;wAb=+?n6KpW4F(CO6aD%>D)u!$Hc;Bcl{_B6J zCT=;VZJUM7m6e6!P>O|K=BnRLbDnAZZh!kAOQ(weeK@ggow%H~^ zWdN_9mVV{ek~{@}RmNZ!kd?vR55m$sBMFboDoNSmcER%S)3%SD2Cr{q%l=h1hQ*<$ zfccI4@891^6Ot5F^qy;MOan9~{I;{PZ#ez}Sc)d3V*glc-0%tfNXQkpo&HTetu?a1 z?PXa7!w*L8L4=F|TtK70eFdRM3=#Th>lnmkG%MCZUR-oo`dh!ZEH!PGSjvCQ6>-cU z5pOsCj+b0MFDqMyViC=zag`wH2QH7vdHmBtPb?ac`#^RTKSSSfRok)!${u~e_P;K& zH!9AXcr~|yc2@f6)2wg=F|=a*4sS^x0ZvgqhqZ^`=aeG>M7P^3bNO8bYU}Use|Nuo zJ!k2z3gvVVHrTH(ukssutum9lF8sdj^|$+ETLv#lUVzP+6#%Sg7P0_v_BFhfu=Uu2 z`J}~Z_4QiK|AHR~{bBD2G?6UG*pgIiHgOsMd#U4N`x>{+_A6om&{O7{0<-c$R4Esd zPxtR!odU9th&p5RD`au{%O(+X@PDXQoHhw$ZrI;h5%X2{K6ufBjvR)PveNDT_vU5r zi`&U>K_#s62@6(kqaaqg0v|;GSw$Z7Sew4npNPLD?5mXFK?nC8t}xW%Sc2Qoo0rG2 zsM>J+kncl20T3DcpYqjey=kppy`0x7xb0aHt5rRwc$UBiiS^l=uN?Pr0Df`O3CZ`@ zSSz^ob;hZ*)>gRE)_yM5WAadY#_OT?uSZ)+f==yCYZp%&Z-Wk73_pzOj0dBlKsV)b zZm7)z;U@d(xglWLAe7um-=i&GvMq?+^J+Yw7qtVX((J_Dvo0 zr~dDYD^2@6%NFBygyHOe<@3-1yixc~)o7f5q~5deV^&qxh#&+r(>T4aO*ZxRLVsB_ciyVKtFjBo%Q8(0$9AG^47MyNRMFz zvzlny@6!3kB92<)`5wanpO1=tDv#GZWCFi)#o;&$xix9&+`B3%GuJvRnqjYLE9_vk z2L`mz_AeUkqllPAOF~WK65?BdycdzGUaq;8C~+X;va#l#@!=lFZENlKZK6dL8MfNV z2eb0lu}^o%)LfgV{f~^RmLQexPyU~Le+|Cm%AjbMZL^qM8|T&ZVgM;0D4XQ%z(|;6 z6~Cx*#&EB(YSK2_Xx$$6>ZZ=;S6@d_C4;NpW!WKVyG6x$?XY86$d$mZ;4|#GNtv5cGDljOnofJ0o}4~`o3k6L$zmHbDZ2x(R{@c?`u|UX8r2APTF(0W))VJO(B?@jWT^W z)&VQxgW#J=?lx$K_)7Izxj>KRbA(sKW2)ccD?G!$i`4lCk9GQwZ{l0-Bj-P^Py8rp zPlR1S^uP7sRkj$z{6z_5xm~Rey`9iY@4O(uNnFL#mz{hZYgTO>By0Ja z2|z$Akf};*`0-TP#X*nLK6SPG!O#$q<9rNX@NI6HyS|dIb9^-Z+5_;J_MZAFy&CbY z!EaaxN?%XAo=&?Ux`bWIK9-iznbkut*xNU*SL|<;u_u*$a`)SP4bEx6p~`V7voj`= zHcZ%8uVH8SxSf|EQ@IMFx0j=caY*t$`(yjTjLpY)skI371Gz5JqnK& zhwvYe2pc@e$&N+!h}Gq9979?wWtacoNcY>`L$L^kJINwqqq)!aO*%mj{^j!k<*jJx zikR<<_js$ey>{)=E~{RIJJ^R}Gd6n4)U*o-Z)s;3!&m z8`7)1{{gh~P2(-Pb9u89=f1zw7XcV0;&$6ddcBg4${z&Jk=`Y}t}m}%44l0QHn_0X zzrvOSU$cI|y62ATlC1^V&wK>G?(XR;V*2IZO2UkNUDhRhflq3$_~1A2VaCCN4q+d9 z2l;&RKj0PfHW~T`^cFtTi~Mw>cop`bu{?Gf;eGzGHn0}?rNmRj-${;XhZR8f_r0)q zbz2m^P3)6OJ5g)A8uruu-YcGOXQ&!qTFQZj5AAE|SOd(nn8_~{tJvSElJ(M6=lm!} zr~#w<`l>mf#(KZPd5pm^F!|ZW=+q$;8w(7{;GDCqXeB0%7VBr5!|=eTeHep@G~Dx?`tx@i z?{dJ#oa_0MKNWJ}>Hg^Z30`w-^WwhuJJR{*@A5+FZ8w&lWZ#5Is{*5^{LMu@5Wb#t z@89*WuzJ3%dP<@pZq$bit7eZ*tB&y>{T?#Vil6s?o^*&D{Pq{o_qqQM?a8E9J;G)m zY3QfTDT*J8hV6r2ilz&`0X^>nU*eJSMc4XcnSX4Wr*AaewHsV?m|Q zNqMePG+TX3wL@@^?ngWF*ao*V7nJaKW@4oF6Bes4I}g_hJLtWAC*MnhyS~ zG~J0WJoiNN_CXf6`^vVU!!2z z&_InfKHE4d81ke)G51!fA;ygWL+TKbF8|g#oGqEpP#-$_R+1s@KHEknm|(kj!==Nf zHc;%ASF~px_n_*H8!J3h!yUHhjZn-!#14uq(y1{PR2abmEAYmA2)yj1F$A~7q18ZC ziXNYgwzMChAVF90oW-W<{4O?dQE*|K6bDXVTVNw+9xfA$ag&S?qvvakHTRRhFMDS{ z2`~I?MGKf7aF*l6kVkb?uF$vN%U#BnGF7fIZy{ZhGQZ~Ga)ag*?Pvs8f@>c6t-wL; zUQNg)|0Q!X&Cua!*lrf@rC*)wGVFURKh3}Tq3rumSdfe)?Ff81jMieDJt)kwzu*(| zAAHMm&hbla1_u=K5E`}DFHKtI@hyIk`9lh~3zf7;#<-kb#WUOn#+`T}y31gbv9xWU z*fgrdn@YCMo~Krox92KacF08V*g<1MzqRL>#!0`$sN%i7OFZdCX7!i^jn<*)mn&kxk`-fB zIkq9KLLJ)O`akqf$(oWCLL7ggEx?6grb8Bs4Bagx%zcda;gf{3PaclJczT?P91!c{gMB(|9AUa1f#-9L~mfrEy_xq^QQJp z`XNn{Pi^?HnTUpK+$66=589pdP_{!f-bKtIOBpZ5v`lQa`HT`V;m}7tP-DRcA)PeK zkD(25eWs=cBGNUMHJwwquSO@WU=hv_gkO1YKN|-TlVpd_gL}yXOz`ns z)9rTRfXC5zLNpIfp}Jzd&ps~Qx1b}i@x1`FYMi$mMHtz(W|kW%3ZG zUCFuoyA-P?7&O?$JwAASKff0DRedK zUVx{?tPOJxd9gZ93%+sRKohG8yz)i*d(ZrT#X-Y(#xq9j-}vx0+nunprXKCM@9^(( zX5cib+wz^Rw?ISpf3McIKL=aMq{meHT)}^h?<~R3qm1XI=8P7WJlM1V59yIOi0}QZ z4d>)xDKIh2Hbo%jD0CU|i8>sTH{UL$uo1sv8JLsX`pSAo7_FV3D_(#%<)9hBm-(R* zwi$#^jCaa%@&f}vT1>QIb;qm9=JCVoanvqlk@u;M?wc)Zd`PUX>lC${90Y6h83O>k z9aq|uS;V+9Ub4zgtoNDrl}T#OkpKw3>aGH9zJ%O_92HAn60z%w|0R@q z`(O@}CMhJ~TQR!mZ{H8E*DQVMC%ri7&hJU!qVS%vT-8R?9BY%q9@Vr#dVkh%SIH6S zbt}5(_%-OR+3L{Kl-vhxe2Nq0T%^rh8m|TU*Pdi68d8r-7F|00`{u(UGQgSpW1XSl z?`JF_Xr%k}<4RuYbA(;Mx(2YS!yE&)gO^TRbY2Eev5aZ`5nd$WQtjB#gOJ61IHhP# zwm;fr3E->!S!WgNn;^$L+B%7qouI948TOpCaTOe-@z$0zZwcAhtA4k~`^{Fu zzcx@y*^}>raP^78g!&7d=x3aOZpx0LnD3CeK3>;_JT0byDF=>Ai!Y{~$hrXEnU>{) zKJ%Zx5))>2)6sKH&rPW{97&J$>eL zkwyatEjFDIegwh9hMrZGlLpr6Hr_Or@^i>O;@$S_)A%30*Fmh#JAJL;d`}0SVSl5o z_~Dtqg!FelUa;lo&<=G*bY&mswnKEQudhVIXZxgka|$L+E`BP?(PSp!T}ZEg8Ux+f z|2_B4*I3cl?0byn!~OA&md}p%e|jfgtWVV;$9S|7a|Vw6e%nX$U@LXK$Me-=9QhXE zt;ryfe%RM)y-!tIo1bLyGYsT$-k&a(jqUyq_VLlBKEX#)o@DF-4QC(LZht!5_wKf-wMz)!qz_#WBB zGygu>;q88Y{?Ly|Pk?j(qy4>_u^&BfzVa^JRRN#hQ|yNN z&9O&wWQXu4_O#}rkG26{YBAN;>vfKf?bai{bgR05{e4s#3lCo&6LJxWx~$VPpq z!6n1;d{hq5=|YtaPnLg0Mnd^^?;4b z#NY*^iMIB69!>vP-e*0+wz~I?W-;D^17waW=$w27j9W{$KgpG;D^tEv-#)*o_jul2 zUY5)(elco$%4|GOrI7j$i>s&!@vZhO3U>zdyHT9Vp4S&=QkOb~ytCfN$@ovgmzj4F zLGghWuP~rw(AGqKGmI~`9Zoh83*Ks#MUeU5xOz)uML>3;k-35LcN_xv?xbbHVVGoA z5!O;di~7B-ndR#m*{=!P`va%0XNE{rBSqyBFu}}hu|B}g=IL`7FcI8EMmHg*;c;i> zOLU&F@!yaQfnfr{2Z7AOoX5AnUsc)5u1h`{v0|0^En&W@N`j=K63WT|8;{#l(3h`?9bxnR9)sKh4khqSFH7hfv|8Dmuj5uom#=#jDF?W|2 zJ;MX{kE~wzJMXNL7X1QrR>AC+z0(1faO0}SyY1IY4g(Sf$bSAMVwExS&IByU=Vk13 z*3X7x@X?#H9}x^Oeq>^t@{BV$@$WkLvvj^C{M!4)*zG&Z0f&pg+LUh5#31#U3 zY`DGMPjYu<^W+M#?V83#Tr(Rk_&>96j!M->W$Vn|N$sbSmh&385$Ogk_~NN5dj7j8 zi@i=m&zT}|fzhqi`uAaKf)LrmQi0Tvr+K;l-s6bX)0H*f{>%ow?`E zEC$-+r|XET$kI3S~X%$bP}I9P`qDO|w^ z(Xuh3jhQVQSB?8C`I_wkWO{;Ob6rK7>@Yz_CT-nSD&C%n6$8u7m{yy1LH9nEH`!Ff z4z+;0R2A=}(~Bwx+|RDkulM&R;{p#B|GV4&VwoHC4g55|Cf?lL#5mr(LCRQ$qAFzA zIC7-}Iemfs`#Wqb@RHHSKgEcKO=T5ud%s~TxzDpVgj=CCD@u}1+8Y22{b!ktDHb{FkfAYWCA|uJR;<(91pvn8)y$aa)nVlI6?3e%L0`Z`-$FVNHtX*FuId*2i%tDyhkBJar)P{^ z^1mA=@16xRz`JL7S0PMX=4`IKmqBU0(!PeR=LZyCUX3X#QLcrt2Y*ND$IJky(9Z}t z0DjSP{OOfw-Iv%l*7B;NLDpHZ&MWENz78@z_G+dDUx+l9AuFmHD=K!8Pq&A?diJpG z(@=o^uCRS)I`ax&Cap^NZb)SYw;cXFU&%_6!FEZL37M$MxT`CzU;FuY2DReJJ&x~P zZDi|=*T824h_9{HIZzpL`^JgQab8*7*AEJcJ6mLequ=V_Pm(OqePFZ&Au&llyAwkG=XhAq3YhH^s zGF#vczx9<_Ht#1;QQoW6uB7Wwv0r)Ny)9Z5cTw%s zH}GltnlGvhDqOt=RivU~SL1u@NnN;dTeE>1&u(bAOck#xmA+79vEBRxc|*1%S3gO; zw&z!TlYZ+>D_^9~6$fTbjH@4ReHPYW$nY!t-L%7FQd!yRrlFgb))(0)lKkjZj7d+1 zUdaP`CZ+30zk(0m?}!7&nJYzhYmkX&R~CKr=gz{l~}JG2*N2)@|3^`ue+Pxy9TY{)r!XLqQIg{k<=r$X8}@b&POj zX>UhUpZLLsut}`Ofbs7Z-Xp#gW6X@L;R_)KgY49M?tiY|_Akz~gdXoQ64x#B0V7n1 zP5VJ4GdgcCBP!yRZGDxGfN{eg{~~#Fo3p>a!^Vzxmk;jt6|b;4LQMFWt?by8$)S&M zC=r!7s`7KdiP}KrXos!S?K?7)BWtzOjyJGzaoaF)o&wa7GD&pU{jeW3?M+lIPIv?k zDnqI!?3EMRy;k!0=JN$1?R{V1e^fkx9TI;dJ1>$GxIG)Zdp`@CEBJC(7mo2Gma%d2 z^{Q;sN->Ui#Q^HSmp^y6f6os(TSH&ME&=Us{r~H0%loS4?Niwa3MN~Ut8>R2|+(;(73@v#e zK?lV_w=DiebOKsR2ntss+4FjjN=J~R5o@ReyB6mPYvYet$@m32)8f&auJ_tS=~~k?%&&YJ-=amd72lm_Nz%2uUF}Ut`CCdZW_59 z=da+i#2sCTPq==^CXGm-fa*+;-ALjUObD9?z5(pXOeor9*YfJ$NFW8AG7VpB|GMu0 zdqj4n_3vgI;+?yi@!CGtFDFVT5|48k^RbmozsLK1l}x(z|DUyU$jIG)tRR1dEq0MD zl%!%pxVkyzyKJC$9pc&*Qbr}B7)a4w_=~9LRXLt|8#M4*XJsyq&s+GX$nc-f#X7qC=R}WEJ_XxTB_J&Q zm~H1OSMJ&!O7~l}Y$z#J!54G`5*4Sc)iR<`Su5kKR_zJdGQNM~D=H5lhPaZ~%U~&+ zyR9+Z&xH+Rz@=HU*WaklazU0?^)t8Iza#b-YZIaW@f^mURV+}wA=ebHY!~yrubW2T zTWlG8eWwo~Qhq`0rTL2Z)qCq^{fa6K@D+o{cC6rf?{;r`xcA=Ne$y>aI2P7)R4Pwx z`mJx&m(&Hmq4a7SZ8OG^{;OssgIm_RY%jeA`+Kd`_WHQ*(KlOd*Dz@2qV=Av1PvPm z<6T%wq;(;TP0Ci|y$BY*l!Onc|xbs%6 zTf=vy`_RAFSS!P1uUU;WF5W}4WpJ#!77YJ>FlV}pw6!O!Wlw}PfA{qsd*@oLP&zI8?b0E;oi)c1v52__ z8gTxK3SP-~^MZU$d9zwYwomV|KD!7f{=N3ZWFG~z{d*>Uv#?{smfF599bb57ySx{zfEY0Zh5`6OM6iFc(f80d!u&^*Jc^%O+Bnnb{io~eqAwhbn){qs&KcTATVbc{_0rc$y$)L^ z_w`Bbn|wYHRml)GA4c`^_0{($dDY?ecIb$zddxDpCuq^Ohm>O)^O~@Izn}N8_TMEd zvsX-`?*|2~+-rFI`_QitAiF|6*_*&Y%53fW*4Va{;t%NatlUX9AY!O0U50I&XvAV+ z>mWA4f{pp)MSBQyFR5tLk3KYT8S5B8?QU&Y+G z((gt4i%_j`+KiYJaJlz)ylU^;O=Iuyb+(^K?bd#2*AY&?W4%Yl-qRFknzH3#Ksm1a zdM8dg?UcUkwvS%@JcYixtj+hoA)9~s_+PV3n{%=NMKnpM{?mch; zJ6|j5_UO|EeJdp6!u)A}N+OoLBZ z4$R8axH!r0{{DS6+L0V%$RI<^BOrpx^RLdYtRGZ+%;1Wc!j4JMUch%C60u;cwS&R{ zBiKPHB1y*ida&f0kin)>uLOOs#ju^Mv0tf!vY&78*qzS>zH7-H-wX1B-|R+!%i365 zPyhC{8a&X?*VKQke^m0lelDnFIiE4fb^$e|eI2*Wv~=?g_m6A(pU|@lb00d!E9pv; zyZ-zt{VFQG>Z7DAy~t){zXY-NOe7Z-Z8HYH^n<oiI>CSVT#@PubSY>7{YsWv+){n*=nSOwqn42l-bWH*{|e9$p?9I;9Gqi6%M z9u1u*$*;Egam5~)&To;FA!)wb;k>7PxAhKRE7qS^>?xakCNbWHHT?8HUkQU;^Oa#U z()h5)?dz+@4ixLZR_m`*2f*$IFEZVh9USsxjdND8Ux@zqd$BhTv};YrY>YU~2a1!A zrEHg!F&ytmTHr!wCB&JxGtp3Jc?-D!y}qB1{mACb({Py;)Gf&<_g?M&l#qp?GkuM1 zTm;YW+^_NK^bM(RB}sW@74zE5wuch)`I^p6veS@(PlUqv zDjOICLpLPyIe%Hsi-f0f7~2xDQ+S|#F@D-8D>U#G=95n1)8;fg0><3Tnv%v`H8+}c znB+JD0jkV6=W|cW=J+Xx(ixEj4qrtG+M4r4j+{v6bmxKwEEvJ56nFN z^1ydfv zM#6X|Ow-__rqE8wt>SwbZLr=mwo&Yp45#<>vy3eng%550FdX;iZ5T3a#``j4vAUI= zx>CrFDO?2Z2#5ZA9GZyvg5RR`;rRHyeGocedGODkhwI@ozE8OMP&%#I6TGcHbIxdB z+8hTiJqXv?+j+v8EqLPiIm28nzV*30;gK9Rl1UdYl#Ti85I*JTVlf|8IJ$h4B#}!d ztW#5@EG_-VbSTng*2IqyzH=d;Y$P0h%?`A~C;pJ?NTrb4@jkD@&5(&7WuTA)j9WHr zp`kbA*_L44+9ec=P}&4!KF$Pzm7gK$aDta&vqR`T6>auGKCA6@NxlahnU18}U!pY& z$WlCqz~>$_#JkXDJnQ}y|Cw2B(LBZj^(;{-(1y)}x$W~lWTOjoH_048QA=L?2Q3Qi zpI81p;f909MpZD{-z-- ziqjZt6vU+Y(!5gl>A)QTMKX?bQ6_vapwjI<5BwDEy<#{xOQJad1i`QZ=1>dA)CMZ7)7j+-jf=S8EJifQC)3Nog4jmC0e z(t?v^IPB!KaW%b@GF+wE%Qc=p#+qBf#(Av9Q8>W8YPadfxoK=JX5bIn0L3cPD@jS% zEBs#Z|Nj4VB~5YTc>oE6Rf2rLN*E?dA4bBQu_cYi6H&WwaDyN*W(AG4!&Bn0q9m-e z!$T6d4NzRQN&+V(ldzd5#xZ0mV1~J7pz*c(bY9x!{h*5)vv_-p`4R0`gQ<>q9N8Id z`b;|0e7^-eA@9-7`=XY#$=G})GF51HSBE9C;f!Gx4$^-VA=nX(R4K09T%Q%f^^_BU zS>tqdxh*WW8HS*V=+AMXIS-#7o#w z&nM;P%iG9m%KN~X6g&oRm%Lc*e*NwLO+CkwsV2U!OKWrFmYCFC^4_2w)-%x4g*MGm z?hVb_4{Ey%ba}8h))?V_|6a6IzJQP8)PR<_sxi=0kO%i~7yUM4Ccu{!eRn@ohpaB! zs>x4bt`ISL9`MYC-#FaC`qlNNwlQH2i9zkZciBtNf|rHjoK*2HZKca~%7(YO4$^B0 zfKm2QEarvnmor6sM)Lse8N)>e{`z7~+0RLAdrV9F#tQtFGC!%^b}|&u(Y~V{hZ*ld z8zP;e%rZHoek2>%K`5-P%j&J%WIHx8P>|=;PT=&VO^j6UGjD;L)3duS>YyIKZOAH&;*V1U|?HUnM#>S~n#FleIT8ugU zYrOL~j%nA%J?ram+!y}N*bmDw;(ngPTD%6oa?`7X%xFOxWrlTt_A#5ZIQ;|89(}y) zs)QMdD=plPF(bx5;pX${8=?3amEOKmn;3Jo<-E6($s436!MiRalb4_vfroq%D9Lh&UtG4vwWHU{1d84L|I$O74zK_A0TQE})rX4(oe`Vv*8^hk>Pi{!LPn)v6aQlQ~n>Nxgi)X>P{G-s&e?=(^pkZKIP|>@0+Es!g^fC zd-ys>dD!8?v_!Nq?2@D{9v64S`u!7M&F`P=+x!_a^5^pdpK#AHjf_Xccf>USw}R(M zTPJ;XyG7tP=l#`WMbk;q2ke>C#w+|#uqZdhcPgpn6Mt-(e7$( zJjvb}OY8QZN)FZ**PE;~ex}#3VR6tLjt||NK z3jYv?$F+PBZL&5W&vB$oGuCXp4yN?Zp_(MF>pPN=!1m(#vJILrpd^33m%(v_edq>z zz@pOu8`hUMSuA%OAaR-NOF5lGS6sA-;p}ut^MEX;qy^XYmL}Tj6DRPS@hFw8Ftdd1 zS>-g|w@(TZoK#0UPYR;4x7bZ6xD)&887$17p{6xbXd|+;d&XI)n?^30fu^abmcJ z;+fR#WcOekAWL9Y5{rzinN>Oz6tWt;lSV$7)wC^G0`id^<)#cdICQdMOSaEh{W4p! zAiIVyO5*p-+!*-3+We3J%`8LKvvXikN>y7G6S0~3t*RKGOi4P8o>JNPWoDR|#?k99 zS^JEtpD-@7Dlr}(hBmU}X2qe%kil6$4-L?B7zY~yOZ6s%xxeegKJydL5euj%BhEFB zRj|hIQz@ieiArD+#;;dv>J<@aIPoqrwyvDZ^#Es?YvT*P)>#2M{zgW~TlOr2tn0Xi zQbC5*GMp-F*7=^5Hlw*ubUYH}lmhO`8MO6-tS4l^0EYa1t;&2T@w~C3oHBAMLMsDt zE;gsqF48AC=Qu$nOU795#MI^=zSDNl)cl@E~;s3_hNx_Gb$+eHjekJWU$sWTNYd&rAD@|x3F;vm4PfVZdX`l#6s0?WG!@AwI~zotLY$ih@J0V zbXc;}!pZOy`r9iabiOwHgDmmLIz+HYngbAWQj*RNHnb$Gn`LF(!^c0BRg)cn97{Oy zsM5w6lT{?M$IlAy-C2^X8d371XGTwle~bauPvLaDqjK!wAFEBKo3jClWCpm>|0NHP zzCBrVUr|YDAKl3E^b-{^IfE;lmDFFrRgk?`jDEF^KWPW!*==bXN$|jn@R@KIE!*d8 zhPqn$9Qe*Gnz&Fc&6ptw)|aEqYN9f-NsWVSu~$^QgR}FBY8E#eDl*Yo4c;4tV?1PH z1^L2>`nd(y2q_@@OUIFYC(YMe;l`qgc0 zmS;V9!Qt1X|DfkZvO?L1s=r~ksnK`d?px$AHF~k9FWEWhD&62L0(f=6( z9ro%0WS>jgGUhOH7I2)csOV|-37YtI+PNyrE{#fkVz-RM@TE}6H)Uer@YuIn-%WbZ z@DtUGU%w)gWAMMrxCrE4ve^28Lia}{=_50vh8{$9J%Mz!6Lt(nn052i%6%=fERW^&tMd$pQN??v@cR1(S9$wu5M zGB3t>UQs1EGb79DK27-0hptsKdn@pQ1K#Teo`UV}cwoJM`1X>iMs}Get!?&5#biPr zT>SRi`7En9?N8zvixz6Z+t|0GCUtJWVf@>EpMKt}GBBR;9@<|y-;4u^VBdb&S`o9n zXnu$64q67^ZmI~53o)J}OSe}q<3lczLx~C=grl_A4o$%h)I89Q&F1ihT>e!5h)Z47 zJP+SSCAniWUU`1w{!8D9ThQg1ddNl#yFg>Es7wnwM&+`kf`ENh?h8JS@v|>+VD!uN zF9PBC#F(m*ebDPm(k?!-d!zFEyDGHBXbz9YxB;sb8BQS|aoDmB1Y7C}96$l=oR!WW*AKKlY~<=OpP!S|W-7f*@v)b}8&RAv)EHS>~%+eBk!xzc8?pJ2?-9jdmC@ z=#>tmsg&OmaDxm-TsUzX?PcY8R855MZqoWS95{Nfv=w7QWfPjv0Rs#E3m8S^;1~Q^ ztAs*F&i)Ix*HvZs<8k8y$K`g-Ra^*_KC_}R#bG#|T8^22Vc%cWj zR3Zo11BhE4+=cC&`YtNUA>oTxOjW9K=FKhOFl>QWt1c+z7svnD_BecU*-i^GIAm>% z+4cVt_-bOP>{a(Am49L$faz5c-fgX@;3be_0j}+HId<`?e)!O_+d4rXF?YlY zP(jcAx({WLt?Iszr7PloB3c>ekL)cQ*J&I5ZfS9+CFDziVY^QTV5fa5L5rTF+Uel< zKxHeV^15uN15_+{r`}GEb-q#XN)W-UqQo(d;Hy(n5*ZEFD{<#B68B|x&@chp7 z1PhU@QhZ_&N7ns#6^8Xn-e8^gimH>m_6A?+vfIgkN&_A!M}cm7O+KR+bGMW8SY> zjWnpOU=^_l*vX)+kg2gmRmnix^36kh*#&&cQ^>EZ=5odO71dQVY`R*fsj704GSXv- zF58bUc(onn2b`y*C(;S|v?`-U(iOhA?dCp~AKKUIR|=Oq;kMHT#$kXJm7lYUA|3Q} z`De`!mf+Ergh!;Rm>nVn@bFU1Q!MpI+3~JN7iAL1TW6#{;TOh1@Yjk;n1JP~eD_VQtXEK2cr=WV_v>kL#D;Q58zwJYPvW1r-mD9+coq=6_>c*8Buw1=S}aCa+l$ z-d}mY@0Dv^um3bU>DlF_^;_`bHLlvYt>L4<9`(&0R6$Ttfq>TDFPPBU`aF1A^N;n# zpj*Vbc`m3RfO*bMOF2gKaj&dG`boJ94O(;wS}0iK!rDFh2X3+w2rAmGR~swGe~u2w z{Sb(CRLrB|KYd+M0lOID^~@*i>=o-fuTdS5*R=}AmbSPmJuAWQ>OM*KtJwHfzEH*v z3Fh#v+&*5yl~Q$7V&STa9!t>#d7|L(IQyzq$yW*HP9vxc5_*uvvm&O^ED5?ZX-ptVeVg~J(v3yMa*nikCcY2rL3%$1!2d;T6!ZJ6Qi{}ZUwIV?;|NcrD_X#_4*SxL#-Q=IZ z!HPr;LUdZONm$G^?%eN`IP9>Rl}By|+s9h^jA5dh;%Ds7$oH8h%v#k}zFvH2=6cV_ zMwD9PW13c03S(ZFORpq!jeWJlwt!DoC?&a)whq%u#v-G=s2<}oTW_=!T|W(vs;)h6 zFs^wNjx}`ACEc-)0r8_*y^Yrb(ck%fR2Rp4zkj0YY4T;szxX3R7|m79E*+3_rC(0` z1bY|s$_>qGcZ+B;~*>5eC|eZ#>}O`|OI=DOKJ8g}QbL8ZKL1^cdi4Y6W>lW%eDaXjxX8-~yjOAL$Xa_xbc{;;+G1Rn43FrSI6E^_fXNoyckw{CjMtfB#06 z#1~fs)QX#x?0peUO72fg9KJpN`H4zhZ`v0LAFJkUH(LsypSce)ZH5lx+5;ZX4;skd zcdu*>8w&SxjH_1}#-2Fv5wCwaoE)fFKg~VC>TyEI{A-Q1>Clkf-u`MjmFcPW*ytC% zje(0G_VM}DzTtzDc=sn_4X9)boKL=4b00EnGNxnb1TC79FMI%_EzfEoUJO}3&J7g* zfwp?3Tg)A@{U&1q=2fA3@oOG8py#sRhM%%gmUepsvU|$V~s0{gETAHqMK_M~~tD=Se8 ze2WL&AEwmOyIqbkvyB0nBV-q&Po}B#$yG8QRd*FI&4m4zvZVm?u>$27-M=>3?Bds%a}6eHHtWb;NOS0Py`< z&35GTZESPgD#xReZQ%0khZ4EbNdAs<39yBNKNB|U*f>iDR(q||j+*LAE1m=x9ol1^ zCzAf|1ux%oy^{7Z&$AYXeOaxevW2ekU(fiyQjT9r&YS;p_?LYEKlqF}P%+P*u>Em@M?t|ktduQa}lp=q~uu*VKIr&o%XAwR6e6iR;ykwM6#n=#O` zXv>&{q;TIPMDp=NBwetV5o2=W_AwYABN-@Kf-r*#6|v8@E32l;{Qqnp-_1%fP6LhS zIlo(LuPd6_-&01@r>oy*IN5W%PmC=h90WMuS7)eihF>o3&-=IWY6v1WEC}=g)E-2R zc1G~(sgE4TAQh#ozQA2F;;KwFWz2&$_1=$aQ!p^dZbqF92Vey4buu{7N8I$!F9D#x zT_xE6^85d#E&r16!uRvBP+2RSwDJ3#AJ097A@N`;<3y>35qTLS!OMEn{=-BPe8a+5a>~|9r~oXF~@SO<9u>XixPn>%YnV z+r7VBf0OMuI{J_A=`bc_7~(YO$M(LpUq(dFz=-<|FSjx0U-W71^U2_=woDMHn7`l0 zpf|&`oDuEtur4>}hRScSxjE9-jl8lIj<`Jo0VSZp7$ANgn+~ukCi_(nA~I~) zemV1A+8w@2*4mh(@z}J~~a>2yY8Pm3F`o&t0$Y*dhX6kzvP#j%~CSBRgy*Qk8DCaH62U zq-*a#c_=E0q(gu1TOPPbyvJ*2Yaazh5fu%3Y&n3fU^H4VF26gAQIu@kq%vrNeqc zVlfWB(X+{OVRIH$Y+<9S7CMNEA9!QRn9L5icWx{%wP?iq;CpP?(Ks9m`^|}mY3#Z{ zLzqmcwiqgnZ@?4@nX|eJMRv&&5L)l{%H+;tEch9#O7G_ zU=?bu^p7PB&_M8y0-q;!g+R{|8PwcNh<{^j5ck)34cKgy8MGjrxHWY`PPf6h-p0ag z!gR`bv##f)7Q=lXKP_M;Eh_PVl&>7^WKxEjL9t2=mXT2~7L#v&ZT_BduQ3;uOa{{KrTN{hy7_`gA5?K~}SACU!kYEE^|GaK5mT1;o-31O`mX5RY>=yJX~!K$rq+$4$`Vr9N6v9Yg=ODVoH7p zi%|Cj@8qeVOS?%yVz__>;f-xT4IyLvT{}-CZi%5m&xba61F}jc3utyB`HnHGq@A=o zk}p|ql?)Os4JuuzSN{^SD?z^G=08*0MLU|mumDe*mIS2~Un{k_PeO<0yGU#_h$N0h zle9S>vL+HbEL66a-Qm2dztU?pvhGIIWC7bfHXQOZEC+4eLz~sUWq;GIB|;%3Ghi(kDq%NIcZ4D+uwI-#E7YB|8#F zZK#dM)Bft@9Pe23F;mYnofz@L;L{ALtg@BiH4%};IB%~2^Q`e(nEXo2M@+d1fK@7^DtDV}*=KTa{IMT2d>0of5P zMof0P+cd?+wU46K)ETz0v0%@(^|&wW1Q@WNz%l+j%**s_*4aV6pqT7hv@K$7o^@Y_ z45{%L`PH|<$ER&+^3bHeV%G1>I43??x0deHY_Y9vsSN#S^ekQZdbJDu3hCGu1GU;r z$j?Z7hiS3sDCsy~Q5pu49!Vq8#!p8+mL1CfN%Dz3+6Uz)OX?ewNdq*vaizSD#NzCO z>Not|8xiMCA)3%Uh}|BQl65@J-d0`8I^g<$@CV*ieh+#t?Asfu&~w>%;!xyfuk;Zo zug?pxD_PLqy5o%YBlYziZ+vd7@8gk9o0wA@k3N2%>$376_hU8vAe|N_4~cOs_Hnwy%1Z|BuWPu&XEgFaoIGae2oT)}{*7 zK})X0rRkA;FLe7e$>)GluGYjJc(a~wI%+)jjW7Qz|K|7A_cJ}|Gj11iXmJ$1>%p4{ zl!lTatK^x%$2gZf$-*Z;mvl%yoqWh^>xFx?{6N3aW`1Aw-V;wg+ZBcCHTJkYPgrkz zOxIfSU#@RB|C3C<_5JYOp2jGT4ffCTY;S<|n~*)9vN-nbH2y_1#`;v!W-ggrwDEOp z(kxK9`6Ti{qteIU=kX`ndA>{@4FLHz-v83>*YS=d!A*~o@5K6spS#n#3jFQHk0jI5 zo>gf!Wqn>Bb;v=73<@>d`_=AeuJ&vl++bRPj!b`f*ec&(qF?B{)5!CEjOo@cU;kHG z{qP-geQNLNo#!iLCD|yQ{~g=Om+igUdv5=sZ??5$_($z9JF!#JC?DKRUnAc6!tQM> zG#-{Cf8z6g*^PE)@v}LId%HtV&M^$z;x4l$Wl0gP$5U4IQELkj3O9Xhp~4k?2?cFkeaBK4`z{ zi{BIJYu6^-e`syp`S3a3aF@v~ZZpSB&-4A+Hpe`^O|W3YeG|PTKWOJ`)tlUyy8FCC z=&>53mM`V;Vr$RixmP3|%09ly%9Q05d$03ncUcbF zQA$KzaoaC?TI2@bwicZ_(BYW{?TmT)ARj}>u|p@%xpm%@>PrY0anD>a%vR*tPq)+s zcUdaEPv{DPJg~0Mi7w7H&lGWc#6L3;0N^m!7Shg)+wVTQy5{s_*+Foc8qHci;k< ztMOjgW_&xDzGKelCo@FZtYjOC&+ML|E#UYX0jTD< z(PcL!Pr~KA*MHCcch4%8IF4*GEPSv3ph#s1F|Jf{_;d(SWD~+Tk<9?~kB!>RI3Q*3 zRSA$~?IyTCnem z-*_V&JY4t(J+E=c6M- z6pSX&Ll3-b-miXE=_l~uFlJQBfKJ11$b%^_q5+3BSKf>k0el`h^fBJ&>MHDr&)+Lh zTET*J9?Y^zx}GYA)-qLHGQq!>k%p=;B?mY_xB9$Qzsiv#V>hzzbsOgTU(d`~aOC$r zld{Xwl=~`CNu+454kL-{VB^7V6OtU|j} zc1gF%PdFwfO9M64^er zypW*tu=T{6?g6cTqPk;ds0tcPp4`#q%jrC2exS1Sd<^H~6!Cul?|dSA*r7!?R?m0N zq5aiM~D9LF?!YMb)>T%%fLb&s*XWRUJ=;H8Iw6SBes6=0mlXu#FPLIwPM~{*p zAz>H3qtXv5;8nklpQ|znk4HkTJMF~#bZ~4%#meGeNgCt8p$1;L0xsLF$s1C#;`-+k zdRAYW^EReG1f3GrwTO{H3en0kwtKc*rw7YS#?Z-^Pn#8Pqyiua?3{{Ukqx(kBfhB? z8$Nxk|KieWqs`Sk4(M^_R89U0m|ghRvB4I6@h^@JPkq=Ql6)se*j&>wuk6&uGObFYeNxQB~X#?lKCkIEbQ8UpZf{f+H9ZHgI<~L+L-?H+wBK^ z6;EhX;k>Rl^eO4*Yka?cc_opo{uUWxvEdTB;%e7~vTTEut@sCg4?TKaAB&3Chp9E} zx=&?RB)bFPhfG}U;Fk#dW#C5_jax)e85r6?QqL#eh3tZmlSwC1w$`HdkA(m1?gIrb zGNWTuv`bll%JaZIGLN?LUzKsnHg{Z>Y`os{YOLawq|vSvUA=`}0#LA7nF@^x@^ zP+Go^giUL~Z`XgH-7A3|y@~3@5f8g;mJJ)pB(u_+6u%!o_}t%aE2U1wF$Zh02^Y`A zXA<@R`0}Ef-|qXtu0Iv;tiaOz2q7EAtl*+rJQi>{**h=XhmDH(Theo6fYss0BW91P zJae1utTLjuFSIHAYBky>L~@Ur7mRk5i|q8f7N~P za8_|}ZWSS$G@pgOKQvI4MXm>bK3z{kN38eC_;uQFbV3OFFylNU!5u16m#wmez?icA zpR2mWzu*7&%l+EZFRCUo)FBt&4ksjFOdE({X4qWdG=~Zwm#(@J_O!##pgC0L44ZmM zRgOO6xL^@Bl#p+`qVnAV9c?&|MubnV9{c`^hh5{?R@tvFd2{dBG8-g)B8pWii3)v`$p`oOBvFvUQcEm%^a{LgjMh&PYhha?{jUIt1dV?} zA78eU(^dGZ!T+ZM-_o`q+^7fswy>_TmKa3I7RdNs{C;qI=2uk@5C6ZN1}=X+`&MZc z>9bA50948j&-kV!zgK0F9TgO6T>M!Yqx0&~e+l2vvn;Gdf^I8|{PjHS>&vbcs_>T8 z#6v#Vh%-x?0-CnVfx)RdUcR~88y-6LXgPw85|W&?X6wZG3VJX+Pt)tNQMe zrcbldEn*6he4*mq4#Vp^Xf$Qy7oPv?7gZO@c$Qe&c(|HuB-+K5 zG5+BDlH)FK7ANO2&;eCtLIsl`txv=rFImsOhsj2AD(H&V9uO1c`KMi&`zD;{ZWX?; zX90RJB<)M*;W`LFI!P17+0Th@{rqHwt)~hkh^K+hQtzTKE7%iOavV*J~9 zt;F0mw9sE`^-2JAvHj=%`!1X3=x3MFh+}PYx_{;VjIj=> zxeT&CS?#4kh1d>A$rvj3Vm) zAJ8sjCG;t(kI!nvn0MMCVr|Y@P4)e&!HD(gkt6S3S&u8{<)=ui0-obkw_(9^*7PWB zfpu`r7pfQ^xfpXwu7S)KY4S4n==}Q+wv=GgtS3;t%a+@fGQ6)VcN#LOIFCq7GGN}< z-X~9^o!kQx&rJTUp8P6#)7$0hp`)Yr_4V$1;#l8i?3p_>%b0-4r~59~+`eo(1;3c_ zexzQdsM?W&AB|gcP5yJ{&3b|L@zj-7*|u*Sw_zi3UlVqdrn#S4v;{uitX{g_9mgPv zS%Ern@}XD`|By9`G)y5vTK ztnBY6oy(m@{r7I~;^MulEXSu@zy%uM>T&IN9edIPred{!82*9nvS0O8`?@babe*M# z4nMTdu=w)+nTIb1tXkz-vsMuc?P9MxIw{-fP!0#{X(2cKEPMLkFBJUoH8 zN|t^e-=CFhVcX4^4If@%*x9{H`u&=J@hvL5#}k5h(x!^B@NIz0dGVemk3)sOCT`PA zzX$bBU_65)Hu^&=-4f3+1Ngkz7wEDi9iV=`cW4?~ac)~b&EQj}? zufTu%)8n01GCOW|Jsz>rrdOk_Cm)XK-R=Br_C{A{?qjbv+Q&Xo@coPB5A|1i`MGlK zyt>U0a1^`I1U_F8uPHpPOshYR;_-5`W4p?m3E9-4C%zSpfR`H2_9mTKCpReL` zqjBx3Qf$=b%2>mMgNRWaPRue^Cp1^Y?(%nCJ$@xZd!`*Qmyg2m-?8uM&338CjrWuP zcEutvH^!^etOy%0O(x)PDHtF=$1#t5UdtI{{H@gwl%2}gM|TRzcq^Qkb^RA(g$`L1 z^RXwpO@dD%ridb22VMj-tREja06q&GC4Aeq!{N_lN95PVJ;Vg?-im#Xxi2d8`8*GR zSyWZ;5yK!|#J&OOn=9Ay^%<4yaV`nI4D4~(EJYiV@WOZw?P#1O0c~l;wh%+O_E-?w z8*Mq+g}mK#wg52*(OchA0q+~_V{eWOn+WuEVht#G6Z`ncBODykfx(Ug(+ zK4sSD=hOJZ*Kz1vk-Gi<^HXQA96l}+uNdRh&D{Q!t%zmhb1^5m(Z*3L1xChbFG4W z@eoO(8BCPmMUQKj&arH(bOz*;%ZpE(1GFY5%I3oL(%Q!_1aHiXD=}Z!S$Dl`6~vz* z2L}Jc2JBjxADF^E1y%{0r{{3532ZYm*zIP7#7nK+TifPiU|rrX!@t$U-+5uw1Ll+cV}X1mjvpE$8^gm>$_ zjG4##UmV>#ZuS06*|_b`H6^Lj0HC=Mk4$>OGdcc4|98G^&xSHHGTxN&I{4>4r}&@A zEr7#w+j|_YQHXp=#lZbpy?&qDw+pbHi*SRV(?I*u-sG>p^_$Nn-TLM?KA6XRE5pFL z8?klp;lL&W{Bw*GX1HHYjb(6ONfu70wfZmR*!zKDW{ob{iJ9$V*7KTtD#M_=!Mui6 z_w|cT`Y+d%+10T8pRO;oaT|BzcXGy5J1jybGat_9yt!wYE<+Qu48)ykQiZYOM)QCv z8&9|XZmb!!u!(lG9VATS-h?U!eTR9IL%CV5zfycR?loOxx94+?mZ330LIS4gn+_n+ zuc1G`>6NJ?&pU(vik9uMJ8CT3?EEIZ?;%^~57W7Tp7~}o`kR_`$utK3#fB+tE}Zbb z*(%T#0iPS+i)O$m;dard^~LfULoA|DK;XPH7KGWEY&1=LhEL7+3O9Av@B1M!(!nG+ zyPRh{YwHs{&&e?IeJdEZ>pb>A-=H;p)?2U%&tqA^P8!TAxKh3Dy*msaWG^-{OqrU$ zV+~;sn#5+H9kkWORmx0Ueu&kIz61VCwez7$+7?{V2V=4gxNGV)A@rm}8FRy3vSiaf zQLBKw@UP?jUa`n(oNIm8A*y*$jQzDBfrOJJZ}f#QrHXxQ7v5>gc=B!B)d$Um=GgdJ z#-H?#(-`p{s;5G3-{Ol3$xP3xX`-8>}pQ>N_>*cPai6u z*H%$Z>0VZtjqmjUHDS{D$I&{1T}>8i(GrWQ5)2}ckDvnwf|#F#ml7Q;11Sinmhza# zhq0jYrp@sW`FF$Jr1x_`Xl#bTbAUPEq9Uy@g^27B^@gGyLifFpVc8)?n6Zipk^H%=5*K!jjQ~{f(gWu=%B}x>k^3#sGS5v>8kv{4q1F;o=|ps$7#n@*?oYGkUTE_ z;ze#v+uQ9GB|hFYKa=DQjHgVYfL|tZfG!-iVDOdi`!gW|^$*xfF_)X}%r;8aD9fyP z{boU$v}ZiC>rPo-eoooxRe00KY?v_FBB{68wuk%(8CN=@;LU^TziZMR6hVRxI1t~^ zVBxgnp_23ODj7|2FqO{IO&(h4;hfgs*GL%A4j!=hn6j79ntulE%ns{D|s}_blIhB=t1JfCS zN!bb*uMrKKRGb!Y#Q|`Z1!B^D9uvtmK*+^vM`@gHi%8KxPAHm2KUtMk8V=A0>;GoQ z#%={qE{bW94kSMihnO!v+82In{z-ODB9fz}u@d>E%+D`I@|#8hT$fIuac)c4`nmIe6XU^SBu41xCTHEx>x=y^ZmsNuXubADYIB24gzyr+NhEZDodVkAL^o154neoR?yB#60vGqSZ9 zj`bMg8b}V);=nR+G=zvnABiLQWJDjp&y0oiPU_i3$r8GKBf_y8W!uwg9Ecs{^IO^` zf4qRrY%|u1>S;Wt_)&P^NfWfjfwN?KvwNiV55AfDfG_qD8XTgdY3HTvp#MsQYE2>j zIO=tmtm=K6z;5ce9LUe{)zF&G*RV30K9;l%86Rk;;wDnG7xZn>M%ga~Lxy+RqTIaQ z=6I7IVSn&DK5uMBt#@ZT`any!e)2sNR8&o20(~um-i7soG+PU8l`OIjD-q&$x>RrX z&-2@aV{EWVVSCksavLN2y=sGA+wud)^Dnf z7r9TC4U>PV0hw^%cJYk1`xx$ee7ER;?-1Bw!{#qzTr7L2->0ivoXGM*G>YJX}ice&;QW>vj!!)9wLxU)ssd*fO47!e{`H+~9DeV=UTAOKWbVB`@AJ?4mVKT-@uS3^^Rur@?3Ro) z`-9IA39V8-4ZA?T==<7#;*4{%iRQjW8MGyceHCBMe##a`{9+}49)6cQ3>ZF`F(_&3 z3{CkVk8*1kZ~5ExN15?>b=$5(^xm%NGwpnnFVsM@dyA&Jy?d8?Y4ffN7XsgXVb@525_ZQjrx9bMuZ|(Zc+xy@8 zGio2S$#IdC&0pFo`gYtfjj{gvHvT^Dh!sR59Oo(BvqVQnI{ZD!pV8-f)E(?!{mCwt zhq0%PIqv!6BT0fi+ekMUeCeP4Vlj%bYphx3-b?VuR)fQtt^MK=z-Zr+LkRV= zZt&=1ueq1}aooDx>@-yGlw9y{QhP1g*VJ{F4`R1?M>gz&n(VvM7d!_1{S8N~cfZ-& z>7Vm6^r6~m))P6@e7SA*L2ym}YIk+W;pvZ(y{?hmI@bi@=d|{tA*DFnu32f0-Bh zSTO-@`0r8;ZPoiYfM2-R?%zg#%^%U}4Yv=x9PGe^wLB7-Y=c@e(YP?xF>yz^jHQzi@%L*2aJ>F!f;sU(0Z)3 zsXnxM?=KpubHM>JnN$OW5x`+X2rglX`nJ+>_<4@)HDqIrK<^59V2o=?UTD2&ML6-lyS+LVCRhq z>vdniLEA=*cmj%C4b{q_V+nH!n4K9|sZFf~SFfTfRDBG{*&+`FjI1QcwAiOsC+2a@ z1GLE0i1E&o@RBFxM+P4v{%b5ah=g&yG%}9obK0dXnu#oip2hD|0&rDE8w*1#CLk%i zHwOYGvmkKB)D#wZihYeuq4oQfnfsiO|MZg149__SuROyW3rP^IUbQVjn$=D#g9QtR z{Uswu4WrZlw!VlxS$<|;`ju7Pq`fft*}#9JMerqVzcZ6#n4(SSP#~bJ*tm~_Vxyu5 zdnqhvA$TRKKCRaia74ZcJt#7}9h@$D+QZrKthXyF3q)3h7>fmrxEZdXdFB&YU4a8+ zl&Px6J+o|PoQg~>_UTzVWf<7GsTG+pUe60d&1ky*4w?9RQT7F)Kr|~8Ddm@C%w9x)d59;fBydK>lr<+)D`%4gfGo#!aJEVjU+;aQ{h9T4N4BvX z-X`ZgXg6i)swz;G5$ct=W1M`eR6DQzmxH_DznN`skLQE^0H(Yf+lEx+A?`yD1JZobI9nV2eFpb_L^^2 zh)y1@ir5EcVK-ac`}~A{-aj7D#lhc`iA|#tZqQt0)<*_@QAs)GUx9nfw!UMr1-24+ zvnqvk6BHE#k%g_vDuKzmL+`z*ja?gttqjLA&Uj`=#oJ@!Mn4fb%IYkb_0fY_DV7XN z1OJN$nG`yCWL~{CJDT^c1B^VE@7-GqNMJFARCS5cs{agMxOoDtARgScKaf*>7L5utD~ydeu>u0#_B( z;~f&8LU-^IKX3#Yn^o1qw^CFc-XEfSgzKCi&zJoPdMthstt_IMr86o6Arqp5r3coW z4%KNgf*_~*j=d{jc2)2qIGhUA+iDEw4@;iImgK97>8X0#{8G)>K?dETdYWfn{G`qH z3EM0)yh+jCfs6V=tXFIG4SrcQP_#dQkvRf~K#&FL+#IJ{7mttN3?yJfHWl_Lj2HiXQ18A)i9HDl(jkTZ(Eo zRz8n;cF$|fmkzpMcJz75V5>^LL06}W@TJFsN7x5?D-OB9*79eLUOWd#WBf5@->49J z-u{opZZw=+8`f?IZ!Pp?T(v zs6Y0xMfI1EJMyuDN7^+PY~B7y+b?uxR-k)ntD*=%odCW$>^B`&M@ILHUr~kDQM!u% zk4})o`$&ukk%E;@--CHF8U(*~6A(RcDYrC^D8)HSx>S0y1`5%=*}fDvD7 z$PPoXg6;q_37h;AS*zbvfe7(h_aUJ7taOxUJ3yA}JJBYRchw=t%2>{o z4J`CQl#Tj#43QB%WF=>}#<;G3PsVj!C1V4^pU-c9>e3xn6@4<97&06qD?RxFm{-Ey zq!RA{N2sV9-|_w{_y(1?K?ilR2(DYxe;rxHIj%Ut^leP54vpLE^}ZnuS$%7 zc`4aK0+~Si0{2rlKu_u_U+RMKt86=`f2Rqr!d*J#iZNVsxT@?5dtA`2vQCR8VSqx9LoObF4*DtQZ$&c_ zo3cQMW?5-ADa4gX`Xm;5NZ;WLyjQj_#GkGMRJ6sq95xqzxq|fJ=VR}BMS94J#{NBle2YcGE|`m%uEu^q{Nfn5oH zJ#%>XN}B~^*sf8%O{;Qg@;hzrKI5Xzk~`i-RaaF>U3TpK57}JDX4!2`E%kPcC)bfh z>b{je0bja(wz`aeDPh{O;;zTjE}C%P$k#OF*ymT%?^Ur&TnfEX%{5;SG=Xu|d$jp; z_p0uY`9EBd%h^N_Z$31sT5^&OkZ1KYz$oanvfS^4W8>kFp&qZXlhIwnuRQ#XzO>5& z=0D~ke*}9tELa*c$YmgWg^b$-Z5}_D4i%FH;xNLR9V!Uq8hCA3av2;|piuoYVil-J zn^o5WkL@6txc!b8eCa#3C&LCgzLcD*7J!XP`9`0g-}K%!j{lv{<3At0>@tJ-_`p2Z zYbpnI4n?U*w5@tD;x0sQHOl{=6{u&#ZDduBu$ye@~ej)lN&cJh$T$lcJ;C)bRXh z`5lt&LS~+(3^8QL>_vQS$@8b`qn4i$FW;&=A%1tqDeadc`M!g1PbJJ*Y1#T7pB6vA z)|nn)oriACZk2SZYH+V)i|UM5tWibU{)DR?R8<4qJ+?trV%EF$2O4;d>ZMs>>)rQ7 z8S81${K4PX+?QsF!w%cIkLx56)T*47)nX9Cf8w{$G5Q7eLih2>>*gW$e0)dt-m8ss z1#s5&$A10no9)MA%c?HTZU-3MPF1oyY8|G-KH0^p`tsBKV&FwHpaICf^;}U8cDb!? zW8Dgh=w0qGA7uq>lK-%g@Z1WW!c`2hpNe4&e}(r=q(A<`-nfcIS|~#cA0!$RP8jC= z`ffH1#tT_|t^KDj1&~VE2|{~RALRD!3Ll?;-$HVb_z(Wci}>4N_Ta z{dN$ZWFllC_JQ52FV?5yXSA#Szcuu{+tHdh)!q;_EC*R_&yf(0UbRoLWJs?rT6Rgu zNG#YCFdPSL3&0jh_*$zp-R$C!ZMf4vl8{Ng?|6@ z&-qLnXg%+-D;v+>|5)uMZ+6`--nlN13D)=AGsn0fI0M%%zx(g$y9W&09>dQkWGBW= zdw|(KPMilWoZ)gGqdIV!Z{w9B$sVP(FX(9>S5!BC@H72yhk1)BGOS}dRb@54^PctU zPFiB)z=_bCSveE2Kr6fS>0&z`pJwpM^!9tgHtZ+BJmXi)pUNb9JhKD$ef)rTx5cz* ziYw1D4Q7l#Y$Tpjv8N^dv#f>wpqVF3bHDJl?@#WwRninXqPVrg{3RSCnEi1i_QQwo@akd+6-Q`4|^N04@@HO{OrjNw?8+ra@AM!Q# z3Fmym7t0EnB!{G7p$;l)!gU|JMZ=bIxfInFMcNsO6Z`vA+~)9n*h$#uc-WlUt^J11 z_msa^@E7dyk|V*duSH2}uQ9-8t33js0qpUNfgN9Dt=cng>91<`30N}BCoYZl5wOju zBzy2(NDj`}d+G&&?uz{yD{P_97*FVN^x^m^y(na>9o&yt1pbCy%=g_N^@UyE`-DB` zv}bzz+%NcDWAeS>pBRUw{Bd6MJyO13()YNcuY`#@KF_U)cS3)2g>@zVg`EYqShsi& zU_-G@A$=zzZA~L+ui3X|c{U{XylLNqo3V<81Nb!tQTAisGX3-G`T<|Y9&+FS`n^8#ej34*QaYM*X5|w}tFx+h6hA>ydZF=CR)O9x=h!yDDTiAMK0{ za4i0Mjq^jecF+g-Ijek2$vw7zA&;XM%r0$Nruo8ygq(F$OP^|i8LK&f{f>Gx_}{^>LT84kO-WE6Z9;5yEJ zL;#!PO`v(kAuuw>^1csDpT7^}>rf)Ruor)nksE(Jz`+@b+MGnjDin&GfeQzw8$24- zgIs~MIq`E8m^pW8u`qoYeKz2DOn7JBdz|kuy02>X#q54|?t^ z4vd^my&DFFYZ(lJahHL^eOEU%zgy5u%9xvTD<*PrA`tqexl=GHDUlqC72SSw_UHH* zX6ziQ4yK>D8|}i$d+hJqI3Dij=lHz|Kuk91TKR=gOmi-(_f}KzoGz5MSabyaP0@`e|=v5B7z@f#~Oms)B*H}3;Fh-KW_@f1!{VUO>8R>0oHlug#zF5XMdXi_nD8gf!__)zM!C*hy1u^L0 z11#*+VraiAi}siCr>K3#d5%*8Pa^k9jY7QP0!#p6AzUm9aHcVSz0*3?TiZEKiT0#q zbmCc`-s5@De4xt-7tj=Q98%qi=of|?{F!6fkXdERnAwe9j27pTzG*(`5S|gn|Ie67 zKga*3J&X5PH{%}oc#Xb9I!$+#+4(`5UXvJG-_UZGJ*;<0&gG2iVjILnzN$i%j=fr# zwyb)jM7Pbpe2{~aj$rFF91~wj=y0aP)~?Y&g{xVR+kJ(CI#AYTO#L6nDc%J#5QFab+MIaZ4 zc%^VtmY>S>p#dje>_cDRYoONqFA$yIhz7D%tKNWTe|-~Nx}KA!$EA7 zX%FqT_9bOo9-C2)u~UJ*R|1BAE#2=;8*RH^Rh4e zNwO%2@6g8T)iFEDa@zaXH-;?p!cjm_JDj%&2cqwt@Fk zCO+Ya^>F+n0iyIn$HpSe(+qz^v$2q!Gy)qtDHyV_`s+B5W*0E=LWWqP;Xwu{{h|Gd zCfkiASuFVCe^+8Z=%45fUmzbOIO6u}iKM7HeK*PjAwR{%JbmJ%kUI z7k=02KNGGh$w#TpF%lcK8$S)XRXi0IY!Dg8XMDl$)nHN0klqN~99oTibgXmo8G&EB zJDjh+NXYa#s?}HzFEQS8TwF0ia~$QX68~Sn@!